I have one of those hdds, that have a very aggressive power management. To prevent load cycles from rising in to critical numbers I wrote an udev rule:
SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="TOSHIBA MK2555GS", RUN+="/usr/bin/hdparm -B 200 /dev/%k" The problem is, that this rule is not triggered aftr i wake my notebook from sleep. Therefore i have the following systemd service:
[Unit] Description=root resume actions After=suspend.target [Service] Type=simple ExecStart=/bin/hdparm -B 200 /dev/sda [Install] WantedBy=suspend.target I'd prefer the ExecStart command to be something like /bin/udevadm trigger --subsystem-match="block". So I don't have to state the kernel name explicitly. If I do this command manually the power managment is adjusted correctly but it doesn't work from the systemd service. Is there a way to do this? btw I'm using arch-linux