udev does not create scsi disk entries during bootup
Hi all,
I am not able to create the scsi disk entries during boot time using
udev.
Manual addtion/removal of device entries using udev program works
fine.
I have installed latest hotplug scripts.
Am I missing something here ?
Appreciate your help.
Thanks,
surekha
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Surekha.PC
I am not able to create the scsi disk entries during boot time using
udev.
Manual addtion/removal of device entries using udev program works
fine.
I have installed latest hotplug scripts.Am I missing something here ?
Anything in your debug logs to show that udev is really running? Is /etc/hotplug.d/default/udev.hotplug pointing to your udev binary?
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi Greg,
Quoted 2 lines
Anything in your debug logs to show that udev is really running? Is
/etc/hotplug.d/default/udev.hotplugpointing to your udev binary?
The debug log is empty, it seems udev is not being invoked by hotplug program.
The symlink exists from udev.hotplug to the binary.
CONFIG_HOTPLUG is enabled in the kernel.
The sd_mod driver is not a module, it is made part of the kernel. Is that ok?
Thanks,
surekha
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Greg KH
Sent: Thursday, November 13, 2003 11:56 AM
To: Surekha.PC
Cc: [email protected]
Subject: Re: udev does not create scsi disk entries during bootup
Quoted 9 lines · Surekha.PC
I am not able to create the scsi disk entries during boot time using
udev.
Manual addtion/removal of device entries using udev program works
fine.
I have installed latest hotplug scripts.Am I missing something here ?
Anything in your debug logs to show that udev is really running? Is /etc/hotplug.d/default/udev.hotplug pointing to your udev binary?
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Surekha.PC
Hi Greg,
Quoted 2 lines
Anything in your debug logs to show that udev is really running? Is
/etc/hotplug.d/default/udev.hotplugpointing to your udev binary?The debug log is empty, it seems udev is not being invoked by hotplug program.
The symlink exists from udev.hotplug to the binary.
And does your /sbin/hotplug binary say that it will read from the /etc/hotplug.d directories?
Quoted 3 lines
CONFIG_HOTPLUGis enabled in the kernel.
Thesd_moddriver is not a module, it is made part of the kernel. Is that ok?
That's fine, but remember, only devices found after init mounts your root disk will show up as being found by udev for right now, unless you put udev into initramfs somehow.
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
Anything in your debug logs to show that udev is really running? Is
/etc/hotplug.d/default/udev.hotplugpointing to your udev binary?The debug log is empty, it seems udev is not being invoked by hotplug
program. The symlink exists from udev.hotplug to the binary.
And does your
/sbin/hotplugbinary say that it will read from the
/etc/hotplug.d
Quoted 1 line
directories?
Yes, it mentions that it reads from /etc/hotplug.d path.
I downloaded this package from the following URL.
http://kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2003_08_05.tar.
gz
Quoted 5 lines
Quoted 3 lines
CONFIG_HOTPLUGis enabled in the kernel.
Thesd_moddriver is not a module, it is made part of the kernel. Is that ok?That's fine, but remember, only devices found after init mounts your
root disk will show >up as being found by udev for right now, unless you put udev into initramfs somehow.
Ok, that being the case, the local scsi disks would not be seen by udev during bootup unless it is part of initrd, right ?
However I am bring up my iSCSI services, after root disk is mounted, so these disks have to be recognised by udev. Stopping the iSCSI service, will deconfigure the iSCSI disks, this should remove the disk entries in udev.
Is it possible to achive this funtionality with the latest hotplug and udev?
FYI, the /etc/hotplug directory has scsi.agent installed, along with usb, pci ..etc.
Thanks,
surekha
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi,
I am not able to run udev during boot time inspite of having installed
udev, and the associated configuration.
Appreciate help in resolving this issue soon.
Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
TIA,
surekha
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Anything in your debug logs to show that udev is really running? Is
/etc/hotplug.d/default/udev.hotplugpointing to your udev binary?The debug log is empty, it seems udev is not being invoked by hotplug
program. The symlink exists from udev.hotplug to the binary.
And does your
/sbin/hotplugbinary say that it will read from the
/etc/hotplug.d
Quoted 1 line
directories?
Yes, it mentions that it reads from /etc/hotplug.d path.
I downloaded this package from the following URL.
http://kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2003_08_05.tar.
gz
Quoted 5 lines
Quoted 3 lines
CONFIG_HOTPLUGis enabled in the kernel.
Thesd_moddriver is not a module, it is made part of the kernel. Is that ok?That's fine, but remember, only devices found after init mounts your
root disk will show >up as being found by udev for right now, unless you put udev into initramfs somehow.
Ok, that being the case, the local scsi disks would not be seen by udev during bootup unless it is part of initrd, right ?
However I am bring up my iSCSI services, after root disk is mounted, so these disks have to be recognised by udev. Stopping the iSCSI service, will deconfigure the iSCSI disks, this should remove the disk entries in udev. Is it possible to achive this funtionality with the latest hotplug and udev?
FYI, the /etc/hotplug directory has scsi.agent installed, along with usb, pci ..etc.
Thanks,
surekha
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Surekha.PC
Hi,
I am not able to run udev during boot time inspite of having installed
udev, and the associated configuration.
Appreciate help in resolving this issue soon.Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
I suspect that you still have to run udev-005 manually unless the devices are detected after the hotplug service starts (i.e., if your scsi disk code is a module). Is that right Greg?
mh
Signature · 15 lines
Martin Hicks Wild Open Source Inc. [email protected] 613-266-2296 ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines
Quoted 9 lines
Hi,
I am not able to run udev during boot time inspite of having
installed udev, and the associated configuration. Appreciate help in resolving this issue soon.Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
I suspect that you still have to run udev-005 manually unless the
devices are detected after the hotplug service starts
Quoted 1 line
(i.e., if your scsi disk code is a module). Is that right Greg?
Ok, that applies for native scsi disks. I have a iSCSI setup. My iSCSI disks are detected long after hotplug service has started. In that case, the device entries should have been created by udev.
Does this still require sd_mod to be loaded as a module?
Thanks,
surekha
-----Original Message-----
From: Martin Hicks [mailto:[email protected]]
Sent: Monday, November 17, 2003 6:33 PM
To: Surekha.PC
Cc: [email protected]
Subject: RE: udev does not create scsi disk entries during bootup
Quoted 8 lines · Surekha.PC
Hi,
I am not able to run udev during boot time inspite of having
installed udev, and the associated configuration. Appreciate help in resolving this issue soon.Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
I suspect that you still have to run udev-005 manually unless the devices are detected after the hotplug service starts (i.e., if your scsi disk code is a module). Is that right Greg?
mh
Signature · 16 lines
Martin Hicks Wild Open Source Inc. [email protected] 613-266-2296 ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.
Appreciate your response.
Thanks,
surekha
-----Original Message-----
From: Surekha.PC [mailto:[email protected]]
Sent: Tuesday, November 18, 2003 1:42 PM
To: 'Martin Hicks'
Cc: '[email protected]'
Subject: RE: udev does not create scsi disk entries during bootup
Quoted 6 lines
Quoted 6 lines
Hi,
I am not able to run udev during boot time inspite of having
installed udev, and the associated configuration. Appreciate help in resolving this issue soon.
Quoted 6 lines
Quoted 2 lines
Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
I suspect that you still have to run udev-005 manually unless the devices are detected after the hotplug service starts (i.e., if your scsi disk code is a module). Is that right Greg?
Ok, that applies for native scsi disks. I have a iSCSI setup. My iSCSI disks are detected long after hotplug service has started. In that case, the device entries should have been created by udev. Does this still require sd_mod to be loaded as a module?
Thanks,
surekha
-----Original Message-----
From: Martin Hicks [mailto:[email protected]]
Sent: Monday, November 17, 2003 6:33 PM
To: Surekha.PC
Cc: [email protected]
Subject: RE: udev does not create scsi disk entries during bootup
Quoted 8 lines · Surekha.PC
Hi,
I am not able to run udev during boot time inspite of having
installed udev, and the associated configuration. Appreciate help in resolving this issue soon.Is this feature working for udev-005 right now or one needs to manually run "udev add/remove" to configure devices ?
I suspect that you still have to run udev-005 manually unless the devices are detected after the hotplug service starts (i.e., if your scsi disk code is a module). Is that right Greg?
mh
Signature · 16 lines
Martin Hicks Wild Open Source Inc. [email protected] 613-266-2296 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Surekha.PC
root disk will show >up as being found by udev for right now, unless you put udev into initramfs somehow.
Ok, that being the case, the local scsi disks would not be seen by udev during bootup unless it is part of initrd, right ?
udev would need to be initrd, and sysfs needs to be mounted. Have you done that?
Quoted 6 lines
However I am bring up my iSCSI services, after root disk is mounted, so these disks have to be recognised by udev. Stopping the iSCSI service, will deconfigure the iSCSI disks, this should remove the disk entries in udev.
Is it possible to achive this funtionality with the latest hotplug and udev?
Yes, make sure that sysfs is mounted before you start finding the iscsi devices.
Good luck,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi,
Quoted 8 lines
Quoted 6 lines
root disk will show >up as being found by udev for right now, unless you put udev into initramfs somehow.
Ok, that being the case, the local scsi disks would not be seen by udev during bootup unless it is part of initrd, right ?
udev would need to be initrd, and sysfs needs to be mounted. Have you
done that?
Ok thanks for that, I will try making udev part of initrd and test this feature.
Quoted 3 lines
Quoted 3 lines
However I am bring up my iSCSI services, after root disk is mounted, so these disks have to be recognised by udev. Stopping the iSCSI service, will deconfigure the iSCSI disks, this should remove the
disk
Quoted 4 lines
Quoted 2 lines
entries in udev. Is it possible to achive this funtionality with the latest hotplug and udev?
Yes, make sure that sysfs is mounted before you start finding the iscsi
devices.
I have automounted sysfs. The /sys/block/ shows the iSCSI device entries.
But hotplug event is not notified by the kernel. This is the reason why udev
is not getting triggered for configuring device nodes.
I have few queries about the way hotplug mechanism works.
The /etc/hotplug/scsi.agent script does not seem to handle the "ACTION" add/remove of a scsi device ?
Also the "/usr/src/linux/drivers/scsi" driver code does not have any hotplug
initialization functions, then how does it indicate "/sbin/hotplug" program about the addition/deletion of device ?
I have referred the hotplug documentation in the follg URL FYI
http://linux-hotplug.sourceforge.net/?selected=hotplug
Thanks,
surekha
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Surekha.PC
Quoted 2 lines
Yes, make sure that sysfs is mounted before you start finding the iscsi
devices.
I have automounted sysfs. The
/sys/block/shows the iSCSI device entries.
But hotplug event is not notified by the kernel. This is the reason why udev is not getting triggered for configuring device nodes.
How do you know hotplug is not running? It will if CONFIG_HOTPLUG is enabled in your kernel.
Quoted 4 lines
I have few queries about the way hotplug mechanism works.
The
/etc/hotplug/scsi.agentscript does not seem to handle the "ACTION" add/remove of a scsi device ?
It should.
Quoted 3 lines
Also the "
/usr/src/linux/drivers/scsi" driver code does not have any hotplug initialization functions, then how does it indicate "/sbin/hotplug" program about the addition/deletion of device ?
The kobject core code does this when a scsi kobject is created.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Surekha.PC
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.
Getting udev to work for your devices has nothing to do with getting your iscsi driver to be included in the main 2.6 kernel. Why do you say that?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
On Thu, 20 Nov 2003, Greg KH uttered the following:
Quoted 13 lines · Surekha.PC
Quoted 5 lines
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.Getting udev to work for your devices has nothing to do with getting your iscsi driver to be included in the main 2.6 kernel. Why do you say that?
thanks,
In the effort to get this iSCSI driver included into the 2.6 kernel, we are making a number of changes in response to comments from the SCSI maintainers. Many of these comments are regarding work-arounds or designs currently in our [2.2/2.4-derived] driver that should be removed or redesigned in favor of features now available in 2.6. Udev is one of those features.
iSCSI is a weird beast that allows SCSI commands to be sent over a TCP network to a target device (usually fibrechannel-attached disk or tape). During normal operation, there is the opportunity for hotplug events based on network access, etc. Trying to boot from an iSCSI disk is another, perhaps more complex, set of issues. We are trying our best to understand new things such as udev as fast as we can to make best use of them.
That we are putting time pressure on ourselves for 2.6 inclusion is not your or the community's problem, of course. We do appreciate the help that all of you provide. I hope this information has helped to answer your question.
Regards,
Signature · 15 lines
Clay Haapala ([email protected]) Cisco Systems SRBU +1 763-398-1056 6450 Wedgwood Rd, Suite 130 Maple Grove MN 55311 PGP: C89240AD Well, looks like hypocrisy is back on the airwaves. C'mon, Rush! Do the crime, do the time, right? ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Clay Haapala
On Thu, 20 Nov 2003, Greg KH uttered the following:
Quoted 11 lines · Surekha.PC
Quoted 5 lines
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.Getting udev to work for your devices has nothing to do with getting your iscsi driver to be included in the main 2.6 kernel. Why do you say that?
Quoted 8 lines
Quoted 2 lines
thanks,
In the effort to get this iSCSI driver included into the 2.6 kernel, we are making a number of changes in response to comments from the SCSI maintainers. Many of these comments are regarding work-arounds or designs currently in our [2.2/2.4-derived] driver that should be removed or redesigned in favor of features now available in 2.6. Udev is one of those features.
Um, but what features does udev require, that any other well working scsi driver not require? sysfs support? I thought the scsi core would provide that for you.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
On Thu, 20 Nov 2003, Greg KH spake thusly:
Quoted 23 lines · Clay Haapala
Quoted 13 lines
On Thu, 20 Nov 2003, Greg KH uttered the following:
Quoted 12 lines · Surekha.PC
Quoted 6 lines
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.Getting udev to work for your devices has nothing to do with getting your iscsi driver to be included in the main 2.6 kernel. Why do you say that?
Quoted 8 lines
Quoted 2 lines
thanks,
In the effort to get this iSCSI driver included into the 2.6 kernel, we are making a number of changes in response to comments from the SCSI maintainers. Many of these comments are regarding work-arounds or designs currently in our [2.2/2.4-derived] driver that should be removed or redesigned in favor of features now available in 2.6. Udev is one of those features.
Quoted 7 lines
Um, but what features does udev require, that any other well working scsi driver not require? sysfs support? I thought the scsi core would provide that for you.
thanks,
greg k-h
Being newest to iSCSI dev, I probably shouldn't have entered the discussion, since I'm not sure that what is needed is a new udev feature, or rather a better understanding of udev.
Signature · 15 lines
Clay Haapala ([email protected]) Cisco Systems SRBU +1 763-398-1056 6450 Wedgwood Rd, Suite 130 Maple Grove MN 55311 PGP: C89240AD Well, looks like hypocrisy is back on the airwaves. C'mon, Rush! Do the crime, do the time, right? ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
We need to make hotplugging work with udev for iSCSI devices, so that persistent named device nodes are dynamically configured/de-configured. iSCSI users look upon the persistent device nodes for any operation on iSCSI devices.
We have a iSCSI network boot feature for which, we need to use persistent device entries for early boot. Earlier we were creating our own symlinks for persistency.
Now for 2.6 kernel changes, we are planning to use udev to do that work for us, so we will need to make this feature working for completeness.
To achieve these things, I need to make udev work in hotplug mode. That was the intent of my mention.
Thanks,
surekha
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Greg KH
Sent: Thursday, November 20, 2003 10:24 PM
To: Surekha.PC
Cc: 'Martin Hicks'; [email protected]
Subject: Re: udev does not create scsi disk entries during bootup
Quoted 5 lines · Surekha.PC
Hi all,
Request your attention for the problem I am facing. This issue is
urgent for our iSCSI driver inclusion to 2.6 kernel.
Getting udev to work for your devices has nothing to do with getting your iscsi driver to be included in the main 2.6 kernel. Why do you say that?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here:
http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Surekha.PC
To achieve these things, I need to make udev work in hotplug mode. That was the intent of my mention.
Ok, if the iscsi driver creates a scsi device properly with the scsi subsystem, and registers a block device, then udev will work just fine with it.
What does your /sys/block/ tree look like with a iscsi drive connected?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Yes, the iSCSI driver is registering the device with scsi layer and sysfs shows the device attributes just like for any scsi device.
The /sys/block tree looks the same as with native scsi disks connected.
#ls -l /sys/block/sd*
sda sdb sdc sdd
FYI, I have attached the ls -lR /sys/block/ in log file.
Here sda, sdb are my native scsi disks while sdc, sdd are iSCSI disks.
I am able to manually create the device nodes for iSCSI disks with udev.
Making udev work with hotplug is the only issue now :(
Thanks,
Surekha
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Greg KH
Sent: Friday, November 21, 2003 11:43 AM
To: Surekha.PC
Cc: 'Martin Hicks'; [email protected]
Subject: Re: udev does not create scsi disk entries during bootup
Quoted 3 lines · Surekha.PC
To achieve these things, I need to make udev work in hotplug mode. That was the intent of my mention.
Ok, if the iscsi driver creates a scsi device properly with the scsi subsystem, and registers a block device, then udev will work just fine with it.
What does your /sys/block/ tree look like with a iscsi drive connected?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here:
http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
/sys/block/:
total 0
drwxr-xr-x 3 root root 0 Nov 20 09:54 fd0 drwxr-xr-x 3 root root 0 Nov 20 09:54 hda drwxr-xr-x 3 root root 0 Nov 20 09:54 loop0 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop1 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop2 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop3 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop4 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop5 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop6 drwxr-xr-x 3 root root 0 Nov 20 09:54 loop7 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram0 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram1 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram10 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram11 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram12 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram13 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram14 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram15 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram2 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram3 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram4 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram5 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram6 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram7 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram8 drwxr-xr-x 3 root root 0 Nov 20 09:54 ram9 drwxr-xr-x 6 root root 0 Nov 20 09:55 sda drwxr-xr-x 9 root root 0 Nov 20 09:55 sdb drwxr-xr-x 6 root root 0 Nov 20 14:55 sdc drwxr-xr-x 6 root root 0 Nov 20 14:55 sdd
/sys/block/fd0:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/fd0/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/fd0/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 09:54 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 read_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 write_expire
/sys/block/hda:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev lrwxrwxrwx 1 root root 22 Nov 20 09:54 device -> ../../devices/ide0/0.0 drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/hda/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/hda/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 09:54 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 read_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:54 write_expire
/sys/block/loop0:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop0/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop0/queue/iosched:
total 0
/sys/block/loop1:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop1/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop1/queue/iosched:
total 0
/sys/block/loop2:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop2/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop2/queue/iosched:
total 0
/sys/block/loop3:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop3/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop3/queue/iosched:
total 0
/sys/block/loop4:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop4/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop4/queue/iosched:
total 0
/sys/block/loop5:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop5/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop5/queue/iosched:
total 0
/sys/block/loop6:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop6/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop6/queue/iosched:
total 0
/sys/block/loop7:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/loop7/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/loop7/queue/iosched:
total 0
/sys/block/ram0:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram0/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram0/queue/iosched:
total 0
/sys/block/ram1:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram1/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram1/queue/iosched:
total 0
/sys/block/ram10:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram10/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram10/queue/iosched:
total 0
/sys/block/ram11:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram11/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram11/queue/iosched:
total 0
/sys/block/ram12:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram12/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram12/queue/iosched:
total 0
/sys/block/ram13:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram13/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram13/queue/iosched:
total 0
/sys/block/ram14:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram14/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram14/queue/iosched:
total 0
/sys/block/ram15:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram15/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram15/queue/iosched:
total 0
/sys/block/ram2:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram2/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram2/queue/iosched:
total 0
/sys/block/ram3:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram3/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram3/queue/iosched:
total 0
/sys/block/ram4:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram4/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram4/queue/iosched:
total 0
/sys/block/ram5:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram5/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram5/queue/iosched:
total 0
/sys/block/ram6:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram6/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram6/queue/iosched:
total 0
/sys/block/ram7:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram7/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram7/queue/iosched:
total 0
/sys/block/ram8:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram8/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram8/queue/iosched:
total 0
/sys/block/ram9:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:54 dev drwxr-xr-x 3 root root 0 Nov 20 09:54 queue -r--r--r-- 1 root root 4096 Nov 20 09:54 range -r--r--r-- 1 root root 4096 Nov 20 09:54 size -r--r--r-- 1 root root 4096 Nov 20 09:54 stat
/sys/block/ram9/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:54 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:54 nr_requests
/sys/block/ram9/queue/iosched:
total 0
/sys/block/sda:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev lrwxrwxrwx 1 root root 51 Nov 20 09:55 device -> ../../devices/pci0000:01/0000:01:03.1/host0/0:0:0:0 drwxr-xr-x 3 root root 0 Nov 20 09:55 queue -r--r--r-- 1 root root 4096 Nov 20 09:55 range drwxr-xr-x 2 root root 0 Nov 20 09:55 sda1 drwxr-xr-x 2 root root 0 Nov 20 09:55 sda2 drwxr-xr-x 2 root root 0 Nov 20 09:55 sda3 -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sda/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:55 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:55 nr_requests
/sys/block/sda/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 09:55 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 read_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 write_expire
/sys/block/sda/sda1:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sda/sda2:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sda/sda3:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev lrwxrwxrwx 1 root root 51 Nov 20 09:55 device -> ../../devices/pci0000:01/0000:01:03.1/host0/0:0:1:0 drwxr-xr-x 3 root root 0 Nov 20 09:55 queue -r--r--r-- 1 root root 4096 Nov 20 09:55 range drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb1 drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb2 drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb5 drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb6 drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb7 drwxr-xr-x 2 root root 0 Nov 20 09:55 sdb8 -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 09:55 iosched -rw-r--r-- 1 root root 4096 Nov 20 09:55 nr_requests
/sys/block/sdb/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 09:55 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 read_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 09:55 write_expire
/sys/block/sdb/sdb1:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/sdb2:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/sdb5:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/sdb6:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/sdb7:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdb/sdb8:
total 0
-r--r--r-- 1 root root 4096 Nov 20 09:55 dev -r--r--r-- 1 root root 4096 Nov 20 09:55 size -r--r--r-- 1 root root 4096 Nov 20 09:55 start -r--r--r-- 1 root root 4096 Nov 20 09:55 stat
/sys/block/sdc:
total 0
-r--r--r-- 1 root root 4096 Nov 20 14:55 dev lrwxrwxrwx 1 root root 34 Nov 20 14:55 device -> ../../devices/legacy/host2/2:0:0:0 drwxr-xr-x 3 root root 0 Nov 20 14:55 queue -r--r--r-- 1 root root 4096 Nov 20 14:55 range drwxr-xr-x 2 root root 0 Nov 21 09:11 sdc1 drwxr-xr-x 2 root root 0 Nov 21 09:11 sdc2 drwxr-xr-x 2 root root 0 Nov 21 09:11 sdc3 -r--r--r-- 1 root root 4096 Nov 20 14:55 size -r--r--r-- 1 root root 4096 Nov 20 14:55 stat
/sys/block/sdc/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 14:55 iosched -rw-r--r-- 1 root root 4096 Nov 20 14:55 nr_requests
/sys/block/sdc/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 14:55 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 read_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 write_expire
/sys/block/sdc/sdc1:
total 0
-r--r--r-- 1 root root 4096 Nov 21 09:11 dev -r--r--r-- 1 root root 4096 Nov 21 09:11 size -r--r--r-- 1 root root 4096 Nov 21 09:11 start -r--r--r-- 1 root root 4096 Nov 21 09:11 stat
/sys/block/sdc/sdc2:
total 0
-r--r--r-- 1 root root 4096 Nov 21 09:11 dev -r--r--r-- 1 root root 4096 Nov 21 09:11 size -r--r--r-- 1 root root 4096 Nov 21 09:11 start -r--r--r-- 1 root root 4096 Nov 21 09:11 stat
/sys/block/sdc/sdc3:
total 0
-r--r--r-- 1 root root 4096 Nov 21 09:11 dev -r--r--r-- 1 root root 4096 Nov 21 09:11 size -r--r--r-- 1 root root 4096 Nov 21 09:11 start -r--r--r-- 1 root root 4096 Nov 21 09:11 stat
/sys/block/sdd:
total 0
-r--r--r-- 1 root root 4096 Nov 20 14:55 dev lrwxrwxrwx 1 root root 34 Nov 20 14:55 device -> ../../devices/legacy/host2/2:0:1:0 drwxr-xr-x 3 root root 0 Nov 20 14:55 queue -r--r--r-- 1 root root 4096 Nov 20 14:55 range drwxr-xr-x 2 root root 0 Nov 21 08:50 sdd1 drwxr-xr-x 2 root root 0 Nov 21 08:50 sdd2 drwxr-xr-x 2 root root 0 Nov 21 08:50 sdd3 -r--r--r-- 1 root root 4096 Nov 20 14:55 size -r--r--r-- 1 root root 4096 Nov 20 14:55 stat
/sys/block/sdd/queue:
total 0
drwxr-xr-x 2 root root 0 Nov 20 14:55 iosched -rw-r--r-- 1 root root 4096 Nov 20 14:55 nr_requests
/sys/block/sdd/queue/iosched:
total 0
-rw-r--r-- 1 root root 4096 Nov 20 14:55 antic_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 read_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 read_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 write_batch_expire -rw-r--r-- 1 root root 4096 Nov 20 14:55 write_expire
/sys/block/sdd/sdd1:
total 0
-r--r--r-- 1 root root 4096 Nov 21 08:50 dev -r--r--r-- 1 root root 4096 Nov 21 08:50 size -r--r--r-- 1 root root 4096 Nov 21 08:50 start -r--r--r-- 1 root root 4096 Nov 21 08:50 stat
/sys/block/sdd/sdd2:
total 0
-r--r--r-- 1 root root 4096 Nov 21 08:50 dev -r--r--r-- 1 root root 4096 Nov 21 08:50 size -r--r--r-- 1 root root 4096 Nov 21 08:50 start -r--r--r-- 1 root root 4096 Nov 21 08:50 stat
/sys/block/sdd/sdd3:
total 0
-r--r--r-- 1 root root 4096 Nov 21 08:50 dev -r--r--r-- 1 root root 4096 Nov 21 08:50 size -r--r--r-- 1 root root 4096 Nov 21 08:50 start -r--r--r-- 1 root root 4096 Nov 21 08:50 stat
Quoted 10 lines · Surekha.PC
Yes, the iSCSI driver is registering the device with scsi layer and sysfs shows the device attributes just like for any scsi device.
The
/sys/blocktree looks the same as with native scsi disks connected.#ls -l
/sys/block/sd*
sda sdb sdc sddFYI, I have attached the
ls -lR /sys/block/in log file.
The 'tree' function is much nicer for seeing things like this :)
Quoted 1 line
Here sda, sdb are my native scsi disks while sdc, sdd are iSCSI disks.
Why is your iscsi host controller haning off of the legacy bus? Isn't it connected to a ethernet device in reality? You should link it to that.
Quoted 3 lines
I am able to manually create the device nodes for iSCSI disks with udev.
Making udev work with hotplug is the only issue now :(
Don't know why it isn't working for you. Does any other devices work
with hotplug? What distro are you using? Can you install the hotplug
rpms instead of using the tarballs?
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines
The 'tree' function is much nicer for seeing things like this :)
Is this a utility? Appreciate if you can inform me where to get it.
Quoted 1 line
Quoted 1 line
Here sda, sdb are my native scsi disks while sdc, sdd are iSCSI
disks.
Quoted 1 line
Why is your iscsi host controller haning off of the legacy bus? Isn't
it connected to a >ethernet device in reality? You should link it to that.
iSCSI is a pseudo SCSI HBA, it is registered with Scsi_Host template just like any native SCSI HBA. Since there isn't any pci bus associated with it, it appears on legacy bus.
Quoted 8 lines
Quoted 4 lines
I am able to manually create the device nodes for iSCSI disks with udev.
Making udev work with hotplug is the only issue now :(
Don't know why it isn't working for you. Does any other devices work
with hotplug? What distro are you using? Can you install the hotplug
rpms instead of using the tarballs?
I have native scsi disk devices on my system. These are not tested for hotplugging since it requires to build udev with initrd, which I am yet to test with.
I am using Redhat 9.0 with linux-kernel 2.6.0-test5.
I was not able to install from rpm, rpm on 2.6 kernel has an issue, it gives following error and fails... That's another issue.
------------------------------------------------------------------------
--------------
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
------------------------------------------------------------------------
--------------
I have one more query. I happened to read from the URL mentioned below, that hotplugging can be achieved by plugging/unplugging the scsi device and executing the following command.
echo "scsi add-single-device <h> <c> <t> <l>" > /proc/scsi/scsi echo "scsi remove-single-device <h> <c> <t> <l>" > /proc/scsi/scsi
h - host number
c - channel
t - target
l - lun
http://lwn.net/Articles/12723/
Hope this is not all about scsi hotplugging ? I presume that hotplugging should not take any user input and should be completely automated.
Thanks,
surekha
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Surekha.PC
Quoted 3 lines
The 'tree' function is much nicer for seeing things like this :)
Is this a utility? Appreciate if you can inform me where to get it.
Hm, it should be included in your distro. What are you running?
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Here sda, sdb are my native scsi disks while sdc, sdd are iSCSI
disks.
Quoted 1 line
Why is your iscsi host controller haning off of the legacy bus? Isn't
it connected to a >ethernet device in reality? You should link it to that.
iSCSI is a pseudo SCSI HBA, it is registered with
Scsi_Hosttemplate just like any native SCSI HBA. Since there isn't any pci bus associated with it, it appears on legacy bus.
But it's attached to a network connection, correct? If so, why not link it to the network device?
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
I am able to manually create the device nodes for iSCSI disks with udev.
Making udev work with hotplug is the only issue now :(
Don't know why it isn't working for you. Does any other devices work
with hotplug? What distro are you using? Can you install the hotplug
rpms instead of using the tarballs?
Quoted 8 lines
I have native scsi disk devices on my system. These are not tested for hotplugging since it requires to build udev with initrd, which I am yet to test with.
I am using Redhat 9.0 with linux-kernel 2.6.0-test5.
I was not able to install from rpm, rpm on 2.6 kernel has an issue, it gives following error and fails... That's another issue.
Sounds like you aren't running as root to do that.
Anyway, try grabbing the version of hotplug from rawhide/fedora that should be a good base to work off of. Other than that, I really have no idea what's going wrong. It doesn't look to be a kernel or udev error, so I'll be of no help :)
Good luck,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi Greg,
I was able to make hotplug work !!!
The latest udev-007 release provides udev startup script, which was not
present in earlier udev-005 release. The script however does not get installed in the rc.d path.
I had to install it manually to make it work. This needs to be taken care in future releases.
I am now able to automatically add and remove my iSCSI devices through udev.
I am submitting the patch with 2 changes.
1)To include new field in the NUMBER rule specially for iSCSI devices.
The current rule provided by udev is as below.
NUMBER, BUS="scsi", ID=2:0:0:0", NAME="disk%n"
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
2) Device partition name needs to be appended with "s" before partition id.
If the device name consists of bus,target info like "c0b0t0l0" it will be easier to identify the partition as in "c0b0t0l0s1".
Please find the patch alongwith.
Thanks,
surekha
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Greg KH
Sent: Tuesday, November 25, 2003 3:44 AM
To: Surekha.PC
Cc: 'Martin Hicks'; [email protected]
Subject: Re: udev does not create scsi disk entries during bootup
Quoted 5 lines · Surekha.PC
Quoted 3 lines
The 'tree' function is much nicer for seeing things like this :)
Is this a utility? Appreciate if you can inform me where to get it.
Hm, it should be included in your distro. What are you running?
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Here sda, sdb are my native scsi disks while sdc, sdd are iSCSI
disks.
Quoted 2 lines
Why is your iscsi host controller haning off of the legacy bus? Isn't
it connected to a >ethernet device in reality? You should link it to that.
iSCSI is a pseudo SCSI HBA, it is registered with
Scsi_Hosttemplate just like any native SCSI HBA. Since there isn't any pci bus associated with it, it appears on legacy bus.
But it's attached to a network connection, correct? If so, why not link it to the network device?
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
I am able to manually create the device nodes for iSCSI disks with udev.
Making udev work with hotplug is the only issue now :(
Don't know why it isn't working for you. Does any other devices work
with hotplug? What distro are you using? Can you install the
hotplug
Quoted 4 lines
Quoted 1 line
rpms instead of using the tarballs?
I have native scsi disk devices on my system. These are not tested for
Quoted 8 lines
hotplugging since it requires to build udev with initrd, which I am yet to test with.
I am using Redhat 9.0 with linux-kernel 2.6.0-test5.
I was not able to install from rpm, rpm on 2.6 kernel has an issue, it
gives following error and fails... That's another issue.
Sounds like you aren't running as root to do that.
Anyway, try grabbing the version of hotplug from rawhide/fedora that should be a good base to work off of. Other than that, I really have no idea what's going wrong. It doesn't look to be a kernel or udev error, so I'll be of no help :)
Good luck,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here:
http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
*** namedev.c.org Tue Nov 25 17:48:47 2003
--- namedev.c Tue Nov 25 17:45:27 2003
***************
*** 298,310 ****
break;
strfieldcpy(dev.id, temp3);
! /* NAME="new_name" */
temp2 = strsep(&temp, ",");
! retval = get_value("NAME", &temp, &temp3);
if (retval)
break;
! strfieldcpy(dev.name, temp3);
dbg_parse("NUMBER name='%s', bus='%s', id='%s'",
dev.name, dev.bus, dev.id);
}
--- 298,320 ----
break;
strfieldcpy(dev.id, temp3);
! /* file="value" OR NAME="new_name" */
temp2 = strsep(&temp, ",");
! retval = get_pair(&temp, &temp2, &temp3);
if (retval)
break;
! if(strcmp("NAME", temp2) != 0) {
! /* file="value" */
! strfieldcpy(dev.sysfs_file, temp2);
! strfieldcpy(dev.sysfs_value, temp3);
! /* NAME="new_name" */
! temp2 = strsep(&temp, ",");
! retval = get_value("NAME", &temp, &temp3);
+ dbg_parse("sysfs_file='%s' sysfs_value='%s'",
+ dev.sysfs_file, dev.sysfs_value);
+ }
+ strfieldcpy(dev.name, temp3);
dbg_parse("NUMBER name='%s', bus='%s', id='%s'",
dev.name, dev.bus, dev.id);
}
***************
*** 520,525 ****
--- 530,536 ----
case 'n':
if (strlen(udev->kernel_number) == 0)
break;
+ strcat(pos, "s");
strcat(pos, udev->kernel_number); dbg("substitute kernel number '%s'", udev->kernel_number); break;
***************
*** 724,729 ****
--- 735,741 ----
char path[SYSFS_PATH_MAX];
int found;
char *temp = NULL;
+ struct sysfs_attribute *tmpattr = NULL;
/* we have to have a sysfs device for NUMBER to work */ if (!sysfs_device)
***************
*** 749,754 ****
--- 761,797 ----
}
if (!found)
continue;
+
+ dbg_parse(" device_type = %s\n", dev->sysfs_file);
+ if (strcmp(dev->sysfs_file, "device_type") == 0) {
+ dbg_parse("look for device_type attribute '%s'",
+ dev->sysfs_file);
+ /* try to find the attribute in the class device directory */
+ tmpattr = sysfs_get_classdev_attr(class_dev, dev->sysfs_file);
+ if (tmpattr)
+ goto number_found;
+
+ /* look in the class device directory if present */
+ if (sysfs_device) {
+ tmpattr = sysfs_get_device_attr(sysfs_device, dev->sysfs_file);
+ if (tmpattr)
+ goto number_found;
+ }
+
+ continue;
+ number_found:
+ tmpattr->value[strlen(tmpattr->value)-1] = '\0';
+ dbg_parse("compare attribute '%s' value '%s' with '%s'",
+ dev->sysfs_file, tmpattr->value,
+ dev->sysfs_value);
+ if (strncmp(dev->sysfs_value, tmpattr->value, strlen(dev->sysfs_value)) != 0)
+ continue;
+
+ dbg_parse("found matching attribute '%s', '%s' becomes"
+ " '%s' - owner='%s', group='%s', mode=%#o",
+ dev->sysfs_file, class_dev->name, udev->name,
+ dev->owner, dev->group, dev->mode);
+ }
strfieldcpy(udev->name, dev->name); if (dev->mode != 0) {
udev->mode = dev->mode;
Quoted 6 lines · Surekha.PC
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
What happens when you are connecting to multiple ISCSI targets? do you end up with multiple iscsi hosts? Is there any situation that you can think of where someone might have more than one iSCSI host? if there is then your patch probably doesn't go far enough.
Thinking Big,
mh
Signature · 1 line
Martin Hicks || [email protected] || PGP/GnuPG: 0x4C7F2BEE
Hi,
Our iSCSI driver supports only one HBA. So even if we connect to
multiple targets, the same iSCSI host will be used. Work is underway for inclusion of our iSCSI driver in 2.6 kernel. So I don't foresee the case you mentioned.
Thanks,
surekha
-----Original Message-----
From: Martin Hicks [mailto:[email protected]]
Sent: Tuesday, November 25, 2003 6:42 PM
To: Surekha.PC
Cc: 'Greg KH'; linux-hotplug
Subject: RE: udev does not create scsi disk entries during bootup
Quoted 6 lines · Surekha.PC
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
What happens when you are connecting to multiple ISCSI targets? do you end up with multiple iscsi hosts? Is there any situation that you can think of where someone might have more than one iSCSI host? if there is then your patch probably doesn't go far enough.
Thinking Big,
mh
Signature · 13 lines
Martin Hicks || [email protected] || PGP/GnuPG: 0x4C7F2BEE ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Surekha.PC
I am submitting the patch with 2 changes.
Can you split this up into 2 different patches, both generated with 'diff -u' so we can see the changes easier?
Quoted 11 lines
1)To include new field in the NUMBER rule specially for iSCSI devices.
The current rule provided by udev is as below.
NUMBER, BUS="scsi", ID=2:0:0:0", NAME="disk%n"
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
Where does the device_type come from? Is it a sysfs file?
Quoted 5 lines
2) Device partition name needs to be appended with "s" before partition id.
If the device name consists of bus,target info like "c0b0t0l0" it will be easier to identify the partition as in "c0b0t0l0s1".
It looks like your patch just always adds a 's' whenever you use a %n field. Why not just put the 's' in your NAME? Otherwise you just broke everyone's rules who do not want a 's' :)
Can't you do everything you need with a simple callout script right now with no changes needed for udev?
Quoted 1 line
Please find the patch alongwith.
patches are all that need to be sent. You don't have to send the original and modified files.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi,
Quoted 1 line
Can you split this up into 2 different patches, both generated with
'diff -u' so we can
Quoted 1 line
see the changes easier?
I have generated the patch in the suggested format. The patch for appending partition name is just a one liner, so it is part of patch enclosed alongwith. Line #34, is the change with this statement.
+ strcat(pos, "s");
Quoted 1 line
Quoted 1 line
1)To include new field in the NUMBER rule specially for iSCSI
devices.
Quoted 5 lines
Quoted 5 lines
The current rule provided by udev is as below.
NUMBER, BUS="scsi", ID=2:0:0:0", NAME="disk%n"
Quoted 7 lines
Quoted 5 lines
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
Where does the
device_typecome from? Is it a sysfs file?
It is a sysfs file which is a device attribute defined for iSCSI devices in the iSCSI driver.
Quoted 4 lines
Quoted 4 lines
2) Device partition name needs to be appended with "s" before partition id.
If the device name consists of bus,target info like "c0b0t0l0" it
will
Quoted 3 lines
Quoted 1 line
be easier to identify the partition as in "c0b0t0l0s1".
It looks like your patch just always adds a 's' whenever you use a %n
field. Why not
Quoted 1 line
just put the 's' in your NAME? Otherwise you just broke everyone's
rules who do not want >a 's' :)
The string 's' (it could be named as 'part' also) has be used only on partition names like 'sda1', 'sda2' and not on block device name 'sda'. So it can't be put in the NAME field.
Below is the how the output for iSCSI device looks with this patch.
This will help separately identify the partition number from lun number.
#ls -l /udev
total 0
brw-rw-rw- 1 root root 8, 32 Nov 27 07:17 ib0t4l0 brw-rw-rw- 1 root root 8, 33 Nov 27 07:17 ib0t4l0s1 brw-rw-rw- 1 root root 8, 34 Nov 27 07:17 ib0t4l0s2
Quoted 1 line
Can't you do everything you need with a simple callout script right now
with no changes
Quoted 1 line
needed for udev?
Persistent naming of iSCSI devices require bus, target and lun info. This is in conjunction with persistent target binding done internally in our driver where we bind each iSCSI device to a unique bus/target pair based on the iSCSI targetname.
In a case where there are many targets connected to iSCSI host, udev.config is automatically generated by looking up the bus and target id allocated for the iSCSI device.
This needs to be matched with iSCSI specific device attribute 'device_type' to make sure this naming applies only for a iSCSI device. It is not possible to achieve this funtionality with CALLOUT configuration.
Thanks,
surekha
namedev.c renamed from namedev.c.org +45 -3
@@ -298,13 +298,23 @@break ;strfieldcpy (dev.id, temp3); -/* NAME="new_name" */ +/* file="value" OR NAME="new_name" */ temp2 =strsep (&temp,"," ); - retval =get_value ("NAME" , &temp, &temp3); + retval =get_pair (&temp, &temp2, &temp3);if (retval)break ; -strfieldcpy (dev.name, temp3); +if (strcmp ("NAME" , temp2) !=0 ) { +/* file="value" */ +strfieldcpy (dev.sysfs_file, temp2); +strfieldcpy (dev.sysfs_value, temp3); +/* NAME="new_name" */ + temp2 =strsep (&temp,"," ); + retval =get_value ("NAME" , &temp, &temp3); +dbg_parse ("sysfs_file='%s' sysfs_value='%s'" , + dev.sysfs_file, dev.sysfs_value); + } +strfieldcpy (dev.name, temp3);dbg_parse ("NUMBER name='%s', bus='%s', id='%s'" , dev.name, dev.bus, dev.id); }
@@ -520,6 +530,7 @@case 'n' :if (strlen (udev->kernel_number) ==0 )break ; +strcat (pos,"s" );strcat (pos, udev->kernel_number);dbg ("substitute kernel number '%s'" , udev->kernel_number);break ;
@@ -724,6 +735,7 @@char path[SYSFS_PATH_MAX ];int found;char *temp =NULL ; +struct sysfs_attribute *tmpattr =NULL ;/* we have to have a sysfs device for NUMBER to work */ if (!sysfs_device)
@@ -749,6 +761,36 @@ }if (!found)continue ; + +if (strcmp (dev->sysfs_file,"device_type" ) ==0 ) { +dbg_parse ("look for device_type attribute '%s'" , + dev->sysfs_file); +/* try to find the attribute in the class device directory */ + tmpattr =sysfs_get_classdev_attr (class_dev, dev->sysfs_file); +if (tmpattr) + goto number_found; + +/* look in the class device directory if present */ +if (sysfs_device) { + tmpattr =sysfs_get_device_attr (sysfs_device, dev->sysfs_file); +if (tmpattr) + goto number_found; + } + +continue ; +number_found: + tmpattr->value[strlen (tmpattr->value)-1 ] ='\0' ; +dbg_parse ("compare attribute '%s' value '%s' with '%s'" , + dev->sysfs_file, tmpattr->value, + dev->sysfs_value); +if (strncmp (dev->sysfs_value, tmpattr->value,strlen (dev->sysfs_value)) !=0 ) +continue ; + +dbg_parse ("found matching attribute '%s', '%s' becomes" +" '%s' - owner='%s', group='%s', mode=%#o" , + dev->sysfs_file, class_dev->name, udev->name, + dev->owner, dev->group, dev->mode); + }strfieldcpy (udev->name, dev->name);if (dev->mode !=0 ) { udev->mode = dev->mode;
Quoted 4 lines · Surekha.PC
Hi,
Quoted 1 line
Can you split this up into 2 different patches, both generated with
Quoted 8 lines
'diff -u' so we can
Quoted 1 line
see the changes easier?
I have generated the patch in the suggested format. The patch for appending partition name is just a one liner, so it is part of patch enclosed alongwith. Line #34, is the change with this statement.
+
strcat(pos, "s");
With that, you break everyone who uses the %n modifier. Why not just add a 's' to your NAME value?
Not applied.
Quoted 36 lines
Quoted 1 line
Quoted 1 line
1)To include new field in the NUMBER rule specially for iSCSI
devices.
Quoted 5 lines
Quoted 5 lines
The current rule provided by udev is as below.
NUMBER, BUS="scsi", ID=2:0:0:0", NAME="disk%n"
Quoted 7 lines
Quoted 5 lines
For iSCSI devices, since hostid is not consistent, we are defining a new iSCSI device attribute in sysfs, which will be checked while naming the device.
NUMBER, BUS="scsi", ID="0:0:0", device_type="ISCSI", NAME="ib0t0l0%n"
Where does the
device_typecome from? Is it a sysfs file?It is a sysfs file which is a device attribute defined for iSCSI devices in the iSCSI driver.
Quoted 4 lines
Quoted 4 lines
2) Device partition name needs to be appended with "s" before partition id.
If the device name consists of bus,target info like "c0b0t0l0" it
will
Quoted 3 lines
Quoted 1 line
be easier to identify the partition as in "c0b0t0l0s1".
It looks like your patch just always adds a 's' whenever you use a %n
field. Why not
Quoted 1 line
just put the 's' in your NAME? Otherwise you just broke everyone's
rules who do not want >a 's' :)
The string 's' (it could be named as 'part' also) has be used only on partition names like 'sda1', 'sda2' and not on block device name 'sda'. So it can't be put in the NAME field.
Below is the how the output for iSCSI device looks with this patch.
Quoted 7 lines
This will help separately identify the partition number from lun number.
#ls -l /udev
total 0brw-rw-rw- 1 root root 8, 32 Nov 27 07:17 ib0t4l0 brw-rw-rw- 1 root root 8, 33 Nov 27 07:17 ib0t4l0s1 brw-rw-rw- 1 root root 8, 34 Nov 27 07:17 ib0t4l0s2
What is driving naming iscsi devices like this? Any LSB standard? Any devfs standard?
I really think you can handle all of this for iscsi devices with a CALLOUT script that can handle this more complex way of creating a name.
Quoted 8 lines
Quoted 1 line
Can't you do everything you need with a simple callout script right now
with no changes
Quoted 1 line
needed for udev?
Persistent naming of iSCSI devices require bus, target and lun info. This is in conjunction with persistent target binding done internally in our driver where we bind each iSCSI device to a unique bus/target pair based on the iSCSI targetname.
Why? What if I want to name my iscsi device "greg_server_storage"? What is forcing users to use bus, target, and lun info?
Quoted 3 lines
In a case where there are many targets connected to iSCSI host, udev.config is automatically generated by looking up the bus and target id allocated for the iSCSI device.
What tool modifies udev.config automatically today?
Quoted 4 lines
This needs to be matched with iSCSI specific device attribute '
device_type' to make sure this naming applies only for a iSCSI device. It is not possible to achieve this funtionality with CALLOUT configuration.
Again, why? What about:
CALLOUT, BUS="scsi", PROGRAM="/sbin/name_iscsi", ID="*", NAME="%c"
and then your program can test the 'type' value of the sysfs device passed to it. As most scsi device naming issues are going to be handled by a CALLOUT rule anyway (due to a lot of the scsi device info not available in sysfs), I don't see a big problem with this.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel