Increase /tmp directory mount
Closed this issue · 6 comments
Is there a way to increase the /tmp mount for the container?
After some investigation, I can see that the /tmp
dir is hardcoded to 2GB (lib/vagrant-lxc/action/boot.rb
on line 30). I've tried to redefine the mount point as below but it doesn't work.
lxc.vm.provider :lxc do |provider|
provider.customize "mount.entry", "tmpfs tmp tmpfs rw,nosuid,nodev,relatime,size=8G 0 0"
end
I was looking for this, also.
As a workaround I run a simple shell provision to remount /tmp.
config.vm.provision "shell",
inline: "mount -o remount,size=5G /tmp"
Couldn't get @alinefr work around working.
I just get the following error message:
mount: cannot remount block device tmpfs read-write, is write-protected
Or maybe it would be possible to get rid of the tmpfs mount altogether. This mount was added for #360 which mentioned LXC <v1.0 limitations. We're soon going to bump LXC's requirement to v1.0+.
I'm not familiar enough with the issue to be sure, but maybe that we could get rid of the mount while keeping #360 fixed.
It seems that my previous fix was a bad idea and I've reverting it in my PR at #456. This PR, however, also includes a new tmpfs_mount_size
config that lets the user easily change the size of that mount or even disable it altogether. The default, however, stays as it was, 2G
.