VirtualBox

Opened 12 years ago

Closed 12 years ago

#9627 closed defect (fixed)

unable to mount shared folder -> fixed as of 29 Sep. 2011

Reported by: don-vbox Owned by:
Component: other Version: VirtualBox 4.0.12
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

I get the impression from forums that everyone has this problem. But I don't see there solutions that work for me. Host is fedora 14, guest is fedora 15, version is 4.0.12 Inside guest: [don@number11 ~]$ mkdir /tmp/xxx [don@number11 ~]$ mount -t vboxsf xxx /tmp/xxx mount: only root can do that [don@number11 ~]$ sudo mount -t vboxsf xxx /tmp/xxx /sbin/mount.vboxsf: Could not add an entry to the mount table.: Invalid argument

Under shared folders I see when I edit share:

folder path = /tmp/xxx folder name = xxx

none of the check boxes is checked

Attachments (2)

mount.strace (5.4 KB ) - added by don-vbox 12 years ago.
mount.strace2 (5.4 KB ) - added by don-vbox 12 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by Michael Thayer, 12 years ago

Are you sure that you are unable to mount the shared folder? I get that message too (and am investigating it), but the folder is still mounted.

comment:2 by Michael Thayer, 12 years ago

Stranger still, /etc/mtab is updated correctly (that error means that the system library function which updates that file reported failure unless I missed some error in the code (http://www.virtualbox.org/browser/trunk/src/VBox/Additions/linux/sharedfolders/vbsfmount.c#L82)).

comment:3 by Michael Thayer, 12 years ago

I don't see that on other guests, I suspect it is a Fedora 15 bug.

in reply to:  3 comment:4 by don-vbox, 12 years ago

Replying to michael:

I don't see that on other guests, I suspect it is a Fedora 15 bug.

Does this mean you can reproduce it in fc15?

This is interesting - different from fc14 [root@number11 don]# ls -l /etc/mtab lrwxrwxrwx. 1 root root 12 Sep 19 12:08 /etc/mtab -> /proc/mounts

I do not see the new mount there and the shared folder does not seem to be working.

comment:5 by Michael Thayer, 12 years ago

Yes, that would explain the error message, wouldn't it? I'm still slightly surprised though, because it should never get as far as that error message unless the mount succeeded. Could you try doing the mounting using /sbin/mount.vboxsf, and running that in strace? I.e.

$ sudo strace -o mount.strace /sbin/mount.vboxsf xxx /tmp/xxx

and then attach mount.strace to this ticket?

comment:6 by don-vbox, 12 years ago

I now find that one of those mounts did work after all. Part of my confusion is caused by the fact that after I got the error message, I tried the mount on another directory and that mount did NOT work. Below is an anotated transcript. I'm doing this all from a shell inside an emacs run as root.

  [root@number11 don]# mount
...
  fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
  none on /tmp/pub type vboxsf (rw,nodev,relatime)
  none on /tmp/xxx type vboxsf (rw,nodev,relatime)
  [root@number11 don]# du -s /tmp/xxx
  640	/tmp/xxx
this is actually my shared directory
  [root@number11 don]# umount /tmp/xxx
  [root@number11 don]# du -s /tmp/xxx
  4	/tmp/xxx
  [root@number11 don]# strace -o /tmp/mount.strace mount -t vboxsf xxx /tmp/xxx
  bash: strace: command not found...
  Install package 'strace' to provide command 'strace'? [N/y] y
(amazing what does and does not come in the fedora live cd)
   * Waiting in queue... 
   * Running... 
   * Resolving dependencies... 
   * Waiting for authentication... 
   * Waiting in queue... 
   * Resolving dependencies... 
   * Downloading packages... 
   * Testing changes... 
   * Installing packages... 
   * Scanning applications... 
   * Getting information... 
  /sbin/mount.vboxsf: Could not add an entry to the mount table.: Invalid argument

  [root@number11 don]# [root@number11 don]# du -s /tmp/xxx
  640	/tmp/xxx
so yes, that does work after all!
  [root@number11 don]# du -s /tmp/zzz
  4	/tmp/zzz
  [root@number11 don]# strace -o /tmp/mount.strace2 mount -t vboxsf xxx /tmp/zzz
  /sbin/mount.vboxsf: mounting failed with the error: Invalid argument
  [root@number11 don]# du -s /tmp/zzz
  4	/tmp/zzz
and yes, that fails (is there some reason they can't both be mounted?
  [root@number11 don]# du -s /tmp/xxx
  640	/tmp/xxx
  [root@number11 don]# 

I'll attach the two strace outputs. They look pretty short. (Maybe you need more output?)

by don-vbox, 12 years ago

Attachment: mount.strace added

by don-vbox, 12 years ago

Attachment: mount.strace2 added

comment:7 by Michael Thayer, 12 years ago

You can't mount the same share in two places. This looks to me like a bug (I noticed it while looking at this ticket) and I am just testing a fix now.

comment:8 by Michael Thayer, 12 years ago

Summary: unable to mount shared folderunable to mount shared folder -> fixed as of 29 Sep. 2011

The error message should now be fixed, and as a bonus mounting a share in two places should now also work. The fix will be included in (at least) any future 4.1 releases we might make. And if you are still using 4.0, please note that the Guest Additions (for Linux guests only) in future 4.1 releases should be compatible with VirtualBox 4.0 as well.

comment:10 by Frank Mehnert, 12 years ago

Resolution: fixed
Status: newclosed

VBox 4.1.4 contains the fix, please update your Guest Additions.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use