Have added a line to fstab to mount my NAS as below:
//192.168.0.12/Public /home/mike/Nas cifs rw,guest,vers=1.0,iocharset=utf8,_netdev,noperm 0 0
The _netdev bit allegedly) is to make the system wait until the network is up before attempting the mount.
If I am using the wired network it mounts fine. If I am on wireless (which takes longer to initialise) it does not mount and I have to do a mount -a to make it happen.
Any ideas. Or should I post somewhere else, but I am a newbie!
Mounting NAS using fstab causes timing issues
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Mounting NAS using fstab causes timing issues
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Mounting NAS using fstab causes timing issues
Use the
as a custom command in start up applications and set a suitable time delay?
Code: Select all
mount -a
Re: Mounting NAS using fstab causes timing issues
Just a suggestion on the use of Startup Applications: What you might want to do is change your fstab line to this:
user will allow an ordinary ( non root ) user to mount the share.
Then in Startup Applications add:
An alternative method is:
** Keep your current fstab line as it is.
** Create a new file at
With these lines:
** Then make the file executable:
Anything added to if-up.d will execute only after the network is up in the boot process.
noauto will prevent the mount from happining at boot time.//192.168.0.12/Public /home/mike/Nas cifs rw,guest,vers=1.0,iocharset=utf8,_netdev,noperm,noauto,user 0 0
user will allow an ordinary ( non root ) user to mount the share.
Then in Startup Applications add:
Code: Select all
mount /home/mike/Nas
** Keep your current fstab line as it is.
** Create a new file at
/etc/network/if-up.d/fstab
With these lines:
Code: Select all
#!/bin/sh
mount -a
Code: Select all
sudo chmod +x /etc/network/if-up.d/fstab
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Mounting NAS using fstab causes timing issues
So as to avoid such issues it is advised to "automount" network file systems; this is to say that they mount only when in fact accessed (and can automatically unmount after laying idle for some specified time again). If you're on Mint 18 you can do this directly from /etc/fstab:
Also see
Code: Select all
//192.168.0.12/Public /home/mike/Nas cifs noauto,rw,guest,vers=1.0,iocharset=utf8,noperm,x-systemd.automount,x-systemd.device-timeout=10s,x-systemd.idle-timeout=10m
man systemd.mount
. If you do not in fact need the NAS mounted immediately when booting this'll work nicely.Re: Mounting NAS using fstab causes timing issues
Um ... Actually ... and this depends on how you use the NAS device ... you really don't have to use Startup Applications at all.altair4 wrote: ⤴Tue Mar 20, 2018 6:48 am Just a suggestion on the use of Startup Applications: What you might want to do is change your fstab line to this:noauto will prevent the mount from happining at boot time.//192.168.0.12/Public /home/mike/Nas cifs rw,guest,vers=1.0,iocharset=utf8,_netdev,noperm,noauto,user 0 0
user will allow an ordinary ( non root ) user to mount the share.
Then in Startup Applications add:Code: Select all
mount /home/mike/Nas
Your mount point is in your home directory so if you add noauto and user to your fstab line you will get a mount icon on the side panel of your file manager which becomes actionable. Click on the icon and your share is mounted seamlessly.
It's easy enough to try:
** Unmount your share:
Code: Select all
sudo umount /home/mike/Nas
** On the side panel of your file manager you should see something labelled Nas - under Network if you are using Nemo.
** If you click on it it will go to fstab to find out if you can mount it ( user ) and how to mount it and it will mount.
If you only use the nas when needed this is an option.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.