Skip to content

Instantly share code, notes, and snippets.

@L3houx
Created February 25, 2023 00:36
Show Gist options
  • Save L3houx/800f3ba02a4a495300b73600f326a971 to your computer and use it in GitHub Desktop.
Save L3houx/800f3ba02a4a495300b73600f326a971 to your computer and use it in GitHub Desktop.
Commands to resize VMs after updating disk size.
df -h
pvs
pvresize /dev/sda3
lvresize -r -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
parted -s -a opt /dev/sda "resizepart 3 100%"
parted -s -a opt /dev/sda "print free"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment