Shutdown my (backup) hard disk on Linux when I don't use itWhat command do I use to spin up a “power up in standby” drive?I/O errors on hard disk on Linux bootWhich 'smartctl -d' option should I use on this hard-disk: 'scsi' or 'ata'?Recovering data from a damaged hard-drive: the “freezer trick”What is the worst scenario, if the hard disk or motherboard don't support the `hddparm -s`?Hard disk drive spins up on laptop sleep/wake, can I stop it doing this?Linux Hard Drive PartitioningHDD with windows OS not connecting to linux via usb to sata adapterGetting hard disk drive serial number at the terminal - not the WWNHard disk shows '193' bad sectors and makes a repetitive clicking noiseHow to detect a (possibly corrupt) hard disk?

How can I plot a Farey diagram?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Is every set a filtered colimit of finite sets?

Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore

Does a dangling wire really electrocute me if I'm standing in water?

Why do we use polarized capacitors?

How could a lack of term limits lead to a "dictatorship?"

Are cabin dividers used to "hide" the flex of the airplane?

What are the advantages and disadvantages of running one shots compared to campaigns?

Calculate Levenshtein distance between two strings in Python

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

"listening to me about as much as you're listening to this pole here"

Shall I use personal or official e-mail account when registering to external websites for work purpose?

Typesetting a double Over Dot on top of a symbol

Lied on resume at previous job

LWC and complex parameters

Why is my log file so massive? 22gb. I am running log backups

Does bootstrapped regression allow for inference?

Finding files for which a command fails

What is the meaning of "of trouble" in the following sentence?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Why doesn't a const reference extend the life of a temporary object passed via a function?

Are objects structures and/or vice versa?

COUNT(*) or MAX(id) - which is faster?



Shutdown my (backup) hard disk on Linux when I don't use it


What command do I use to spin up a “power up in standby” drive?I/O errors on hard disk on Linux bootWhich 'smartctl -d' option should I use on this hard-disk: 'scsi' or 'ata'?Recovering data from a damaged hard-drive: the “freezer trick”What is the worst scenario, if the hard disk or motherboard don't support the `hddparm -s`?Hard disk drive spins up on laptop sleep/wake, can I stop it doing this?Linux Hard Drive PartitioningHDD with windows OS not connecting to linux via usb to sata adapterGetting hard disk drive serial number at the terminal - not the WWNHard disk shows '193' bad sectors and makes a repetitive clicking noiseHow to detect a (possibly corrupt) hard disk?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








11















I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.



How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?



The drive is a regular SATA drive.










share|improve this question






























    11















    I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.



    How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?



    The drive is a regular SATA drive.










    share|improve this question


























      11












      11








      11


      3






      I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.



      How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?



      The drive is a regular SATA drive.










      share|improve this question
















      I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.



      How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?



      The drive is a regular SATA drive.







      linux hard-disk power-management






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 2 '14 at 6:04









      slm

      256k71541687




      256k71541687










      asked Feb 2 '14 at 4:50









      TotorTotor

      8,772135181




      8,772135181




















          3 Answers
          3






          active

          oldest

          votes


















          12














          Umount the filesystem and then run hdparm -S 1 /dev/sdb to set it to spin down after five seconds (replace /dev/sdb with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.






          share|improve this answer


















          • 2





            With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

            – slm
            Feb 2 '14 at 6:07











          • Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

            – Totor
            Feb 2 '14 at 17:24











          • This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

            – Ray Foss
            Feb 21 '18 at 23:32



















          2














          To further build upon samiam's answer, you can set udev rules to do these things for you.



          For this example, you'd have to fill in a file in /etc/udev/rules.d (ideally name it something along the lines of 45-sdX-power.rules to respect the conventions, but it doesn't really matter...), with the following:



          ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"


          where you will need to fill in sdX and provide the full path to the hdparm binary (which hdparm).



          This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.



          This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).



          As for hdparm -Y /dev/sdX, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.






          share|improve this answer






























            0














            Short lookup in gnome-disk-utility repo code, and:



            udisksctl power-off -b /dev/sdX


            Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.



            Source: Superuser SE answer






            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/3.0/"u003ecc by-sa 3.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%2f112117%2fshutdown-my-backup-hard-disk-on-linux-when-i-dont-use-it%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              12














              Umount the filesystem and then run hdparm -S 1 /dev/sdb to set it to spin down after five seconds (replace /dev/sdb with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.






              share|improve this answer


















              • 2





                With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

                – slm
                Feb 2 '14 at 6:07











              • Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

                – Totor
                Feb 2 '14 at 17:24











              • This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

                – Ray Foss
                Feb 21 '18 at 23:32
















              12














              Umount the filesystem and then run hdparm -S 1 /dev/sdb to set it to spin down after five seconds (replace /dev/sdb with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.






              share|improve this answer


















              • 2





                With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

                – slm
                Feb 2 '14 at 6:07











              • Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

                – Totor
                Feb 2 '14 at 17:24











              • This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

                – Ray Foss
                Feb 21 '18 at 23:32














              12












              12








              12







              Umount the filesystem and then run hdparm -S 1 /dev/sdb to set it to spin down after five seconds (replace /dev/sdb with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.






              share|improve this answer













              Umount the filesystem and then run hdparm -S 1 /dev/sdb to set it to spin down after five seconds (replace /dev/sdb with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 2 '14 at 5:05









              samiamsamiam

              2,466813




              2,466813







              • 2





                With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

                – slm
                Feb 2 '14 at 6:07











              • Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

                – Totor
                Feb 2 '14 at 17:24











              • This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

                – Ray Foss
                Feb 21 '18 at 23:32













              • 2





                With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

                – slm
                Feb 2 '14 at 6:07











              • Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

                – Totor
                Feb 2 '14 at 17:24











              • This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

                – Ray Foss
                Feb 21 '18 at 23:32








              2




              2





              With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

              – slm
              Feb 2 '14 at 6:07





              With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…

              – slm
              Feb 2 '14 at 6:07













              Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

              – Totor
              Feb 2 '14 at 17:24





              Thanks! How can I restore the default standby timeout value then? I also saw hdparm -Y in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?

              – Totor
              Feb 2 '14 at 17:24













              This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

              – Ray Foss
              Feb 21 '18 at 23:32






              This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.

              – Ray Foss
              Feb 21 '18 at 23:32














              2














              To further build upon samiam's answer, you can set udev rules to do these things for you.



              For this example, you'd have to fill in a file in /etc/udev/rules.d (ideally name it something along the lines of 45-sdX-power.rules to respect the conventions, but it doesn't really matter...), with the following:



              ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"


              where you will need to fill in sdX and provide the full path to the hdparm binary (which hdparm).



              This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.



              This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).



              As for hdparm -Y /dev/sdX, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.






              share|improve this answer



























                2














                To further build upon samiam's answer, you can set udev rules to do these things for you.



                For this example, you'd have to fill in a file in /etc/udev/rules.d (ideally name it something along the lines of 45-sdX-power.rules to respect the conventions, but it doesn't really matter...), with the following:



                ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"


                where you will need to fill in sdX and provide the full path to the hdparm binary (which hdparm).



                This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.



                This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).



                As for hdparm -Y /dev/sdX, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.






                share|improve this answer

























                  2












                  2








                  2







                  To further build upon samiam's answer, you can set udev rules to do these things for you.



                  For this example, you'd have to fill in a file in /etc/udev/rules.d (ideally name it something along the lines of 45-sdX-power.rules to respect the conventions, but it doesn't really matter...), with the following:



                  ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"


                  where you will need to fill in sdX and provide the full path to the hdparm binary (which hdparm).



                  This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.



                  This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).



                  As for hdparm -Y /dev/sdX, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.






                  share|improve this answer













                  To further build upon samiam's answer, you can set udev rules to do these things for you.



                  For this example, you'd have to fill in a file in /etc/udev/rules.d (ideally name it something along the lines of 45-sdX-power.rules to respect the conventions, but it doesn't really matter...), with the following:



                  ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"


                  where you will need to fill in sdX and provide the full path to the hdparm binary (which hdparm).



                  This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.



                  This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).



                  As for hdparm -Y /dev/sdX, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 16 '16 at 15:47









                  aznashwanaznashwan

                  211




                  211





















                      0














                      Short lookup in gnome-disk-utility repo code, and:



                      udisksctl power-off -b /dev/sdX


                      Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.



                      Source: Superuser SE answer






                      share|improve this answer



























                        0














                        Short lookup in gnome-disk-utility repo code, and:



                        udisksctl power-off -b /dev/sdX


                        Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.



                        Source: Superuser SE answer






                        share|improve this answer

























                          0












                          0








                          0







                          Short lookup in gnome-disk-utility repo code, and:



                          udisksctl power-off -b /dev/sdX


                          Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.



                          Source: Superuser SE answer






                          share|improve this answer













                          Short lookup in gnome-disk-utility repo code, and:



                          udisksctl power-off -b /dev/sdX


                          Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.



                          Source: Superuser SE answer







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 5 at 19:52









                          CrollCroll

                          172111




                          172111



























                              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%2f112117%2fshutdown-my-backup-hard-disk-on-linux-when-i-dont-use-it%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

                              getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                              Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                              Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.