I've got a luks volume setup and mounted, and when not in use I suspend it with cryptsetup luksSuspend so it cannot be accessed. But if I forget it's suspended and try to do any kind of file access in the mounted directory, the process just hangs, instead of failing immediately. CTRl-C doesn't work to kill it, and CTRL-Z doesn't work to put it in the background. Even sudo kill -9 doesn't help.

Is there a way to make these commands fail fast when the volume is suspended?

If it's relevant, the volume is setup on a loop device backed by a file.

1 Answer 1


Suspending all accesses until the passphrase is entered again is the whole point of luksSuspend. If you want to ensure that the encrypted device is not in use, call luksClose.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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