Jamie Fargen's Weblog

Tag: failure

How to get a hard drive serial number from udev.

by on Dec.26, 2012, under Uncategorized

Some times a hard drive will fail in such a way that tools like smartctl or hdparm is unable to get the hard drive serial number or in certain circumstances will give the wrong hard drive serial.

This may work some of the time, but it won’t always work depending on the type of failure a drive is experiencing. It is definitely a better alternative to try rather than getting someone to go down to the data center and pulling your drive.

*Note that WordPress does something to the hyphens and when rendered on the webpage it is a different character. When entering the command ensure that you enter (hyphen)(hyphen) before each option passed in the command.

$ /sbin/udevadm info –query=property –name=drive| grep -i serial

Just replace drive for which physical drive you are trying to get details. In my case I use the command like so as an example.

$/sbin/udevadm info –query=property –name=sda| grep -i serial

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...