https://access.redhat.com/solutions/22993
SOLUTION 已验证 - 已更新 2016年十月10日18:31 -
环境
- Red Hat Enterprise Linux Server 5
- Red Hat Enterprise Linux Server 6
netfsservice is started at boot (as perchkconfig --list netfs)_netdevoption is specified infstab
问题
- SAN and NFS file systems are not being mounted automatically after reboot.
- Using EMC powerpath as multipathing software and have two LVM volumes on the EMC device. These are not mounting even if they have an entry in
/etc/fstab. Can mount manually after machine boots up. - Default (no) configuration of
netfs _netdevmount option specified.- SAN based FS not auto mounting after reboot.
决议
A workaround for these issues is to introduce a delay at the end of the start function in the network init script , Using the NETWORKDELAY global parameter.
For details, refer to Why do some of the network services fail at boot time but work once Red Hat Enterprise Linux system is up?.
Start with a high delay of 60 seconds. If this solves the problem, then progressively lower the value until the lowest value at which all network services continue to start is found (This will take some testing to find the magic number). For some systems a value as low as 10 will do the trick, for others a higher value may be needed.
根源
-
Mostly this kind of issue happens when networking is "advertised" to the system as being fully started, when in fact it has not. This problem stems from the fact that the network card itself takes an unusually long time to initialize. This results in network dependent services trying to start before the network is ready to accommodate them.
-
In some SAN device cases, the SAN is slow to complete discovery and/or a 3rd party kernel module, such as 3rd party multipath support, isn't loaded until late in the boot cycle.
-
In these cases, the
_netdevflag is a convenient time delayed checkpoint late in the boot cycle to which mounting impacted devices can be postponed. This gives the SAN and/or 3rd party kernel modules time to complete their device discovery and setup.
诊断步骤
-
Check if the service
netfsis set to start in the current runlevel and is running.# chkconfig --list | grep netfs -
Check if adding
_netdevas a mount option in/etc/fstabfor the filesystem fixes the problem. - Device intialization might be the problem. Adding
NETWORKDELAY=60in/etc/sysconfig/networkfile would solve this. -
The
_netdevoption tells the server to ignore these devices when going through the/etc/fstabat boot time: -
/etc/rc.d/rc.sysinit:action $"Mounting local filesystems: " mount -a -n -t nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev -
Devices with _netdev are mounted later in the boot process by the netfs script:
-
/etc/rc.d/init.d/netfs:action $"Mounting other filesystems: " mount -a -t nonfs,nfs4,cifs,ncpfs,gfs -
Make sure the configuration has configured netfs to be run at boot time, otherwise _netdev flagged mounts won't be processed.
# chkconfig --list netfs netfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off -
If not configured to run, change this via the following command:
# chkconfig netfs on

本文档详细介绍了在Red Hat Enterprise Linux Server中遇到的SAN和NFS文件系统无法在重启后自动挂载的问题。通过调整网络初始化脚本中的延迟参数,可以有效解决这一问题,确保所有依赖于网络的服务在系统完全启动前能够正常启动。
488

被折叠的 条评论
为什么被折叠?



