linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev naming for PATA drives
@ 2007-08-28 18:05 Jan Engelhardt
  2007-08-29  4:11 ` Kay Sievers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jan Engelhardt @ 2007-08-28 18:05 UTC (permalink / raw)
  To: linux-hotplug

Hi,


just for the fun of it, I switched one box from alim15x3.ok to 
pata_ali.ko. That device names were going to change was kinda expected. 
But not this odd.

alim15x3.ko:
	/dev/disk/by-id/ata-TOSHIBA_MK2003GAH_73A30603T

pata_ali.ko:
	/dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______
	/dev/disk/by-id/scsi-SATA-TOSHIBA_MK2003G73A30603T

With pata_ali, the model name is truncated, and I've got six odd 
underscores (limited scsi layer?). Then, scsi is wrong, but perhaps 
acceptable, because it is, indeed, the scsi layer. But SATA is totally 
out of place.

Running udev-103-12 from openSUSE. Not sure if they have any changes 
wrt. disks, but maybe someone is listening and should feel being spoken 
to. :)

	Jan
-- 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
@ 2007-08-29  4:11 ` Kay Sievers
  2007-08-29  4:30 ` Jan Engelhardt
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2007-08-29  4:11 UTC (permalink / raw)
  To: linux-hotplug

On 8/28/07, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> just for the fun of it, I switched one box from alim15x3.ok to
> pata_ali.ko. That device names were going to change was kinda expected.
> But not this odd.
>
> alim15x3.ko:
>         /dev/disk/by-id/ata-TOSHIBA_MK2003GAH_73A30603T
>
> pata_ali.ko:
>         /dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______
>         /dev/disk/by-id/scsi-SATA-TOSHIBA_MK2003G73A30603T
>
> With pata_ali, the model name is truncated, and I've got six odd
> underscores (limited scsi layer?). Then, scsi is wrong, but perhaps
> acceptable, because it is, indeed, the scsi layer. But SATA is totally
> out of place.
>
> Running udev-103-12 from openSUSE. Not sure if they have any changes
> wrt. disks, but maybe someone is listening and should feel being spoken
> to. :)

SCSI, unlike ATA, is limited to 16 chars, yes. So it can't pass the
whole string. Recent udev versions call ata_id also for libata drives.
 But it needs kernel support, which was added for ATA-pass-through.

What does:
  udevtest /block/sda
print on your box?

Kay

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
  2007-08-29  4:11 ` Kay Sievers
@ 2007-08-29  4:30 ` Jan Engelhardt
  2007-08-29  5:05 ` Kay Sievers
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2007-08-29  4:30 UTC (permalink / raw)
  To: linux-hotplug


On Aug 29 2007 06:11, Kay Sievers wrote:
>On 8/28/07, Jan Engelhardt <jengelh@computergmbh.de> wrote:
>> alim15x3.ko:
>>         /dev/disk/by-id/ata-TOSHIBA_MK2003GAH_73A30603T
>>
>> pata_ali.ko:
>>         /dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______
>>         /dev/disk/by-id/scsi-SATA-TOSHIBA_MK2003G73A30603T
>>
>> With pata_ali, the model name is truncated, and I've got six odd
>> underscores (limited scsi layer?). Then, scsi is wrong, but perhaps
>> acceptable, because it is, indeed, the scsi layer. But SATA is totally
>> out of place.
>
>SCSI, unlike ATA, is limited to 16 chars, yes. So it can't pass the
>whole string. Recent udev versions call ata_id also for libata drives.
> But it needs kernel support, which was added for ATA-pass-through.
>
>What does:
>  udevtest /block/sda
>print on your box?

<<<
main: looking at device '/block/sda' from subsystem 'block'
run_program: 'usb_id -x'
run_program: '/lib/udev/usb_id' returned with status 1
run_program: 'scsi_id -g -x -s /block/sda -d /dev/.tmp-8-0'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_VENDOR=ATA'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_MODEL=TOSHIBA_MK2003GA'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_REVISION=AM.0'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL=SATA_TOSHIBA_MK2003G73A30603T'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL_SHORTsA30603T_`<344><377><377><^B>'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_TYPE=disk'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_BUS=scsi'
run_program: '/lib/udev/scsi_id' returned with status 0
udev_rules_get_name: add symlink 'disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T'
udev_rules_get_name: 5 untrusted character(s) replaced
udev_rules_get_name: add symlink 'disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______'
run_program: 'path_id /block/sda'
run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:10.0-scsi-0:0:0:0'
run_program: '/lib/udev/path_id' returned with status 0
udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0'
run_program: 'vol_id --export /dev/.tmp-8-0'
run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-0: unknown volume type'
run_program: '/lib/udev/vol_id' returned with status 4
run_program: 'edd_id --export /dev/.tmp-8-0'
run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
run_program: '/lib/udev/edd_id' returned with status 2
udev_rules_get_name: no node name set, will use kernel name 'sda'
udev_device_event: device '/block/sda' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/sda', major = '8', minor = '0', mode = '0640', uid = '0', gid = '6'
udev_node_add: creating symlink '/dev/disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T' to '../../sda'
udev_node_add: creating symlink '/dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______' to '../../sda'
udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0' to '../../sda'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: 'socket:/org/kernel/udev/monitor'
>>>

So that would explain the six underscores. Some uninitialized char array or so
seems to be happening. And I also wonder why the ID_MODEL gets truncated by one
character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)


	Jan
-- 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
  2007-08-29  4:11 ` Kay Sievers
  2007-08-29  4:30 ` Jan Engelhardt
@ 2007-08-29  5:05 ` Kay Sievers
  2007-08-29 12:04 ` Jan Engelhardt
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2007-08-29  5:05 UTC (permalink / raw)
  To: linux-hotplug


On Wed, 2007-08-29 at 06:30 +0200, Jan Engelhardt wrote:
> On Aug 29 2007 06:11, Kay Sievers wrote:
> >On 8/28/07, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> >> alim15x3.ko:
> >>         /dev/disk/by-id/ata-TOSHIBA_MK2003GAH_73A30603T
> >>
> >> pata_ali.ko:
> >>         /dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______
> >>         /dev/disk/by-id/scsi-SATA-TOSHIBA_MK2003G73A30603T
> >>
> >> With pata_ali, the model name is truncated, and I've got six odd
> >> underscores (limited scsi layer?). Then, scsi is wrong, but perhaps
> >> acceptable, because it is, indeed, the scsi layer. But SATA is totally
> >> out of place.
> >
> >SCSI, unlike ATA, is limited to 16 chars, yes. So it can't pass the
> >whole string. Recent udev versions call ata_id also for libata drives.
> > But it needs kernel support, which was added for ATA-pass-through.
> >
> >What does:
> >  udevtest /block/sda
> >print on your box?
> 
> <<<
> main: looking at device '/block/sda' from subsystem 'block'
> run_program: 'usb_id -x'
> run_program: '/lib/udev/usb_id' returned with status 1
> run_program: 'scsi_id -g -x -s /block/sda -d /dev/.tmp-8-0'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_VENDOR=ATA'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_MODEL=TOSHIBA_MK2003GA'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_REVISION=AM.0'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL=SATA_TOSHIBA_MK2003G73A30603T'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL_SHORTsA30603T_`<344><377><377><^B>'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_TYPE=disk'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_BUS=scsi'
> run_program: '/lib/udev/scsi_id' returned with status 0
> udev_rules_get_name: add symlink 'disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T'
> udev_rules_get_name: 5 untrusted character(s) replaced
> udev_rules_get_name: add symlink 'disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______'
> run_program: 'path_id /block/sda'
> run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:10.0-scsi-0:0:0:0'
> run_program: '/lib/udev/path_id' returned with status 0
> udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0'
> run_program: 'vol_id --export /dev/.tmp-8-0'
> run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-0: unknown volume type'
> run_program: '/lib/udev/vol_id' returned with status 4
> run_program: 'edd_id --export /dev/.tmp-8-0'
> run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
> run_program: '/lib/udev/edd_id' returned with status 2
> udev_rules_get_name: no node name set, will use kernel name 'sda'
> udev_device_event: device '/block/sda' already in database, validate currently present symlinks
> udev_node_add: creating device node '/dev/sda', major = '8', minor = '0', mode = '0640', uid = '0', gid = '6'
> udev_node_add: creating symlink '/dev/disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T' to '../../sda'
> udev_node_add: creating symlink '/dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______' to '../../sda'
> udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0' to '../../sda'
> main: run: 'socket:/org/freedesktop/hal/udev_event'
> main: run: 'socket:/org/kernel/udev/monitor'
> >>>
> 
> So that would explain the six underscores. Some uninitialized char array or so
> seems to be happening.

Yep, it was fixed here:
  http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hR84454d5f4e7ebe6c7095cf78318020ca9991bf

SERIAL_SHORT is not used anymore, as native SCSI strings are too short
for IDE disk links, and we switched to ATA pass-trough which was added
to make this possible.

> And I also wonder why the ID_MODEL gets truncated by one
> character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)

They are unfortunately truncated to 15 chars, which should be 16, yes. 

And if you read the native ATA string it has an additional 'H' too,
which does not survive the SCSI layer. :)

Kay


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
                   ` (2 preceding siblings ...)
  2007-08-29  5:05 ` Kay Sievers
@ 2007-08-29 12:04 ` Jan Engelhardt
  2007-08-29 12:12 ` Hannes Reinecke
  2007-08-29 12:18 ` Kay Sievers
  5 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2007-08-29 12:04 UTC (permalink / raw)
  To: linux-hotplug


On Aug 29 2007 07:05, Kay Sievers wrote:
>
>> And I also wonder why the ID_MODEL gets truncated by one
>> character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)
>
>They are unfortunately truncated to 15 chars, which should be 16, yes. 
>
>And if you read the native ATA string it has an additional 'H' too,
>which does not survive the SCSI layer. :)

Can't the SCSI layer be enhanced? If the (real SCSI) hardware still only does
16, well, let it be. Especially bad is that vendor is always "ATA" with libata
and the real vendor + model name get squeezed into model name or so.


	Jan
-- 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
                   ` (3 preceding siblings ...)
  2007-08-29 12:04 ` Jan Engelhardt
@ 2007-08-29 12:12 ` Hannes Reinecke
  2007-08-29 12:18 ` Kay Sievers
  5 siblings, 0 replies; 7+ messages in thread
From: Hannes Reinecke @ 2007-08-29 12:12 UTC (permalink / raw)
  To: linux-hotplug

Jan Engelhardt wrote:
> On Aug 29 2007 07:05, Kay Sievers wrote:
>>> And I also wonder why the ID_MODEL gets truncated by one
>>> character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)
>> They are unfortunately truncated to 15 chars, which should be 16, yes. 
>>
>> And if you read the native ATA string it has an additional 'H' too,
>> which does not survive the SCSI layer. :)
> 
> Can't the SCSI layer be enhanced? If the (real SCSI) hardware still only does
> 16, well, let it be. Especially bad is that vendor is always "ATA" with libata
> and the real vendor + model name get squeezed into model name or so.
> 
Nope. Vendor name is 8 bytes, Model name 16 bytes.
Sadly as there are no vendor name in the IDE IDENTIFY command, the vendor
name is fixed to 'ATA'. That leaves us with 16 bytes of model information.

No way of increasing that.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: udev naming for PATA drives
  2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
                   ` (4 preceding siblings ...)
  2007-08-29 12:12 ` Hannes Reinecke
@ 2007-08-29 12:18 ` Kay Sievers
  5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2007-08-29 12:18 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 2007-08-29 at 14:04 +0200, Jan Engelhardt wrote:
> On Aug 29 2007 07:05, Kay Sievers wrote:
> >
> >> And I also wonder why the ID_MODEL gets truncated by one
> >> character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)
> >
> >They are unfortunately truncated to 15 chars, which should be 16, yes. 
> >
> >And if you read the native ATA string it has an additional 'H' too,
> >which does not survive the SCSI layer. :)
> 
> Can't the SCSI layer be enhanced? If the (real SCSI) hardware still only does
> 16, well, let it be.


Standard INQUIRY Data Format:
  ...
  |-----+-----------------------------------------------------------------------|
  | 8   | (MSB)                                                                 |
  |- - -+---                        Vendor Identification                    ---|
  | 15  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 16  | (MSB)                                                                 |
  |- - -+---                        Product Identification                   ---|
  | 31  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  ...

> Especially bad is that vendor is always "ATA" with libata
> and the real vendor + model name get squeezed into model name or so.

If vendor is ATA, you can use the native ATA commands (hdparm, ata_id)
and send ATA inquiries over the SCSI device. I think its fine, its just
ATA tunneled through SCSI.

Kay


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-29 12:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
2007-08-29  4:11 ` Kay Sievers
2007-08-29  4:30 ` Jan Engelhardt
2007-08-29  5:05 ` Kay Sievers
2007-08-29 12:04 ` Jan Engelhardt
2007-08-29 12:12 ` Hannes Reinecke
2007-08-29 12:18 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).