I built a NAS with a BananaPi and a SATA hard drive. The OS is Bananian (Debian 8/Jessie). I want to put the harddrive into standby mode using hdparm -y.

For some reason this only works, when the hard drive (partition) is not mounted. If i mount it with -o noatime and execute hdparm -y it does not go into standby.

I also tried different values for hdparm -B (127, 128, 254, 255) without any luck.

Looking at iotop and dstat I can see that there is something constantly writing to the harddrive.


Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       3.77 M/s
 1408 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % getty 38400 tty2
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init [2]
    2 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]
    3 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/0]
 1412 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % getty 38400 tty6

My guess is that this writing wakes up the hard drive again immediately. The hard drive has a single partition formatted with ext4, and journaling is off.

What could be the cause of this excessive writing? Am I right that this could interfere with standby mode? How should I fix this?

Edit: Regarding NAS, there is currently no software installed (Samba, Apache, ...). In fact it is a fresh install of Debian without anything else. No software accesses the hard drive, at least not that i am aware of.

migrated from askubuntu.com Sep 14 '16 at 14:20

This question came from our site for Ubuntu users and developers.

  • You might want to include some details about how the drive is used as part of the NAS -- e.g., if it is part of a samba share or something. I'm not a samba user, but I'm just guessing a potential culprit is whatever software is making the content "network accessible". Of course you could test that premise by disabling it to see if it makes any difference. – goldilocks Sep 14 '16 at 14:40
  • @goldilocks Its actually not a NAS yet, so there is no software. Added to my question just now... – Mario Dekena Sep 14 '16 at 15:28

I solved the problem myself. I turned up /proc/sys/vm/block_dump und looked at dmesg.

As it turns out ext4lazyinit is still finishing the formatting of the hard drive (inode tables) in the background.

I am going to reformat the drive with lazy_itable_init=0 to force it to finish.

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.