NFS/CIFS/iSCSI exports/shares are not automatically mounted at boot on a RHEL client
SOLUTION 已验证 - 已更新 2019年五月2日23:36 -
环境
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- NFS v3
- NFS v4
- Samba filesystem
- Filesystems on block-devices depending on networking (e.g. iSCSI)
问题
- NFS share is not mounting correctly at boot time as specified in
fstab
file. - Unable to mount nfs share at boot time on Red Hat Enterprise Linux 5.5.
-
NFS/SMBFS mounts do not mount when the system boots up, however, running the following command after boot works to mount the NFS or SMBFS shares:
# mount -a
Need to know why NFS mounts didn't mount after reboot.
决议
-
Netfs(remote-fs.target in RHEL7)
is responsible for mounting network filesystems at boot time. Enablenetfs(remote-fs.target in RHEL7)
and reboot:RHEL 4, 5, 6 # chkconfig netfs on RHEL 7 # systemctl enable remote-fs.target
-
If that does not solve the problem, try adding the
_netdev
mount option in the/etc/fstab
to the problematic network filesystem mount entry.# vi /etc/fstab nfs.example.com:/export /mnt/nfs defaults,_netdev 0 0
-
Reboot the system and verify the network filesystems are mounted.
See How can I mount iSCSI devices in /etc/fstab at boot time in RHEL? for additional information.