How to obtain Hard Drive serial numbers on GuardianOS based SnapServers?

Version 1

    How do I get the serial number for a hard drive without pulling the disk and looking at the label?


    This information applies to the following Operating System(s):

    - This information is not Operating System specific




    ---Solution---

    As of GOS 4.4 the simplest way to obtain HDD serial numbers is by examining /etc/devices.

    cat /etc/devices


    This should give you a table similar to the following:

    /dev/hda

    IDE-0/Master

    244198584

    244 GB

    WDC-WD2500BB-50

    0/0

    WD-WMAEH1864963

    /dev/hdc

    IDE-1/Master

    245117376

    245 GB

    Maxtor-6Y250P0

    0/2

    Y60KF0SE

    /dev/hde

    IDE-2/Master

    244198584

    244 GB

    WDC-WD2500BB-50

    0/4

    WD-WMAEH1862756

    /dev/hdg

    IDE-3/Master

    244198584

    244 GB

    WDC-WD2500BB-50

    0/6

    WD-WMAEH2215288

    /dev/sdaa

    SCSI0:0-0

    244198584

    244 GB

    WD2500BB-50DWA0

    1/0

    WD-WMAEH1861615

    /dev/sdab

    SCSI1:0-0

    244198584

    244 GB

    WD2500BB-50DWA0

    1/1

    WD-WMAEH1861346

    /dev/sdac

    SCSI2:0-0

    244198584

    244 GB

    WD2500BB-50DWA0

    1/2

    WD-WMAEH1860662

    /dev/sdad

    SCSI3:0-0

    244198584

    244 GB

    WD2500BB-50DWA0

    1/3

    WD-WMAEH1861400

    /dev/sdba

    SCSI4:0-0

    245117376

    245 GB

    6Y250P0

    2/0

    Y60KEW3E

    /dev/sdbb

    SCSI5:0-0

    244198584

    244 GB

    WD2500SB-01KBC0

    2/1

    WD-WMAL73702363

    /dev/sdbc

    SCSI6:0-0

    245117376

    245 GB

    6Y250P0

    2/2

    Y60KF0FE

    /dev/sdbd

    SCSI7:0-0

    245117376

    245 GB

    6Y250P0

    2/3

    Y60KES4E

    Device location

    Bus location

    Drive bytes

    Drive size

    Drive Model

    Slot location

    Drive serial

    In GOS versions prior to 4.4 there are 2 different ways to obtain serial information from the system.

    For PATA drives the syntax is:

    hdparm -I /dev/hda


    For SATA or SAS drives (including expansion units):

    smartctl -i /dev/sda

    Please note:


    SD10 units must be checked by physically examining the label on the drive cover plate.