(on Knoppix 5.0DVD) plugging second usb-storage device removes the first one!
I am having a problem with hotplugging two usb storage devices. This is using the new Knoppix 5.0DVD recently released. I'd like to fix or, barring that, workaround it. Here's the outline of what happens:
a) i plug a usb-storage device;
b) a desktop icon for the device appears, i get a dialog box asking me what I want to do with the device (open or "do nothing"), I say do nothing;
c) from a shell, i manually mount the device:
# mount /dev/sda1 /media/sda1
d) /proc/mounts shows /dev/sda1 mounted
e) i plug a second usb-storage device;
f) the desktop icon for the first device disappears for a few moments, then it reappears with a second desktop icon for the second usb-storage device. I get two more dialog boxes asking me what I want to do with the devices. I look in /proc/mounts and my /dev/sda1 mount is gone. Ouch.
I've attached an strace to udevd during this procedure, you can find it at:
<http://www.personaltelco.net/~russell/strace-udevd.log>
On line 6887, I see a recv(4, "remove@/class/scsi-device/[...] which I presume is udevd receiving a request to remove the /dev/sda1. How do I figure out where that remove request is coming from?
Any other clues about debugging this?
Thanks!
Signature · 13 lines
Russell Senior ``I have nine fingers; you have ten.'' [email protected] ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Russell" = Russell Senior <[email protected]> writes:
Russell> I am having a problem with hotplugging two usb storage Russell> devices. This is using the new Knoppix 5.0DVD recently Russell> released. I'd like to fix or, barring that, workaround it. Russell> Here's the outline of what happens:
Russell> a) i plug a usb-storage device;
Russell> b) a desktop icon for the device appears, i get a dialog
Russell> box asking me what I want to do with the device (open or "do Russell> nothing"), I say do nothing;
Russell> c) from a shell, i manually mount the device: # mount
Russell> /dev/sda1 /media/sda1
Russell> d) /proc/mounts shows /dev/sda1 mounted
Russell> e) i plug a second usb-storage device;
Russell> f) the desktop icon for the first device disappears for a
Russell> few moments, then it reappears with a second desktop icon for Russell> the second usb-storage device. I get two more dialog boxes Russell> asking me what I want to do with the devices. I look in Russell> /proc/mounts and my /dev/sda1 mount is gone. Ouch.
Russell> I've attached an strace to udevd during this procedure, you Russell> can find it at:
Russell> <http://www.personaltelco.net/~russell/strace-udevd.log>
[...]
I've learned a little more about this. I have discovered that more or less the same thing occurs on Debian/unstable (with a vanilla kernel). I've just retested on a 2.6.16.1 kernel. I also found udevmonitor. Here's what I see from that when I plug the two devices on the Debian/unstable box with 2.6.16.1:
# udevmonitor udevmonitor prints the received event from the kernel [UEVENT] and the event which udev sends out after rule processing [UDEV]
UEVENT[1144060933.782273] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UEVENT[1144060933.782382] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UEVENT[1144060933.782405] add@/class/scsi_host/host7
UEVENT[1144060933.782424] add@/class/usb_device/usbdev4.14
UDEV [1144060933.784163] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UDEV [1144060933.822599] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UDEV [1144060933.878505] add@/class/scsi_host/host7 UDEV [1144060933.892363] add@/class/usb_device/usbdev4.14 UEVENT[1144060938.800149] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host7/target7:0:0/7:0:0:0 UEVENT[1144060938.802896] add@/block/sda UEVENT[1144060938.807103] add@/block/sda/sda1 UEVENT[1144060938.807154] add@/class/scsi_device/7:0:0:0 UDEV [1144060938.823077] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host7/target7:0:0/7:0:0:0 UDEV [1144060938.838759] add@/class/scsi_device/7:0:0:0 UDEV [1144060938.881802] add@/block/sda UDEV [1144060938.939771] add@/block/sda/sda1 UEVENT[1144060953.195921] remove@/class/scsi_device/7:0:0:0 UEVENT[1144060953.196013] remove@/block/sda/sda1 UEVENT[1144060953.196035] remove@/block/sda UEVENT[1144060953.196057] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host7/target7:0:0/7:0:0:0 UEVENT[1144060953.196080] remove@/class/scsi_host/host7 UEVENT[1144060953.196101] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UEVENT[1144060953.196123] remove@/class/usb_device/usbdev4.14 UEVENT[1144060953.196148] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UDEV [1144060953.198097] remove@/class/scsi_device/7:0:0:0 UDEV [1144060953.199573] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host7/target7:0:0/7:0:0:0 UDEV [1144060953.204013] remove@/class/scsi_host/host7 UDEV [1144060953.209152] remove@/block/sda/sda1 UDEV [1144060953.212780] remove@/class/usb_device/usbdev4.14 UDEV [1144060953.221786] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UDEV [1144060953.229281] remove@/block/sda UDEV [1144060953.242272] remove@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UEVENT[1144060953.522434] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UEVENT[1144060953.523274] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UEVENT[1144060953.523335] add@/class/scsi_host/host8 UEVENT[1144060953.523358] add@/class/usb_device/usbdev4.15 UDEV [1144060953.525767] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1 UDEV [1144060953.565114] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0 UDEV [1144060953.621186] add@/class/scsi_host/host8 UDEV [1144060953.634874] add@/class/usb_device/usbdev4.15 UEVENT[1144060953.818125] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3 UEVENT[1144060953.820214] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3/4-3.1.3:1.0 UEVENT[1144060953.820290] add@/class/scsi_host/host9 UEVENT[1144060953.820312] add@/class/usb_device/usbdev4.16 UDEV [1144060953.820724] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3 UDEV [1144060953.858802] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3/4-3.1.3:1.0 UDEV [1144060953.914400] add@/class/scsi_host/host9 UDEV [1144060953.928954] add@/class/usb_device/usbdev4.16 UEVENT[1144060958.537592] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host8/target8:0:0/8:0:0:0 UEVENT[1144060958.540764] add@/block/sda UEVENT[1144060958.545060] add@/block/sda/sda1 UEVENT[1144060958.545120] add@/class/scsi_device/8:0:0:0 UDEV [1144060958.561068] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.1/4-3.1.1:1.0/host8/target8:0:0/8:0:0:0 UDEV [1144060958.577157] add@/class/scsi_device/8:0:0:0 UDEV [1144060958.619965] add@/block/sda UDEV [1144060958.676679] add@/block/sda/sda1 UEVENT[1144060959.340269] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3/4-3.1.3:1.0/host9/target9:0:0/9:0:0:0 UEVENT[1144060959.342911] add@/block/sdb UEVENT[1144060959.347502] add@/block/sdb/sdb1 UEVENT[1144060959.347557] add@/class/scsi_device/9:0:0:0 UDEV [1144060959.365249] add@/devices/pci0000:00/0000:00:0b.0/0000:02:08.2/usb4/4-3/4-3.1/4-3.1.3/4-3.1.3:1.0/host9/target9:0:0/9:0:0:0 UDEV [1144060959.377210] add@/class/scsi_device/9:0:0:0 UDEV [1144060959.423595] add@/block/sdb UDEV [1144060959.465071] add@/block/sdb/sdb1
I don't understand why does /block/sda1 get removed on a plug of a different usb-storage? What is the solution for this to behave sanely?
Thanks!
Signature · 13 lines
Russell Senior ``I have nine fingers; you have ten.'' [email protected] ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi Russel,
Quoted 2 lines
I don't understand why does /block/sda1 get removed on a plug of a different usb-storage? What is the solution for this to behave sanely?
did this ever work correctly? Some old VIA cards have the interesting property that they disconnect any plugged in usb device if you plug in a second one.
Ciao,
Duncan.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel