docs: add hdparm quick reference

This commit is contained in:
Klesh Wong 2023-04-26 20:21:19 +08:00
parent 87d67d32d1
commit 2a97ded0f8

22
cli/hdparm.md Normal file
View File

@ -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