Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 384M 1.1M 383M 1% /run
**/dev/mapper/ubuntu--vg-ubuntu--lv 196G 16G 171G 9% /** primary partition here
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/loop1 33M 33M 0 100% /snap/snapd/12398
/dev/loop2 68M 68M 0 100% /snap/lxd/20326
/dev/loop4 33M 33M 0 100% /snap/snapd/12159
/dev/loop0 56M 56M 0 100% /snap/core18/2074
/dev/loop5 56M 56M 0 100% /snap/core18/2066
/dev/loop3 70M 70M 0 100% /snap/lxd/19188
/dev/sda2 976M 203M 707M 23% /boot
tmpfs 384M 0 384M 0% /run/user/1000
对阵
myuser@ubuntu20:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
loop0 7:0 0 55.5M 1 loop /snap/core18/2074
loop1 7:1 0 32.3M 1 loop /snap/snapd/12398
loop2 7:2 0 67.6M 1 loop /snap/lxd/20326
loop3 7:3 0 69.9M 1 loop /snap/lxd/19188
loop4 7:4 0 32.3M 1 loop /snap/snapd/12159
loop5 7:5 0 55.4M 1 loop /snap/core18/2066
sda 8:0 0 800G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 799G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 199G 0 lvm /
sr0 11:0 1 1024M 0 rom
我该如何做ubuntu--vg-ubuntu--lv
消耗全部 799 GB?
答案1
尝试
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
然后通过运行调整 fs 的大小
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv