How To Expand Ubuntu 20.04 LTS Filesystem Volume on Hyper-V
I tried existing solutions on 18.04 and found it doesn't work with a 'nothing to do' output. Some further searching had similar-but-slightly-different steps and needing to merge a few different bits-and-pieces from other solutions on the web to make work.
Setup: Hyper-V; VHDX file as hard disk; Ubuntu-18.04
Expand the VDHX file via Hyper-V as mentioned in existing solutions and then inside the VM:
See which partition is the current Ubuntu setup - should be obvious based on size (in my case was sda3)
growpart /dev/sda 3
Note the space as mentioned.
This is the step which isn't mentioned in a lot of places; its the intemediate step that allows the logical volume extension step work.
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
/dev/part can seen in the fdisk output from step 1.
After the prep above, this step now works. Takes a couple of moments and afterwards can verify with
df -hthat the partition is expanded.