identifying your hdd from cli

lets say you have two identical hdd in your linux box in a software raid1 setup. one of them fails and you have a nice degraded array. you have to replace the failed hdd and rebuild the array. but which one is to replace??

let’s say sda is the working hdd, issue the following command

hdparm -I /dev/sda | head -8

and you should see

/dev/sda:

ATA device, with non-removable media
Model Number:       WDC WD6400AACS-00G8B1
Serial Number:      WD-WCAUF2974726
Firmware Revision:  05.04C05
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5

voila, there you have the model number and the serial of the hdd 🙂

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>