暗号化ループバックデバイスの作成の仕方。

cryptsetupを使う

# dnf install cryptsetup

# dd if=/dev/urandom of=crypt bs=1G count=14 iflag=fullblock
# losetup /dev/loop0 crypt

# cryptsetup luksFormat /dev/loop0
# cryptsetup --type luks open /dev/loop0 secret
# mkfs.ext4 /dev/mapper/secret

# cryptsetup --type luks open /dev/loop0 secret
# mount -t ext4 /dev/mapper/secret /mnt/secret

# umount /mnt/secret
# cryptsetup close secret
# losetup -d /dev/loop0