I have a ZFS raid with two disks. The homeserver is running 24/7 and the disks too. So I'd like to set them to standby after some idle time. Several posts recommend to test this with the -C
param
# hdparm -y /dev/sda
/dev/sda:
issuing standby command
# hdparm -C /dev/sda
/dev/sda:
drive state is: standby
# hdparm -C /dev/sda
/dev/sda:
drive state is: standby
# hdparm -C /dev/sda
/dev/sda:
drive state is: active/idle
I re-run the hdparm -C /dev/sda
command every second. Why the disk got waked up after a few seconds? I stopped all applications accessing those disk (its not the OS disk). And using fatrace I could not find any io operations. And I also tried this kernel workaround followed by reloading the rules, which should avoid waking the disk up by hdparm
.
Additionally, I tried smartctl -i -n standby /dev/sda |grep "^Power mode"
. This seems to wake up the disk on the second run
# hdparm -y /dev/sda
/dev/sda:
issuing standby command
# smartctl -i -n standby /dev/sda|grep "^Power mode"
# smartctl -i -n standby /dev/sda|grep "^Power mode"
Power mode is: ACTIVE or IDLE
The /dev/sda
disk is a WD Red 8TB:
# smartctl -i /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.41-1-pve] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD80EFZX-68UW8N0
Serial Number: xxx
LU WWN Device Id: 5 000cca 263c7a3f7
Firmware Version: 83.H0A83
User Capacity: 8,001,563,222,016 bytes [8.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat May 30 09:41:56 2020 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
I'm running Proxmox, so it's a debian based distribution with Debian Buster (10).
Edit: Trying hd-idle
I tried hd-idle but the disk went not in standby. Since there were no entries in the logs, I executed it manually with the debug flag
hd-idle -i 0 -a /dev/sda -i 120 -l /var/log/hd-idle.log -d
This showed me increasing reads on every check
probing sda: reads: 12760648, writes: 3174104
probing sda: reads: 12763720, writes: 3174104
probing sda: reads: 12765256, writes: 3174104
probing sda: reads: 12766792, writes: 3174104
I'd expect no reads at all, like described in this blog post (its for the RPI, but I think this is not relevant here). Most of the software runs on Docker containers, so I stopped the daemon but the reads continues. There is currently just one Proxmox VM. It's located on the system SSD, so it couldn't cause reads.