Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
I have the same problem with 10.10 and with a 100MB encrypted image file. – Iradrian Jun 29 '11 at 21:04
up vote 2 down vote accepted

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.

share|improve this answer
Thank you for a descriptive solution! – zeiger Jul 2 '11 at 23:46

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.


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

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


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
share|improve this answer
If I only mount it and then try to unmount it (without even accessing the mounted file system to add/remove files), it still does not work. Can you tell me how to use 'fuser' and 'lsof'? – zeiger Jun 29 '11 at 20:45
@zeiger: I've just updated my answer with fuser and lsof usage info. Hope it helps. If it works please remember to upvote and accept :) – Vanni Totaro Jul 1 '11 at 19:11
+1 I wasn't able to dismount my tc partition and this helped. Thanks – CodeExpress Oct 9 '12 at 17:18
@Shivam you're welcome! – Vanni Totaro Oct 10 '12 at 20:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.