Ubuntu 22.04
My drives keep sleeping and PMS skips loading.
Is there an easy way to keep all my internal and external drives awake?
Have you tried hdparm CLI command?
I tried hdparm something via YT University. Could not make it work.
Seems to work except on this external USB drive-
:/home/plexbox/Desktop# hdparm -S 00 /dev/sdc1
/dev/sdc1:
setting standby to 0 (off)
SG_IO: bad/missing sense data, sb: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
root@plexbox:/home/master/Desktop#
Ideas?
I think external USB drives have a mind of their own IME ![]()
Edit: I have my drives spinning down on Linux (unRAID) and it doesn’t seem to cause any issues with PMS.
And here I thought this was the place to go for the answers. kek
They do. Particularly those which are sold as being energy-efficient. They will ignore any directives from the outside and will aggressively spin down their platters, only following their own firmware commands.
Avoid external drives.
Read something about using a crontab but, I am a novice.
WD drives are notorious for sleeping and ignoring what you want.
There is a utility for most. For some, even Synology wrote special code to keep them from sleeping unexpectedly.
https://support-en.wd.com/app/answers/detailweb/a_id/13880/related/1#subject9
Disable the sleep timer
EDIT
Looking back through the DSM history, Synology disables the sleep timer at powerup (DSM startup).
Based on this, it makes sense to have a cron (or systemd or even rc.local) job which runs at system startup which finds the drives and issues the disable commands to each of them.
I doubt crontab would help, that is used for running commands repeatedly on a timed schedule.
As per @ChuckPa external drives typically have their own internal firmware that controls spin up/down so you need to check manufacturer’s website ideally.
man 5 crontab
Instead of the first five fields, one of eight special strings may appear:
string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".
Please note that startup, as far as @reboot is concerned, is the time when the cron(8) daemon startup. In particu‐
lar, it may be before some system daemons, or other facilities, were startup. This is due to the boot order sequence
of the machine.
It’s acceptable if a systemd local service ‘one-shot’ is too much for the user.
I’m a Linux system administrator, I know what Cron is ![]()
Was just trying to explain simply ![]()
You could always go super-low-tech and just modify a file on the disk often enough to keep it spun up. A cron job similar to the following should work (edit your cron table with crontab -e):
*/5 * * * * touch /path/to/mount/point/some_file &>/dev/null
The above touches some_file every 5 minutes. If that’s not sufficient, you could increase the frequency by lowering the 5 (*/1 for every minute, for example).
Sorry I don’t understand.
KeepAlive was a program I used on windows that worked well.
https://anonfiles.com/kdcfHavdz7/06_08_2023_075422_jpg
Something like that would be fine. Every few seconds it wrote a file and it worked perfectly.
How do I add the above crontab?
*/5 * * * * touch /path/to/mount/point/some_file &>/dev/null
Just type that line as root in a terminal?
Not running Ubuntu but this may well work, from a terminal just type:
crontab -e
which will take you into an editor, then type in your crontab line and exit.
If you need more help with crontab command type:
crontab -h
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.