* Re-ordering rules in config file gives different results when it should not
@ 2004-02-25 0:00 Sabharwal, Atul
2004-02-25 1:30 ` Patrick Mansfield
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sabharwal, Atul @ 2004-02-25 0:00 UTC (permalink / raw)
To: linux-hotplug
I have a sample config file below. Executing it just creates device
entries
Scsi_card_1 and host_scsi0. If I reo-order the rules, host_scsi1 gets
Created and host_scsi0 is not created.
Patrick, you were saying about bug with partitions. I ran scsi_id
manually
To complete the RESULT field. I am assuming that I have created 6
distinct
Rules and till there is no success, the next rule will get selected.
Re-ordering rules should not make a difference as I have different
device
name for scsi_id. This is with version 18 of udev.
I have 24 SCSI devices on my system and I am looking to create 24
entries
Based on the serial number. In this test, I wanted to create 6 devices
But it creates only two. ( scsi_card_1 and host_scsi0).
--
Atul
# There are a number of modifiers that are allowed to be used in some of
the
# fields. See the udev man page for a full description of them.
#scsi device 3.1
BUS="scsi", ID="1:0:1:0", NAME="scsi_card_1"
#scsi device /block/sda in sysfs
PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sda", BUS="scsi",
RESULT="SSEAGATE ST318436LW 3BM07NKA000070456Z6B", NAME="host_scsi0"
#scsi device /block/sdb in sysfs
PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sdb", BUS="scsi",
RESULT="SSEAGATE ST318436LW 3BM07R68000070456ZCK",
NAME="host_scsi1"
##scsi device /block/sdc in sysfs
PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sdc", BUS="scsi",
RESULT="SSEAGATE ST318452LC 3EV08ANK00007219JAVA",
NAME="mpath_scsi0"
#
##scsi device /block/sdd in sysfs
PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sdd", BUS="scsi",
RESULT="SSEAGATE ST318452LC 3EV00NZB000072190Y90",
NAME="mpath_scsi1"
#
##scsi device /block/sde in sysfs
PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sde ", BUS="scsi",
RESULT="SSEAGATE ST318452LC 3EV00NZB000072190Y90",
NAME="mpath_scsi2"
#
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
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] 4+ messages in thread* Re: Re-ordering rules in config file gives different results when it should not
2004-02-25 0:00 Re-ordering rules in config file gives different results when it should not Sabharwal, Atul
@ 2004-02-25 1:30 ` Patrick Mansfield
2004-02-25 2:04 ` Sabharwal, Atul
2004-02-25 2:13 ` Patrick Mansfield
2 siblings, 0 replies; 4+ messages in thread
From: Patrick Mansfield @ 2004-02-25 1:30 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 04:00:31PM -0800, Sabharwal, Atul wrote:
> I have a sample config file below. Executing it just creates device
> entries
> Scsi_card_1 and host_scsi0. If I reo-order the rules, host_scsi1 gets
> Created and host_scsi0 is not created.
>
> Patrick, you were saying about bug with partitions. I ran scsi_id
> manually
Yes, partitions (what most people care about) won't match any RESULT
when PROGRAM is used to call scsi_id.
> To complete the RESULT field. I am assuming that I have created 6
> distinct
> Rules and till there is no success, the next rule will get selected.
> #scsi device 3.1
> BUS="scsi", ID="1:0:1:0", NAME="scsi_card_1"
>
> #scsi device /block/sda in sysfs
> PROGRAM="/sbin/scsi_id -p 0x80 -s /block/sda", BUS="scsi",
> RESULT="SSEAGATE ST318436LW 3BM07NKA000070456Z6B", NAME="host_scsi0"
Don't pass any options to scsi_id in the PROGRAM rule, not even the -p
0x80. If the device supports page 0x83, the RESULT *will* be different.
If the default behaviour does not work for some reason, and a line in
/etc/scsi_id.config.
But what is screwing up your rules is passing a sysfs device to scsi_id.
scsi_id -s /dev/sda in the rule is like asking "does /dev/sda have result
X?", instead of "does the current device have result X?".
i.e. the rule should be:
PROGRAM="/sbin/scsi_id", BUS="scsi", RESULT="SSEAGATE ST318436LW 3BM07NKA000070456Z6B", NAME="host_scsi0"
-- Patrick Mansfield
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
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] 4+ messages in thread
* RE: Re-ordering rules in config file gives different results when it should not
2004-02-25 0:00 Re-ordering rules in config file gives different results when it should not Sabharwal, Atul
2004-02-25 1:30 ` Patrick Mansfield
@ 2004-02-25 2:04 ` Sabharwal, Atul
2004-02-25 2:13 ` Patrick Mansfield
2 siblings, 0 replies; 4+ messages in thread
From: Sabharwal, Atul @ 2004-02-25 2:04 UTC (permalink / raw)
To: linux-hotplug
But what is screwing up your rules is passing a sysfs device to scsi_id.
scsi_id -s /dev/sda in the rule is like asking "does /dev/sda have
result
X?", instead of "does the current device have result X?".
i.e. the rule should be:
PROGRAM="/sbin/scsi_id", BUS="scsi", RESULT="SSEAGATE ST318436LW
3BM07NKA000070456Z6B", NAME="host_scsi0"
>> That fixed part of the problem. I still get only host_scsi0,
mpath_scsi0 & mpath_scsi1
Created. I am still not able to create host_scs1 & mpath_scsi2 device
entries. Re-ordering
The entries works but all 5 are not being created.
Thanks,
Atul
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
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] 4+ messages in thread
* Re: Re-ordering rules in config file gives different results when it should not
2004-02-25 0:00 Re-ordering rules in config file gives different results when it should not Sabharwal, Atul
2004-02-25 1:30 ` Patrick Mansfield
2004-02-25 2:04 ` Sabharwal, Atul
@ 2004-02-25 2:13 ` Patrick Mansfield
2 siblings, 0 replies; 4+ messages in thread
From: Patrick Mansfield @ 2004-02-25 2:13 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 06:04:06PM -0800, Sabharwal, Atul wrote:
> But what is screwing up your rules is passing a sysfs device to scsi_id.
> scsi_id -s /dev/sda in the rule is like asking "does /dev/sda have
> result
> X?", instead of "does the current device have result X?".
>
> i.e. the rule should be:
>
> PROGRAM="/sbin/scsi_id", BUS="scsi", RESULT="SSEAGATE ST318436LW
> 3BM07NKA000070456Z6B", NAME="host_scsi0"
>
> >> That fixed part of the problem. I still get only host_scsi0,
> mpath_scsi0 & mpath_scsi1
> Created. I am still not able to create host_scs1 & mpath_scsi2 device
> entries. Re-ordering
> The entries works but all 5 are not being created.
>
> Thanks,
>
> Atul
Atul -
Maybe verify the output of scsi_id -s /dev/sdN exactly matches your udev
rules.
If you still can't figure out what is wrong, resend your udev.rule (as an
attachment as your mailer is munging lines).
And send the output of scsi_id -s /dev/sdN for each device.
I was working on a script to autogenerate a set of udev rules using
scsi_id, and test the scsi_id fix for partitions but have been sidetracked
by other tasks.
-- Patrick Mansfield
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2004-02-25 2:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25 0:00 Re-ordering rules in config file gives different results when it should not Sabharwal, Atul
2004-02-25 1:30 ` Patrick Mansfield
2004-02-25 2:04 ` Sabharwal, Atul
2004-02-25 2:13 ` Patrick Mansfield
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).