For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Hard Drive Serial Numbers

Hard Drive Serial Numbers

Created by dave. Last edited by dave, 8 years and 83 days ago. Viewed 2,363 times. #1
[edit] [rdf]
labels
attachments
(2016-02-04)

Reading Hard Drive Serial Numbers From The Command Line

# for i in /dev/sd? ; do echo $i ; hdparm -I $i | grep 'Serial Number' ; done
/dev/sda
        Serial Number:      S1D52---
/dev/sdb
        Serial Number:      S1D5E---
/dev/sdc
 HDIO_DRIVE_CMD(identify) failed: Input/output error
/dev/sdd
        Serial Number:      S1D57---
/dev/sde
        Serial Number:      S1D5E---

...assuming that they are not hidden behind a RAID controller, in which case you'll have to do something else.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt