Solving disk problems is a little more complicated when devices are encrypted. You need to keep in mind that a filesystem on an encrypted device can’t be seen unless the device is decrypted. Here is a few problems I’ve come in touch with, together with solutions that have worked for me.
Error unmounting a volume
Error message which may occur when trying to unmount truecrypt volume:
Trying to remove the volume with cryptsetup gives a similar message:
Device /dev/mapper/truecrypt1 is busy.
As the error messages implies, something is keeping the volume open. If lsof doesn’t show anything, it might be an active NFS export keeping it busy.
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
Try removing again with cryptsetup.
Error mounting a volume
If the unmount was done incorrectly, perhaps due to a power-failure, the filesystem is dirty and needs to be checked with fsck. This should be done with the filesystem unmounted. You still need to provide the password to open the volume, but you must tell truecrypt not to mount it.
On the command-line this is done with the following command:
To accomplish the same thing in the graphical environment, you need to check the Do not mount option, as seen in this picture:
Now it’s possible to fsck the volume:
You now need to detach the volume, so you can open/mount it:
Finally you can mount the volume again in the usual manner.