GNOME Bugzilla – Bug 758639
Virtualbox shared folder is unmountable
Last modified: 2018-04-13 18:14:39 UTC
When virtual Box's shared folder was mounted, it shows as "none /media/sf_sharedname" at /proc/mounts. Now I patched the virtual box to add it's own entry as "sharename /media/sf_sharedname" at /proc/mounts. After this patch, the gnome-vfs does not support it correctly. It shows the shared folder as a disk volume that ejectable at the nautilus's left sidebar.
I already have the patch to commit.
Did you forget to attach the patch?
Yes, let me attach patch now.
Created attachment 316224 [details] [review] virtualbox shared folder support Virtual box is already modified. It's related to the modification.
I attached the patch. And I did not know how to set the status. Please understand about this point.
Thanks for your bug report. I wonder what distribution are you using, because AFAIK recent distributions are using udisks2volumemonitor... I wonder why it doesn't work correctly after you patched virtualbox... what is difference? JFYI we don't care about importance field, but importance of this bug isn't really critical.
Review of attachment 316224 [details] [review]: What happens if we unmount the share? Could you please create the patch using "git format-patch" with some meaningful description? Please see: https://wiki.gnome.org/Git/Developers#Contributing_patches Also the coding style is wrong. Declarations should be at the beginning and there are also whitespace mistakes, please see: https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html#most-important-rule ::: ggdumount.c.orig @@ +273,3 @@ + if (mount->device_file){ + g_free (mount->name); + mount->name = g_strdup (mount->device_file); Why we can't use mount->mount_entry_name as it is used for all other cases?
I'm a Ubuntu Member. So I'm using Precise(Ubuntu12.04 LTS) and Trusty(Ubuntu14.04 LTS). And I'm also a Debian Virtualbox Team member. And at the virtualbox.org, I'm a contributor. Virtual box's shared folder is automatically mounted while the system is booting. And gvfs does not detect it correctly from /proc/mounts. Current gvfs shows me /media/sf_sharedname as sf_sharedname. And it is shown as ejectable. But could not ejected. So I made the patch. And I applied to become a GNOME member. I'll be happy if you can support me for this applicant? Best Regards. P.S. It's shown critical? Oh, I think that it's not critical. I'm a beginner to this. Please understand about this point.
Yes, we could not use mount->mount_entry_name It will be <sf_sharedname> rather than <sharedname> because It comes from the function, g_unix_mount_guess_should_display. sf_sharedname is mountpoint name. And the mountpoint name is can be duplicated. device name is only one can be identified. Thank you and best regards.
Because the virtualbox does not support device node to monitor, once we un-mount the shared folder, we could not find it after un-mount. And this is mounted by virtualbox automount process while booting, it could not be un-mounted by the gdu. Best Regards. Du Pingping. And i need to remake and upload this patch for the coding style again?
BTW Ubuntu Trusty should be using udisks2volumemonitor already, does it work "correctly" with udisks2volumemonitor? Sorry, but I doubt about we need special hacks for virtualbox share folders. We should be consistent in names, so we should use mount_entry_name as it is used in other cases (even if it can be duplicated).. and also if unmount works I don't see any reason why we should disable unmounting (it is expected that the mount disappears)...
Created attachment 316241 [details] [review] Styled for git and GNU C coding style. I created this patch again for git format-patch HEAD^ and GNU C coding style.
Stop changing the statuses of patches.
I tested it on Ubuntu 12.04 with gvfs 1.12.x. Precise uses gdu-volume-monitor still.
14.04 shows it as sf_<sharename> rather than real <sharename>. When i click eject button at there, it shows me an error message said that "Unable to unmount sf_<sharename>" and "umount: /media/sf_<sharename> is not in the fstab (and you are not root)."
Created attachment 316248 [details] [review] virtualbox shared folder patch for udisk2volumemonitor It's a udisk2volumemonitor.patch for virtualbox shared folder.
Comment on attachment 316248 [details] [review] virtualbox shared folder patch for udisk2volumemonitor It was made on gvfs git master.
Will you please stop changing the statuses of patches.
It's really not needed? It's really a bug when running with virtualbox 5.0.x version's addition iso. You could not check it with virtualbox latest version.
Please do not change bug status either in such way... I'm reopening the bug, because the _can_unmount flag might be determined in better way probably. I thought that it is possible to unmount the mount successfully from your previous comments, but it seems error is returned as per your recent comments. I don't want to add hacks for specific mounts, such as virtualbox, but we might want to use g_unix_mount_point_is_user_mountable to set _can_unmount flag for all mounts. It seems this function might do exactly what we need, but I have never tried. However it should be carefully tested to be sure we don't break anything... I'm changing bug title consequently, because virtualbox folder IS supported (i.e. you can see it in Nautilus and you might browse files)... As I said before, I would like to be consistent with other mounts. So I do not think it is bug that mount is named as "sf_sharename", device name might be better in this case, but it might be nonsense for other mounts... If you really think that the name should be different, then you should modify g_unix_mount_point_guess_name to be sure that same name is used also on other places. But I doubt about that the patch will be accepted.
Review of attachment 316248 [details] [review]: As per previous comment.
Gdu volume monitor has been superseded by udisks2 volume monitor long time ago. I am closing this bug because many have been changed since this was reported. If this is still an issue with the recent gvfs releases, please reopen and change component to udisks2 volume monitor.