Bug 427157 - mounting of nfs shares with fstab during bootup not working
mounting of nfs shares with fstab during bootup not working
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
8
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
: 389401 427658 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-01 11:20 EST by Mark
Modified: 2014-03-16 23:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-01 19:49:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
netfs-data-gathering during boot (2.32 KB, text/plain)
2008-01-01 16:31 EST, Mark
no flags Details

  None (edit)
Description Mark 2008-01-01 11:20:34 EST
Description of problem:  mounting of nfs shares with fstab during bootup not
working due to networking not started until after fstab is processed.


Version-Release number of selected component (if applicable):


How reproducible:  add these lines to fstab and reboot: 
192.168.1.102:/mnt/hdd1 /mnt/fileserver		nfs	defaults	0 0
192.168.1.102:/mnt/hdb1 /mnt/fileserver2 	nfs	defaults	0 0


  
Actual results:  after adding those lines to fstab and rebooting, the shares are
not mounted.  During boot process I can see an error about network unreachable
when the mount attempts to take place


Expected results: the shares to be mounted at boot.


Additional info:  After the boot has finished, i can drop to terminal and type:
mount -a and everything works fine.
Comment 1 Jon Stanley 2008-01-01 12:07:42 EST
Instead of defaults in the mount options, you need to add _netdev, and make sure
that netfs starts at boot (chkconfig netfs on).  This will cause it to mount
later in the boot process after networking is up.

Let me know if that works for you.
Comment 2 Mark 2008-01-01 14:17:59 EST
i changed fstab to the following and it still does not mount them during bootup.
 Same error.  Network unreachable.  netfs is running also.

192.168.1.102:/mnt/hdd1 /mnt/fileserver		nfs	_netdev 	0 0
192.168.1.102:/mnt/hdb1 /mnt/fileserver2 	nfs	_netdev		0 0
Comment 3 Jon Stanley 2008-01-01 14:51:16 EST
Is your machine on the same subnet as the fileserver in question?
Comment 4 Mark 2008-01-01 15:15:51 EST
yes.  The Fedora 8 machine is 192.168.1.195.
Comment 5 Jon Stanley 2008-01-01 15:50:29 EST
I just stepped through the boot sequence by inspecting the scripts.  There's no
way that nfs filesystems should be mounted prior to networking coming up -
rc.sysinit (which handles mounting all of the local filesystems amongst a host
of other tasks) specifically skips NFS since the network isn't yet available. 
The _netdev that I had you put in is unnecessary, since netfs looks for NFS
filesystems anyway.  Do you see a 'Mounting NFS filesystems', and then the
Network is unreacable, or is it at some other point?  Could you also verify your
initscripts package with rpm -qV initscripts? 

Since this is just about boot-time, I'm going to change the component to
initscripts, as well.
Comment 6 Jon Stanley 2008-01-01 16:12:04 EST
I've also provided a replacement for the netfs script at
http://jstanley.fedorapeople.org/netfs-debug that will log some diagnostic data
(particularly loaded modules and the state of networking at the time) to
/tmp/netfs-data-gathering which you can attach to this bug report.
Comment 7 Mark 2008-01-01 16:19:35 EST
I see mounting NFS then it fails and says network unreachable.

[nix4me@localhost ~]$ rpm -qV initscripts
..5....T c /etc/inittab
Comment 8 Jon Stanley 2008-01-01 16:26:31 EST
Can you try the script that I posted in comment #6?  You can put that in
/etc/init.d/netfs (after backing up the original) and provide the output in the
file for further reference.
Comment 9 Mark 2008-01-01 16:31:15 EST
Created attachment 290618 [details]
netfs-data-gathering during boot
Comment 10 Jon Stanley 2008-01-01 16:49:43 EST
Very odd - loopback is configured but not eth0.  Hmmm...what are the contents of
/etc/sysconfig/network, and /etc/sysconfig/network-scripts/ifcfg-eth0?  May as
well throw in /etc/modprobe.conf, too - but I do see that r8169 is loaded, so
that should be correct.  Also, this seems silly, but could you verify that the
symlinks in /etc/rc3.d or /etc/rc5.d (depending on what runlevel you use) there
is really a symlink called S!0network and S25netfs?
Comment 11 Mark 2008-01-01 17:07:28 EST
[nix4me@localhost ~]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain

[nix4me@localhost ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet
controller
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:1D:7D:A1:77:AD
ONBOOT=yes

[nix4me@localhost ~]$ cat /etc/modprobe.conf
alias eth0 r8169
alias snd-card-0 snd-hda-intel
options snd-card-0 index=0
options snd-hda-intel index=0

[nix4me@localhost rc3.d]$ ls
K01smartd                    K89dund           S25netfs
K01smolt                     K89netplugd       S26rsyslog
K02NetworkManagerDispatcher  K89pand           S26udev-post
K05saslauthd                 K89rdisc          S27messagebus
K10psacct                    K90network        S27setroubleshoot
K15httpd                     K91capi           S44acpid
K20nfs                       S00fedora-live    S50bluetooth
K24irda                      S00microcode_ctl  S80sendmail
K25sshd                      S05kudzu          S85gpm
K35nmb                       S06cpuspeed       S90ConsoleKit
K35smb                       S08ip6tables      S90crond
K50netconsole                S08iptables       S95atd
K69rpcsvcgssd                S08nvidia         S96avahi-daemon
K71lirc                      S09isdn           S97yum-updatesd
K73winbind                   S11auditd         S98cups
K73ypbind                    S12restorecond    S98haldaemon
K74nscd                      S13irqbalance     S98NetworkManager
K74ntpd                      S13rpcbind        S99anacron
K76openvpn                   S14nfslock        S99firstboot
K87multipathd                S15mdmonitor      S99local
K88nasd                      S18rpcidmapd
K88wpa_supplicant            S19rpcgssd

[nix4me@localhost rc5.d]$ ls
K01smartd                    K89dund           S25netfs
K01smolt                     K89netplugd       S26rsyslog
K02NetworkManagerDispatcher  K89pand           S26udev-post
K05saslauthd                 K89rdisc          S27messagebus
K10psacct                    K90network        S27setroubleshoot
K15gpm                       K91capi           S44acpid
K15httpd                     S00fedora-live    S50bluetooth
K20nfs                       S00microcode_ctl  S80sendmail
K24irda                      S05kudzu          S88nasd
K25sshd                      S06cpuspeed       S90ConsoleKit
K35nmb                       S08ip6tables      S90crond
K35smb                       S08iptables       S95atd
K50netconsole                S08nvidia         S96avahi-daemon
K69rpcsvcgssd                S09isdn           S97yum-updatesd
K71lirc                      S11auditd         S98cups
K73winbind                   S12restorecond    S98haldaemon
K73ypbind                    S13irqbalance     S98NetworkManager
K74nscd                      S13rpcbind        S99anacron
K74ntpd                      S14nfslock        S99firstboot
K76openvpn                   S15mdmonitor      S99local
K87multipathd                S18rpcidmapd
K88wpa_supplicant            S19rpcgssd

I am using freshly installed Fedora 8(installed yesterday) from the dvd
gnome-livecd spin directly from the website.
Comment 12 Jon Stanley 2008-01-01 17:57:42 EST
I see the problem now - your network is being managed by NetworkManager rather
than statically (as it should be for a wired connection that you need all the
time).  Do a 'chkconfig NetworkManager off' and 'chkconfig network on' and these
problems should go away.
Comment 13 Mark 2008-01-01 19:01:37 EST
Yes, that was the problem.  I think this behavior (use of network manager on a
machine with ethernet connection only) could use a bit of investigation.  Should
the installer have used network manager on my machine?

Thanks for the great triage session.  You asked the right questions and I posted
the needed results.

Comment 14 Jon Stanley 2008-01-01 19:49:47 EST
I think that the situation there is that on the LiveCD, we can't be sure what
the usage scenario for the machine is.  IIRC, the 'installer' for the LiveCD
installation does little/nothing more than copy the bits to the hard drive.  In
a DVD or network installation, anaconda always configures the network
statically.  I'm honestly not sure who to bring this up with, it was certainly
confusing for both of us for a time.
Comment 15 Bill Nottingham 2008-01-07 14:43:57 EST
*** Bug 389401 has been marked as a duplicate of this bug. ***
Comment 16 Bill Nottingham 2008-01-07 14:49:27 EST
*** Bug 427658 has been marked as a duplicate of this bug. ***
Comment 17 Don Hoover 2009-03-16 16:17:21 EDT
There is also the problem of netfs starting to early in the init for a system that is a NFS client of itself.

Netfs starts up before nfsd and therefore will fail to mount any nfs filesystems that are mounted by the same system.

Netfs(currently 25) needs to be after nfsd (currently 60) in the init.

Note You need to log in before you can comment on or make changes to this bug.