Extending ubuntu lvm volumes in hyper-v

This is… trickier than expected. Here’s the process:

Expand VHDX through Hyper-V

Extend the partition (gparted helps with this)

Extend the logical volume: lvextend –size +40G /dev/vg0/foo

Resize the filesystem: resize2fs /dev/vg0/foo

Other useful commands: pvs lvs