Prevent HDD from sleeping

Oct 4, 2019
37
7
28
40
I recently replaced a faulty HDD in one of my RAIDZ-pools. Before, it concisted of three identical, 8TB Toshiba NAS HDDs. The replacement drive is a 8TB Toshiba NAS drive, but a slightly newer model with more cache etc.
It also differs from the other two drives in that it insists on going to sleep regularly. For example, this is the output of the hddtemp command I run on my drives to check that they are in healthy conditions temperature-wise:

/dev/sdd: TOSHIBA HDWN180: 39°C
/dev/sde: TOSHIBA HDWN180: 38°C
/dev/sdf: TOSHIBA HDWG180: drive is sleeping

Since this filesystem has VMs on it that regularly sync stuff; it most often wakes up again within a few minutes.
I would like the new drive to stay awake like the previous ones, as constant going to sleep and waking up probably will be bad for the drive in the long run.
Can this be set as some kind of parameter in ZFS? Or in proxmox?

All the threads I find when searching for info on this in the forums are regarding forcing your drives to sleep :)
 
Can't test it right now, but cited from man hdparm:

Code:
       -B     Get/set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a
              high value means better performance.  Possible settings range from values 1 through 127 (which  permit  spin-down),  and
              values  128 through 254 (which do not permit spin-down).  The highest degree of power management is attained with a set‐
              ting of 1, and the highest I/O performance with a setting of 254.  A value of 255 tells hdparm to disable Advanced Power
              Management altogether on the drive (not all drives support disabling it, but most do).

So it seems hdparm -B 254 /dev/sdf (or 255 to disable completely) might be what you need. hdparm -B /dev/sdd should tell you the value used for your other drives.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!