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

博客讨论了Red Hat Enterprise Linux 4 - 7系统中,NFS/CIFS/iSCSI导出或共享在开机时无法自动挂载的问题。如NFS共享在开机时无法按指定文件正确挂载,给出的解决办法是启用相关服务并重启,若问题未解决,可在挂载项添加挂载选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值