1

My non-system (/media) HDD unfortunatly wakes up from sleep after around 1-2 min. I tried to investigate which process could request an access to hdd while sleep with the help of thes thread:

https://unix.stackexchange.com/questions/29409/finding-out-what-is-spinning-up-harddrive

result: root@xyz:/# dmesg -c | grep sdb [158741.703982] systemd-udevd(22709): READ block 5860530048 on sdb1 (8 sectors) [158748.094970] systemd-udevd(22709): READ block 5860530160 on sdb1 (8 sectors) [158748.107881] systemd-udevd(22709): READ block 0 on sdb1 (8 sectors) [158748.107974] systemd-udevd(22709): READ block 8 on sdb1 (8 sectors) [158748.108050] systemd-udevd(22709): READ block 5860530168 on sdb1 (8 sectors) [158748.108118] systemd-udevd(22709): READ block 5860529912 on sdb1 (8 sectors) [158748.108243] systemd-udevd(22709): READ block 24 on sdb1 (8 sectors) [158748.108306] systemd-udevd(22709): READ block 56 on sdb1 (8 sectors) [158748.108424] systemd-udevd(22709): READ block 0 on sdb (8 sectors) [158748.108510] systemd-udevd(22709): READ block 8 on sdb (8 sectors) [158748.108515] systemd-udevd(22709): READ block 16 on sdb (8 sectors) [158748.108519] systemd-udevd(22709): READ block 24 on sdb (8 sectors) [158748.108522] systemd-udevd(22709): READ block 32 on sdb (8 sectors) [158748.109663] parted(22708): READ block 5860533160 on sdb (8 sectors) [158748.111845] parted(22708): READ block 5860533128 on sdb (8 sectors) [158748.111857] parted(22708): READ block 5860533136 on sdb (8 sectors) [158748.111861] parted(22708): READ block 5860533144 on sdb (8 sectors) [158748.111864] parted(22708): READ block 5860533152 on sdb (8 sectors) [158748.112577] parted(22708): READ block 2304 on sdb (8 sectors) [158748.112655] parted(22708): READ block 2176 on sdb (8 sectors) [158748.112724] parted(22708): READ block 2048 on sdb (8 sectors) [158748.112792] parted(22708): READ block 5860532216 on sdb (8 sectors) [158748.112873] parted(22708): READ block 2112 on sdb (8 sectors) [158748.112973] parted(22708): READ block 2064 on sdb (8 sectors) [158748.113039] parted(22708): READ block 2560 on sdb (8 sectors) [158748.114847] systemd-udevd(22718): READ block 5860532992 on sdb (8 sectors) [158748.115923] systemd-udevd(22718): READ block 5860532904 on sdb (8 sectors) [158748.116003] systemd-udevd(22718): READ block 5860533104 on sdb (8 sectors) [158748.116063] systemd-udevd(22718): READ block 5860532912 on sdb (8 sectors) [158748.116123] systemd-udevd(22718): READ block 5860532768 on sdb (8 sectors) [158748.116180] systemd-udevd(22718): READ block 5860532576 on sdb (8 sectors) [158748.116236] systemd-udevd(22718): READ block 5860532488 on sdb (8 sectors) [158748.116290] systemd-udevd(22718): READ block 5860532432 on sdb (8 sectors) [158748.116345] systemd-udevd(22718): READ block 5860532256 on sdb (8 sectors) [158748.116403] systemd-udevd(22718): READ block 5860532192 on sdb (8 sectors) [158748.116453] systemd-udevd(22718): READ block 5860532176 on sdb (8 sectors) [158748.116507] systemd-udevd(22718): READ block 5860530080 on sdb (8 sectors) [158748.136347] systemd-udevd(22718): READ block 56 on sdb (8 sectors) [158748.136517] systemd-udevd(22718): READ block 120 on sdb (8 sectors) [158748.136734] systemd-udevd(22718): READ block 40 on sdb (8 sectors) [158748.136746] systemd-udevd(22718): READ block 48 on sdb (8 sectors) [158748.136762] systemd-udevd(22718): READ block 64 on sdb (8 sectors) [158748.136766] systemd-udevd(22718): READ block 72 on sdb (8 sectors) [158748.136770] systemd-udevd(22718): READ block 80 on sdb (8 sectors) [158748.136773] systemd-udevd(22718): READ block 88 on sdb (8 sectors) [158748.136778] systemd-udevd(22718): READ block 96 on sdb (8 sectors) [158748.136781] systemd-udevd(22718): READ block 104 on sdb (8 sectors) [158748.136784] systemd-udevd(22718): READ block 112 on sdb (8 sectors) [158748.136787] systemd-udevd(22718): READ block 128 on sdb (8 sectors) [158748.136792] systemd-udevd(22718): READ block 136 on sdb (8 sectors) [158748.136795] systemd-udevd(22718): READ block 144 on sdb (8 sectors) [158748.136798] systemd-udevd(22718): READ block 152 on sdb (8 sectors) [158748.136801] systemd-udevd(22718): READ block 160 on sdb (8 sectors) [158748.136804] systemd-udevd(22718): READ block 168 on sdb (8 sectors) [158748.136808] systemd-udevd(22718): READ block 176 on sdb (8 sectors) [158748.136814] systemd-udevd(22718): READ block 184 on sdb (8 sectors) [158748.136817] systemd-udevd(22718): READ block 192 on sdb (8 sectors) [158748.136820] systemd-udevd(22718): READ block 200 on sdb (8 sectors) [158748.136826] systemd-udevd(22718): READ block 208 on sdb (8 sectors) [158748.136829] systemd-udevd(22718): READ block 216 on sdb (8 sectors) [158748.136836] systemd-udevd(22718): READ block 224 on sdb (8 sectors) [158748.136841] systemd-udevd(22718): READ block 232 on sdb (8 sectors) [158748.136845] systemd-udevd(22718): READ block 240 on sdb (8 sectors) [158748.136848] systemd-udevd(22718): READ block 248 on sdb (8 sectors) [158748.136852] systemd-udevd(22718): READ block 256 on sdb (8 sectors) [158748.136858] systemd-udevd(22718): READ block 264 on sdb (8 sectors) [158748.136862] systemd-udevd(22718): READ block 272 on sdb (8 sectors) [158748.136865] systemd-udevd(22718): READ block 280 on sdb (8 sectors) [158748.136868] systemd-udevd(22718): READ block 288 on sdb (8 sectors) [158748.136874] systemd-udevd(22718): READ block 296 on sdb (8 sectors) [158748.136878] systemd-udevd(22718): READ block 304 on sdb (8 sectors) [158748.136882] systemd-udevd(22718): READ block 312 on sdb (8 sectors) [158748.136885] systemd-udevd(22718): READ block 320 on sdb (8 sectors) [158748.136887] systemd-udevd(22718): READ block 328 on sdb (8 sectors) [158748.136895] systemd-udevd(22718): READ block 336 on sdb (8 sectors) [158748.136899] systemd-udevd(22718): READ block 344 on sdb (8 sectors) [158748.136903] systemd-udevd(22718): READ block 352 on sdb (8 sectors) [158748.136907] systemd-udevd(22718): READ block 360 on sdb (8 sectors) [158748.136911] systemd-udevd(22718): READ block 368 on sdb (8 sectors) [158748.136914] systemd-udevd(22718): READ block 376 on sdb (8 sectors) [158748.136917] systemd-udevd(22718): READ block 384 on sdb (8 sectors) [158748.136923] systemd-udevd(22718): READ block 392 on sdb (8 sectors) [158748.136927] systemd-udevd(22718): READ block 400 on sdb (8 sectors) [158748.136932] systemd-udevd(22718): READ block 408 on sdb (8 sectors) [158748.136936] systemd-udevd(22718): READ block 416 on sdb (8 sectors) [158748.136939] systemd-udevd(22718): READ block 424 on sdb (8 sectors) [158748.136943] systemd-udevd(22718): READ block 432 on sdb (8 sectors) [158748.136945] systemd-udevd(22718): READ block 440 on sdb (8 sectors) [158748.136949] systemd-udevd(22718): READ block 448 on sdb (8 sectors) [158748.136952] systemd-udevd(22718): READ block 456 on sdb (8 sectors) [158748.136954] systemd-udevd(22718): READ block 464 on sdb (8 sectors) [158748.136956] systemd-udevd(22718): READ block 472 on sdb (8 sectors) [158748.136959] systemd-udevd(22718): READ block 480 on sdb (8 sectors) [158748.136961] systemd-udevd(22718): READ block 488 on sdb (8 sectors) [158748.136965] systemd-udevd(22718): READ block 496 on sdb (8 sectors) [158748.136968] systemd-udevd(22718): READ block 504 on sdb (8 sectors) [158748.138198] systemd-udevd(22718): READ block 768 on sdb (8 sectors) [158748.138303] systemd-udevd(22718): READ block 776 on sdb (8 sectors) [158748.138363] systemd-udevd(22718): READ block 784 on sdb (8 sectors) [158748.138445] systemd-udevd(22718): READ block 792 on sdb (8 sectors) [158748.138540] systemd-udevd(22718): READ block 800 on sdb (8 sectors) [158748.138629] systemd-udevd(22718): READ block 808 on sdb (8 sectors) [158748.138712] systemd-udevd(22718): READ block 816 on sdb (8 sectors) [158748.138798] systemd-udevd(22718): READ block 824 on sdb (8 sectors) [158748.138927] systemd-udevd(22718): READ block 832 on sdb (8 sectors) [158748.139047] systemd-udevd(22718): READ block 840 on sdb (8 sectors) [158748.139129] systemd-udevd(22718): READ block 848 on sdb (8 sectors) [158748.139220] systemd-udevd(22718): READ block 856 on sdb (8 sectors) [158748.139312] systemd-udevd(22718): READ block 864 on sdb (8 sectors) [158748.139391] systemd-udevd(22718): READ block 872 on sdb (8 sectors) [158748.139470] systemd-udevd(22718): READ block 880 on sdb (8 sectors) [158748.139610] systemd-udevd(22718): READ block 888 on sdb (8 sectors) [158748.139717] systemd-udevd(22718): READ block 896 on sdb (8 sectors) [158748.140240] systemd-udevd(22718): READ block 904 on sdb (8 sectors) [158748.140307] systemd-udevd(22718): READ block 912 on sdb (8 sectors) [158748.140414] systemd-udevd(22718): READ block 920 on sdb (8 sectors) [158748.140480] systemd-udevd(22718): READ block 928 on sdb (8 sectors) [158748.140544] systemd-udevd(22718): READ block 936 on sdb (8 sectors) [158748.140607] systemd-udevd(22718): READ block 944 on sdb (8 sectors) [158748.140664] systemd-udevd(22718): READ block 952 on sdb (8 sectors) [158748.140721] systemd-udevd(22718): READ block 960 on sdb (8 sectors) [158748.140784] systemd-udevd(22718): READ block 968 on sdb (8 sectors) [158748.140845] systemd-udevd(22718): READ block 976 on sdb (8 sectors) [158748.140901] systemd-udevd(22718): READ block 984 on sdb (8 sectors) [158748.140964] systemd-udevd(22718): READ block 992 on sdb (8 sectors) [158748.141025] systemd-udevd(22718): READ block 1000 on sdb (8 sectors) [158748.141157] systemd-udevd(22718): READ block 1008 on sdb (8 sectors) [158748.141221] systemd-udevd(22718): READ block 1016 on sdb (8 sectors) [158748.141289] systemd-udevd(22718): READ block 512 on sdb (8 sectors) [158748.141359] systemd-udevd(22718): READ block 4096 on sdb (8 sectors)

So first I tired to find out, what system-udevd is responsible for. My assupmtion was maybe the SMART functionality wakes it up. But even if I turned off smart (smartctl set -off /dev/sdb) the hdd was still woken. Finally I stoped the udevd service, but the parted process still woke it up. And anyway udevd is probably essential for the system. Of course gparted is not running in the background. I also try to add the noatime option into fstab, but it neither helped. I run out off ideas, and I couldnt find anymore tipps on the internet. So I would really appriciate some aimed help, to get a solution.

For about some month I havent had this problem, so I assume it could be even a bug. Maybe of the udev/parted processes, or I dont know. Should you need any more information for investigation I can gladly post more. And please dont come with umount of the HDD, I would like to have an automated solution as it is orignially intended to work. Thank you!

root@xyz:/# uname -r 3.16.0-33-generic root@xyz:/# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.10 Release: 14.10 Codename: utopic

Mount list:

root@xyz mount -l ... /dev/mapper/sdb1_crypt on /media/vol1 type btrfs (rw,noatime,device=/dev/mapper/sdb1_crypt,device=/dev/mapper/sdc1_crypt,compress=lzo)

root@xyz:/# sudo smartctl -i -d sat /dev/sdb -P show
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.16.0-33-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
enter code here
Drive found in smartmontools Database.  Drive identity strings:
MODEL:              WDC WD30EFRX-68AX9N0
FIRMWARE:           80.00A80
match smartmontools Drive Database entry:
MODEL REGEXP:       WDC WD(10|20|30)EFRX-.*
FIRMWARE REGEXP:    .*
MODEL FAMILY:       Western Digital Red (AF)
ATTRIBUTE OPTIONS:  None preset; no -v options are required.
  • Described possible workaround to the same issue here. – saaj Feb 25 '17 at 17:31
1

In my experience, the udisksd daemon is always the sinner. If you can uninstall it, I envy you; if it is depended on by a bunch of GUI programs that you depend on (KDE4 for me) here is my workaround:

Assuming you have set idle timeouts for your harddisks (hdparm -S), see if sudo killall -SIGSTOP udisksd now lets them spin down by themselves. You don't even need to unmount them – it is enough that they aren't accessed. Which, if your filesystems are mounted noatime, and you have plenty of pagecache, just means you must not write to them.

If that works, you will soon discover certain situations where your GUI programs will hang. In my experience, the KDE4 startup and Open/Save dialogs will hang. The solution is to simply unfreeze the daemon again: sudo killall -SIGCONT udisksd. Thankfully, this will NOT spin up your disks again, otherwise this trick would be worthless! They will however all spin up whenever the daemon is started, which is why stopping it is useless. As a matter of convenience, you may want a cron job doing the freezing, so you can concentrate on the unfreezing – you will have to do this a lot…

0

I am chasing a similar issue and I am using intotify to see what files have been accessed to track down the program that is accessing them. This command will watch a specific directory for X minutes:

inotifywatch -v -e access -e modify -t "$TIME" -r "$STORAGE"

Replace "$TIME" with the length in seconds to watch for and "$STORAGE" with the directory you want watched.

  • Hi, thanks for the hint, however in my case there was no file access (read/write) occurred on the drive. Unfortunately I dont have overview which program can trigger systemd-udevd and parted... or how can they be configured not to access the drive during sleep – fricigrillbufe Mar 31 '15 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.