linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Robinson <john.robinson@anonymous.org.uk>
To: Phil Turmel <philip@turmel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Determining which spindle is out of order
Date: Sun, 07 Nov 2010 12:53:21 +0000	[thread overview]
Message-ID: <4CD6A141.5090601@anonymous.org.uk> (raw)
In-Reply-To: <4CD57C17.8020303@turmel.org>

On 06/11/2010 16:02, Phil Turmel wrote:
> On 11/06/2010 11:46 AM, John Robinson wrote:
[...]
>> Now I need to find udevadm I guess. It must have been introduced since the udev version that comes with RHEL/CentOS 5, which is udev-095-14.21.el5_5.1. rpmfind.net suggests it's only been in since version 118 or so. Never mind :-)
>
> Heh.  Anyone know the equivalent command in earlier versions of udev?

I think it's `udevinfo` instead of `udevadm info` - the comment in the 
ChangeLog for udev-117 is "udevadm: merge all udev tools into a single 
binary". But it doesn't work terribly well:

[root@beast describe_scsi]# udevinfo -q all -p 
/devices/pci0000\:00/0000\:00\:1f.2/
no record for '/devices/pci0000:00/0000:00:1f.2/' in database

That's unfortunate. But it does know about that device if asked differently:

[root@beast describe_scsi]# udevinfo -a -p 
/devices/pci0000\:00/0000\:00\:1f.2/

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

   looking at device '/devices/pci0000:00/0000:00:1f.2':
     KERNEL=="0000:00:1f.2"
     SUBSYSTEM=="pci"
     SYSFS{broken_parity_status}=="0"
     SYSFS{enable}=="1"
 
SYSFS{modalias}=="pci:v00008086d00003A22sv00001043sd000082D4bc01sc06i01"
 
SYSFS{local_cpus}=="7fffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff"
     SYSFS{irq}=="251"
     SYSFS{class}=="0x010601"
     SYSFS{subsystem_device}=="0x82d4"
     SYSFS{subsystem_vendor}=="0x1043"
     SYSFS{device}=="0x3a22"
     SYSFS{vendor}=="0x8086"

   looking at parent device '/devices/pci0000:00':
     ID=="pci0000:00"
     BUS==""
     DRIVER==""

[root@beast describe_scsi]#

And that output is obviously not what the rest of your script wants. I 
can ask about individual drives though:

[root@beast describe_scsi]# udevinfo -q all -p /block/sda
P: /block/sda
N: sda
S: disk/by-id/scsi-SATA_Hitachi_HDS7210_JP2921HQ0J0PZA
S: disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
E: ID_VENDOR=ATA
E: ID_MODEL=Hitachi_HDS72101
E: ID_REVISION=JP4O
E: ID_SERIAL=SATA_Hitachi_HDS7210_JP2921HQ0J0PZA
E: ID_TYPE=disk
E: ID_BUS=scsi
E: ID_PATH=pci-0000:00:1f.2-scsi-0:0:0:0
[root@beast describe_scsi]#

I suspect the udev version in EL5 just isn't going to give up the info 
you need, even if you did rewrite for the different sysfs paths :-(

Thanks for your efforts though!

Cheers,

John.

  parent reply	other threads:[~2010-11-07 12:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 14:13 Determining which spindle is out of order Nat Makarevitch
2010-11-03 14:38 ` Roman Mamedov
2010-11-03 15:17   ` Graham Mitchell
2010-11-03 16:05     ` Roman Mamedov
2010-11-03 19:00       ` Jon Hardcastle
2010-11-03 14:43 ` John Robinson
2010-11-03 14:45 ` Tim Small
2010-11-03 15:59   ` Jon Hardcastle
2010-11-03 17:17     ` Bill Davidsen
2010-11-03 20:03       ` Tim Small
2010-11-03 15:29 ` Mikael Abrahamsson
2010-11-03 21:54 ` Phil Turmel
2010-11-03 22:26   ` Roman Mamedov
2010-11-04  9:29   ` Tom Carlson
2010-11-06 10:22   ` Leslie Rhorer
2010-11-06 15:12     ` Phil Turmel
     [not found]       ` <4CD57867.4010207@anonymous.org.uk>
2010-11-06 16:02         ` Phil Turmel
2010-11-06 16:11           ` Mathias Burén
2010-11-06 16:45           ` Jan Ceuleers
2010-11-06 19:39             ` Phil Turmel
2010-11-06 20:16               ` Leslie Rhorer
2010-11-06 20:23               ` Mr. James W. Laferriere
2010-11-07  7:51               ` Jan Ceuleers
2010-11-07 12:53           ` John Robinson [this message]
2010-11-07 13:21             ` Phil Turmel
2010-11-07 13:43               ` John Robinson
2010-11-07 14:43                 ` Phil Turmel
2010-11-07 15:04                   ` Mathias Burén
2010-11-07 15:19                   ` John Robinson
2010-11-07 18:39                     ` Phil Turmel
2010-11-07 20:46                       ` Leslie Rhorer
2010-11-07 21:22                         ` John Robinson
2010-11-08 18:59                           ` John Robinson
2010-11-07 21:24                       ` Andreas Dröscher
2010-11-08 21:05                   ` Mr. James W. Laferriere
2010-11-07 20:52                 ` Roman Mamedov
2010-11-09 14:40                   ` Phil Turmel
2010-11-06 19:58       ` Leslie Rhorer
2010-11-06 21:17       ` John Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD6A141.5090601@anonymous.org.uk \
    --to=john.robinson@anonymous.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=philip@turmel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).