LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-21-2015, 08:34 AM   #1
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Problem with NFS mounting at boot.


Hello

I can mount a NFS server fine manually. And I put this in /etc/fstab

Quote:
XX.XX.XX.XX:/share/inmemory.no /mnt/nasse nfs hard,nosuid,intr,async,bg 0 0
The XX is the ip address of a NAS. I've been trying different options but it doesn't seem to make a difference.

The end of dmesg after a reboot is this:

Quote:
... mounting of local disks here
[ 15.655668] EXT4-fs (sdf1): mounted filesystem with ordered data mode
[ 16.273155] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 16.276402] e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[ 16.284351] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 18.540255] fuse init (API version 7.13)
[ 25.707168] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 26.406467] eth1: no IPv6 routers present
But the NAS is not mounted. And I can find nothing in the logs about it. When I do "mount /mnt/nasse" or "mount -a" this is added to dmesg:

Quote:
[ 253.495731] RPC: Registered udp transport module.
[ 253.495736] RPC: Registered tcp transport module.
[ 253.495739] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 253.547313] Slow work thread pool: Starting up
[ 253.547521] Slow work thread pool: Ready
[ 253.547661] FS-Cache: Loaded
[ 253.600391] FS-Cache: Netfs 'nfs' registered for caching
And now the mount is fine. Anyone have any idea on how to troubleshoout this?

The NFS client is a server running Debian Squeeze LTS and the NFS server is some QNAP NAS box. I think the problem is on the client side because mounting manually works fine.

I searched the net and found many similar threads, but no solutions seem to work for me.

Maybe I should do it in a different way? The perfect solution would be like this:
- If the NAS is down, keep retrying till it comes up.
- And it would be better if Apache isn't started until the NAS is up.
- Is there a way to stop Apache if the NAS box goes down?

Maybe mounting in fstab is not the best way in this scenario?
 
Old 08-21-2015, 12:44 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Not sure about Debian; but in RHEL based systems you need to put in _netdev in the options field

Quote:
XX.XX.XX.XX:/share/inmemory.no /mnt/nasse nfs hard,nosuid,intr,async,bg,_netdev 0 0
Look at the man pages for fstab and mount

--C
 
Old 08-24-2015, 09:08 AM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Original Poster
Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
The _netdev thing is not needed on Debian.

My problem was that eth0 never came up - only eth1. I had configured both network interfaces so it shouldn't matter where the network cable is plugged in.

And those scripts in ifup/ifdown waited for eth0 to came up, which never happened. On Debian, automounting of network drives only work with eth0.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS Volumes not mounting on boot custangro Linux - Enterprise 6 07-17-2009 09:36 AM
Problem mounting NFS share at boot amishtechie Linux - Networking 1 03-17-2007 10:23 PM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
NFS not mounting on boot lairdcp Linux - Networking 0 01-04-2005 08:30 PM
mounting nfs on boot-up jonfa Linux - General 1 09-04-2001 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration