FS#23184 - [truecrypt] dismount fails with Error: device-mapper: remove ioctl failed: Device or resource busy
Attached to Project:
Arch Linux
Opened by ilya (leniviy) - Tuesday, 08 March 2011, 09:53 GMT
Last edited by Eric Belanger (Snowman) - Monday, 30 January 2012, 19:19 GMT
Opened by ilya (leniviy) - Tuesday, 08 March 2011, 09:53 GMT
Last edited by Eric Belanger (Snowman) - Monday, 30 January 2012, 19:19 GMT
|
Details
Description:
Can't dismount with truecrypt. But if I do 'umount' first, it succeeds. * package version(s) truecrypt 7.0a-2, did pacman -Suy * config and/or log files etc. Mar 8 12:42:09 IL kernel: device-mapper: ioctl: unable to remove open device truecrypt1 |
This task depends upon
Closed by Eric Belanger (Snowman)
Monday, 30 January 2012, 19:19 GMT
Reason for closing: Fixed
Additional comments about closing: This bug was fixed in newer versions of ntfs-3g and truecrypt and does not affect arch users anymore.
Monday, 30 January 2012, 19:19 GMT
Reason for closing: Fixed
Additional comments about closing: This bug was fixed in newer versions of ntfs-3g and truecrypt and does not affect arch users anymore.
- umount /dev/dm-? fails, although it's in /etc/mtab
- in tc window mount point is empty
If it's not Truecrypt itself then maybe we have something else in common.
Hope they'll fix it soon!! :(
After all, maybe something will change since ntfs-3g has been merged with ntfsprogs?
----
While not ideal, I think I have a workaround for this. The idea struck me after setting this up recently via the wiki (https://wiki.archlinux.org/index.php/TrueCrypt). One can mount the truecrypt device to a slot with no filesystem like so:
,---
| $ sudo truecrypt --filesystem=none --slot=1 /dev/sdaX
`---
Enter the password, and then mount using the system mount command:
,---
| $ sudo mount /dev/mapper/truecrypt1 /media/tc
`---
I concur that the problem appears to be ntfs + truecrypt, but the above is working splendidly for me. I can just mount once with truecrypt and leave it alone mapped to /dev/mapper/truecrypt1 and then mount/umount from there to my mount point as needed.
In addition, once the mapper is unmounted from the mount point, I've had no problems at all with:
,---
| $ sudo truecrypt -d
`---
So, perhaps this is a workaround for others while this gets fixed?
Oh, and if it helps, here's my fstab line for this:
,---
| /dev/mapper/truecrypt1 /media/vault ntfs-3g uid=1000,gid=100,fmask=113,noatime 0 0
`---
@ifaigios: Hmm, what about write-access with the kernels ntfs drivers? Will that still work, or will it revert to read-only? I think I still have ntfs and ntfs-3g symlinked here... oh noes. :/
,---
| truecrypt -t --filesystem=ntfs-3g -k "" --protect-hidden=no --fs-options=noatime /dev/sda4 /media/vault
`---
It didn't seem to like that and I couldn't umount /media/vault. On the other hand, if you do 'truecrypt -d' *first*, do you run into problems later? Maybe it's the first failed attempt that goofs things up?
@Ifai: how good is the default NTFS support in the kernel? Reading the help section when compiling didn't sound too promising. I even think not having ntfs-3g might have been the culprit for my wife's ridiculously slow Arch install, mentioned here: https://bbs.archlinux.org/viewtopic.php?pid=901563
Installing ntfs-3g and changing fstab from ntfs -> ntfs-3g *drastically* improved things and I haven't seen a 20-30sec hang since. She was up to date on Arch, running the default 2.6.38 kernel. Just curious about this.
# disable ARCH's ntfs-3g hack
$ mv /sbin/mount.ntfs{,.1}
# -t ntfs puts correct entry to mtab
$ mount /dev/mapper/truecrypt1 /media/myprivate -t ntfs
$ mount
/dev/mapper/truecrypt1 on /media/myprivate type ntfs (ro)
$ umount /dev/mapper/truecrypt1
$ mount /dev/dm-7 /media/myprivate -t ntfs
$ mount
/dev/mapper/truecrypt1 on /media/myprivate type ntfs (ro)
$ umount /dev/mapper/truecrypt1
# -t ntfs-3g puts bad entry to mtab
$ mount /dev/mapper/truecrypt1 /media/myprivate -t ntfs-3g
$ mount
/dev/dm-7 on /media/myprivate type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
$ umount /dev/mapper/truecrypt1
umount: /dev/mapper/truecrypt1: not mounted
$ umount /dev/dm-7
umount: /dev/dm-7: not mounted
$ umount /media/myprivate
$ mount /dev/dm-7 /media/myprivate -t ntfs-3g
$ mount
/dev/dm-7 on /media/myprivate type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
$ umount /dev/mapper/truecrypt1
umount: /dev/mapper/truecrypt1: not mounted
$ umount /dev/dm-7
umount: /dev/dm-7: not mounted
$ umount /media/myprivate
# enable ARCH's ntfs-3g hack
$ mv /sbin/mount.ntfs{.1,}
@leniviy: Interesting. If ntfs-3g puts a bad entry to /etc/mtab, it is more that expected for TrueCrypt/device-mapper to fail to recognize and dismount the volume.
[Edit]: Please use the second tarball (the .tar.gz one), as I have made some mistakes in the first one (and I can't delete it for some reason)
Is it safe for me to just download and install ntfs-3g_ntfsprogs-git-with_canonicalize_path_patch.tar.gz ??
And, again, please pardon my stupidity, but exactly how would I install it?
thanks!
Thank you!