当前位置: 首页 > 工具软件 > A-shares > 使用案例 >

NFS/CIFS/iSCSI exports/shares are not automatically mounted at boot on a RHEL client

长孙雅志
2023-12-01

NFS/CIFS/iSCSI exports/shares are not automatically mounted at boot on a RHEL client

 SOLUTION 已验证 - 已更新 2019年五月2日23:36 - 

English 

环境

  • 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:

    Raw

    # mount -a 
    

    Need to know why NFS mounts didn't mount after reboot.

决议

  1. Netfs(remote-fs.target in RHEL7) is responsible for mounting network filesystems at boot time. Enable netfs(remote-fs.target in RHEL7) and reboot:

    Raw

    RHEL 4, 5, 6
    
    # chkconfig netfs on
    
    RHEL 7
    
    # systemctl enable  remote-fs.target
    
  2. If that does not solve the problem, try adding the _netdev mount option in the /etc/fstab to the problematic network filesystem mount entry.

    Raw

    # vi /etc/fstab
    nfs.example.com:/export /mnt/nfs defaults,_netdev 0 0 
    
  3. 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.

 类似资料: