我的 XEN 主机上运行了一个虚拟机,但磁盘空间不足。它安装了/dev/xvda2
使用 ext4 文件系统格式化的卷。
这是我的虚拟机 xen 配置:
# /etc/xen/vm04.experimental.cfg
kernel = '/boot/vmlinuz-4.9.0-11-amd64'
extra = 'elevator=noop'
ramdisk = '/boot/initrd.img-4.9.0-11-amd64'
root = '/dev/xvda2 ro'
disk = [
'phy:/dev/vg0/vm04.experimental-disk,xvda2,w',
'phy:/dev/vg0/vm04.experimental-swap,xvda1,w',
]
...
# lvdisplay /dev/vg0/vm04.experimental-disk
--- Logical volume ---
LV Path /dev/vg0/vm04.experimental-disk
LV Name vm04.experimental-disk
VG Name vg0
LV Status available
# open 1
LV Size 60,00 GiB
Current LE 15360
Segments 5
Allocation inherit
...
我的卷组上还有 44GB 空间vg0
:
# vgdisplay
--- Volume group ---
VG Name vg0
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 36766
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 27
Open LV 22
Max PV 0
Cur PV 2
Act PV 2
VG Size 1,07 TiB
PE Size 4,00 MiB
Total PE 281534
Alloc PE / Size 270080 / 1,03 TiB
Free PE / Size 11454 / 44,74 GiB
如何将剩余空间分配给我的 vm04?