Solved

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

Posted on 2004-10-21
1,472 Views
Last Modified: 2013-12-21
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
0
Question by:ebi168
    8 Comments
     
    LVL 34

    Expert Comment

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

    df -ak
    0
     

    Author Comment

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

    Expert Comment

    by:PsiCop
    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
     
    LVL 38

    Assisted Solution

    by:wesly_chen
    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
     
    LVL 38

    Assisted Solution

    by:yuzh
    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
     
    LVL 1

    Assisted Solution

    by:kawin
    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
     
    LVL 1

    Expert Comment

    by:mdhmi

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

    Mark
    0
     
    LVL 10

    Accepted Solution

    by:
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now