You are not logged in.

#1 2017-01-16 21:46:03

Batou
Member
Registered: 2017-01-03
Posts: 259

Systemd Journal is full of udisksd errors when I put my HDD to sleep

Hi all,

I have several disks in my machine and one of them is an older 2TB Seagate disk that I use for backup. I tend to put that disk to sleep so it doesn't make any noise because it's very loud.

However, after I do that, my systemd log is full of errors like this (this repeats ever 30 seconds):

Jan 16 16:38:04 batou spindown[447]: suspending sdb
Jan 16 16:38:09 batou udisksd[721]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 16 16:38:39 batou udisksd[721]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 16 16:39:09 batou udisksd[721]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 16 16:39:39 batou udisksd[721]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 16 16:40:09 batou udisksd[721]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
....
 

How do I stop this endless stream of error messages? Is there a way to tell udisks2 not to report these "errors"? It's hard to even see other diagnostic messages from the torrent of udisks ones...

Thanks!

Last edited by Batou (2017-01-16 21:47:06)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2017-01-17 10:46:34

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

Try to write a udev rule for this disk with

ENV{UDISKS_DISABLE_POLLING}="1"

Offline

#3 2017-01-17 16:28:29

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

In case you are having trouble writing udev rules, read this excellent article.
http://reactivated.net/writing_udev_rules.html

You may need to replace 'udevtest' and 'udevinfo' commands with 'udevadm test' and 'udevadm info' respectively.

Offline

#4 2017-01-18 23:51:53

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

berbae & adesh, thank you so much guys for guidance and a helpful link! Unfortunately, I haven't been able to resolve this. Could you, or someone else, take a look and double check what I'm doing and maybe point out what I did wrong or what else I could try out?

To construct the rule, I did the following:

# udevadm info -a -p /sys/block/sdb

  looking at device '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb':
    KERNEL=="sdb"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{alignment_offset}=="0"
    ATTR{badblocks}==""
    ATTR{capability}=="50"
    ATTR{discard_alignment}=="0"
    ATTR{events}==""
    ATTR{events_async}==""
    ATTR{events_poll_msecs}=="-1"
    ATTR{ext_range}=="256"
    ATTR{inflight}=="       0        0"
    ATTR{range}=="16"
    ATTR{removable}=="0"
    ATTR{ro}=="0"
    ATTR{size}=="3907029168"
    ATTR{stat}=="     668       62    83022     2490        1        0        8       16        0     1223     2506"

  looking at parent device '/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0':
    KERNELS=="1:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
...
 

So, I constructed a rule like this

# "/etc/udev/rules.d/99-local.rules"

ATTR{size}=="3907029168", ENV{UDISKS_DISABLE_POLLING}="1"  

Next, I reloaded the rules like so (I also tried rebooting but rebooting didn't change the final behavior of errors either):

# udevadm control -R 

To double check that rule is being applied, I did:

# udevadm test /sys/dev/block/8:16                 #8:16 is /sys/dev/sdb (won't work with a link only)

...

Reading rules file: /etc/udev/rules.d/99-local.rules
Reading rules file: /usr/lib/udev/rules.d/99-systemd.rules
rules contain 393216 bytes tokens (32768 * 12 bytes), 29661 bytes strings
22217 strings (176030 bytes), 19126 de-duplicated (149461 bytes), 3092 trie nodes used
GROUP 6 /usr/lib/udev/rules.d/50-udev-default.rules:55
IMPORT 'ata_id --export /dev/sdb' /usr/lib/udev/rules.d/60-persistent-storage.rules:33
starting 'ata_id --export /dev/sdb'
'ata_id --export /dev/sdb'(out) 'ID_ATA=1'
'ata_id --export /dev/sdb'(out) 'ID_TYPE=disk'
'ata_id --export /dev/sdb'(out) 'ID_BUS=ata'
'ata_id --export /dev/sdb'(out) 'ID_MODEL=ST2000NC000_2DA164'
'ata_id --export /dev/sdb'(out) 'ID_MODEL_ENC=ST2000NC000_2DA164\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'
'ata_id --export /dev/sdb'(out) 'ID_REVISION=CE02'
'ata_id --export /dev/sdb'(out) 'ID_SERIAL=ST2000NC000_2DA164_Z1E3JQ8W'
'ata_id --export /dev/sdb'(out) 'ID_SERIAL_SHORT=Z1E3JQ8W'
'ata_id --export /dev/sdb'(out) 'ID_ATA_WRITE_CACHE=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_WRITE_CACHE_ENABLED=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_HPA=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_HPA_ENABLED=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_PM=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_PM_ENABLED=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SECURITY=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SECURITY_ENABLED=0'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=214'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=2'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SECURITY_FROZEN=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SMART=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_FEATURE_SET_SMART_ENABLED=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_DOWNLOAD_MICROCODE=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_SATA=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_SATA_SIGNAL_RATE_GEN2=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_SATA_SIGNAL_RATE_GEN1=1'
'ata_id --export /dev/sdb'(out) 'ID_ATA_ROTATION_RATE_RPM=7200'
'ata_id --export /dev/sdb'(out) 'ID_WWN=0x5000c500503ec696'
'ata_id --export /dev/sdb'(out) 'ID_WWN_WITH_EXTENSION=0x5000c500503ec696'

....

SUBSYSTEM=block
TAGS=:systemd:
UDISKS_DISABLE_POLLING=1
USEC_INITIALIZED=14948238
Unload module index
Unloaded link configuration context.
 

So it is definitely being applied because 99-local.rules   is being read and UDISKS_DISABLE_POLLING=1  is being set for sdb

However, these errors just keep on piling up in the journal after the disk is put to sleep... so the rule above didn't affect it for some reason.

 Jan 18 18:33:28 batou udisksd[697]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 18 18:33:58 batou udisksd[697]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 18 18:34:28 batou udisksd[697]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 18 18:34:58 batou udisksd[697]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
Jan 18 18:35:28 batou udisksd[697]: Error updating ATA smart for /org/freedesktop/UDisks2/drives/ST2000NC000_2DA164_X2F687XX: Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)
 

What could be wrong?

Thank you so much for any advice!

Last edited by Batou (2017-01-19 00:54:46)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#5 2017-01-19 10:14:53

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

Use a more specific udev rule than only the size like:

KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTR{size}=="3907029168", ENV{UDISKS_DISABLE_POLLING}="1" 

If this still doesn't work, try

ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0"

instead in the rule.

I cannot test this rule myself though.

Last edited by berbae (2017-01-19 10:16:11)

Offline

#6 2017-01-20 18:30:35

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

berbae wrote:

Use a more specific udev rule than only the size like:

KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTR{size}=="3907029168", ENV{UDISKS_DISABLE_POLLING}="1" 

If this still doesn't work, try

ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0"

instead in the rule.

I cannot test this rule myself though.

Hi berbae!

I set the rule as you suggested. No go. I also tried it like this:

  KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTR{size}=="3907029168",  ENV{UDISKS_DISABLE_POLLING}="1", ENV{ID_ATA_FEATURE_SET_SMART_ENABLED}="0" 

Still there's the same errors in the journal sad

Any other ideas of what I could try?


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#7 2017-01-21 10:10:14

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

Sorry I have no other ideas and I cannot make tests here or see why this rule doesn't work.
Maybe you could find some explanations on the web.
There should exist a way to prevent the ATA smart updating or to change the frequency of the updating.

Offline

#8 2017-01-22 11:38:43

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

berbae wrote:

Sorry I have no other ideas and I cannot make tests here or see why this rule doesn't work.
Maybe you could find some explanations on the web.
There should exist a way to prevent the ATA smart updating or to change the frequency of the updating.

I've tried everything.. I just can't get rid of these "Error updating ATA smart for ... Disk is in sleep mode and the nowakeup option was passed (udisks-error-quark, 13)" error messages.

Do you have any suggestions which site or a mailing list I should ttry to ask questions about this?

Thanks for all the help! Much appreciated.

EDIT: how about this idea... is it possible to somehow tell systemd journal not to add those messages? is there some kind of a facility to filter those out? LOL smile I just don't want thousands of these messages written to disk...

Last edited by Batou (2017-01-22 12:00:49)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#9 2017-01-22 16:17:16

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

You could use a drop-in conf file for the udisks2.service unit.
For example: /etc/systemd/system/udisks2.service.d/logerror.conf

[Service]
StandardError=null

or rising the log level

[Service]
StandardError=syslog
SyslogLevel=crit

You can also filter the output of the journal with:

journalctl | grep -v "Error updating ATA smart"

But it would be better to find a way to act on the ATA smart updating of the disk.
Doesn't a search on the web give you some links?

Edit: a simple search led me to the 'smartmontools' package containing the 'smartctl' utility

Last edited by berbae (2017-01-22 16:40:55)

Offline

#10 2017-01-22 20:03:14

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

berbae wrote:

You could use a drop-in conf file for the udisks2.service unit.
For example: /etc/systemd/system/udisks2.service.d/logerror.conf

[Service]
StandardError=null

or rising the log level

[Service]
StandardError=syslog
SyslogLevel=crit

You can also filter the output of the journal with:

journalctl | grep -v "Error updating ATA smart"

But it would be better to find a way to act on the ATA smart updating of the disk.
Doesn't a search on the web give you some links?

Edit: a simple search led me to the 'smartmontools' package containing the 'smartctl' utility

I've looked at man pages for journald.conf and there's no way to filter out some messages from ever being stored in the journal.  There's just no facility to prevent something from being stored.

I've also looked at  smartctl after you mentioned it and I tried this:

 smartctl -s off /dev/sdb
 

and it didn't affect the messages.

This bug report suggests that this polling is done by the kernel:

https://bugs.freedesktop.org/show_bug.cgi?id=26508

People in that bug report have a similar issue to mine but the maintainers are drawing the distinction between udisks1 and udisks2 (which is the new package and the package that comes with most distros today).

I have no idea if it's even possible to disable now given the comments there. sad

I've basically set my journal to be "volatile" for now so it never gets written to disk. That's a pretty bad "fix" because you never have any past logs but at least I'm not getting thousands of junk data written to disk all the time.

Thanks for all the help!

Last edited by Batou (2017-01-22 20:05:43)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#11 2017-01-22 21:50:44

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

You seem to not have tried the drop-in conf file of the udisks2.service unit.
As the messages in the journal come from the udisksd daemon, I advice you to try that suggestion also.

Offline

#12 2017-01-22 23:53:18

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

berbae wrote:

You seem to not have tried the drop-in conf file of the udisks2.service unit.
As the messages in the journal come from the udisksd daemon, I advice you to try that suggestion also.

Thanks again! udisk.conf file seems like another way to try to change the behavior of this. I've been searching for the past 30 min and reading various manual pages and I did come across this page:

http://rpm.pbone.net/index.php3/stat/45 … 2_lsm.conf

Interesting variable is refresh_interval = <integer> so I'll try setting this to some bigger number and hopefully that will minimize the torrent of messages in the journal.

I've created  /etc/udisks2/udisks2.conf  and put "refresh_interval = 600" in there. There's some discrepancies online about whether the conf file should be in /etc/udisks or /etc/udisks2 so I'll see if this gets picked up the next time I reboot (have something running right now so can't test it out).

I haven't been able to actually find a way to completely suppress the SMART module in udisks2 through the conf file. I don't see any examples of someone doing something like that...


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#13 2017-01-23 10:01:46

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Systemd Journal is full of udisksd errors when I put my HDD to sleep

The drop-in conf file method seems easier to implement to me, but you do as you want, though I am not convinced that this udisks2 lsm module is the appropriate tool.

From 'man udisks' you could test also the '/etc/udisks2/IDENTIFIER.conf' way with
WriteCacheEnabled=false

So now you've got three possibilities to test. I hope one of these will work for you.

Offline

Board footer

Powered by FluxBB