IMPORTANT NOTE: before doing step 1-3, you need to insert a Ubuntu live-cd and boot from it. And then, open gparted in the live-cd and continue with step 1-3.
The problem was that the partitions were somehow locked. So:
I should add that in the VM the new space was not available, so I had to run those 2 commands: expand LVM to all remaining free space:
- I right Clicked both sd2 and sd5 and chose "Deactivate".
- I resized the extended (sda2) partition.
- I resized the lvm (sda5) partition.
I should add that in the VM the new space was not available, so I had to run those 2 commands: expand LVM to all remaining free space:
lvextend –l +100%FREE [MOUNTPOINT]
expand filesystem:sudo resize2fs [MOUNTPOINT]
::NOTES::
1. To display Mountpoint run the command lvdisplay to display where is
the root directory. For example, /dev/nameoftheserver/root
2. After that, run lvextend -1 +100%FREE /dev/nameoftheserver/root
3. Run sudo resize2fs /dev/nameoftheserver/root.
Credit to
papnikol and
linuxdev2013 for their solution in
https://superuser.com/questions/917988/
gparted-cannot-resize-extended-or-lvm-partition
No comments:
Post a Comment