Locating physical disk drives in Solaris

On “enterprise” Sun hardware, you can do nifty tricks like blink LED lights on disks to identify where logical disk names like c8t2d0 resides as Matty pointed out in the blog post here.

But what if you’re stuck on crufty (cheaper) regular SATA drives without the sexy LED support? How do you find c8t2d0 amongst a ton of other disks? Using cfgadm -alv, you can print out the serial number of the drive. The serial number of the drive is usually printed on the external area that is viable (hopefully) or on top of the disk itself. Then, you can go SN hunting amongst all the other disk in your array. Niiice!


$ cfgadm -alv
Ap_Id                          Receptacle   Occupant     Condition  Information
When         Type         Busy     Phys_Id
sata1/0::dsk/c8t0d0            connected    configured   ok         Mod: WDC WD800JD-75HKA1 FRev: 14.03G14 SN: WD-WMAJ95141282
unavailable  disk         n        /devices/pci@0,0/pci108e,534a@7:0
sata1/1::dsk/c8t1d0            connected    configured   ok         Mod: ST31000528AS FRev: CC37 SN: 9VP21P37
unavailable  disk         n        /devices/pci@0,0/pci108e,534a@7:1
sata2/0::dsk/c3t0d0            connected    configured   ok         Mod: WDC WD10EARS-00Z5B1 FRev: 80.00A80 SN: WD-WMAVU1311029
...
...
......

Update: iostat -En also shows this serial number info as well. I often use iostat -En to check for transport errors and it didn’t dawn on me to look for SN info here. Thanks Mark!


$ iostat -En
c8t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: ATA      Product: WDC WD800JD-75HK Revision: 3G14 Serial No:  
Size: 80.00GB 
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 9 Predictive Failure Analysis: 0 
...
......

7 Comments

Steve  on July 13th, 2010

There’s another way. Kick off a dd if=/dev/dsk/cXtXdXs2 of=/dev/null bs=10240 and look for the activity light that’s furiously flashing away.

MarkG  on July 13th, 2010

I usually use iostat -En

troy  on November 6th, 2010

First, absolutely great blog. For Solaris running on Sun hardware, you can also check out the sunsolve doc “Solaris [TM] Operating System: Matrix of Recognized Device Paths’, article ID 1005907.1″ The doc breaks down the paths of devices under /devices to identify the physical entity for both sparc and x86 hardware. If it can be of use to anyone, I’ve written a utility (ioDev) to specifically decode said device paths for quite a few of the server models listed in the above doc. It is available at “http://troysunix.blogspot.com/p/tools.html#ioDev”

dlethe  on January 4th, 2011

If you want a commercial product there is a product at http://www.santools.com/smartmonux that has a great deal of diags, PLUS, it will automatically make the disks in SES-compliant enclosures reflect the status of the disks and pools as seen by zfs. I.e, fault light goes on if zfs kills a disk, and drives blink in the pool while it is scrubbing, as example

Nathan  on December 21st, 2011

cfgadm -alv doesn’t show all drives. I have 24 drives and that command shows 6 of them.
iostat -En shows all 24

Antony Brooke-Wood  on January 30th, 2012

Does anyone know how to get cfgadm to show everything? It seems truncated for me (shows no disks at all; only USB devices).

Also, iostat -En reports both of my drives as having the same serial number!

9d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD20EADS-00 Revision: Serial No: WD-WCAVY01 Size: 2000.37GB
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0

c10d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD20EADS-00 Revision: Serial No: WD-WCAVY01 Size: 2000.37GB
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0

KVMfun  on July 30th, 2012

how about locating virtual disks on solaris 11 ( as guest running on KVM)

Leave a Comment