Home > Storage > Finding hdd serial number in Solaris

Finding hdd serial number in Solaris

Redeemers of this world
Dwell in hypocrisy:
“How were we supposed to know?”
(Nightwish – The Kinslayer)

ZFS is one of the those technologies out there that really kicks some serious ass. Data security and storage scalability is really of no match to any other volume manager + filesystem. But, being mechanical beasts, hard disks tend to fail sooner or later. Today I got alert from one of my systems, and this was the state I encountered:

# zpool status tank
 pool: tank
 state: DEGRADED
 status: One or more devices has experienced an unrecoverable error.  An
 attempt was made to correct the error.  Applications are unaffected.
 action: Determine if the device needs to be replaced, and clear the errors
 using 'zpool clear' or replace the device with 'zpool replace'.
 see: http://www.sun.com/msg/ZFS-8000-9P
 scan: none requested
 config:
 NAME     STATE     READ WRITE CKSUM
 tank    DEGRADED     0     0     0
 raidz1-0  ONLINE     0     0     0
 c2t0d0  ONLINE       0     0     0
 c2t1d0  ONLINE       0     0     0
 c2t2d0  ONLINE       0     0     0
 raidz1-1  DEGRADED   0     0     0
 c2t3d0  ONLINE       0     0     0
 c2t4d0  ONLINE       0     0     0
 c2t5d0  DEGRADED     0     0    33  too many errors
 errors: No known data errors

No know data errors, and bad blocks on one of the hard drives in RAID5 – now how cool is that! Silent corruption is not even negotiable possibility 🙂 OK it’s time to replace hard drive, but how to locate it in the chassis? Even if you know the exact slot position, serial number is always a welcomed additional security measure. We don’t wanna replace wrong drive, do we? OK, so how can one see serial number of hard drive on Solaris? First try, iostat:

# iostat -E c2t5d0
 sd5       Soft Errors: 0 Hard Errors: 184 Transport Errors: 0
 Vendor: ATA      Product: ST3500630AS      Revision: C    Serial No:
 Size: 500.11GB <500107861504 bytes>
 Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
 Illegal Request: 24 Predictive Failure Analysis: 0

Now we know the hdd model, and some additional information, but really no way to distinct this drive from other 5 in this pool. The iostat command maybe works on SPARC systems, but obviously on homebuilt cheap storage server with SATA disks fails to deliver needed information. So, next try is cfgadm:

# cfgadm -alv | grep SN | grep c2t5d0
 sata0/5::dsk/c2t5d0            connected    configured   ok        Mod: ST3500630AS FRev: 3.AAC SN: 4BA6G5NN

OK now we have the serial and can be 100% certain what drive to replace.

Advertisements
Categories: Storage
  1. Locane
    May 24, 2016 at 8:56 pm

    Good fucking god I hate solaris.

    Thanks.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: