codekitchen / dinghy

faster, friendlier Docker on OS X
MIT License
2.12k stars 109 forks source link

VM volume resize #254

Closed jarrettj closed 6 years ago

jarrettj commented 6 years ago

Hi,

I'm constantly running out of space on the VM that dinghy has created. Is there anyway to increase the volume size? When doing a df on that vm machine:

sudo df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   896.1M    187.2M    708.9M  21% /
tmpfs                   497.8M      1.2M    496.6M   0% /dev/shm
/dev/sda1                17.9G     17.1G         0 100% /mnt/sda1
cgroup                  497.8M         0    497.8M   0% /sys/fs/cgroup
/dev/sda1                17.9G     17.1G         0 100% /mnt/sda1/var/lib/docker/plugins
/dev/sda1                17.9G     17.1G         0 100% /mnt/sda1/var/lib/docker/aufs

My test environments won't work anymore. MySQL fails to come up because there's no space.

I tracked it down to the /mnt/sda1/var/lib/docker/aufs/diff folder. Not sure what that is for. Might just try and delete it and see what happens! :)

Regards. JJ

codekitchen commented 6 years ago

Ha, deleting the aufs folder would definitely delete all your container data.

dinghy help create will show you the create options, which includes an option to change the virtual disk size. I know that you can also change the disk size on an already-created VM in the VirtualBox UI. Last time I checked, xhyve didn't have a way to change the disk size without re-creating.

jarrettj commented 6 years ago

Thanks man.

I made that mistake, but did a volume copy in the Virtualbox UI first. You see I don't want to redownload all the images I have. But it seems that is the only way. I tried the Virtualbox UI and it merely copied the the volume and the setting to allocate space dynamically is seemed to be ignored.

Will checkout your resizing tips, thanks @codekitchen.

JJ

jarrettj commented 6 years ago

Sometimes one just needs to know what to google! + stackoverflow :-D

https://stackoverflow.com/questions/11659005/how-to-resize-a-virtualbox-vmdk-file

All fixed, thanks again.