Shared folder getting read errors in guest

This is for discussing general topics about how to use VirtualBox.

Shared folder getting read errors in guest

Postby wearyofallthiscrap » 30. Nov 2011, 10:19

Using 4.1.4 on a Windows XP host running a Debian 6 wheezy/sid guest. Setting up a couple of shared folders was one of the first things I did, and they've worked wonderfully for a few weeks now.

Earlier today I made some changes to some dirs/files in a shared folder; I was using programs on the host to make the changes. When I switched into the guest, the changed directories gave read errors when trying to do a simple directory listing. On the host (actually inside a cygwin terminal; thus the *nix-y appearance even though it's an XP host), I can access the subdir with no trouble:
Code: Select all   Expand viewCollapse view
% cd .svn/pristine
% ls -g
total 0
drwx------+ 1 None 0 Nov 30 00:04 14/
drwx------+ 1 None 0 Nov 30 00:04 20/
drwx------+ 1 None 0 Nov 30 00:04 37/
drwx------+ 1 None 0 Nov 30 00:04 59/
drwx------+ 1 None 0 Nov 30 00:04 69/
drwx------+ 1 None 0 Nov 30 00:04 7e/
drwx------+ 1 None 0 Nov 30 00:04 c8/
drwx------+ 1 None 0 Nov 30 00:04 d3/
drwx------+ 1 None 0 Nov 30 00:04 ee/
drwx------+ 1 None 0 Nov 30 00:04 f6/
drwx------+ 1 None 0 Nov 30 00:04 fb/
drwx------+ 1 None 0 Nov 30 00:04 fc/
drwx------+ 1 None 0 Nov 30 00:04 fe/
%

Inside the Linux guest, trying to see the same subdir just pukes:
Code: Select all   Expand viewCollapse view
$ cd /media/sf_remtssd/TestOne/.svn/pristine
$ /bin/ls -l
/bin/ls: cannot access 14: No such file or directory
/bin/ls: cannot access 20: No such file or directory
/bin/ls: cannot access 37: No such file or directory
/bin/ls: cannot access 59: No such file or directory
/bin/ls: cannot access 69: No such file or directory
/bin/ls: cannot access 7e: No such file or directory
/bin/ls: cannot access c8: No such file or directory
/bin/ls: cannot access d3: No such file or directory
/bin/ls: cannot access ee: No such file or directory
/bin/ls: cannot access f6: No such file or directory
/bin/ls: cannot access fb: No such file or directory
/bin/ls: cannot access fc: No such file or directory
/bin/ls: cannot access fe: No such file or directory
total 0
?????????? ? ? ? ?            ? 14
?????????? ? ? ? ?            ? 20
?????????? ? ? ? ?            ? 37
?????????? ? ? ? ?            ? 59
?????????? ? ? ? ?            ? 69
?????????? ? ? ? ?            ? 7e
?????????? ? ? ? ?            ? c8
?????????? ? ? ? ?            ? d3
?????????? ? ? ? ?            ? ee
?????????? ? ? ? ?            ? f6
?????????? ? ? ? ?            ? fb
?????????? ? ? ? ?            ? fc
?????????? ? ? ? ?            ? fe
%


The name of the shared folder in question only shows up once in VBox.log, when it's initially registered. Nothing odd appears in the guest's syslog. Accessing files on the shared folders that weren't touched today is fine (presumably the host-side programs rewriting the files have done something odd).

Is there a way of prodding the VM to resync or refresh or re-whatever its shared folder data, without restarting the guest?
wearyofallthiscrap
 
Posts: 31
Joined: 8. Nov 2011, 16:10
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu/Debian

Re: Shared folder getting read errors in guest

Postby wearyofallthiscrap » 30. Nov 2011, 22:12

wearyofallthiscrap wrote:Is there a way of prodding the VM to resync or refresh or re-whatever its shared folder data, without restarting the guest?


I should add: alternatively, are there guest properties that I can set to disable or change whatever caching is in use? Ideally on a per-share basis, I guess, but if not then not.
wearyofallthiscrap
 
Posts: 31
Joined: 8. Nov 2011, 16:10
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu/Debian

Re: Shared folder getting read errors in guest

Postby Perryg » 30. Nov 2011, 22:31

You might want to try using the manual mount instead of the auto-mount. Lots more control.
Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Shared folder getting read errors in guest

Postby wearyofallthiscrap » 30. Nov 2011, 23:44

Sounds good. Is there anything host-side I need to do other than unchecking the Auto-Mount option?

On the guest side, are there any VB-specific mount options that I can use in the fstab?
wearyofallthiscrap
 
Posts: 31
Joined: 8. Nov 2011, 16:10
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu/Debian

Re: Shared folder getting read errors in guest

Postby Perryg » 1. Dec 2011, 00:12

Nothing on the host side really, You will need to remove the auto-mount (I have not had great success with editing it) and create it new.
Code: Select all   Expand viewCollapse view
sudo mount -t vboxsf -o rw,uid=1000,gid=1000 <sharename> <mount-point>

Once you see this working and if you want it to mount at boot, put it in /etc/rc.local. Make sure it is above exit 0

Note: replace uid, gid to match yours.
Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Shared folder getting read errors in guest

Postby wearyofallthiscrap » 1. Dec 2011, 01:16

For those reading this in the future: this is the same behavior reported over in this thread: viewtopic.php?f=3&t=46021

I've turned off the automount and am doing it manually instead, so that if/when this happens again, a umount and remount inside the guest should hopefully be enough. (Well, not really manually; it's in /etc/fstab instead of rc.local, and is mounted at boot time. It's "manually" in the sense of the guest OS doing the steps instead of the hypervisor being all magical.)

Thanks for the uid=/gid= tip, I'd forgotten about those.
wearyofallthiscrap
 
Posts: 31
Joined: 8. Nov 2011, 16:10
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu/Debian

Re: Shared folder getting read errors in guest

Postby Perryg » 1. Dec 2011, 02:07

Just to clarify why the suggestion to use /etc/rc.local in Ubuntu or other debian distros.

There are times when fstab is loaded before the vbox services starts, and putting the mount in the fstab will cause a double mount statement (runs again) and slows the boot up and even cause the mount to fail. /etc/rc.local is always loaded at user login so this does not experience the same behavior.
Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 16 guests