Skip to content

Instantly share code, notes, and snippets.

@michaelcoyote
Last active June 15, 2017 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelcoyote/e77b1a4a7d35908f987e5aec806273eb to your computer and use it in GitHub Desktop.
Save michaelcoyote/e77b1a4a7d35908f987e5aec806273eb to your computer and use it in GitHub Desktop.
Linux encrypted LVM and luks notes.

https://www.linux.com/blog/how-full-encrypt-your-linux-system-lvm-luks

sudo cryptsetup luksClose sda_crypt
sudo pvcreate /dev/mapper/sda_crypt
sudo cryptsetup luksOpen /dev/sdb sda_crypt
sudo pvcreate /dev/mapper/sda_crypt
sudo vgcreate vg00 /dev/mapper/sda_crypt
lvcreate -n rbk_lv_data
lvcreate -n rbk_lv_data vg00
sudo lvcreate -n rbk_lv_data vg00
sudo lvcreate -n rbk_lv_data -l +100%FREE vg00
sudo mkfs.ext4 /dev/vg00/rbk_lv_data 
sudo cryptsetup luksClose sda_crypt
lvchange -an rbk_lv_data
sudo lvchange -an /dev/mapper/vg00-rbk_lv_data 
sudo vgchange vg00
sudo vgchange -an vg00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment