kusnier / vagrant-persistent-storage

A Vagrant plugin that creates a persistent storage and attaches it to guest machine.
MIT License
292 stars 68 forks source link

Storage Mount Doesn't Work #107

Open john-everden opened 3 years ago

john-everden commented 3 years ago

I have the following settings:

config.persistent_storage.enabled = true config.persistent_storage.location = "~/work/pde/data/data.vdi" config.persistent_storage.size = 15000 config.persistent_storage.mountname = 'persistantdata' config.persistent_storage.filesystem = 'ext4' config.persistent_storage.mountpoint = '/webfiles' config.persistent_storage.volgroupname = 'persistantdata' config.persistent_storage.variant = 'Fixed' config.persistent_storage.use_lvm = false

I've also tried without config.persistent_storage.use_lvm = false

and without config.persistent_storage.variant = 'Fixed'

Upon creating vagrant instance I see the following disks vagrant@ubuntu-focal:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 474M 0 474M 0% /dev tmpfs 99M 952K 98M 1% /run /dev/sda1 39G 1.3G 38G 4% / tmpfs 491M 0 491M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 491M 0 491M 0% /sys/fs/cgroup /dev/loop0 56M 56M 0 100% /snap/core18/1997 /dev/loop1 33M 33M 0 100% /snap/snapd/11588 /dev/loop2 71M 71M 0 100% /snap/lxd/19647 /dev/sdb1 4.8M 28K 4.1M 1% /webfiles vagrant 954G 118G 837G 13% /vagrant tmpfs 99M 0 99M 0% /run/user/1000

Notice /webfiles is only a size of 4.8M. Inspecting the actual VDI file I can see it's 15GB. No data I write to this folder survives destorying the vagrant instance.

john-everden commented 3 years ago

Was specifically on ubuntu 20.02. The fix was setting config.persistent_storage.diskdevice = '/dev/sdc'