Last active
August 20, 2024 20:41
-
-
Save amunchet/b14701277391ceab3f79a2914ab174c7 to your computer and use it in GitHub Desktop.
Rescan VM disk resize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must be done as root | |
echo 1 > /sys/class/block/sda/device/rescan | |
# For LVM | |
fdisk /dev/sda # For the resizing - delete it, then recreate it. | |
pvresize /dev/sda3 | |
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv | |
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment