USB drive serial numbers
Scott Long
scottl at samsco.org
Wed May 7 23:20:36 UTC 2008
Sean Bruno wrote:
> Can someone send me the output of "camcontrol inquiry daX" where daX is
> a usb attached hard drive? I'm interested to know if the USB external
> hard drives report a serial number as the USB flash drives I currently
> have in my possession do not report one.
>
> eg: SCSI hard drive:
> sudo camcontrol inquiry da0
> pass0: <SEAGATE ST373207LC D701> Fixed Direct Access SCSI-3 device
> pass0: Serial Number 3KT17YJL
> pass0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged
> Queueing Enabled
>
>
> eg: USB flash drive:
> sudo camcontrol inquiry da3
> pass4: <TOSHIBA TransMemory 5.00> Removable Direct Access SCSI-0 device
> pass4: Serial Number
> pass4: 40.000MB/s transfers
>
CAM used to assume that all DA devices supported the serial number EVPD
page. I recently changed it to query the device for the list of pages
it does support, and only ask for the serial number page if it does
(which in turns cuts down on a whole lot of kernel printf noise). My
experience is that some devices do, but most devices don't. If you want
to check your devices manually, do:
camcontrol cmd pass0 -v -c "12 01 00 00 255 00" -i 255 "-" | hd
If 0x80 appears after the 4th byte, the device claims support for
querying the serial number. The serial number can then be fetched with
camcontrol cmd pass0 -v -c "12 01 80 00 255 00" -i 255 "-" | hd
Or via
camcontrol inq pass0 -S
Scott
More information about the freebsd-scsi
mailing list