wanna increase the size of the guest disk in virtualbox, but it is not so simple for encrypted systems :-/
I run debian into a virtualbox with (debian/LUKS) disk encryption, no vbox disk encryption. The guests disk has ~7GB, I resized it by doing:
1) open vbox > File > Virtual Media Manager > slide the bar to 30GB size;
2) open a hosts shell and do:
vboxmanage modifymedium disk "vmName.vdi" --resize 30000
(this gave me a non-understandable error msg... whatever..)
3) I started the VM, opened gparted and saw the whole 30GB there... cool Off course it was showing the additional ~23GB as unused space.
4) I use the gparted slider to resize the partition /dev/sda3 (where my home is) to use the whole space, thus going to ~30GB;
5) I rebooted the guest system, logded in reopened gparted at the guest and saw /dev/sda3 having 30GB ... great!
6) Diagnosis:
I typed 'du -h' in the guest and saw only the former 7GB there ... :-/
If i 'du -h vmName.dvi' from the host shell i keep seeing only the 7GB there, but it does not need to mean much, since the initial setting was already for dynamically allocated disk space;
From the guest shell i do 'fdisk -l' and see the whole 30GB inside /dev/sda3 (mounted as /dev/mapper/sda3_crypt ... 30GB);
Now i open virtualbox from the guest, open settings for my VM and go to storage. There it says: Virtual size: 30GB; Actual size: 7GB (?? no idea, maybe it refers to dynamic allocation);
I open gparted, right-click on the problematic partition and click on information, than I read: ''22.29 GiB of unallocated space within the partition. To grow the file system to fill the partition, select the partition and choose the menu item: Partition --> Check." However option 'check' is disabled in menu.
Can anyone help me further audit or solve this problem ??
Thanks a lot!
Note1: when i encrypt a guest disk, dynamic allocation from virtualbox does not have any effect, meaning, the encrypted partition goes directly to its full potential size, at leas if i 'du' its image file from the guest OS. Thus step 6 above should indeed show right alway 30GB;
Note2: cross question from stackexchange/linux&unix, since no answer there ..

Host: ubuntu Guest: debian/openbox on virtualbox, dynamic allocation of HD space