Действия
Libvirt blockresize¶
host: # lvresize -L +44g mirror/kvm602-guest-storage
Using stripesize of last segment 64.00 KiB Extending logical volume kvm602-guest-storage to 92.00 GiB Logical volume kvm602-guest-storage successfully resized
host: # lvs --units k mirror/kvm602-guest-storage
LV VG Attr LSize kvm602-guest-storage mirror -wi-ao 96468992.00k
host:~# virsh
Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit
virsh # list
virsh # list Id Name State ---------------------------------------------------- ... 7 kvm602-guest running ...
virsh # domblklist kvm602-guest
Target Source ------------------------------------------------ vda /dev/mirror/kvm602-guest-root vdb /dev/mirror/kvm602-guest-storage
virsh # blockresize kvm602-work-backup --path /dev/mirror/kvm602-guest-storage --size 96468992
Block device '/dev/mirror/kvm602-work-storage' is resized
Смотрим, чтобы ядро было старше 3.0
guest # uname -r
3.2.0-0.bpo.4-amd64
guest # dmesg |tail
[838729.810179] vdb: detected capacity change from 51539607552 to 98784247808
guest # blockdev --rereadpt /dev/vdb
guest # pvresize /dev/vdb
Physical volume "/dev/vdb" changed 1 physical volume(s) resized / 0 physical volume(s) not resized
Обновлено Андрей Волков больше 11 лет назад · 4 изменени(я, ий)