Proxmox减少虚拟磁盘大小
Proxmox采用的是LVM模式,因此,采用lvm相关命令即可配置
查看lv信息
lvs
root@home:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
DISK3-4T DISK3-4T twi-aotz-- <3.61t 0.11 0.20
vm-102-disk-0 DISK3-4T Vwi-aotz-- 1.00t DISK3-4T 0.40
base-1000-disk-0 pve Vri-a-tz-k 23.50g data 19.49
base-1001-disk-0 pve Vri---tz-k 20.00g data
data pve twi-aotz-- <245.98g 11.54 1.00
root pve -wi-ao---- 96.00g
snap_vm-100-disk-0_A0 pve Vri---tz-k 80.00g data vm-100-disk-0
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-a-tz-- 80.00g data 7.19
vm-1000-cloudinit pve Vwi-a-tz-- 4.00m data 9.38
vm-1001-cloudinit pve Vwi-a-tz-- 4.00m data 9.38
vm-101-disk-0 pve Vwi-a-tz-- 500.00g data 2.20
vm-102-disk-0 pve Vwi-aotz-- 1.00g data 89.87
vm-102-disk-1 pve Vwi-aotz-- 64.00g data 4.17
减小lvm大小
原始数据:
配置命令:
lvreduce -L -2G /dev/pve/base-1000-disk-0
root@home:~# lvreduce -L -2G /dev/pve/base-1000-disk-0 WARNING: Reducing active logical volume to 21.50 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce pve/base-1000-disk-0? [y/n]: y Size of logical volume pve/base-1000-disk-0 changed from 23.50 GiB (6016 extents) to 21.50 GiB (5504 extents). Logical volume pve/base-1000-disk-0 successfully resized.
修改后需要在虚拟机中将磁盘分离
然后再添加
最后可以看到,磁盘变小了
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。