Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running on Sun Solaris system.

I would like to know the following

  1. How to find the HDs associated with a mountpoint?
  2. How to find all available HDs (those which are used as well as unused for the mountpoint)?
  3. How can I find the IO controllers' usage for the HDs associated with a mountpoint? I am trying to find out if the IO controllers for the HDs associated with the mountpoints are handling too many requests forcing some other requests to wait.
  4. How can I find the free space available on each available disk?
share|improve this question
Abhinav, is it Solaris9 or Solaris10?. Are you using ZFS or MD for managing the hdds? if ZFS, zpool command should show you the status and space available under the pool. pool = collection of disks managed under single hood to show a total logical space. – Nikhil Mulley Dec 1 '11 at 6:00

to find a list of the mount points, and which disks are used from each:

look at /etc/vfstab - this file shows what file systems are configured on the system, including which disks are used at which mount points. This file is not used for ZFS filesystems.

# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/dsk/c1t0d0s0       /dev/rdsk/c1t0d0s0      /       ufs     1       no      -
/dev/dsk/c1t1d0s0       /dev/rdsk/c1t1d0s0      /jumpserver     ufs     1       yes     -
/devices        -       /devices        devfs   -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
#/jumpserver/install/SunOS/5.10/i386/u4/boot - /tftpboot/I86PC.Solaris_10-4 lofs - yes ro
#/jumpserver/install/SunOS/5.10/i386/u7/boot - /tftpboot/I86PC.Solaris_10-7 lofs - yes ro
/jumpserver/install/SunOS/5.10/i386/u9/boot - /tftpboot/I86PC.Solaris_10-9 lofs - yes ro
/jumpserver/install/SunOS/5.10/i386/u7/boot - /tftpboot/I86PC.Solaris_10-10 lofs - yes ro

run the command zpool status - this command will print a list of any zpools configured and imported on the system, and lists which disks are used in each pool, and what the configuration of the pool is, as far as being mirrored, or raidz, etc.

# zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c0t0d0s0  ONLINE       0     0     0
            c0t1d0s0  ONLINE       0     0     0

errors: No known data errors

run the command mount -p - this will show your a vfstab-style listing of any filesystems that are mounted on the server. The importance of this, is it can identify filesystems that were mounted, but never added to /etc/vfstab, or changes to mounts that were not made persistent.

# mount -p
/dev/dsk/c1t0d0s0 - / ufs - no rw,intr,largefiles,logging,xattr,onerror=panic
/devices - /devices devfs - no 
ctfs - /system/contract ctfs - no 
proc - /proc proc - no 
mnttab - /etc/mnttab mntfs - no 
swap - /etc/svc/volatile tmpfs - no xattr
objfs - /system/object objfs - no 
/usr/lib/libc/libc_hwcap1.so.1 - /lib/libc.so.1 lofs - no 
fd - /dev/fd fd - no rw
swap - /tmp tmpfs - no xattr
swap - /var/run tmpfs - no xattr
/dev/dsk/c1t1d0s0 - /jumpserver ufs - no rw,intr,largefiles,logging,xattr,onerror=panic
/hgfs - /hgfs vmhgfs - no 
/dev/lofi/1 - /mnt/s10u9x86 hsfs - no ro,noglobal,maplcase,rr,traildot
/dev/lofi/2 - /mnt/s10u9x86ccd hsfs - no ro,noglobal,maplcase,rr,traildot
/dev/lofi/3 - /mnt/s10u9 hsfs - no ro,noglobal,maplcase,rr,traildot
/jumpserver/install/SunOS/5.10/i386/u7/boot - /tftpboot/I86PC.Solaris_10-10 lofs - no ro

run the command cfgadm -al - this will provide you with a list of all the controllers on the system, along with all the devices connected to those controllers.

# cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 disk         connected    configured   unknown
c1::dsk/c1t1d0                 disk         connected    configured   unknown

run the command format - to see details of all the disks installed in a system, which are not provided by cfgadm -al. In particular, you'll want to note the sub-commands verify and inquiry.

# format
Searching for disks...done

       0. c0t0d0 <DEFAULT cyl 60797 alt 2 hd 255 sec 252>
       1. c0t1d0 <DEFAULT cyl 60797 alt 2 hd 255 sec 252>
       2. c0t2d0 <DEFAULT cyl 60797 alt 2 hd 255 sec 252>
       3. c0t3d0 <DEFAULT cyl 60478 alt 2 hd 255 sec 252>
Specify disk (enter its number): 

For example, select disk 0 in the menu above, and run inquiry:

format> inquiry
Vendor:   ATA     
Product:  Hitachi HUA72202
Revision: A3HA

and verify:

format> verify

Primary label contents:

Volume name = <        >
ascii name  = <DEFAULT cyl 60797 alt 2 hd 255 sec 252>
pcyl        = 60799
ncyl        = 60797
acyl        =    2
bcyl        =    0
nhead       =  255
nsect       =  252
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       1 - 60796        1.82TB    (60796/0/0) 3906750960
  1 unassigned    wm       0                0         (0/0/0)              0
  2     backup    wm       0 - 60796        1.82TB    (60797/0/0) 3906815220
  3 unassigned    wm       0                0         (0/0/0)              0
  4 unassigned    wm       0                0         (0/0/0)              0
  5 unassigned    wm       0                0         (0/0/0)              0
  6 unassigned    wm       0                0         (0/0/0)              0
  7 unassigned    wm       0                0         (0/0/0)              0
  8       boot    wu       0 -     0       31.38MB    (1/0/0)          64260
  9 unassigned    wm       0                0         (0/0/0)              0

now you have the make and model, and the partition table. from this, combined with the information gleaned in previous commands, you can put together a map of available disks/partitions (called slices in solaris), and their corresponding filesystem (if any). You'll also know which slices are unused (free space).

As for which disks are busy, that's what the command iostat is for:

# iostat -zxnM 5
                extended device statistics              
r/s    w/s   Mr/s   Mw/s wait actv wsvc_t asvc_t  %w  %b device
0.0   29.3    0.0    0.5  0.0  2.2    0.0   76.7   0  33 c8t0d0
0.0   29.3    0.0    0.5  0.0  2.2    0.0   73.9   0  32 c8t1d0


r/s - Reads per second
w/s - Writes per second
Mr/s - Mbytes read per second
Mw/s - Mbytes written per second
wait - Average number of transactions that are waiting for service (queue length)
actv - Average number of transactions that are actively being serviced
svc_t - Average service time, in milliseconds
%w - Percentage of time that the queue is not empty

Once you know what lives on which disks, you can start to nail down which application is causing the I/O, and from there, dig down into the reasons.

Search Google for solaris iostat brendan gregg and you'll find some good information on investigating I/O issues, including links to the K9Toolkit and DTraceToolkit, which are for Solaris < 10, and Solaris 10+, respectively, and which can really simplify investigating I/O issues.

share|improve this answer

Does iostat -En give you what are the hdds available and being used for you?

df -h /path/to/mountpoint/. usually prints everything you are looking for, it prints the harddisk/device that is being used under the mountpoint and as well gives the amount of freespace/freeblocks available under the hood.

share|improve this answer
df on the mountpoint would give the amount of free space available on the mountpoint/filesystem but not the total harddisk. Use tools like fdisk to find out the total disk space available on single disk. – Nikhil Mulley Dec 1 '11 at 6:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.