PowerPath for Linux:PowerPath 在重新启动后未启动,必须手动启动
Summary: PowerPath for Linux:PowerPath 在重新启动后未启动,必须手动启动。
Symptoms
操作系统:Red Hat Enterprise Linux 7.x、OEL 7.x 和 SLES 12
这 不适用于 Red Hat Enterprise Linux 5.x、6.x 和 SLES 11 版本。
EMC 软件:PowerPath for Linux 6.x
主机重新启动后,PowerPath 不会自动启动。
可以手动启动 PowerPath,而不会出现任何问题。
PowerPath服务启动和停止时,boot.log中不会记录任何错误。
系统重新启动后,您会看到 PowerPath 失败并显示“初始化错误”,因为该服务无法启动:
# powermt display dev=all ERROR: Cannot open PowerPath. Initialization error
# cat /var/log/boot.log |grep Power Starting PowerPath startup script... [ OK ] Stopped PowerPath startup script. <--- Starting PowerPath Management Daemon... Starting PowerPathPost startup script... [ OK ] Started PowerPathPost startup script. [ OK ] Started PowerPath Management Daemon.
Cause
启动时,PowerPath 最初会进行一些检查,然后再继续实际启动。其中之一是检查 PowerPath 上次启动的时间,这通过计算标记文件的存在时间来确定。在启动时,系统时钟最初与硬件时钟同步。但是,如果在主机上配置了 NTP 客户端,则在该客户端启动时,系统时钟将从 NTP 服务器更新。
如果硬件时钟与 NTP 时钟的不同步程度太高(通常是在硬件时钟远远落后的情况下),就会出现问题。在主机启动时,PowerPath 的启动时间比 NTP 客户端早很多。因此,当它尝试确定何时尝试计算标记文件的存在时间时,它为负值,并且 PowerPath 将立即退出而不继续启动。
Resolution
解决方法:
在主机上使用以下命令将 hwclock 更新到系统时钟:
hwclock --systohc
这会将硬件时钟更新为主机上的正确时间。
永久修复:
此问题将在 PowerPath for Linux 6.3 中修复。
Additional Information
您可以运行以下命令来检查 PowerPath 上次启动的时间:
systemctl status PowerPath.service
通常您会看到,上一次 PowerPath 处于活动状态的时间有很大的时差:
systemctl status PowerPath.service PowerPath.service - PowerPath startup script Loaded: loaded (/usr/lib/systemd/system/PowerPath.service; enabled; vendor preset: disabled) Active: inactive (dead) since Thu 2017-04-06 12:00:15 GET; 4h 0min ago Process: 2075 ExecStopPost=/usr/lib/PowerPath/PowerPath check_service_stop (code=exited, status=0/SUCCESS) Process: 1807 ExecStartPost=/usr/lib/PowerPath/PowerPath check_service_start (code=killed, signal=TERM) Process: 1665 ExecStart=/usr/lib/PowerPath/PowerPath start (code=exited, status=0/SUCCESS) Main PID: 1665 (code=exited, status=0/SUCCESS)
------------------------------------------------------------------------------------------
另一种查找方法是 PowerPath 启动脚本中的启用“-x”标记。
对于 OEL 7.x,启动脚本为:
/usr/lib/PowerPath/PowerPath
/etc/opt/emcpower/EMCpower.LINUX-6.1.0.00.00/enable
示例:
# head -5 /usr/lib/PowerPath/PowerPath #!/bin/sh -x
重新启动主机后,将在 boot.log 中捕获日志。此外,请运行以下命令,其中last_boot会获得相同的解压:
journalctl -b 0 > last_boot
在上面收集的以下详细日志中,我们看到时间滞后 -13991。
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + '[' yes == yes -a -f /tmp/.pp_systemctl_check ']'
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: ++ date +%s
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: ++ date +%s -r /tmp/.pp_systemctl_check
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + '[' -13991 -lt 5 ']'
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + rm -f /tmp/.pp_systemctl_check
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + /bin/true
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + rc_exit
Apr 20 10:23:23 revdb1.mfg.ge PowerPath[1751]: + exit 0