Wednesday 22 May 2013

LVM crypt disks on Linux/AWS



  1. dd if=/dev/urandom of=/keys/xvdm.key bs=1024 count=4
  2. dd if=/dev/urandom of=/keys/xvdn.key bs=1024 count=4
  3. cryptsetup --verbose -y luksFormat /dev/xvdm /keys/xvdm.key
  4. cryptsetup --verbose -y luksFormat /dev/xvdn /keys/xvdn.key
  5. cryptsetup luksOpen /dev/xvdm cryptm --key-file /etc/xvdm.key
  6. cryptsetup luksOpen /dev/xvdn cryptn --key-file /etc/xvdn.key
  7. pvcreate /dev/mapper/cryptm /dev/mapper/cryptn
  8. Add entries to /etc/crypttab for reboots and test somehow
    1. cryptm /dev/xvdm /etc/xvdm.key luks
    2. cryptn /dev/xvdn /etc/xvdn.key luks
Complete LVM setup and add entries to /etc/fstab.

Hint: don't make one, single typo...ever.

1 comment:

  1. Very informative! Thanks for providing your information. Keep Share and update with us AWS Online Training Bangalore

    ReplyDelete

Note: only a member of this blog may post a comment.

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...