Hi
I try to extend one of my VM (debian 8.5) disk size, but it fails every time.
Steps :
After
and
... and it fails :
VM is broken, unable to get a shell, I use a snapshot to revert to previous state :/
So, were am I wrong ?
I try to extend one of my VM (debian 8.5) disk size, but it fails every time.
Steps :
- In proxmox hypervisor, select "resize disk", add 10Gb
- Start and stop VM, parted shows the free space on the physical drive with "print free" (free space at the end)
Code:
(parted) print free
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 19.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
0.03MB 1.05MB 1.02MB Free Space
1 1.05MB 256MB 255MB primary ext2 boot
256MB 257MB 1.05MB Free Space
2 257MB 10736MB 10479MB extended
5 257MB 10736MB 10479MB logical lvm
10736MB 19327MB 8591MB Free Space
- Resizepart of the extended and logical partition to the end size :
Code:
resizepart 2 19327
resizepart 5 19327
- Partitions after :
Code:
Number Start End Size Type File system Flags
0.03MB 1.05MB 1.02MB Free Space
1 1.05MB 256MB 255MB primary ext2 boot
256MB 257MB 1.05MB Free Space
2 257MB 19327MB 19070MB extended
5 257MB 19327MB 19070MB logical lvm
19327MB 19327MB 0.35MB Free Space
- pvresize the physical volume
Code:
PV Size 9.76 GiB / not usable 2.00 MiB
Code:
$pvresize --setphysicalvolumesize 19327M /dev/vda5
WARNING: /dev/vda5: Overriding real size. You could lose data.
Physical volume "/dev/vda5" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
After
Code:
PV Size 18.62 GiB / not usable 0
Code:
VG Size 18.62 GiB
- lvextend the logical volume
Code:
lvextend -l+100%FREE /dev/yolo-vg/root
... and it fails :
Code:
Size of logical volume yolo-vg/root changed from 9.31 GiB (2383 extents) to 18.17 GiB (4652 extents).
device-mapper: resume ioctl on failed: Invalid argument
Unable to resume yolo--vg-root (253:0)
Problem reactivating root
VM is broken, unable to get a shell, I use a snapshot to revert to previous state :/
So, were am I wrong ?