Is it possible to (7 day) schedule sleep time of a hard drive?Renaming a Hard DriveSlow hard drive?Hard drive making strange soundHard Drive health checkHow to schedule shutdown every day?Prevent hard drive spinupSchedule the last day of every monthCompletly erasing hard driveHard drive waking from sleep for no apparent reason
How might people try to stop the world becoming a rogue planet?
Create a program that prints the amount of characters it has, in words
Hell0 W0rld! scored by ASCII values
Noise reduction using multiple recordings of the same signal
Thousands separator for symbolic x coordinates?
Regarding asking for writing about some courses in my CV in which I got bad grades due to my non interest in those courses
Is "I can eat a glass" a good translation of "私はガラスを食べられます"?
Why are so many cities in the list of 50 most violent cities in the world located in South and Central America?
Why is the Falcon Heavy center core recovery done at sea?
How did the T-850 still function after it removed its second battery?
Surjection from one string to two strings
Right way to say I disagree with the design but ok I will do
How does AT-AT deploy troops?
Does the FIDE 75-move rule apply after checkmate or resignation?
Sci-fi book trilogy about space travel & 'jacking'
How to deal with non-stop callers in the service desk
Why past tense of vomit generally spelled 'vomited' rather than 'vomitted'?
Decay of spin-1/2 particle into two spin-1/2 particles
What is a word for the feeling of constantly wanting new possessions?
How to make a Bash script to change the format of a date in a CSV file
Leaving passport in the hotel room
Why buy a first class ticket on Southern trains?
why we need self-synchronization?
Reviewer wants me to do massive amount of work, the result would be a different article. Should I tell that to the editor?
Is it possible to (7 day) schedule sleep time of a hard drive?
Renaming a Hard DriveSlow hard drive?Hard drive making strange soundHard Drive health checkHow to schedule shutdown every day?Prevent hard drive spinupSchedule the last day of every monthCompletly erasing hard driveHard drive waking from sleep for no apparent reason
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I'm looking for a way to schedule when an external hard drive connected to my Linux (Debian 9) box goes to sleep (stops spinning).
To put this into content: I have a Linux box that runs as a multimedia server. If a call is made to fetch content that is on the external hard drive, it often takes 15-30 seconds for the hard drive to wake and start spinning which a) is frustrating and b) sometimes causes timeouts with the multimedia server. I could set the hard drive to be awake and spinning 24/7, but this seems a waste when most of the time I only use the multimedia server when I'm at home.
Is there any software tool or command I could use to set a weekly schedule for when the hard drive is spinning - e.g.
Monday-Friday: SPINNING between 5pm and 11pm
Saturday-Sunday: SPINNING between 3pm and 11pm
OTHERWISE SPINNING on demand and sleep as per system timer
linux debian cron hard-disk
add a comment
|
I'm looking for a way to schedule when an external hard drive connected to my Linux (Debian 9) box goes to sleep (stops spinning).
To put this into content: I have a Linux box that runs as a multimedia server. If a call is made to fetch content that is on the external hard drive, it often takes 15-30 seconds for the hard drive to wake and start spinning which a) is frustrating and b) sometimes causes timeouts with the multimedia server. I could set the hard drive to be awake and spinning 24/7, but this seems a waste when most of the time I only use the multimedia server when I'm at home.
Is there any software tool or command I could use to set a weekly schedule for when the hard drive is spinning - e.g.
Monday-Friday: SPINNING between 5pm and 11pm
Saturday-Sunday: SPINNING between 3pm and 11pm
OTHERWISE SPINNING on demand and sleep as per system timer
linux debian cron hard-disk
1
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
1
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24
add a comment
|
I'm looking for a way to schedule when an external hard drive connected to my Linux (Debian 9) box goes to sleep (stops spinning).
To put this into content: I have a Linux box that runs as a multimedia server. If a call is made to fetch content that is on the external hard drive, it often takes 15-30 seconds for the hard drive to wake and start spinning which a) is frustrating and b) sometimes causes timeouts with the multimedia server. I could set the hard drive to be awake and spinning 24/7, but this seems a waste when most of the time I only use the multimedia server when I'm at home.
Is there any software tool or command I could use to set a weekly schedule for when the hard drive is spinning - e.g.
Monday-Friday: SPINNING between 5pm and 11pm
Saturday-Sunday: SPINNING between 3pm and 11pm
OTHERWISE SPINNING on demand and sleep as per system timer
linux debian cron hard-disk
I'm looking for a way to schedule when an external hard drive connected to my Linux (Debian 9) box goes to sleep (stops spinning).
To put this into content: I have a Linux box that runs as a multimedia server. If a call is made to fetch content that is on the external hard drive, it often takes 15-30 seconds for the hard drive to wake and start spinning which a) is frustrating and b) sometimes causes timeouts with the multimedia server. I could set the hard drive to be awake and spinning 24/7, but this seems a waste when most of the time I only use the multimedia server when I'm at home.
Is there any software tool or command I could use to set a weekly schedule for when the hard drive is spinning - e.g.
Monday-Friday: SPINNING between 5pm and 11pm
Saturday-Sunday: SPINNING between 3pm and 11pm
OTHERWISE SPINNING on demand and sleep as per system timer
linux debian cron hard-disk
linux debian cron hard-disk
asked Jun 2 at 10:09
Alex WardAlex Ward
483 bronze badges
483 bronze badges
1
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
1
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24
add a comment
|
1
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
1
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24
1
1
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
1
1
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24
add a comment
|
1 Answer
1
active
oldest
votes
A cronjob would allow this:
# At 11pm every day, enable sleep after 30s
0 23 * * * /sbin/hdparm -S6 /dev/disk/by-id/...
# At 5pm on weekdays, disable sleeping
0 17 * * 1-5 /sbin/hdparm -S0 /dev/disk/by-id/...
# At 3pm on the weekend, disable sleeping
0 15 * * 0,6 /sbin/hdparm -S0 /dev/disk/by-id/...
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f522440%2fis-it-possible-to-7-day-schedule-sleep-time-of-a-hard-drive%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A cronjob would allow this:
# At 11pm every day, enable sleep after 30s
0 23 * * * /sbin/hdparm -S6 /dev/disk/by-id/...
# At 5pm on weekdays, disable sleeping
0 17 * * 1-5 /sbin/hdparm -S0 /dev/disk/by-id/...
# At 3pm on the weekend, disable sleeping
0 15 * * 0,6 /sbin/hdparm -S0 /dev/disk/by-id/...
add a comment
|
A cronjob would allow this:
# At 11pm every day, enable sleep after 30s
0 23 * * * /sbin/hdparm -S6 /dev/disk/by-id/...
# At 5pm on weekdays, disable sleeping
0 17 * * 1-5 /sbin/hdparm -S0 /dev/disk/by-id/...
# At 3pm on the weekend, disable sleeping
0 15 * * 0,6 /sbin/hdparm -S0 /dev/disk/by-id/...
add a comment
|
A cronjob would allow this:
# At 11pm every day, enable sleep after 30s
0 23 * * * /sbin/hdparm -S6 /dev/disk/by-id/...
# At 5pm on weekdays, disable sleeping
0 17 * * 1-5 /sbin/hdparm -S0 /dev/disk/by-id/...
# At 3pm on the weekend, disable sleeping
0 15 * * 0,6 /sbin/hdparm -S0 /dev/disk/by-id/...
A cronjob would allow this:
# At 11pm every day, enable sleep after 30s
0 23 * * * /sbin/hdparm -S6 /dev/disk/by-id/...
# At 5pm on weekdays, disable sleeping
0 17 * * 1-5 /sbin/hdparm -S0 /dev/disk/by-id/...
# At 3pm on the weekend, disable sleeping
0 15 * * 0,6 /sbin/hdparm -S0 /dev/disk/by-id/...
answered Jun 2 at 12:21
Stephen KittStephen Kitt
209k27 gold badges498 silver badges559 bronze badges
209k27 gold badges498 silver badges559 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f522440%2fis-it-possible-to-7-day-schedule-sleep-time-of-a-hard-drive%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
So you are decreasing disk run time, but starting/stopping your disk -40 times a week. Starting/stopping a disk is not without its costs. Unless electricity is very expensive where you are, it might not be worth the effort.
– waltinator
Jun 3 at 2:39
1
@waltinator Modern HDDs are designed to handle hundreds of thousands of start-stop cycles, so having one cycle per day is absolutely not harmful. It will literally take a thousand years to kill the HDD from excessive number of spin-downs at this rate. If anything, I would be more concerned about hours of useless spinning.
– Dmitry Grigoryev
Jun 3 at 11:47
@waltinator Fair argument, but the whole point is that this would actually result in a net DECREASE in spin ups/downs, as at the moment it spins up and down more or less every time content is requested from the multimedia server, particularly during the times I want scheduling. As you say, it probably costs more energy every time the drive spins up - so leaving it spinning in the evenings would probably level off energy use.
– Alex Ward
Jun 3 at 15:24