You are not logged in.

#1 2015-10-23 16:40:02

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Virtualbox permissions issue Arch Guest + Arch Host

I've set up a development environment using Vagrant and Virtualbox. Since I can replicate this without Vagrant it is a Virtualbox issue so I'll walk through what happens.

Mounting a shared folder /media/srv on the guest to /home/tom/srv on the host then:

1) On the guest cd /media/srv

2) run stat newfile.css inside the guest... as you'd expect it says "No such file or directory"

3) Create the file newfile.css on the host

4) Type ls -aoh on the guest. I'd expect to see the new file and it kind of appears however, ls first displays this error:

ls: cannot access newfile.css: No such file or directory

And in the output where it should list the file it shows:

-????????? ? ?          ?            ? newfile.css

Trying to open the file with any program, e.g. cat gives "newfile.css: no such file or directory"

If I add a file from the host without first running stat (or otherwise trying to access it) on the guest, it works 100% as you'd expect and the file gets listed via ls with valid permissions, owner, group , size etc and cat can display the contents of the file.

So by deduction it's something that trying to open the file on the guest first changes when it does it, some sort of cache...

If I clear the filesystem cache:

# echo 3 > /proc/sys/vm/drop_caches

the file is suddenly visible!

How can I make it so that the guest's cache is correctly updated when the file is updated? Is this a mounting issue? Is this a permissions issue? Is it a kernel module problem?

I have the relevant kernel modules loaded in the guest:

-vboxguest
-vboxsf
-vboxvideo

Thanks for any help, this is really confusing me and I don't know what else to try!

To get it to work I can clear the cache in a cron... but that's an ugly hack and would prefer to find a proper solution.

Last edited by Tom B (2015-10-23 16:40:34)

Offline

#2 2015-10-23 17:07:35

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: Virtualbox permissions issue Arch Guest + Arch Host

Ok it looks like there's a kernel option called CONFIG_FSCACHE ( https://bbs.archlinux.org/viewtopic.php?id=184282 it's mentioned here) but I have no idea how to change this value... how can I set it?

Offline

Board footer

Powered by FluxBB