Extend encrypted primary partition to fill free space without decrypting?

I'm finding a lot of advice online explaining how to enlarge an unencrypted file system partition but very few helpful ones for my situation explaining how to do so with an encrypted partition without having to decrypt. I recently created a disk image from my previous 128GB drive and restored it on a larger 500GB drive and I'd like to expand to use all the remaining unallocated free space. I already used the default Disks app to resize /dev/sda2 to use the full 500GB but I'm unsure what to do next. Here's some info on my current disk/partition situation:

brad@TEST-PC:~$ lsblk
NAME                 MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                  7:0    0     4K  1 loop  /snap/bare/5
loop1                  7:1    0  55.6M  1 loop  /snap/core18/2721
loop2                  7:2    0 164.8M  1 loop  /snap/gnome-3-28-1804/161
loop3                  7:3    0 116.8M  1 loop  /snap/core/14784
loop4                  7:4    0 116.8M  1 loop  /snap/core/14946
loop5                  7:5    0  55.6M  1 loop  /snap/core18/2714
loop6                  7:6    0  91.7M  1 loop  /snap/gtk-common-themes/1535
loop7                  7:7    0 101.5M  1 loop  /snap/p7zip-desktop/220
loop8                  7:8    0   140K  1 loop  /snap/gtk2-common-themes/13
sda                    8:0    0 465.8G  0 disk  
├─sda1                 8:1    0   512M  0 part  /boot/efi
├─sda2                 8:2    0     1K  0 part  
├─sda5                 8:5    0   1.4G  0 part  /boot
└─sda6                 8:6    0 117.3G  0 part  
  └─sda6_crypt       253:0    0 117.3G  0 crypt 
    ├─vgzorin-root   253:1    0 116.3G  0 lvm   /
    └─vgzorin-swap_1 253:2    0   976M  0 lvm   [SWAP]
sr0                   11:0    1  1024M  0 rom   
brad@TEST-PC:~$ sudo vgs
  VG      #PV #LV #SN Attr   VSize   VFree 
  vgzorin   1   2   0 wz--n- 117.29g 44.00m
brad@TEST-PC:~$ sudo lvs
  LV     VG      Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   vgzorin -wi-ao---- <116.30g                                                    
  swap_1 vgzorin -wi-ao----  976.00m                                                    
brad@TEST-PC:~$ sudo pvs
  PV                     VG      Fmt  Attr PSize   PFree 
  /dev/mapper/sda6_crypt vgzorin lvm2 a--  117.29g 44.00m

Also, I'd like to increase the swap space to 2GB but I'm not sure how to do that either!

Any help would be greatly appreciated :slight_smile: :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.