* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
@ 2004-02-24 1:19 ` Greg KH
2004-02-24 1:23 ` Patrick Mansfield
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-02-24 1:19 UTC (permalink / raw)
To: linux-hotplug
On Mon, Feb 23, 2004 at 03:43:13PM -0800, Sabharwal, Atul wrote:
> Greg,
Hey, I'm not the only person on this mailing list :)
> Besides USB, can udev be used for persistent names for SCSI and fiber
> channel devices ?
Yup.
> Do the drivers need to be loaded as modules ?
Nope.
> Does udev handle boot time events for devices ?
If you use the udev init scripts that are in the package and have been
discussed here.
> Are these available with the latest v0.18 ?
I have never heard of udev version 0.18 before. Where did you find such
a release?
thanks,
greg k-h
-------------------------------------------------------
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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
2004-02-24 1:19 ` Greg KH
@ 2004-02-24 1:23 ` Patrick Mansfield
2004-02-24 1:33 ` Sabharwal, Atul
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Patrick Mansfield @ 2004-02-24 1:23 UTC (permalink / raw)
To: linux-hotplug
On Mon, Feb 23, 2004 at 03:43:13PM -0800, Sabharwal, Atul wrote:
> Greg,
>
> Besides USB, can udev be used for persistent names for SCSI and fiber
> channel devices ? Do the drivers need to be
>
> loaded as modules ? Does udev handle boot time events for devices ? Are
> these available with the latest v0.18 ?
Atul -
You can use scsi_id in a callout rule with udev for scsi persistent names.
scsi_id is released along with udev under extras/scsi_id.
linux scsi can be all modular (drivers and scsi core), but then of course
you need an initrd to boot from your scsi disks.
scsi_id uses scsi vpd page 0x80 or 0x83 to get a unique id, and then that
id can be used to give a peristent name to your scsi device. You have to
edit the /etc/scsi_id.config or run it with '-g' to get anything useful
out of it.
If you have any questions about it, let me know.
FYI I just fixed a bad bug with with it not handling disk partitions at
all, and will post a new version RSN.
-- 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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
2004-02-24 1:19 ` Greg KH
2004-02-24 1:23 ` Patrick Mansfield
@ 2004-02-24 1:33 ` Sabharwal, Atul
2004-02-24 2:06 ` Greg KH
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 1:33 UTC (permalink / raw)
To: linux-hotplug
> Greg,
Hey, I'm not the only person on this mailing list :)
Sure!! I had my e-mail client sending HTML content.
> Besides USB, can udev be used for persistent names for SCSI and fiber
> channel devices ?
Yup.
> Do the drivers need to be loaded as modules ?
Nope.
> Does udev handle boot time events for devices ?
If you use the udev init scripts that are in the package and have been
discussed here.
> Are these available with the latest v0.18 ?
I have never heard of udev version 0.18 before. Where did you find such
a release?
The tar ball uses this naming scheme. Hence, the version number.
Regards,
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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (2 preceding siblings ...)
2004-02-24 1:33 ` Sabharwal, Atul
@ 2004-02-24 2:06 ` Greg KH
2004-02-24 2:09 ` Sabharwal, Atul
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-02-24 2:06 UTC (permalink / raw)
To: linux-hotplug
On Mon, Feb 23, 2004 at 05:33:14PM -0800, Sabharwal, Atul wrote:
> > Are these available with the latest v0.18 ?
>
> I have never heard of udev version 0.18 before. Where did you find such
> a release?
>
> The tar ball uses this naming scheme. Hence, the version number.
Please, point out a 0.18 release to me on kernel.org.
I see a 018, 017, 016, 015 and so on release... but no '.' anywhere
after 0.2 :)
thanks,
greg k-h
-------------------------------------------------------
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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (3 preceding siblings ...)
2004-02-24 2:06 ` Greg KH
@ 2004-02-24 2:09 ` Sabharwal, Atul
2004-02-24 2:22 ` Kay Sievers
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 2:09 UTC (permalink / raw)
To: linux-hotplug
You can use scsi_id in a callout rule with udev for scsi persistent
names.
scsi_id is released along with udev under extras/scsi_id.
>> I tried a callout rule as follows :
CALLOUT="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print
$3 }'",
BUS="scsi", ID="325687809", NAME="host_scsi"
But it did not work. Any obvious mistake here or is it the partition
related
problem.
--
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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (4 preceding siblings ...)
2004-02-24 2:09 ` Sabharwal, Atul
@ 2004-02-24 2:22 ` Kay Sievers
2004-02-24 4:58 ` Patrick Mansfield
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kay Sievers @ 2004-02-24 2:22 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2004-02-24 at 03:09, Sabharwal, Atul wrote:
> You can use scsi_id in a callout rule with udev for scsi persistent
> names.
> scsi_id is released along with udev under extras/scsi_id.
> >> I tried a callout rule as follows :
>
> CALLOUT="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
Huh, do we really need this complex callout argument line.
We are not prepared for something like this, cause we pass
only 7 arguments down to the program.
If it's really needed, I can have look.
Pat?
thanks,
Kay
-------------------------------------------------------
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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (5 preceding siblings ...)
2004-02-24 2:22 ` Kay Sievers
@ 2004-02-24 4:58 ` Patrick Mansfield
2004-02-24 11:22 ` Kay Sievers
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Patrick Mansfield @ 2004-02-24 4:58 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 03:22:14AM +0100, Kay Sievers wrote:
> On Tue, 2004-02-24 at 03:09, Sabharwal, Atul wrote:
> > You can use scsi_id in a callout rule with udev for scsi persistent
> > names.
> > scsi_id is released along with udev under extras/scsi_id.
> > >> I tried a callout rule as follows :
> >
> > CALLOUT="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
It's scsi_id, not scsid.
Should udev log an error if it can't find the CALLOUT program?
You don't need any arguments, scsi_id relies on the environment variable
DEVPATH for the sysfs path, though it might be cleaner if we could use a
udev string substitution.
And, make sure you have at least one line in your /etc/scsi_id.config
like:
options=-g
I will add a udev example to the scsi_id man page, and more about its
behaviour when called with no arguments, though the udev man has a fine
example.
DEVPATH should probably be documented somewhere, maybe in hotplug(8). (I
can't find anything about it in man pages of udev, udevinfo, or hotplug.)
> Huh, do we really need this complex callout argument line.
> We are not prepared for something like this, cause we pass
> only 7 arguments down to the program.
> If it's really needed, I can have look.
> Pat?
No. The above rule should just be:
BUS="scsi", CALLOUT="/sbin/scsi_id", ID="325687809", NAME="your_disk"
But if the device is really using page 0x80, the ID will likely have
spaces in it, so run scsi_id manually to verify the value needed in the
ID, including all spaces *especially* any trailing spaces, i.e. run:
/sbin/scsi_id -s /block/sda
-- 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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (6 preceding siblings ...)
2004-02-24 4:58 ` Patrick Mansfield
@ 2004-02-24 11:22 ` Kay Sievers
2004-02-24 17:03 ` Sabharwal, Atul
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kay Sievers @ 2004-02-24 11:22 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2004-02-24 at 05:58, Patrick Mansfield wrote:
> On Tue, Feb 24, 2004 at 03:22:14AM +0100, Kay Sievers wrote:
> > On Tue, 2004-02-24 at 03:09, Sabharwal, Atul wrote:
> > > You can use scsi_id in a callout rule with udev for scsi persistent
> > > names.
> > > scsi_id is released along with udev under extras/scsi_id.
> > > >> I tried a callout rule as follows :
> > >
> > > CALLOUT="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> It's scsi_id, not scsid.
>
> Should udev log an error if it can't find the CALLOUT program?
It does, but only with DEBUG=true.
I will have a look. We may change some critical debug to info().
> You don't need any arguments, scsi_id relies on the environment variable
> DEVPATH for the sysfs path, though it might be cleaner if we could use a
> udev string substitution.
>
> And, make sure you have at least one line in your /etc/scsi_id.config
> like:
>
> options=-g
>
> I will add a udev example to the scsi_id man page, and more about its
> behaviour when called with no arguments, though the udev man has a fine
> example.
>
> DEVPATH should probably be documented somewhere, maybe in hotplug(8). (I
> can't find anything about it in man pages of udev, udevinfo, or hotplug.)
Strange, hotplug(8) mentions ACTION but not DEVPATH.
I will prepare a patch fot hotplug and put a few words in SYNOPSIS of
udev, tonight.
> > Huh, do we really need this complex callout argument line.
> > We are not prepared for something like this, cause we pass
> > only 7 arguments down to the program.
> > If it's really needed, I can have look.
> > Pat?
>
> No. The above rule should just be:
>
> BUS="scsi", CALLOUT="/sbin/scsi_id", ID="325687809", NAME="your_disk"
Nice, so we can stay with the current logic.
thanks,
Kay
-------------------------------------------------------
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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (7 preceding siblings ...)
2004-02-24 11:22 ` Kay Sievers
@ 2004-02-24 17:03 ` Sabharwal, Atul
2004-02-24 17:32 ` Patrick Mansfield
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 17:03 UTC (permalink / raw)
To: linux-hotplug
I tried /sbin/scsi_id also: So, tried combination #1 & #2. Do we need
the method prefix or
Its implied. Somewhere in the documentation, there were examples based
on PCI slot number
But there was no prefix TOPOLOGY.
1. CALLOUT, PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end {
print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
2. PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print$3
}'", BUS="scsi", ID="325687809", NAME="host_scsi"
--
Atul
-------------------------------------------------------------
P.S: All opinions are my personal opinion(s) & responsibility and do
not represent the view of my employer ( Intel Corporation ).
-----Original Message-----
From: Patrick Mansfield [mailto:patmans@us.ibm.com]
Sent: Monday, February 23, 2004 8:58 PM
To: Kay Sievers
Cc: Sabharwal, Atul; linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Udev and SCSI/Fiber channel devices
On Tue, Feb 24, 2004 at 03:22:14AM +0100, Kay Sievers wrote:
> On Tue, 2004-02-24 at 03:09, Sabharwal, Atul wrote:
> > You can use scsi_id in a callout rule with udev for scsi persistent
> > names.
> > scsi_id is released along with udev under extras/scsi_id.
> > >> I tried a callout rule as follows :
> >
> > CALLOUT="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end {
print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
It's scsi_id, not scsid.
Should udev log an error if it can't find the CALLOUT program?
You don't need any arguments, scsi_id relies on the environment variable
DEVPATH for the sysfs path, though it might be cleaner if we could use a
udev string substitution.
And, make sure you have at least one line in your /etc/scsi_id.config
like:
options=-g
I will add a udev example to the scsi_id man page, and more about its
behaviour when called with no arguments, though the udev man has a fine
example.
DEVPATH should probably be documented somewhere, maybe in hotplug(8). (I
can't find anything about it in man pages of udev, udevinfo, or
hotplug.)
> Huh, do we really need this complex callout argument line.
> We are not prepared for something like this, cause we pass
> only 7 arguments down to the program.
> If it's really needed, I can have look.
> Pat?
No. The above rule should just be:
BUS="scsi", CALLOUT="/sbin/scsi_id", ID="325687809", NAME="your_disk"
But if the device is really using page 0x80, the ID will likely have
spaces in it, so run scsi_id manually to verify the value needed in the
ID, including all spaces *especially* any trailing spaces, i.e. run:
/sbin/scsi_id -s /block/sda
-- 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Ì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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (8 preceding siblings ...)
2004-02-24 17:03 ` Sabharwal, Atul
@ 2004-02-24 17:32 ` Patrick Mansfield
2004-02-24 18:03 ` Sabharwal, Atul
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Patrick Mansfield @ 2004-02-24 17:32 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 09:03:39AM -0800, Sabharwal, Atul wrote:
> I tried /sbin/scsi_id also: So, tried combination #1 & #2. Do we need
> the method prefix or
> Its implied. Somewhere in the documentation, there were examples based
> on PCI slot number
> But there was no prefix TOPOLOGY.
>
> 1. CALLOUT, PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end {
> print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> 2. PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end { print$3
> }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> --
> Atul
Yes, that should have been PROGRAM not CALLOUT in my previous email, as
there is no CALLOUT, so the rule should be like:
BUS="scsi", PROGRAM="/sbin/scsi_id", ID="325687809", NAME="your_disk"
But what is the output of:
/sbin/scsi_id -s /block/sda
Whatever the result is what you want in the ID field.
And, you need a line like this in your /etc/scsi_id.config:
options=-g
-- 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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (9 preceding siblings ...)
2004-02-24 17:32 ` Patrick Mansfield
@ 2004-02-24 18:03 ` Sabharwal, Atul
2004-02-24 18:11 ` Sabharwal, Atul
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 18:03 UTC (permalink / raw)
To: linux-hotplug
As per the udev version 8 man page, the five methods to be used are
CALLOUT, LABEL, NUMBER, TOPOLOGY & REPLACE.
PROGRAM is a valid key which can be used. So, what you are mentioning
is not in sync with the manpage.
Thanks,
Atul
On Tue, Feb 24, 2004 at 09:03:39AM -0800, Sabharwal, Atul wrote:
> I tried /sbin/scsi_id also: So, tried combination #1 & #2. Do we
need
> the method prefix or
> Its implied. Somewhere in the documentation, there were examples
based
> on PCI slot number
> But there was no prefix TOPOLOGY.
>
> 1. CALLOUT, PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end
{
> print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> 2. PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end {
print$3
> }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> --
> Atul
Yes, that should have been PROGRAM not CALLOUT in my previous email, as
there is no CALLOUT, so the rule should be like:
BUS="scsi", PROGRAM="/sbin/scsi_id", ID="325687809", NAME="your_disk"
But what is the output of:
/sbin/scsi_id -s /block/sda
Whatever the result is what you want in the ID field.
And, you need a line like this in your /etc/scsi_id.config:
options=-g
-- 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Ì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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (10 preceding siblings ...)
2004-02-24 18:03 ` Sabharwal, Atul
@ 2004-02-24 18:11 ` Sabharwal, Atul
2004-02-24 18:16 ` Kay Sievers
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 18:11 UTC (permalink / raw)
To: linux-hotplug
The output of command /sbin/scsi_id -s /block/sda giver <vendor, model,
serialnumber> .
I can put -p 0x80 but it defaults to page 0x80 anyway.
The reason to separate the three field with awk was to have exact match
without worrying
about spaces. Putting vendor, model number information in a udev rule
does not belong
Over there. In fact, if like scsi_id, it was okay to have an custom
callout programs
And use their output to match the RESULT field, that would be great.
The reason I am explotring CALLOUT is to have a method to give
persistant device names
Using bus#, chasis# & slot#.
So, is CALLOUT used for third party programs and PROGRAM strictly for
known ones like
Scsi_id.
--
Atul
-----Original Message-----
From: Patrick Mansfield [mailto:patmans@us.ibm.com]
Sent: Tuesday, February 24, 2004 9:33 AM
To: Sabharwal, Atul
Cc: Kay Sievers; linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Udev and SCSI/Fiber channel devices
On Tue, Feb 24, 2004 at 09:03:39AM -0800, Sabharwal, Atul wrote:
> I tried /sbin/scsi_id also: So, tried combination #1 & #2. Do we
need
> the method prefix or
> Its implied. Somewhere in the documentation, there were examples
based
> on PCI slot number
> But there was no prefix TOPOLOGY.
>
> 1. CALLOUT, PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end
{
> print$3 }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> 2. PROGRAM="/sbin/scsid -p 0x80 -s /block/sda| awk ' {}; end {
print$3
> }'", BUS="scsi", ID="325687809", NAME="host_scsi"
>
> --
> Atul
Yes, that should have been PROGRAM not CALLOUT in my previous email, as
there is no CALLOUT, so the rule should be like:
BUS="scsi", PROGRAM="/sbin/scsi_id", ID="325687809", NAME="your_disk"
But what is the output of:
/sbin/scsi_id -s /block/sda
Whatever the result is what you want in the ID field.
And, you need a line like this in your /etc/scsi_id.config:
options=-g
-- 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Ì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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (11 preceding siblings ...)
2004-02-24 18:11 ` Sabharwal, Atul
@ 2004-02-24 18:16 ` Kay Sievers
2004-02-24 18:19 ` Greg KH
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kay Sievers @ 2004-02-24 18:16 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2004-02-24 at 19:03, Sabharwal, Atul wrote:
> As per the udev version 8 man page, the five methods to be used are
> CALLOUT, LABEL, NUMBER, TOPOLOGY & REPLACE.
>
> PROGRAM is a valid key which can be used. So, what you are mentioning
> is not in sync with the manpage.
No, definitely not!
You are using a very very old version.
Kay
-------------------------------------------------------
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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (12 preceding siblings ...)
2004-02-24 18:16 ` Kay Sievers
@ 2004-02-24 18:19 ` Greg KH
2004-02-24 18:20 ` Sabharwal, Atul
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-02-24 18:19 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 10:03:01AM -0800, Sabharwal, Atul wrote:
> As per the udev version 8 man page, the five methods to be used are
> CALLOUT, LABEL, NUMBER, TOPOLOGY & REPLACE.
>
> PROGRAM is a valid key which can be used. So, what you are mentioning
> is not in sync with the manpage.
udev version 008 is 10 releases ago. Please get the latest release (018
as of right now) and notice that the format of the rules file has
changed.
thanks,
greg k-h
-------------------------------------------------------
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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (13 preceding siblings ...)
2004-02-24 18:19 ` Greg KH
@ 2004-02-24 18:20 ` Sabharwal, Atul
2004-02-24 18:24 ` Sabharwal, Atul
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 18:20 UTC (permalink / raw)
To: linux-hotplug
I am using version 18 but the man pages are probably outdated. The man
pages
Are udev.8, udevinfo.8. As per this man page, there are only 5 methods
And there are keys associated with them. But I have seen examples where
there
Are no methods at all.
--
Atul
-------------------------------------------------------------
P.S: All opinions are my personal opinion(s) & responsibility and do
not represent the view of my employer ( Intel Corporation ).
-----Original Message-----
From: Kay Sievers [mailto:kay.sievers@vrfy.org]
Sent: Tuesday, February 24, 2004 10:16 AM
To: Sabharwal, Atul
Cc: Patrick Mansfield; linux-hotplug-devel@lists.sourceforge.net
Subject: RE: Udev and SCSI/Fiber channel devices
On Tue, 2004-02-24 at 19:03, Sabharwal, Atul wrote:
> As per the udev version 8 man page, the five methods to be used are
> CALLOUT, LABEL, NUMBER, TOPOLOGY & REPLACE.
>
> PROGRAM is a valid key which can be used. So, what you are mentioning
> is not in sync with the manpage.
No, definitely not!
You are using a very very old version.
Kay
-------------------------------------------------------
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] 19+ messages in thread* RE: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (14 preceding siblings ...)
2004-02-24 18:20 ` Sabharwal, Atul
@ 2004-02-24 18:24 ` Sabharwal, Atul
2004-02-24 18:31 ` Patrick Mansfield
2004-02-24 18:40 ` Greg KH
17 siblings, 0 replies; 19+ messages in thread
From: Sabharwal, Atul @ 2004-02-24 18:24 UTC (permalink / raw)
To: linux-hotplug
The udev version 18 tar ball has version 8 man pages.
--
Atul
-------------------------------------------------------------
P.S: All opinions are my personal opinion(s) & responsibility and do
not represent the view of my employer ( Intel Corporation ).
-----Original Message-----
From: Greg KH [mailto:greg@kroah.com]
Sent: Tuesday, February 24, 2004 10:20 AM
To: Sabharwal, Atul
Cc: Patrick Mansfield; Kay Sievers;
linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Udev and SCSI/Fiber channel devices
On Tue, Feb 24, 2004 at 10:03:01AM -0800, Sabharwal, Atul wrote:
> As per the udev version 8 man page, the five methods to be used are
> CALLOUT, LABEL, NUMBER, TOPOLOGY & REPLACE.
>
> PROGRAM is a valid key which can be used. So, what you are mentioning
> is not in sync with the manpage.
udev version 008 is 10 releases ago. Please get the latest release (018
as of right now) and notice that the format of the rules file has
changed.
thanks,
greg k-h
-------------------------------------------------------
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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (15 preceding siblings ...)
2004-02-24 18:24 ` Sabharwal, Atul
@ 2004-02-24 18:31 ` Patrick Mansfield
2004-02-24 18:40 ` Greg KH
17 siblings, 0 replies; 19+ messages in thread
From: Patrick Mansfield @ 2004-02-24 18:31 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 10:11:31AM -0800, Sabharwal, Atul wrote:
> The output of command /sbin/scsi_id -s /block/sda giver <vendor, model,
> serialnumber> .
> I can put -p 0x80 but it defaults to page 0x80 anyway.
>
> The reason to separate the three field with awk was to have exact match
> without worrying
> about spaces. Putting vendor, model number information in a udev rule
> does not belong
> Over there. In fact, if like scsi_id, it was okay to have an custom
> callout programs
> And use their output to match the RESULT field, that would be great.
It's normal to use vendor and model in udev rules.
Page 0x80 gives a unique serial number only for a given vendor and model,
so if you use only the serial number, it is possible though perhaps
unlikely that it will collide with other ID's.
> The reason I am explotring CALLOUT is to have a method to give
> persistant device names
> Using bus#, chasis# & slot#.
If you want to name based on position or hardware location you don't want
to use scsi_id, you probably want to key off of the bus id, plus other
sysfs host adapter (i.e. pci) attributes.
-- 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] 19+ messages in thread* Re: Udev and SCSI/Fiber channel devices
2004-02-23 23:43 Udev and SCSI/Fiber channel devices Sabharwal, Atul
` (16 preceding siblings ...)
2004-02-24 18:31 ` Patrick Mansfield
@ 2004-02-24 18:40 ` Greg KH
17 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-02-24 18:40 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 24, 2004 at 10:24:02AM -0800, Sabharwal, Atul wrote:
> The udev version 18 tar ball has version 8 man pages.
Please stop top-posting and quoting the whole previous email, that's
very bad email form. Also, stop breaking the email thread. There are a
number of good Outlook plugins that will fix this for you if you are
stuck using Outlook.
And oh, there is no "version 8 man pages". The section that the man
page is in is 8.
thanks,
greg k-h
-------------------------------------------------------
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] 19+ messages in thread