HAL + LUKS

Danny Kukawka danny.kukawka at web.de
Sun Oct 14 01:43:23 PDT 2007


On Samstag, 13. Oktober 2007, Jakub Schmidtke wrote:
> Another problem I had is with some of USB devices. Some of them, when I
> use 'Safely remove' action of KDE's mediamanager, are umounted and powered
> off. And their icons disappears from KDE's list of drives. If they are
> encrypted, they are also unmapped (cryptsetup luksClose). But some of mine
> USB drives are not powered down. I only get KDE's error, something
> like: "Media was umounted but could not be removed.". I am able to mount
> them again. But the problem is, that they don't get unmapped by cryptsetup,
> so they are still present as /dev/mapper/luks_crypto_*. I use another
> application, that calls 'teardown' method on such devices. It unmaps the
> volume properly, but the drive is still visible in KDE's media list (but it
> is not accessible, attempt to mount it raises an error, that the device
> path - /dev/mapper/luks_* - does not exist). I have no idea why that
> happens (especially when it happens only for some of my USB flash drives
> while others work fine. I also have one external USB HDD case, which works
> fine, and external USB harddrive - Seagate Freeagent - that doesn't, and
> can't be powered down using 'safely remove') and what might be a problem,
> but for some reason HAL still thinks that device is still there - and lshal
> confirms that.

This is a bug in HAL (which add a Eject() to the related dm-device, while 
eject is a ioctl which is not allowed on dm, see my patch on the list) and 
KDE (Which should call org.freedesktop.Hal.Device.Volume.Crypto::Teadown() 
instead of Eject(). This is IIRC already fixed in the SUSE KDE packages, not 
sure if it's already upstream in the KDE SVN.)

Danny


More information about the hal mailing list