From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 07 Nov 2003 19:32:08 +0000 Subject: Re: udev naming for scsi disk partitions Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Nov 07, 2003 at 11:53:29AM +0530, Surekha.PC wrote: > > Please find my comments interspersed below with "=>" mark. > > > > In sysfs the scsi device path looks as shown below. > > > > The sysfs's "block" device path lists the block devices detected on > > the system. Here "sdc" is the iSCSI device and "sdc1" and "sdc2" are > > listed as 2 partitions on the iSCSI disk. > > > > The device field below is pointing to the iSCSI host/bus/tgt/lun path. > > > > #ls -l /sys/block/sdc > > total 0 > > -r--r--r-- 1 root root 4096 Nov 7 08:25 dev > > lrwxrwxrwx 1 root root 35 Nov 7 08:25 device -> > > ../../devices/legacy/host6/6:0:69:0 > > Hm, yeah that rule should have worked. Mind enabling debugging in > namedev.c by uncommenting the line: //#define DEBUG_PARSER > at the top of the file? If you rebuild udev, and then send me the > syslog debug messages when you plug the device in, I'd really apreciate > it. > > => I have enabled the debug as mentioned above. Could you pls tell me > where the messages are logged, "/var/log/messages" file doesn't have any > ? You need to tell syslogd to write the system wide debug messages somewhere. I have the following line in my /etc/syslog.conf: *.debug /var/log/debug Restart syslogd and look in that file. > > I think the sysfs file "/sys/block/sdc/sdc1" should be ideal to use > > for setting the LABEL rule as you have mentioned. > > Hm, if it's always sdc1, why not just use a simple REPLACE rule? > Something like the following rules should work for you: > > REPLACE, KERNEL="sdc1", NAME="c6b0t69l01" > REPLACE, KERNEL="sdc2", NAME="c6b0t69l02" > > Will that work? > > => But it need not be sdc1 always, a disk can have any number of > partitions, then the config file will need to be changed always :( Yes, you are correct, I just thought you said it would always be those kernel names :) How about any of the sysfs files? Are they going to hold unique values? The vendor file? model file? thanks, greg k-h ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.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