* how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i)
@ 2007-01-04 22:27 Yakov Lerner
2007-01-06 4:51 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Yakov Lerner @ 2007-01-04 22:27 UTC (permalink / raw)
To: Kernel Linux
How can I get serial_no from usb-attached HD drive ?
The HDIO_GET_IDENTITY ioctl fails (like 'hdparm -i').
Any advice on how to extract the drive serialNo from the usb disk ?
Can I write kernel module to extract the SerialNo ?
(I don't need whole 'struct hd_driveid', only the SerialNo).
Thanks
Yakov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i)
2007-01-04 22:27 how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i) Yakov Lerner
@ 2007-01-06 4:51 ` Greg KH
2007-01-06 15:15 ` Kay Sievers
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2007-01-06 4:51 UTC (permalink / raw)
To: Yakov Lerner; +Cc: Kernel Linux
On Fri, Jan 05, 2007 at 12:27:34AM +0200, Yakov Lerner wrote:
> How can I get serial_no from usb-attached HD drive ?
use the *_id programs that come with udev, they show you how to properly
do that.
good luck,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i)
2007-01-06 4:51 ` Greg KH
@ 2007-01-06 15:15 ` Kay Sievers
2007-01-06 16:59 ` Stephen Clark
0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2007-01-06 15:15 UTC (permalink / raw)
To: Greg KH; +Cc: Yakov Lerner, Kernel Linux
On 1/6/07, Greg KH <greg@kroah.com> wrote:
> On Fri, Jan 05, 2007 at 12:27:34AM +0200, Yakov Lerner wrote:
> > How can I get serial_no from usb-attached HD drive ?
>
> use the *_id programs that come with udev, they show you how to properly
> do that.
Only "advanced" ATA-USB bridges will offer you the serial number the
adapter reads from the disk on power-up. The usual id-tools will just
work fine on theses bridges.
There is no way to reach that information with most of the cheap USB
storage-adapters.
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i)
2007-01-06 15:15 ` Kay Sievers
@ 2007-01-06 16:59 ` Stephen Clark
2007-01-06 18:02 ` Kay Sievers
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Clark @ 2007-01-06 16:59 UTC (permalink / raw)
To: Kay Sievers; +Cc: Greg KH, Yakov Lerner, Kernel Linux
Kay Sievers wrote:
>On 1/6/07, Greg KH <greg@kroah.com> wrote:
>
>
>>On Fri, Jan 05, 2007 at 12:27:34AM +0200, Yakov Lerner wrote:
>>
>>
>>>How can I get serial_no from usb-attached HD drive ?
>>>
>>>
>>use the *_id programs that come with udev, they show you how to properly
>>do that.
>>
>>
>
>Only "advanced" ATA-USB bridges will offer you the serial number the
>adapter reads from the disk on power-up. The usual id-tools will just
>work fine on theses bridges.
>
>There is no way to reach that information with most of the cheap USB
>storage-adapters.
>
>Kay
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
HI Kay,
I am looking to buy a usb to ata adapter can you name some of the
advanced adapters?
Thanks,
Steve
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i)
2007-01-06 16:59 ` Stephen Clark
@ 2007-01-06 18:02 ` Kay Sievers
0 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2007-01-06 18:02 UTC (permalink / raw)
To: Stephen Clark; +Cc: Greg KH, Yakov Lerner, Kernel Linux
On Sat, 2007-01-06 at 11:59 -0500, Stephen Clark wrote:
> Kay Sievers wrote:
> >On 1/6/07, Greg KH <greg@kroah.com> wrote:
> >>On Fri, Jan 05, 2007 at 12:27:34AM +0200, Yakov Lerner wrote:
> >>
> >>>How can I get serial_no from usb-attached HD drive ?
> >>>
> >>use the *_id programs that come with udev, they show you how to properly
> >>do that.
> >
> >Only "advanced" ATA-USB bridges will offer you the serial number the
> >adapter reads from the disk on power-up. The usual id-tools will just
> >work fine on theses bridges.
> >
> >There is no way to reach that information with most of the cheap USB
> >storage-adapters.
> I am looking to buy a usb to ata adapter can you name some of the
> advanced adapters?
I have a nice working bridge, in a no-name 2.5" disk-enclosure:
$ lsusb
Bus 005 Device 007: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter
$ scsi_id -x -g -p0x80 -s/block/sdb -d/dev/sdb
ID_VENDOR=TOSHIBA
ID_MODEL=MK1017GAP
ID_REVISION=0000
ID_SERIAL=STOSHIBA_MK1017GAP_144M6603
ID_SERIAL_SHORT=144M6603
ID_TYPE=disk
ID_BUS=scsi
$ /lib/udev/usb_id -x /block/sdb
ID_VENDOR=TOSHIBA
ID_MODEL=MK1017GAP
ID_REVISION=0000
ID_SERIAL=TOSHIBA_MK1017GAP_DEF107727402
ID_TYPE=disk
ID_BUS=usb
Another one just shows for exactly the same disk put behind the bridge:
$ lsusb
Bus 005 Device 012: ID 0402:5621 ALi Corp. USB 2.0 Storage Device
$ scsi_id -x -g -p0x80 -s/block/sdb -d/dev/sdb
$ /lib/udev/usb_id -x /block/sdb
ID_VENDOR=USB_2.0
ID_MODEL=Storage_Device
ID_REVISION=0100
ID_SERIAL=USB_2.0_Storage_Device
ID_TYPE=disk
ID_BUS=usb
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-06 18:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04 22:27 how to get serial_no from usb HD disk (HDIO_GET_IDENTITY ioctl, hdparm -i) Yakov Lerner
2007-01-06 4:51 ` Greg KH
2007-01-06 15:15 ` Kay Sievers
2007-01-06 16:59 ` Stephen Clark
2007-01-06 18:02 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox