On Wed, Jul 21, 2021 at 3:23 PM Chris Adams <linux(a)cmadams.net> wrote:
And you have more space! I do this all the time with
libvirt-managed
Linux VMs. I haven't yet gone through th necessary steps for the more
recent btrfs setup.
Guest:
# lsblk -o NAME,SIZE
NAME SIZE
vda 100G
├─vda1 600M
├─vda2 1G
└─vda3 98.4G
Host:
$ sudo virsh blockresize uefivm
/var/lib/libvirt/images/f34w-uefi-defaultbtrfs.raw 200G
Block device '/var/lib/libvirt/images/f34w-uefi-defaultbtrfs.raw' is resized
Guest:
# lsblk -o NAME,SIZE
vda 200G
├─vda1 600M
├─vda2 1G
└─vda3 98.4G
(gdisk requires three changes: move the secondary GPT to the end of
the disk, then delete vda3 partition, and recreate it max size, which
is the default behavior)
# partprobe
# lsblk -o NAME,SIZE
vda 200G
├─vda1 600M
├─vda2 1G
└─vda3 198.4G
# btrfs fi resize max /
Resize device id 1 (/dev/vda3) from 98.41GiB to max
Single device btrfs resize is straightforward. But with multiple
device Btrfs, you need to specify the devid you want resized,
otherwise it defaults to devid 1.
--
Chris Murphy