PVE直通SATA控制器硬盘无法休眠!
PVE直通SATA控制器硬盘休眠几秒就唤醒,不断重复。把log文件挂载到内存也没有用。日志不断提示:Internal disks woke up from hibernation.
休眠日志:
[ 1092.742589] ppid:7293(synoscgi), pid:19605(synoscgi), dirtied inode 87960 (oom_score_adj) on proc
[ 1102.776208] ppid:7293(synoscgi), pid:19605(SYNO.Entry.Sock), dirtied inode 91281 (current) on proc
[ 1107.804939] ppid:1(systemd), pid:19699(scemd), dirtied inode 19485 (syno_standby_syncing) on sysfs
[ 1107.806091] <redpill/smart_shim.c:684> Expected to copy HDIO_DRIVE_CMD header of 4 bytes from (null) - it failed
[ 1107.806754] ppid:1(systemd), pid:19699(scemd), dirtied inode 19788 (syno_standby_syncing) on sysfs
[ 1107.807784] <redpill/smart_shim.c:684> Expected to copy HDIO_DRIVE_CMD header of 4 bytes from (null) - it failed
[ 1107.808422] ppid:1(systemd), pid:19699(scemd), dirtied inode 20091 (syno_standby_syncing) on sysfs
[ 1107.809466] <redpill/smart_shim.c:684> Expected to copy HDIO_DRIVE_CMD header of 4 bytes from (null) - it failed
[ 1107.810089] ppid:1(systemd), pid:19699(scemd), dirtied inode 20394 (syno_standby_syncing) on sysfs
[ 1107.810796] <redpill/smart_shim.c:684> Expected to copy HDIO_DRIVE_CMD header of 4 bytes from (null) - it failed
[ 1108.192815] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 28362 (messages) on md0
[ 1108.193224] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 28362 (messages) on md0
[ 1108.193632] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 28362 (messages) on md0
[ 1108.194088] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 24317 (kern.log) on md0
[ 1108.194485] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 24317 (kern.log) on md0
[ 1108.194890] ppid:1(systemd), pid:19700(syslog-ng), dirtied inode 24317 (kern.log) on md0
[ 1109.775770] <redpill/override_symbol.c:250> Obtaining lock for <GetHwCapability+0x0/0x110 /ffffffffa065b490>
[ 1109.776342] <redpill/override_symbol.c:250> Writing original code to <ffffffffa065b490>
[ 1109.776730] <redpill/override_symbol.c:250> Released lock for <ffffffffa065b490>
[ 1109.777099] <redpill/override_symbol.c:221> Obtaining lock for <GetHwCapability+0x0/0x110 /ffffffffa065b490>
[ 1109.777659] <redpill/override_symbol.c:221> Writing trampoline code to <ffffffffa065b490>
[ 1109.778061] <redpill/override_symbol.c:221> Released lock for <ffffffffa065b490>
[ 1109.778421] <redpill/bios_hwcap_shim.c:65> proxying GetHwCapability(id=5)->support => real=0
[ 1109.929031] <redpill/pmu_shim.c:310> Got 1 bytes from PMU: reason=1 hex={2d} ascii="-"
[ 1110.079045] <redpill/pmu_shim.c:310> Got 1 bytes from PMU: reason=1 hex={37} ascii="7"
[ 1110.079437] <redpill/pmu_shim.c:239> Executing cmd OUT_STATUS_LED_OFF handler cmd_shim_noop+0x0/0x2d
[ 1110.079919] <redpill/pmu_shim.c:45> vPMU received OUT_STATUS_LED_OFF using 1 bytes - NOOP
[ 1110.809188] ppid:1(systemd), pid:19699(scemd), dirtied inode 23016 (cpufreq) on sysfs
[ 1110.809974] ppid:1(systemd), pid:19699(scemd), dirtied inode 23017 (cpufreq) on sysfs
[ 1110.810429] ppid:1(systemd), pid:19699(scemd), dirtied inode 23018 (cpufreq) on sysfs
[ 1110.810888] ppid:1(systemd), pid:19699(scemd), dirtied inode 23019 (cpufreq) on sysfs
我这物理机安装也没见硬盘会休眠。。。 物理机安装也是硬盘刚休眠不转了过一两秒又开唤醒了。。。3615918不同的三台机器都是一样的情况,, 这个问题我之前也发现了,日志信息还是比较清晰的,比较好解决。
其实这个问题是redpill驱动引起的,在硬盘休眠的时候系统触发了HDIO_DRIVE_CMD命令,而redpill驱动对这个命令处理失败以致写了日志,日志信息被追加到了 /var/log/messages 和 /var/log/kern.log 这两个文件,而这两个日志文件是属于在硬盘分区里的,因此系统需要重新唤醒硬盘来写这些日志文件。
解决办法1:
修改redpill驱动的smart_shim.c文件,把第684行的 pr_loc_err("Expected to copy HDIO_DRIVE_CMD header of %d bytes from %p - it failed", HDIO_DRIVE_CMD_HDR_OFFSET, buff_ptr); 这行代码删掉或者注释掉,然后重新编译redpill引导即可。
解决办法2:
修改 /etc.defaults/syslog-ng/patterndb.d/message.conf 和 /etc.defaults/syslog-ng/patterndb.d/kernel.conf 文件,把 /var/log/messages 和 /var/log/kern.log 日志文件分别都设置到 /tmp/messages 和 /tmp/kern.log ,然后重启系统即可。
最好也把 /etc.defaults/logrotate.d/syslog-ng 里的 messages 和 kern.log 路径也做相应的修改,否则这两个日志文件的大小可能会无休止的增长。
页:
[1]