Disk space doesn't expand past 6-ish MB
josh1703658784 opened this issue · 4 comments
Background
Software versions
Vagrant: 2.0.1
Plugin: 0.0.42
VirtualBox: 5.2.8 r121009
Configuration
config.persistent_storage.enabled = true
config.persistent_storage.location = "./vagrant/sourcehdd.vdi"
config.persistent_storage.size = 10*1024
config.persistent_storage.mountname = 'docker'
config.persistent_storage.filesystem = 'ext4'
config.persistent_storage.mountpoint = '/var/lib/docker'
config.persistent_storage.volgroupname = 'docker'
Other configurations tried
config.persistent_storage.mountpoint = '/external_mount'
config.persistent_storage.use_lvm = false
- And various mount sizes
What happens
When building Docker images the build fails with No space left on device
.
To determine if it was a Docker problem, I also tried running the following:
while true; do echo foobar >> /external_mount/file; done;
In both cases I see the same errors.
The external volume seems to consistently cap out between 6 and 7 MB.
Running df -h
:
root@dev-build:/external/var/lib/docker# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 5.7M 390M 2% /run
/dev/sda1 9.7G 4.2G 5.5G 44% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1000
/dev/mapper/docker-docker 6.8M 6.6M 0 100% /external/var/lib/docker
...
What I expect
For the mount point to expand as needed up to the size specified in the Vagrantfile.
Issue and workaround
After looking at other issues I saw an issue with ubuntu/xenial64
, which I was using. Going to ubuntu/trusty
solved the problem.
@Joshuaks Could you elaborate on the issue with xenial64 that you saw? Running into this same issue and can't/won't/don't want to downgrade to trusty.
Issue is reproducible with ubuntu/xenial64
as well as ubuntu/bionic64
. ubuntu/trusty64
does indeed work but support ends April 2019.
Edit: Apparently xenial and bionic do have /dev/sdb
in their base image. config.persistent_storage.diskdevice = '/dev/sdc'
should force the use of a different device.
Edit: Apparently xenial and bionic do have
/dev/sdb
in their base image.config.persistent_storage.diskdevice = '/dev/sdc'
should force the use of a different device.
You just saved my day with this one ! I was fighting with this error on Ubuntu 18 for hours ! Thanks