I have a fixed vdi disk in an ubuntu server (it's a virtual machine, i'm using virtualbox for handle this from my ubuntu desktop so). I installed a lot of things, and the disk is full (i wasn't pretty sure how much space i was going to need when i started).
So, i want to increase the size of the disk, let's call it my main disk. I search the web and it can't be done from command line using
VBoxManage modifyhd tool.
I keep searching, and i find a video that help me doing it. But, this video it's useful until 4:57 (from that point, the author uses gparted for managing partitions, and i can't do that, because in my case are LVM partitions). I will post the steps that i did just in case that you guys don't have time to see the video:
- Backup the virtual machine and all files related.
- Create a disk, /dev/sdb of the same settings (vdi fixed size) from virtual box, but with more size than /dev/sda. /dev/sdb will have 5 GB and /dev/sda will still having 4.
- Clone /dev/sda in /dev/sdb, this will create /dev/sdb5, lvm disk of 4 GB (with
- Create a new disk in the free (unallocated) space, a 1GB lvm disk, this is /dev/sdb3
So, i have two physical volumes (PV) in /dev/sdb.
- /dev/sdb2 (it contains /dev/sdb5 with 4 GB)
- /dev/sdb3, with 1 GB
I add /dev/sdb3 in the same Volume Group (VG) that /dev/sdb2. And now i wan't to shrink or delete /dev/sdb3 and assign this free space to /dev/sdb5. But i can't find the right command to do it. Can this be donde?
I can't do this from LVM GUI because i don't have space for installing it.