To prevent my external drive from sleeping I need to use this command:
sudo sdparm --clear=STANDBY /dev/sdb2 Do I have to use it every time I boot? Or just one time and I am set forever?
I think that will work if you also add a --save tag after sdparm, but you might want to check the file after reboot to make sure.
example:
sudo sdparm --save --clear=STANDBY /dev/sdb2 Here is the snippet from an sdparm man page:
-S, --save
When a mode page is being modified (by using the --clear=STR and/or --set=STR options) then the default action is to modify only the current values mode page. When this option is given then the corresponding value(s) in the saved values mode page is also changed. The next time the device is power cycled (or reset) the saved values mode page becomes (i.e. is copied to) the current values mode page.
See NOTES section below.
-Courtesy https://linux.die.net/man/8/sdparm
/etc/hdparm.conf(that's on Debian, or whereever your distro has this file) for entries?