disk drive serial number

Jon Hamilton hamilton at pobox.com
Sun Nov 11 16:56:02 PST 2007


Josh Carroll <josh.carroll at gmail.com>, said on Sun Nov 11, 2007 [06:38:08 PM]:
} > is there a way to get the serial number from a drive from within the OS?  im
} > trying to audit the drives in my file server, but without pulling the thing
} > from the rack and cracking it open.  they are just standard sata drives, not
} > on any sort of raid controller (ie, i know 3ware cards are capable of pulling
} > the drive info).
} 
} Check dmesg (or /var/run/dmesg.boot). The serial number should show, e.g.:
} 
} ad8: 381553MB <Seagate ST3400633AS 3.AAH> at ata4-master SATA150

That's a model number, not a serial number.  

I'm not sure if there's a simpler way, but smartctl (from the smartmontools 
port/package) will display a disk's serial number.

[602] root at woodstock tmp$ smartctl -a /dev/ad0 | grep -i serial
Serial Number:    9QG386BV

There's probably a better way, but this should at least work.

-- 

   Jon Hamilton 
   hamilton at pobox.com


More information about the freebsd-questions mailing list