Results 1 to 6 of 6

Thread: How to spin down, unused Internal Disks?

  1. #1
    Join Date
    Apr 2009
    Location
    Saskatoon Canada
    Beans
    1,002
    Distro
    Xubuntu 12.04 Precise Pangolin

    How to spin down, unused Internal Disks?

    Hi,

    I am thinking of putting a couple of extra internal HD's, in my computer. I would only do that, if there is a way to have them spin down, when not using them.

    Is there a way to do this, outside of yanking the power lines?

    Thanks.
    One Psychiatrist's Definition of Insanity:"Knowing what one should do and doing differently"

  2. #2
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to spin down, unused Internal Disks?

    Use 'hdparm'. It's a command line tool for disk power management. Let's say, one of the drives you add is designated as /dev/sdb, then, to spin it down after 10 minutes, you'd use the following as admin:

    Code:
    hdparm -B 127 -S 120 /dev/sdb
    -B stands for advanced power management, with values from 1 - 127 permitting spindown. -S is the spingdown timeout, in the example above - 120x5=600 seconds, or 10 minutes.

    Check out 'man hdparm' for more info.

    To automate the procedure, just add a line for each HDD to /etc/rc.local.

  3. #3
    Join Date
    Apr 2009
    Location
    Saskatoon Canada
    Beans
    1,002
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to spin down, unused Internal Disks?

    Quote Originally Posted by mikewhatever View Post
    Use 'hdparm'. It's a command line tool for disk power management. Let's say, one of the drives you add is designated as /dev/sdb, then, to spin it down after 10 minutes, you'd use the following as admin:

    Code:
    hdparm -B 127 -S 120 /dev/sdb
    -B stands for advanced power management, with values from 1 - 127 permitting spindown. -S is the spingdown timeout, in the example above - 120x5=600 seconds, or 10 minutes.

    Check out 'man hdparm' for more info.

    To automate the procedure, just add a line for each HDD to /etc/rc.local.
    Sounds simple enough.

    Can you give me an other example of entering a line, for automating the proceedure:

    Code:
    gksu gedit /etc/rc.local          *OR* 
    
    sudo nano /etc/rc.local
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    exit 0
    Thanks.
    Last edited by mikodo; March 16th, 2012 at 03:52 AM.
    One Psychiatrist's Definition of Insanity:"Knowing what one should do and doing differently"

  4. #4
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to spin down, unused Internal Disks?

    The lines would look very similar, with only the hdd designations changing:
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    hdparm -B 127 -S 120 /dev/sdb
    hdparm -B 127 -S 120 /dev/sdc
    hdparm -B 127 -S 120 /dev/sdd
    exit 0
    If you want a time out other then 10 minutes, modify the -S value accordingly.

  5. #5
    Join Date
    Apr 2009
    Location
    Saskatoon Canada
    Beans
    1,002
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to spin down, unused Internal Disks?

    Quote Originally Posted by mikewhatever View Post
    The lines would look very similar, with only the hdd designations changing:
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    hdparm -B 127 -S 120 /dev/sdb
    hdparm -B 127 -S 120 /dev/sdc
    hdparm -B 127 -S 120 /dev/sdd
    exit 0
    If you want a time out other then 10 minutes, modify the -S value accordingly.
    Thank you, for the hand-holding!
    One Psychiatrist's Definition of Insanity:"Knowing what one should do and doing differently"

  6. #6
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: How to spin down, unused Internal Disks?

    thank you

    Brian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •