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

Hi,

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.


Thanks
ebi168Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

df -ak
0
ebi168Author Commented:
Is it possible to know for example, c1t2d0/datadg02 and its corresponding filesystems. Instead of the whole big volume and associated filesystems.
0
PsiCopCommented:
Hmmmm....can you clarify what you mean when you say "filesystems"? I think of a "filesystem" as a disk slice that can be mounted.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

wesly_chenCommented:
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.

Regards,

Wesly
0
yuzhCommented:
You can use "vxdiskad" utility to list your disks, see:
http://www.adminschoice.com/docs/vxvm.htm

df -ak will show you the filesystem (mount points), a file system could be a slice inside
a disk or mutiple disk (disk array!).
0
kawinCommented:
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.

Kawin.
0
mdhmiCommented:

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

Mark
0
NukfrorCommented:
Assuming no volume management (and as already recommended):

df
mount

will show disk to file system mapping.

Assuming SVM is being used:

metastat

Assuming VxVM is being used:

vxprint

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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.