What happens after adding _netdev option in fstab ?

During booting of Linux when process is trying to mount the file system present in /etc/fstab, at that time NFS mount points present in that file are not able to mount because the network service was not started at that time. Hence Redhat recommends us to add _netdev option for NFS file system in /etc/fstab. So that they can be mounted after starting the networking service.

But what makes it to mount after booting behind the scenes ?

Lets figure out that.

Currently I am in runlevel 3 directory. By default majorly we are using this run level for linux booting.

[root@Node1 rc3.d]# pwd

In this it will show me that order of start and kill of scripts or services.

Note : Below output is shown selectively to make this article precise.

[root@Node1 rc3.d]# ll
lrwxrwxrwx. 1 root root 17 Sep 30 01:36 S10network -> ../init.d/network
lrwxrwxrwx. 1 root root 15 Sep 30 01:36 S25netfs -> ../init.d/netfs
lrwxrwxrwx. 1 root root 14 Sep 30 02:29 S26gfs2 -> ../init.d/gfs2

By default network service is destined to start at priority 10 and netfs service at 25.

If we have added the _netdev option in /etc/fstab for NFS mountpoint, netfs will take the responsibility to mount those NFS file systems after the network service start.

If your NFS file system are not getting mounted even after adding the _netdev option in /etc/fstab. We need to check whether netfs service is supposed to start during boot or not.

[root@Node1 rc3.d]# chkconfig –list | grep netfs
netfs           0:off   1:off   2:off 3:on     4:on     5:on    6:off

If still getting problem while mounting NFS file system during boot process.

Last option is to add the “NETWORKDELAY=60” in below file.

[root@Node1 rc3.d]# cat /etc/sysconfig/network

Tip : As shown above GFS2 file systems are also not supposed to start at booting time. gfs2 mounts even start after mounting the NFS file system.

References : https://access.redhat.com/solutions/22993


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s