How to delay the mount of Shared Folder in /etc/fstab

If none of the more specific forums is the right place to ask

How to delay the mount of Shared Folder in /etc/fstab

Postby makh » 2018-09-28 17:01

Hi

My virtual guest machine, some times goto boot up failure, if the mount of the shared folder fails. The only solution is to stop the mount in /etc/fstab.

I am now looking by adding: nofail option with defaults to mount the shared folder on the guest machine. But I am not sure, as I have put it under test!

I am not yet satisfied, as to which option to use, as the virtualbox manual says that the mount should work, but on googling: people report mount issues (like mines), but employ different ways to solve it.

Thankyou
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 622
Joined: 2011-10-09 09:16

Re: How to delay the mount of Shared Folder in /etc/fstab

Postby debiman » 2018-09-29 08:33

you should employ the best - in this case, a search engine.
https://www.startpage.com/do/dsearch?qu ... tc%2Ffstab
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: How to delay the mount of Shared Folder in /etc/fstab

Postby makh » 2018-09-29 11:42

debiman wrote:you should employ the best ...

Hi
Thanks a lot; I try that on first step always...! :wink:

2. I am going to meet you soon, dont worry! I think we will be very good friends. :lol:

I have, infact searched, many topics, but the mount issues have been reported by some users, as still having issues:
1. /etc/rc.local (Its not a part of systemd; so may be removed in buster).
2. /etc/fstab doesnt have an option for mount after time.
3. cron has no option that runs at boot-up-complete (it is time based).
4. I still have to learn a lot about systemd options: frankly I was unable to find that systemd has an option that when bootup is done: then execute this and this etc etc! :( ... or I may be wrong!
5. Virtualbox manual doesnt state any technique, directly, to resolve this issue.
6. Theres no way to load vboxsf before mount of /etc/fstab takes place: or I couldnt determine.
7. I dont want to use any complex steps or scripts!

Thankyou
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 622
Joined: 2011-10-09 09:16

Re: How to delay the mount of Shared Folder in /etc/fstab

Postby Head_on_a_Stick » 2018-09-29 11:59

It is possible to bypass /etc/fstab and use systemd to mount the folder instead and take advantage of the greater flexibility this method offers in respect of the relative startup of the unit files.

See systemd-mount(5) for the details but basically you need to make a foo.mount unit file and use the After= and Wants= directives to control the ordering.
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to delay the mount of Shared Folder in /etc/fstab

Postby makh » 2018-09-29 17:46

Hi

After going through the debian mount manual and Arch. I found:
https://wiki.archlinux.org/index.php/fstab
Remote filesystem

The same applies to remote filesystem mounts. If you want them to be mounted only upon access, you will need to use the noauto,x-systemd.automount parameters. In addition, you can use the x-systemd.device-timeout= option to specify how long systemd should wait for the filesystem to show up. Also, the _netdev option ensures systemd understands that the mount is network dependent and order it after the network is online.

noauto,x-systemd.automount,x-systemd.device-timeout=30,_netdev

I am not quite sure, but I suppose, this may work:
Code: Select all
myshare /mnt/mountmyshare vboxsf defaults,uid=user,nofail,noauto,x-systemd.automount,x-systemd.device-timeout=45  0 0


I will try your step, if above doesnt works!

Thankyou
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 622
Joined: 2011-10-09 09:16


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable