From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Mansfield Date: Tue, 24 Feb 2004 04:58:20 +0000 Subject: Re: Udev and SCSI/Fiber channel devices Message-Id: <20040223205820.A16396@beaverton.ibm.com> List-Id: References: <2F75A5CCEF1E6A4C8CA2E75CF7F529E901F260D7@orsmsx409.jf.intel.com> In-Reply-To: <2F75A5CCEF1E6A4C8CA2E75CF7F529E901F260D7@orsmsx409.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id56&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