From 2a97ded0f887dafa3af4def91b91626af1736378 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 26 Apr 2023 20:21:19 +0800 Subject: [PATCH] docs: add hdparm quick reference --- cli/hdparm.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cli/hdparm.md diff --git a/cli/hdparm.md b/cli/hdparm.md new file mode 100644 index 0000000..26fa3ce --- /dev/null +++ b/cli/hdparm.md @@ -0,0 +1,22 @@ + +enable power save +``` +hdparm -B 127 /dev/sdX +``` + +set spindown time to 20min (1-240) x 5sec +``` +hdparm -S 240 /dev/sdX +``` + +check current state +``` +hdparm -C /dev/sdX +``` + +to persistent configuration across reboot using udev rule, please put the following content to `/etc/udev/rules.d/69-hdparm.rules` +``` +ACTION=="add|change", KERNEL=="sd[a-z]", ATTRS{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 127 -S 240 /dev/%k" +``` + +for more detail: https://wiki.archlinux.org/title/hdparm