Last active
January 24, 2025 08:24
-
-
Save acosonic/fc24051aa0f4994473f24037f15b7580 to your computer and use it in GitHub Desktop.
Ubuntu resize VM disk
This file contains hidden or 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
#!/bin/bash | |
echo 1 > /sys/block/sda/device/rescan | |
cfdisk /dev/sda | |
pvresize /dev/sda3 | |
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv | |
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv |
Procedura za ne LVM diskove:
Use lsblk or fdisk -l to confirm there is unallocated space
parted /dev/sdX
select /dev/sdX
resizepart X YGB
resize2fs /dev/sdaX
xfs grow if sys is xfs...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pvresize /dev/sda3
pvdisplay
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv