나는 Western Digital 하드 드라이브가 장착된 노트북을 가지고 있습니다. 나는 로드/언로드 주기를 보기 위해 SMART를 사용했습니다( smartctl -a|grep Load
). 그들은 너무 빠르게 성장하고 있으며 수명 한도인 300,000에 가까워지고 있습니다.
GNOME 디스크를 사용하여 하드 드라이브 APM을 254로 변경했는데 더 이상 증가하지 않았습니다. 이것은 그 자체로는 해결책이 아니었습니다. 또한 이 드라이브 설정이 손실되었을 때 정지로부터의 복구를 처리하기 위한 /usr/lib/systemd/system-sleep/harddrive.sh
솔루션을 만들어야 했습니다 .systemctl restart udisks2
그러나 몇 달 후에 드라이브가 다시 딸깍 소리를 내며 로드/언로드가 실제로 증가하는 것을 발견했습니다. 무엇이 잘못되었나요?
GNOME 디스크도 확인했습니다. 더 이상 SMART 데이터나 드라이브 APM 설정을 찾을 수 없습니다! 무슨 일이에요? !
SELinux 문제해결 도구에 SELinux 경고가 없습니다.
$ rpm -q gnome-disk-utility
gnome-disk-utility-3.22.1-1.fc25.x86_64
$ rpm -q --whatprovides /usr/libexec/udisks2/udisksd
storaged-2.6.2-2.fc25.x86_64
$ systemctl status udisks2
● udisks2.service - Disk Manager
Loaded: loaded (/usr/lib/systemd/system/udisks2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2017-02-23 14:10:47 GMT; 3min 55s ago
Docs: man:udisks(8)
Main PID: 6416 (udisksd)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/udisks2.service
└─6416 /usr/libexec/udisks2/udisksd --no-debug
Feb 23 14:10:47 alan-laptop systemd[1]: Starting Disk Manager...
Feb 23 14:10:47 alan-laptop udisksd[6416]: udisks daemon version 2.6.2 starting
Feb 23 14:10:47 alan-laptop udisksd[6416]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Feb 23 14:10:47 alan-laptop systemd[1]: Started Disk Manager.
$ journalctl -b |grep udisks.*sda
Feb 21 09:05:42 alan-laptop udisksd[870]: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 21 09:05:42 alan-laptop udisksd[870]: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
Feb 21 10:20:56 alan-laptop udisksd[3449]: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 21 10:20:56 alan-laptop udisksd[3449]: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
...
Feb 23 10:07:16 alan-laptop udisksd[15542]: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 23 10:07:17 alan-laptop udisksd[15542]: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
Feb 23 12:31:36 alan-laptop udisksd[4243]: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 23 12:31:36 alan-laptop udisksd[4243]: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
$ date
Thu 23 Feb 14:25:05 GMT 2017
정지 문제에 대한 구체적인 해결 방법은 현재 작동하지 않습니다. 현재 복구 중에는 구성이 적용되지 않습니다.
Feb 23 13:02:55 alan-laptop systemd-sleep[4238]: System resumed.
이때 udisks가 시작되었음에도 불구하고 다음과 같은 상황이 계속 발생합니다.
Feb 23 13:02:55 alan-laptop udisksd[4357]: udisks daemon version 2.6.2 starting
Feb 23 13:02:55 alan-laptop udisksd[4357]: Acquired the name org.freedesktop.UDisks2 on the system message bus
저장된(udisks)의 일부 버전은 다음과 같습니다.이력서 설정을 다시 적용해야 합니다., 하지만 내 시스템에서는 그렇지 않은 것 같습니다. 문제가 발생할 경우를 대비하여 스크립트를 비활성화하려고 시도했지만 정지 상태에서 다시 시작한 후에 다시 hdparm -B /dev/sda
표시됩니다 128
.
답변1
로그아웃하고 다시 시작하면 두 문제가 모두 해결되었습니다. SMART와 APM은 GNOME 디스크에 있습니다. 복구 스크립트를 다시 활성화한 후 절전 모드에서 다시 시작한 후 드라이브 APM 설정이 254로 재설정되었습니다.
다시 시작하면 지워지는 일부 상태가 있어야 하며, udisk를 다시 시작해도 이러한 상태는 지워지지 않습니다.
두 번째로 이런 일이 발생했을 때 udisk가 작동을 멈춘 아래 udev 오류를 발견했습니다.
실행하면 sudo udevadm trigger /dev/sda
udev가 디스크를 다시 검색하고 다시 시작하지 않고도 udisk가 다시 작동하도록 할 수 있습니다. udevadm info /dev/sda
트리거가 udisks가 사용해야 하는 속성이 누락되었음을 표시하기 전에 실행합니다(차이점).
udev가 보류 시간을 계산하기 때문에 udev 이벤트 시간이 초과됩니다. 나는허점그리고 구체적인 세부 사항.
udisk를 다시 시작하기 위해 추가한 후크는 sda가 일시 중지될 때 실행되기 때문에 udev 이벤트는 sda가 일시 중지될 때 발생합니다. 장치를 켜고 끄는 데 필요한 장치의 APM 값을 설정합니다. Udev 변경 이벤트는 블록 장치가 닫힐 때마다 생성되므로 fdisk 또는 mke2fs와 같은 유틸리티를 실행한 후 블록 장치를 다시 검색할 수 있습니다.
Feb 23 08:21:05 alan-laptop kernel: Restarting tasks ...
Feb 23 08:21:05 alan-laptop kernel: usb 2-1: USB disconnect, device number 42
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:01: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:02: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:03: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:01: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:02: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:03: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:01: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:02: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: pci_bus 0000:03: Allocating resources
Feb 23 08:21:05 alan-laptop kernel: done.
Feb 23 08:21:05 alan-laptop systemd[1]: Time has been changed
Feb 23 08:21:05 alan-laptop audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=mlocate-upda
tedb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 23 08:21:05 alan-laptop bluetoothd[865]: Endpoint unregistered: sender=:1.177 path=/MediaEndpoint/A2DPSource
Feb 23 08:21:05 alan-laptop org.gnome.Shell.desktop[1173]: Window manager warning: Failed to set power save mode for output eDP-1: Permission denied
Feb 23 08:21:05 alan-laptop systemd-logind[876]: Lid opened.
Feb 23 08:21:05 alan-laptop bluetoothd[865]: Endpoint unregistered: sender=:1.177 path=/MediaEndpoint/A2DPSink
Feb 23 08:21:05 alan-laptop systemd[1096]: Time has been changed
Feb 23 08:21:05 alan-laptop bluetoothd[865]: Endpoint unregistered: sender=:1.46 path=/MediaEndpoint/A2DPSource
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5075 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda5' killed
Feb 23 08:21:05 alan-laptop bluetoothd[865]: Endpoint unregistered: sender=:1.46 path=/MediaEndpoint/A2DPSink
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5073 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda3' is taking a
long time
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.177" (uid=1000 pid=6695 comm="
/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)"
error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoot
hd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5072 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda2' is taking a
long time
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.177" (uid=1000 pid=6695 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoot
hd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5074 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda4' killed
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.177" (uid=1000 pid=6695 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoothd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5073 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda3' killed
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.177" (uid=1000 pid=6695 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoothd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5072 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda2' killed
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.46" (uid=1001 pid=1704 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoothd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5074 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda4' is taking a long time
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.46" (uid=1001 pid=1704 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoothd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd-udevd[634]: seq 5075 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda/sda5' is taking a long time
Feb 23 08:21:05 alan-laptop dbus-daemon[866]: [system] Rejected send message, 1 matched rules; type="error", sender=":1.46" (uid=1001 pid=1704 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=865 comm="/usr/libexec/bluetooth/bluetoothd " label="system_u:system_r:bluetooth_t:s0")
Feb 23 08:21:05 alan-laptop systemd[1560]: Time has been changed
May 01 14:53:27 alan-laptop systemd[1]: Starting Suspend...
May 01 14:53:24 alan-laptop wpa_supplicant[1103]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
May 01 14:53:27 alan-laptop systemd[1]: Stopping Disk Manager...
May 01 14:53:24 alan-laptop wpa_supplicant[1103]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
May 01 14:53:27 alan-laptop systemd[1]: Stopped Disk Manager.
May 01 14:53:24 alan-laptop chronyd[937]: Source 85.199.214.100 offline
May 01 14:53:27 alan-laptop systemd[1]: Starting Disk Manager...
May 01 14:53:24 alan-laptop chronyd[937]: Source 85.199.214.98 offline
May 01 14:53:28 alan-laptop systemd[1]: Started Disk Manager.
May 01 14:53:24 alan-laptop chronyd[937]: Source 193.150.34.2 offline
May 01 14:53:28 alan-laptop systemd-sleep[31584]: Suspending system...
May 01 14:53:24 alan-laptop chronyd[937]: Source 85.199.214.101 offline
May 01 15:19:01 alan-laptop systemd[1]: Time has been changed
May 01 14:53:24 alan-laptop chronyd[937]: Can't synchronise: no selectable sources
May 01 15:19:01 alan-laptop systemd-logind[877]: Lid opened.
May 01 14:53:25 alan-laptop wpa_supplicant[1103]: nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
May 01 15:19:01 alan-laptop systemd-udevd[639]: seq 5485 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda' killed
May 01 14:53:26 alan-laptop wpa_supplicant[1103]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
May 01 15:19:01 alan-laptop systemd[1578]: Time has been changed
May 01 14:53:27 alan-laptop udisksd[31589]: udisks daemon version 2.6.2 starting
May 01 15:19:01 alan-laptop systemd-udevd[639]: seq 5485 '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sda' is taking a long
May 01 14:53:28 alan-laptop udisksd[31589]: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
May 01 15:19:01 alan-laptop systemd[7053]: Time has been changed
May 01 14:53:28 alan-laptop udisksd[31589]: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
May 01 15:19:01 alan-laptop systemd-udevd[639]: worker [31598] terminated by signal 9 (Killed)
May 01 14:53:28 alan-laptop udisksd[31589]: Acquired the name org.freedesktop.UDisks2 on the system message bus
May 01 15:19:01 alan-laptop systemd-udevd[639]: worker [31598] failed while handling '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/