LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-101-disk-0 pve Vri---tz-k 8.00g data
data pve twi-aotz-- <151.63g 11.24 1.66
root pve -wi-ao---- 59.25g
snap_vm-104-disk-0_org pve Vri---tz-k 50.00g data vm-104-disk-0
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-a-tz-- 32.00g data 3.80
vm-104-disk-0 pve Vwi-a-tz-- 50.00g data 21.05
vm-105-disk-0 pve Vwi-a-tz-- 32.00g data 4.07
移除 local-lvm(/dev/pve/data)
lvremove /dev/pve/data
Removing pool "data" will remove 5 dependent volume(s). Proceed? [y/n]:y
Logical volume "data" successfully removed
vgdisplay | grep Free
Free PE / Size 43705 / 170.72 GiB
使用 gparted live cd 調整lvm大小
使用文字指令parted
parted /dev/sdj
GNU Parted 3.2
Using /dev/sdj
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA INTEL SSDSC2BX40 (scsi)
Disk /dev/sdj: 400GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1049kB 1031kB bios_grub
2 1049kB 538MB 537MB fat32 boot, esp
3 538MB 400GB 400GB lvm
(parted) res
rescue resize resizepart
(parted) res
rescue resize resizepart
(parted) resizepart
Partition number? 3
End? [400GB]? 150G
Warning: Shrinking a partition can cause data loss, are you sure you want to
continue?
Yes/No? Yes
(parted) print
Model: ATA INTEL SSDSC2BX40 (scsi)
Disk /dev/sdj: 400GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1049kB 1031kB bios_grub
2 1049kB 538MB 537MB fat32 boot, esp
3 538MB 150GB 149GB lvm