Getting hard drive serial number from USB devices

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Sat Jan 14 22:46:25 UTC 2006


Sy Ali wrote:
> On 1/14/06, Madison Kelly <linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org> wrote:
>> PS - I'm still looking for a way to get the serial number from USB
>> connected hard drives... :p
> 
> John DiMarco[1] maintains scsiinfo[2], a a SCSI information tool for
> Sun systems.
> 
> cat /proc/scsi/scsi gives some info..  Is it relevant?
> 
> I haven't tried it, but there is sdparm[3].  It says that it can get a
> serial number.  quote:
> Unit serial number [page 0x80]; page abbreviation: "sn". This is a
> vendor specific (vendor format) serial number.
> 
> 
> 
> [1] http://www.cs.toronto.edu/~jdd/
> [2] ftp://ftp.cs.toronto.edu/pub/jdd/scsiinfo/README
> [3] http://sg.torque.net/sg/sdparm.html
> 
> 
> Some other random trails:
> * http://home.earthlink.net/~akonshin/delphi_components.htm
> * http://www.experts-exchange.com/Programming/Programming_Languages/Pascal/Q_20585823.html
> * Search for info on getting the serial number from a memory stick or
> thumbdrive.

Thanks for the reply!

   Unfortunately, 'sdparm', 'scsiinfo' and such all see to just parse 
either '/proc/scsi...' or '/sys/block...'. Inside there I can read:

akane:/home/digimer# cat /sys/block/sda/device/
block           device_blocked  power           rev             timeout
delete          max_sectors     queue_depth     scsi_level      type
detach_state    model           rescan          state           vendor
akane:/home/digimer# cat /sys/block/sda/device/vendor 
/sys/block/sda/device/model /sys/block/sda/device/rev
ST380011
A
3.06

   Which, as you can see, is devoid of the blooming serial number... *sigh*

Madison


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
           Madison Kelly (Digimer)
    TLE-BU; The Linux Experience, Back Up
Main Project Page:  http://tle-bu.org
Community Forum:    http://forum.tle-bu.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list