Skip to content
  • Mike Fleetwood's avatar
    Display device serial numbers (#751251) · 4b72ecd4
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    Run "hdparm -I /dev/DISK" to get the hard drive serial number of
    every device which has one and display it in the Device Information.
    The displayed value can either be the actual serial number, "none" or
    blank.  "none" means the device doesn't have a hard drive serial number,
    such as for Linux software RAID arrays, BIOS fake RAID arrays or USB
    flash drives.  Blank means something went wrong getting the serial
    number.  Either it couldn't be found in the hdparm output or the hdparm
    command wasn't installed.
    
    Example real hard drive:
        # hdparm -I /dev/sda
        ...
        ATA device, with non-removable media
                Model Number:       SAMSUNG HM500JI
                Serial Number:      S1WFJDSZ123732
        ...
    
    Example Linux software RAID array:
        # hdparm -I /dev/md127
    
        /dev/md127:
         HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
    
    On my desktop with 4 internal hard drives 2 Linux software RAID arrays
    on those hard drives, 2 USB flash drives and 1 USB hard drive attached,
    running hdparm 9 times added 0.07 seconds to the device refresh time.
    
    Bug 751251 - Show serial number in device information
    4b72ecd4