Paul Muldoon's picture

I just installed TurnKeyLinux for the first time, and am working to mount my Unraid NFS shares.

I have the following in my fstab

192.168.11.41:/mnt/user/Public /mnt/nasbox nfs defaults 0 0

And I can mount that share with mount -a

But on a reboot, the share is not automouting.

I did some searching as well, and some mentioned to remove the following directory

/var/run/network/mountnfs

However, that directory is already not showing.  So I have no idea why else it would not be mounting on boot.

Any ideas?

Forum: 
Tags: 
Jeremy Davis's picture

I have had very little exposure to NFS so I'm not sure that I can be a lot of help...

However I do know that mounting Samba shares on boot (via fstab) can also be a bit flakey. My understanding that this can be because fstab mounts are parsed fairly early in the boot process, and often networking is not yet available. End result is that the mount times out (because it can't connect with no networking).

Unfortunately I don't recall what the workaround was (I don't use Samba that much either...) but I recall that I did manage to sort it at the time... So hopefully if you keep in mind that TKL v12.x is basically a tricked out/minimised Debian Squeeze server then google may be of some asistance.

Paul Muldoon's picture

Thank Jeremy

So further searching today found this post on debian's forums

http://forums.debian.net/viewtopic.php?f=5&t=71951

and adding

 set ASYNCMOUNTNFS=no in /etc/default/rcS

and rebooting automounted the drives.

Jeremy Davis's picture

Thanks for posting that back, that's brilliant! And will no doubt be of use to others... :)

oVeRFLoW's picture

Putting the "set ASYNCMOUNTNFS=no" the next reboot the / filesystem becomes read-only and you are stuck until it is remounted in rw. 
The solution is to remove the network card eth1 which blocks the initiation of nfs startup. At least in my case I have only one network card. The network card eth1 is found in webmin, but I have not found by ifconfig. 
greetings

Avi's picture

Well, i tried the above describe solution ("set ASYNCMOUNTNFS=no") too and got halted at:

[ok] configuring network interfaces…done.


can you exolain what do you mean by "...until it is remounted in rw. 
The solution is to remove the network card eth1..."

thanks
Avi

Thunderation's picture

It's not "set ASYNCMOUNTNFS=no" you need to put in /etc/default/rcS

It's just "ASYNCMOUNTNFS=no"  !

 

Worked a treat for me!

venkatesh's picture

service netfs start

chkconfig netfs on

fatso's picture

hi new to linux 

I've deleted the  eth1

fstab file
# Map NFS Network Drive
192.168.0.16:/Data/Public/ /mnt/hardie nfs rw,auto,exec 0 0 

/etc/default/rcS
ASYNCMOUNTNFS=no

The information put in the fstab file shows up in Disk and Network Filesystems  
 Mounted as =
/mnt/hardie

Type =
Network Filesystem (nfs)

Location =
192.168.0.16:/Data/Public/

In Use =
No

Save =
Yes

Network Filesystem Mount Details
After clicking on the mount I want to edit, I set it Mount (now)
After saving this error comes up
Failed to save mount : The host '192.168.0.16' does not support NFS

Please help

Jeremy Davis's picture

So you will need to set it up. TBH I'm no NFS expert but if you google then you should find tons of info. Keep in mind that TurnKey Linux is based on Debian so generally any instructions for Debian or Ubuntu should be close.
linux admin's picture

Its is alot easier to just use "default options" for mount followed by specific options you want to happen. an example of this would be defaults,rw,auto,exec. By adding defaults you automatically set the mounting criteria needed by the system. With your additional mounting requirments after defaults you set the specific options you want and overwrite the default mounting options.

Add new comment