One nifty feature that recently made it’s appearance in Solaris 10 is device in use checking. This feature is implemented by the libdiskmgt.so.1 shared library, and allows utiltiies to see if a device is being used, and what it is being used for. This is really neat, and I love the fact that format now prints what each partition on an active device is being used for:
$ format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@11,1/ide@0/cmdk@0,0
1. c1d0
/pci@0,0/pci-ide@11,1/ide@1/cmdk@0,0
Specify disk (enter its number): 0
selecting c0d0
Controller working list found
[disk formatted, defect list found]
/dev/dsk/c0d0s0 is part of SVM volume stripe:d10. Please see metaclear(1M).
/dev/dsk/c0d0s1 is part of SVM volume stripe:d30. Please see metaclear(1M).
/dev/dsk/c0d0s3 is part of SVM volume stripe:d20. Please see metaclear(1M).
/dev/dsk/c0d0s4 is part of active ZFS pool home. Please see zpool(1M).
/dev/dsk/c0d0s7 contains an SVM mdb. Please see metadb(1M).
I digs me some Solaris!