Capturing ATA devices serial numbers

Jason Morgan jwm-freebsd-questions at sentinelchicken.net
Mon Jul 7 20:20:40 UTC 2008


On 2008.07.07 13:54:06, Vaughn Clinton wrote:
> All,  
> 
> I'm looking for a FreeBSD utility that will allow me to query a disk for its
> serial number.  Can you point me to such a tool that'll allow me to do so?

Assuming you mean a hard disk, if you can run smartmontools, this is
from smartctl(8):

       -i, --info
              Prints the device model number, serial number, firmware version,
              and  ATA  Standard  version/revision  information.   Says if the
              device supports SMART, and if so, whether SMART support is  cur-
              rently  enabled  or  disabled.   If  the device supports Logical
              Block Address mode (LBA mode) print current user drive  capacity
              in bytes. (If drive is has a user protected area reserved, or is
              "clipped", this may be smaller than the potential maximum  drive
              capacity.)  Indicates if the drive is in the smartmontools data-
              base (see '-v' options below).  If so, the  drive  model  family
              may also be printed. If '-n' (see below) is specified, the power
              mode of the drive is printed.

Full man page is here:
http://smartmontools.sourceforge.net/man/smartctl.8.html

Port is here:
/usr/ports/sysutils/smartmontools

HTH,
~Jason Morgan


More information about the freebsd-questions mailing list