This is a small how-to to add an (encrypted) disk to an LVM Volume Group (VG).
In this example, we’ll add /dev/sda to an existing volume group called
howto-vg.
Encrypt the disk and open it:
Create the physical volume:
Make sure the volume group exists by running vgscan. Alternatively, you can
use vgdisplay. Add the physical volume to the volume group:
And create the logical volume:
Create the filesystem on the logical volume:
Create the mount point so you can mount the volume:
You can now add the volume in /etc/fstab:
Now reload systemd by running systemctl daemon-reload.
Mount the disk by running mount /path/to/disk. The following step isn’t
needed but cannot hurt either: reboot. After the reboot, you are sure the
disk is mounted in the correct place. Yay.