Get model and serial number of a failed hard disk in Linux when only device name is known
Had a disk fail in a MD RAID array and all I knew was that it's /dev/sdh1. Needed to know the serial number to know which disk to swap, but because the disk was dead, "smartctl -i /dev/sdh" didn't work. Another way to find out is to look in "/dev/disk/by-id/". For example:
ls -l /dev/disk/by-id/ | grep "sdh1"
lrwxrwxrwx 1 root root 10 2012-03-04 15:54 ata-ST31000528AS_9VP6GRNW-part1 -> ../../sdh1
lrwxrwxrwx 1 root root 10 2012-03-04 15:54 scsi-SATA_ST31000528AS_9VP6GRNW-part1 -> ../../sdh1
In this example, the model of the disk is ST31000528AS and serial number is 9VP6GRNW. Nice.
Leave a comment