How to spin down temporarily unused hard drives

maeries

Renowned Member
Jul 10, 2015
28
2
68
Hi there,

I have a small home server with 5 hard drives. 4 of those just contain movies and since I just watch a couple of movies per week it would be ideal to shut the drives down when they are not in use.

From what I read, the problem is pvestatd which spins the drives up right after they spun down to be able to continue collecting stats. But since all of those forum post are a little older, I'm wondering weather there is a nice solution now.
 
Hi,

If your hard disks are used as storage the pvestatd will keep it up.
The only way is to disable the storage.
 
Thank you for the quick answer. What are the downsides of disabling pvestatd?
 
I never say you can disable the pvestatd.
I say
disable the storage.
 
oh. Guess I confused it with a forum post i read.

What does disabling mean exactly? Unmounting it? And can disabling and enabling be done automatically?
 
In admin pmx webpage, for any storage in data center you have a check box for disable. And I think you can do it also from shell/script.

But you must think twice if you really want this. For any rotational disk the most stress is at start/stop (in under 1 second the disk will go from 0 rpm to 7200 rpm or in revers). So yes you will have a cheap bill for electricity (1-2 euro ?) but you will reduce the life of your hddd.


So be wise for what you want, because .... ;)
 
In admin pmx webpage, for any storage in data center you have a check box for disable. And I think you can do it also from shell/script.

I was initially confused by this but yeah it seems you must go to "Datacenter (...)" option in the list, select "Storage" select the drive in the list and press the edit button. In there you can check or uncheck the "Enable" check box.

The only think about this, is that it's only for storage that has been mounted to Proxmox. I have drives that I just put in without mounting that keep spinning. I don't even have the option to disable them from this menu. Is it possible that unmounted drives always spin and mounted ones that I disable will spin down? I guess I could do my own testing but if someone already knows this, it would be good to hear from them. I have a Dell PowerEdge T320 that I flashed the RAID controller into IT mode for drive passthrough for ZFS. iDRAC doesn't recognize the HBA anymore. I would like to be able to properly prep a drive for removal by unmounting and spinning down first. I guess I can pull it so it disconnects and wait a few seconds for the drive to stop. I just don't know if not letting the heads park properly will be a problem or if the inertia of the drive and the bias the actuators have to the parked position will take care of that without platter damage.

(in under 1 second the disk will go from 0 rpm to 7200 rpm or in revers).
What's your source on that? your own disk? In my S.M.A.R.T. values Spin_Up_Time can be around 11000 [milliseconds]. I think it largely depends on the drive. Some power saving or performance drives meant for laptops might utilize rapid spin up cycles where as archive storage drives have longer spin up times to reduce drive stress and sudden power spikes from many drives spinning up rather than using lots of current to spin up a drive as fast as possible. As for spin down time, I can confirm that I can feel gyroscopic forces long after 1 second when removing a drive without properly spinning down first (yeah, not good, but in the name of science I can confirm it's longer than a second). If a drive spins down that fast, the bearings either suck, you have a helium leak or the motor has active braking which I can't imagine many use cases for such a feature.
 
Is it possible that unmounted drives always spin and mounted ones that I disable will spin down?
Add the disks to your /etc/hdparm.conf and set there what APM you want and how fast they should spin down. Example for most powersaving and spindown after 5 minutes:
Code:
/dev/disk/by-id/yourdisk {
        apm = 1
        spindown_time = 5
}
Of cause will only help when not used in PVE as a storage (so pvestatd won't poll them) and if no service/guest will access those disks.
 
Last edited:

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!