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;









9

















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










share|improve this question





















  • 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

















9

















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










share|improve this question





















  • 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













9












9








9


1






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










share|improve this question















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






share|improve this question














share|improve this question











share|improve this question




share|improve this question










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












  • 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










1 Answer
1






active

oldest

votes


















17


















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/...





share|improve this answer



























    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
    );



    );














    draft saved

    draft discarded
















    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









    17


















    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/...





    share|improve this answer






























      17


















      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/...





      share|improve this answer




























        17














        17










        17









        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/...





        share|improve this answer














        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/...






        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Jun 2 at 12:21









        Stephen KittStephen Kitt

        209k27 gold badges498 silver badges559 bronze badges




        209k27 gold badges498 silver badges559 bronze badges































            draft saved

            draft discarded















































            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.




            draft saved


            draft discarded














            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





















































            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









            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?