0

i am trying to install an encrypted Ubuntu 20.04 Server on Proxmox. I used the LVM option aswell as the encryption option of the installer.

lsblk gives me:

NAME                        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
loop0                         7:0    0 29.9M  1 loop  /snap/snapd/8542
loop1                         7:1    0   55M  1 loop  /snap/core18/1880
loop2                         7:2    0 71.3M  1 loop  /snap/lxd/16099
loop3                         7:3    0 59.6M  1 loop  /snap/powershell/137
sda                           8:0    0 18.6T  0 disk
├─sda1                        8:1    0    1M  0 part
├─sda2                        8:2    0    1G  0 part  /boot
└─sda3                        8:3    0 18.6T  0 part
└─dm_crypt-1              253:0    0 18.6T  0 crypt
  └─ubuntu--vg-ubuntu--lv 253:1    0  200G  0 lvm   /
sr0                          11:0    1  914M  0 rom
sr1                          11:1    1  1.6G  0 rom
sr2                          11:2    1 1024M  0 rom

showing my 18.6T crypt.

But in df -h there is no filesystem that large.

Filesystem                         Size  Used Avail Use% Mounted on
udev                                97G     0   97G   0% /dev
tmpfs                               20G  1.2M   20G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G   11G  176G   6% /
tmpfs                               95G     0   95G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                               95G     0   95G   0% /sys/fs/cgroup
/dev/sda2                          976M  103M  806M  12% /boot
/dev/loop0                          30M   30M     0 100% /snap/snapd/8542
/dev/loop1                          55M   55M     0 100% /snap/core18/1880
/dev/loop2                          72M   72M     0 100% /snap/lxd/16099
/dev/loop3                          60M   60M     0 100% /snap/powershell/137
tmpfs                               19G     0   19G   0% /run/user/1000

So how can i create a logical volume so i can use the space on the crypt?

Here is my /etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-IdCQcgtk7FSsjYlhEUv98iCG3xH3YFLmNwNK2cUqH2mvo1OujMfgjPB15wYlSUNM / ext4>
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/f20bf465-8640-45d2-a6ab-4d82ed5dbaef /boot ext4 defaults 0 0
/swap.img       none    swap    sw      0       0

and here is the /etc/crypttab:

dm_crypt-1 UUID=55cc21ee-a756-40fa-a677-69c84d023b8d none luks

Thank you in advance for your help!!!

0

Ok, after surfing for two days, i found the solution is pretty easy after all:

1) Extend your logical volume:

lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

2) Resize the Filesystem:

resize2fs -p  /dev/mapper/ubuntu--vg-ubuntu--lv

Done.

I hope it will help others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.