udisks O SMART / APM parou de funcionar?

0

Eu tenho um laptop com o maldito disco rígido da Western Digital. Eu usei o SMART para examinar os ciclos Load / Unload ( smartctl -a|grep Load ). Eles aumentam muito rápido para o limite de vida de 300.000.

Eu uso o GNOME Disks para mudar o APM do disco rígido para o 254, e eles param de aumentar. Esta não era uma solução por si só: eu também tive que criar /usr/lib/systemd/system-sleep/harddrive.sh que faz systemctl restart udisks2 - para lidar com o reinício da suspensão, quando essas configurações da unidade são perdidas.

Mas alguns meses depois, percebi que a unidade estava clicando novamente e, de fato, o Load / Unload estava aumentando. O que deu errado?

Também fui procurar nos discos do GNOME. Não consigo mais encontrar dados SMART nem a configuração de APM da unidade! O que aconteceu?!

Não tenho alertas do SELinux no Solucionador de problemas do 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

Minha solução específica para o problema de suspensão não está funcionando agora. A configuração não foi aplicada quando foi retomada neste momento:

Feb 23 13:02:55 alan-laptop systemd-sleep[4238]: System resumed.

Isso ocorre apesar dos udisk estarem sendo iniciados no momento:

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

Alguma versão do storaged (udisks) é que deveria estar reaplicando a configuração no currículo , mas isso não parece ser o caso no meu sistema. Eu tentei desabilitar o meu script no caso de ter quebrado algo, mas novamente, depois de sair da suspensão, hdparm -B /dev/sda mostra 128 .

    
por sourcejedi 23.02.2017 / 15:27

1 resposta

0

Efetuar logout e reinicialização resolveu os dois problemas. SMART & O APM aparece nos discos do GNOME. Depois de reativar meu script de currículo, a configuração de APM da unidade é redefinida para 254 depois de sair do modo de suspensão.

Houve certamente algum estado limpo pela reinicialização, que não foi limpo reiniciando os udisks.

Isso aconteceu uma segunda vez, e notei os erros do udev abaixo no ponto em que os udisks pararam de funcionar.

A execução de sudo udevadm trigger /dev/sda permitiu que o udev fizesse uma nova varredura dos discos e fiz os udiscos funcionarem novamente sem a necessidade de reinicialização. A execução de udevadm info /dev/sda antes do gatilho mostrou que estava faltando os atributos que os udisks devem estar usando ( diff ).

Os eventos do udev estão expirando porque o udev está contando o tempo gasto suspenso. Arquivei um bug com os detalhes específicos.

Um evento do udev é acionado no tempo de suspensão de sda, porque o gancho que incluí para reiniciar os udisks também é executado no momento da suspensão. Define o valor do APM para o dispositivo, o que requer abri-lo (e depois fechá-lo). Os eventos de alteração do Udev são gerados sempre que um dispositivo de bloco é fechado, para que o dispositivo de bloco seja verificado novamente após a execução de um utilitário como fdisk ou 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/
    
por 23.02.2017 / 16:22