Bug when using loopdevice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm using cryptsetup in combination with a loopdevice.
I sometime have problems to disconnect the loopdevice
from the encrypted file.
It gives the following error:

umount -d securedir
cryptsetup luksClose /dev/mapper/crypt_fs
losetup -v -d /dev/loop0
ioctl: LOOP_CLR_FD: Device or resource busy  <-- ERROR

I found out that this always happens if there
is an  temporary-cryptsetup-xxxxx file in /dev/mapper after
the command cryptsetup luksOpen. (luksOpen works ok b.t.w)

root@ubuntu:/home/bank/crypt # ls -als /dev/mapper/
total 0
0 drwxr-xr-x  2 root root     100 2007-10-28 16:58 .
0 drwxr-xr-x 14 root root   14860 2007-10-28 16:58 ..
0 crw-------  1 root root  10, 63 2007-10-28 16:56 control
0 brw-rw----  1 root disk 254,  1 2007-10-28 16:58 crypt_fs
0 brw-rw----  1 root disk 254,  0 2007-10-28 16:58 temporary-cryptsetup-6448
root@ubuntu:/home/bank/crypt #


root@ubuntu:/home/bank/crypt # ps aux | grep loop
root      6447  0.0  0.0      0     0 ?        S<   16:58   0:00 [loop0]


If there is an temporary-cryptsetup-xxxx file in /dev/mapper/
than the only way to free /dev/loop0 is to do:

cryptsetup luksClose /dev/mapper/temporary-cryptsetup-6448
Followed by:
losetup -d /dev/loop0

After I do this trick everything works like expected.
and I can open en close (and remove from loopdevice) the encrypted file
again and again.

Is this a bug?

Kind regards,

John Suijkerbuijk

b.t.w. I'm using:
Linux ubuntu 2.6.22-14-386 #1 Sun Oct 14 22:36:54 GMT 2007 i686 GNU/Linux

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux