[Webinar] Streamline your web hosting managementRegister Today


Solaris/Veritas command to list disks/devices with corresponding file systems

Posted on 2004-10-21
Medium Priority
Last Modified: 2013-12-21

Does anyone know the command to know which disk is on what filesystem?

Also is there a solaris or veritas command to show the device/disk name with associated disk slot number on the server.

Question by:ebi168
LVL 34

Expert Comment

ID: 12371675
"Does anyone know the command to know which disk is on what filesystem? "

df -ak

Author Comment

ID: 12371742
Is it possible to know for example, c1t2d0/datadg02 and its corresponding filesystems. Instead of the whole big volume and associated filesystems.
LVL 34

Expert Comment

ID: 12372022
Hmmmm....can you clarify what you mean when you say "filesystems"? I think of a "filesystem" as a disk slice that can be mounted.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

LVL 38

Assisted Solution

wesly_chen earned 120 total points
ID: 12376163
Hi ebi168,

    As it shows:
/dev/dsk/c1t2d0/datadg02 (this is filesystem)
   It means that you use veritas volume manager.

   As volume manager, you can see only which disk group associated with the mount point by using "df" command.
You need to use the command or utilities come with Veritas volume manager.

   If you want to see the filesystem type, then
# mount
   command will show the mount point with the filesystem type.


LVL 38

Assisted Solution

yuzh earned 160 total points
ID: 12376963
You can use "vxdiskad" utility to list your disks, see:

df -ak will show you the filesystem (mount points), a file system could be a slice inside
a disk or mutiple disk (disk array!).

Assisted Solution

kawin earned 320 total points
ID: 12378712
In case of file system does not mount and you have no idea where this is mounted to. The only solution that I known is run "fsck"  on those file system, it's will tell you "last mount" of that volume.

If you do mount to somewhere else before this, the information will gone forever.

It's is the easy way to prevent this think happend by put some text files in your partition or volume aka "volume.info" or something else. Put the volume name and the mount point in that text files. Later when you found this situation you can solved it by open that files. That's it.

For second question about the disk slot. If disk is on internal disk you can use "/usr/platform/sun4u/sbin/prtdiag" to show you disk slot BUT THIS WILL WORK WITH SOME HARDWARE ONLY. And from devices path of disk can guild you how it's connect to hosts but it long stories... you need some basic knownledge on SUN Hardware and how Solaris logical devices refer to physical devices.

For shot cut you can "ls -l /dev/dsk/c0t0d0s2" it's will shown you "/pseudo/....../sbus@.../.../sd@..." I think you can asked your Sun Services guy for full detail or you can search in "http://docs.sun.com" for more detail.


Expert Comment

ID: 12388867

Depending on your setup you may need to use a combination of df and format.

LVL 10

Accepted Solution

Nukfror earned 400 total points
ID: 12393832
Assuming no volume management (and as already recommended):


will show disk to file system mapping.

Assuming SVM is being used:


Assuming VxVM is being used:


In both cases of volume manager (SVM or VxVM), the specific disks associated with a metadevice or volume has to be determine from the metastat or vxprint command by looking at the output.  Generally when volume management gets involved, it will usually mean that at a minimum two disks are associated with any metadevice or volume and therefore two disks for the file system under LVM control.  

There generally won't be a one-to-one mapping of disk to file system as I think you hoping for - of course, you could do a one-to-one mapping if you really wanted to configure it that way but generally this is not the case.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question