Documenting Problems That Were Difficult To Find The Answer To

How To Mount A Crypt Disk In /etc/crypttab

I have a /etc/crypttab like the following:

md0_crypt UUID=17f25217-6080-47f5-b6ce-63537f1fb165 none luks
md1_crypt UUID=c5585594-cc7b-41c2-bd5a-349205617a27 none luks
sdb4_crypt UUID=f656f25c-3fa3-4349-9175-c3f129b64589 none luks,swap
sdc4_crypt UUID=5cafe87d-6745-4cd1-bada-8c912663282b none luks,swap

Now I want to “mount” md1_crypt which didn’t mount at boot time due to RAID problems – and I’ve finally successfully restored the RAID1 array /dev/md1.

The command I used to mount the encrypted disk was:

cryptsetup luksOpen /dev/disk/by-uuid/c5585594-cc7b-41c2-bd5a-349205617a27 md1_crypt

In other words: cryptsetup luksOpen /dev/disk/by-uuid/[UUID] [mount_name]

I was asked for my password.

Then I entered the command:

mount /dev/mapper/md1_crypt

…to mount the decrypted disk to the file system from the pre-configured /etc/fstab.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: