lynix / hdd-spindown.sh

Automatic Disk Standby using Kernel diskstats and hdparm
MIT License
52 stars 16 forks source link

Is there any way to identify disks by uuid? #9

Closed iminet closed 2 years ago

iminet commented 3 years ago

I've tried with sda/sdb etc, but I've noticed that, if I change the USB ports, the device names will change (sda->sdb, sdb->sdc, sdc->sda). One of these devices is HDD but the others are SSDs. The script won't work if it gets an SSD devicename. This problem should be solved by identifying via uuid.

Thanks!

lynix commented 2 years ago

As the README states, devices may be listed either by their device name or their ID (have a look at /dev/disk/by-id).

The latter should remain unchanged no matter which USB port you use to connect the device.