From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell Senior Date: Mon, 03 Apr 2006 11:31:18 +0000 Subject: Re: (on Knoppix 5.0DVD) plugging second usb-storage device removes the first one! Message-Id: <86y7ymzyih.fsf@coulee.tdb.com> List-Id: References: <86d5fzl5uf.fsf@coulee.tdb.com> In-Reply-To: <86d5fzl5uf.fsf@coulee.tdb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org >>>>> "Russell" = Russell Senior 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> [...] 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! -- Russell Senior ``I have nine fingers; you have ten.'' seniorr@aracnet.com ------------------------------------------------------- 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 Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel