5

I have an external HDD and use TrueCrypt for keeping encrypted file containers. After mounting, whenever I try to dismount a file container (using TrueCrypt 7.0a on Ubuntu 11.04), it just does not happen and I get the following message:

device-mapper: remove ioctl failed: Device or resource busy
Command failed

Further, if I close TrueCrypt and then try to start it again, it says that TrueCrypt is already running, but I cannot access it from the Unity sidebar (because it is not there).

Also, if I power down my external HDD, the TrueCrypt volume still shows as one of the mounted volumes, but I cannot do anything with it.

Any possible work around? I remember this NOT happening in earlier versions of Ubuntu so I am guessing there is something to do with 11.04.

Thanks

zeiger
  • 329

2 Answers2

3

There is some process(es) with file(s) on your encrypted container still opened.

You gave us too few info to help you with detailed instructions.

You should use fuser and lsof to catch the culprit.

EDIT:

if e.g. your TrueCrypt mount point is /media/truecrypt1 you should try:

fuser -mv /media/truecrypt1 or sudo fuser -mv /media/truecrypt1

and

lsof +c0 /media/truecrypt1 or sudo lsof +c0 /media/truecrypt1

Keep note of the offending PID and kill the process trying one of these commands:

kill PID
kill -9 PID
sudo kill PID
sudo kill -9 PID
Vanni Totaro
  • 2,083
3

This looks indeed like a problem in Natty. A work-around exists by unmounting the mount point (usually a directory in /media/) and then pressing the Unmount button in TrueCrypt. An example of the umount command (sudo is required):

sudo umount /media/truecrypt1

After further investigation, it seems that a NTFS formatted container that was created in Windows is affected.

Output of file -s on the mounted stuff:

A 99MB volume formatted NTFS which is causing issues:

/dev/mapper/truecrypt1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 1, dos < 4.0 BootSector (0x80)

A 99MB volume formatted FAT which works fine:

/dev/mapper/truecrypt1: x86 boot sector, code offset 0x3c, OEM-ID "MSDOS5.0", sectors/cluster 2, reserved sectors 36, Media descriptor 0xf8, heads 1, sectors 204288 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 798, serial number 0xf30d2054, unlabeled The output for EXT* filesystems are similar.

Lekensteyn
  • 178,446