Bugzilla – Bug 306288
device mapper grabs my USB disk and prevents mounting it
Last modified: 2008-02-20 07:33:58 UTC
In my past-Beta2 system, after plugging in my USB drive, it cannot be mounted by the KDE mediamanager and by halmount ("device is busy"). During investigation of this issue i found out, that devicemapper grabs the device and subsequently it can no longer be used. root@strolchi:~# l /dev/mapper/* lrwxrwxrwx 1 root root 16 30. Aug 10:22 /dev/mapper/control -> ../device-mapper brw------- 1 root root 253, 0 30. Aug 10:22 /dev/mapper/cryptotab_loop0 brw------- 1 root root 253, 1 30. Aug 12:57 /dev/mapper/linear-usb-ST980829_A_??????????-0:0 brw------- 1 root root 253, 2 30. Aug 12:57 /dev/mapper/linear-usb-ST980829_A_??????????-0:0_part1 brw------- 1 root root 253, 3 30. Aug 12:57 /dev/mapper/linear-usb-ST980829_A_??????????-0:0_part2 seife@strolchi:~> halmount /dev/sdc2 -> external type ext3 /dev/sdc1 -> vfat_ext type vfat /dev/sda7 on /local type ext3 /dev/sda5 on / type ext3 /dev/sda2 on /boot type ext2 /dev/sda1 -> ? type ntfs seife@strolchi:~> halmount /dev/sdc2 /dev/sdc2: org.freedesktop.Hal.Device.Volume.UnknownFailure: mount: /dev/sdc2 already mounted or /media/external busy root@strolchi:~# dmsetup remove /dev/mapper/linear-usb-ST980829_A_\?\?\?\?\?\?\?\?\?\?-0\:0_part1 root@strolchi:~# dmsetup remove /dev/mapper/linear-usb-ST980829_A_\?\?\?\?\?\?\?\?\?\?-0\:0_part2 root@strolchi:~# dmsetup remove /dev/mapper/linear-usb-ST980829_A_\?\?\?\?\?\?\?\?\?\?-0\:0 root@strolchi:~# l /dev/mapper/ total 0 drwxr-xr-x 2 root root 80 30. Aug 13:02 ./ drwxr-xr-x 11 root root 7720 30. Aug 13:02 ../ lrwxrwxrwx 1 root root 16 30. Aug 10:22 control -> ../device-mapper brw------- 1 root root 253, 0 30. Aug 10:22 cryptotab_loop0 root@strolchi:~# seife@strolchi:~> halmount /dev/sdc2 /dev/sdc2 mounted on /media/external
*** Bug 303999 has been marked as a duplicate of this bug. ***
isn't that what the glorious ConsoleKit should prevent? could the error be there? how to debug that?
I have no idea. Fact is, that device-mapper seems to grab the device, and i don't see a reason why it should do that.
it seems device-mapper is even installed nowadays by default (tested latest KDE Build). raising severity. it has a tendency to be a blocker imho.
http://lists.opensuse.org/opensuse-kernel/2007-08/msg00099.html
To my knowledge device-mapper is installed by default since it is part of our distribution. Besides, I do not see what I can do here. Device mapper is a tool to be called. If someone call "dmsetup create ..." how should device-mapper know that he should refuse this request. This is like blaming maintainer of coreutils because /bin/rm removed certain files. I have no idea who creates these dm maps. From the names they look as if they were created by a call to kpartx. Why kpartx is called for your USB device I do not know, I would suspect this is done by either hal or udev. Reassigning to Hannes, maybe he knows why apparently kpartx is called when a USB stick is inserted.
Forgot to reassign.
And already fixed. *** This bug has been marked as a duplicate of bug 302422 ***
*** Bug 297569 has been marked as a duplicate of this bug. ***