As more of a spectator I hate to be picky, but I think this still points toward 'aes-loop on LVM' instead of 'LVM on aes-loop', the latter of which I believe the OP was shooting for. Therefore, I think the following may be more appropriate (again, completely untested): #!/lib/sh if [ "$1" != "-d" ] ; then /lib/losetup -e AES128 -K /lib/rootkey.gpg -G /lib /dev/loop5 /dev/pv_for_lv # INSERT LOGICAL VOLUME SETUP HERE else # INSERT LOGICAL VOLUME TEARDOWN HERE /lib/losetup -d /dev/loop5 fi - Linux-crypto: cryptography in and on the Linux system Archive: http://mail.nl.linux.org/linux-crypto/