External HDD spinning constantly.

Jo M

New Member
Feb 4, 2022
1
0
1
37
Hi,
Could you advise how to stop external HDD from constant spinning? It's NTFS 3.5" drive which contains only data not system files. Drive was mapped in Proxmox and lxc container. It's not problem with container as HDD running even if is container stopped.
 
You can setup hdparm to spindown your HDDs. Not sure if hdparm is installed by default, you might need to install its package first. Then you can add something like this to your "/etc/hdparm.conf" ...
Code:
/dev/disk/by-id/usb-IdOfYourUSBDisk {
        spindown_time = 1800
        apm = 64
}
...if you want medium energy savings with spindown after 30 minutes. But keep in mind that constant spinning up/down and head parking might lower the life expectation of your HDD as the mechanical parts will be more stressed and the temperature will fluctuate more stressing the materials too. So might save power but it is debatable if it saves money if you maybe need to replace the disk sooner.
 
Last edited:
Hi,
I'm entering this older thread, since its not marked as [solved] :)

I have added a similay entry to my /etc/hdparm.conf, but the drives did not go to sleep ...
Code:
/dev/disk/by-id/ata-TOSHIBA_MD04ACA400_26MIK6FGFSAA {
    spindown_time = 24
}

/dev/disk/by-id/ata-TOSHIBA_MD04ACA400_26M8K078FSAA {
    spindown_time = 24
}

/dev/disk/by-id/ata-TOSHIBA_MD04ACA400_26LIK6BTFSAA {
    spindown_time = 24
}

But when I spin down the drives by hand, they go to standby
Code:
root@pve:/# hdparm -y /dev/sda /dev/sdb /dev/sdc

/dev/sda:
 issuing standby command

/dev/sdb:
 issuing standby command

/dev/sdc:
 issuing standby command

And of course they remain in standby until I really need them again.
Code:
root@pve:/# hdparm -C /dev/disk/by-id/ata-TOSHIBA_MD04ACA400_26MIK6FGFSAA

/dev/disk/by-id/ata-TOSHIBA_MD04ACA400_26MIK6FGFSAA:
 drive state is:  standby

But after rebooting the machine I have to do it again :(
Whats the way in pve to do this automatically?

In my Manjaro desktop's I have just to enable it via systemctl ...