Pradeep
Pradeep

Reputation: 99

Mount Netapp NFS share permanently on RHEL 6.4

I am trying to mount a volume on a RHEL 6.4 virtual machine permanently.

My fstab entry is as:

172.17.4.228:/bp_nfs_test1       /mnt1   nfs   rsize=8192,wsize=8192,intr

And I mounted the volume as:

mount 172.17.4.228:/bp_nfs_test1       /mnt1

When I run df -h I can see the volume and able to access it properly.

But when I reboot the VM, the mount is gone and not able to access it anymore even though the entry in /etc/fstab is present

I have to manually mount the volume again (mount -a), then only I am able to see my volume in df -h and access it.

Any help is appreciated

Upvotes: 0

Views: 4982

Answers (1)

Beggarman
Beggarman

Reputation: 896

The mount process on boot is very early, so your network won't be online thus preventing the nfs share from being mounted. You'll need to enable netfs, which manages network file shares, and runs after the network is up. Your desired process is:

  1. Standard mounts processed.
  2. NFS share is skipped during initial mounts (by adding _netdev to options).
  3. After network is online, netfs will process network file systems like nfs and bring them online.

To prevent automounter for attempting to mount your nfs share before the network services are available, add _netdev to your options:

172.17.4.228:/bp_nfs_test1       /mnt1   nfs   rsize=8192,wsize=8192,intr,_netdev

Enable netfs:

chkconfig netfs on

Alternatively, you could also configure the share through the /etc/auto.master configuration and have it mount when the share is accessed.

Upvotes: 1

Related Questions