How-To Technical

Finding the Failed Hard Drive – Linux Software RAID

After discovering my software raid system had suffered from a failed disk drive it was time to locate it and replace. But the question was “Which physical disk drive failed”. I don’t have a fancy blinking light or one that changes to amber or red when something is wrong.

So to locate the drive I need to gather information such as the serial number of the drive itself so that I can match it up with the physical disk. I was able to do this using the ‘lshw’ command:

Running the command # lshw -class disk gave me the following for example:

description: ATA Disk
product: WDC WD10EVDS-63U
vendor: Western Digital
physical id: 0
bus info: scsi@2:0.0.0
logical name: /dev/sdb
version: 01.0
serial: WD-WCAV58689449
size: 931GiB (1TB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 signature=1eb72643

From these results I gather the information I am looking for: logical name, serial number, and vendor (if you have different vendor type disks in your software raid) I matched the logical name with that of the failed device.


Tip: Linux maps its hard drives using UDEV, and doesn’t guarantee a drive that is mounted at sdb today, will be mounted as sdb tomorrow. So be aware of this before pulling drives.