Unlock LUKs Devices<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\nExtending LUKS-Encrypted LVM by Adding Physical Volume<\/h2>\n\n\n\n
So, how can you easily extend existing root LUKS encrypted LVM by adding an extra Physical disk?<\/p>\n\n\n\n
In my test environment, I have an Ubuntu 24.04 virtual machine with LUKs encrypted physical volume that was enabled and configured during initial installation process.<\/p>\n\n\n\n
lsblk<\/code><\/pre>\n\n\n\nsda 8:0 0 25G 0 disk \n\u251c\u2500sda1 8:1 0 1M 0 part \n\u251c\u2500sda2 8:2 0 2G 0 part \/boot\n\u2514\u2500sda3 8:3 0 23G 0 part \n \u2514\u2500dm_crypt-0 252:0 0 23G 0 crypt \n \u2514\u2500ubuntu--vg-ubuntu--lv 252:1 0 23G 0 lvm \/var\/snap\/firefox\/common\/host-hunspell\n \/snap\n \/\n<\/code><\/pre>\n\n\n\nAs you can see \/dev\/sda3<\/strong> (with root filesystem<\/em>) is LUKs encrypted.<\/p>\n\n\n\nMore information about the Physical volumes, volume group and logical volume;<\/p>\n\n\n\n
sudo pvs<\/code><\/pre>\n\n\n\n PV VG Fmt Attr PSize PFree\n \/dev\/mapper\/dm_crypt-0 ubuntu-vg lvm2 a-- 22.98g 0\n<\/code><\/pre>\n\n\n\nsudo vgs<\/code><\/pre>\n\n\n\n VG #PV #LV #SN Attr VSize VFree\n ubuntu-vg 1 1 0 wz--n- 22.98g 0\n<\/code><\/pre>\n\n\n\nsudo lvs<\/code><\/pre>\n\n\n\n LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert\n ubuntu-lv ubuntu-vg -wi-ao---- 22.98g\n<\/code><\/pre>\n\n\n\nAdditional Drives<\/h3>\n\n\n\n
Now, I want to expand the existing storage by attaching two more physical drives to the machine;<\/p>\n\n\n\n
lsblk<\/code><\/pre>\n\n\n\n...\nsdb 8:16 0 5G 0 disk \nsdc 8:32 0 15G 0 disk\n<\/code><\/pre>\n\n\n\n