Results 1 to 8 of 8

Thread: Disk Spindown Problem

  1. #1
    Join Date
    Jan 2010
    Beans
    62

    Disk Spindown Problem

    I am running Ubuntu 10.10 (amd64). I have two SATA drives connected to the system that I use for weekly backups. I'd like to spin these two disks down when not in use. I have tried:

    1) Editing hdparm.conf like so:

    /dev/sdf {
    spindown_time = 241
    }

    Result: The drives never spin down (checked them using hdparm -C /dev/sdf1)

    2) I have also tried adding a line to rc.local like so:
    sudo hdparm -S 241 /dev/sdf1

    Result: The drives never spin down.

    The drives are formatted as ext4. Here is how they are mounted in fstab:
    UUID=(UUID) /media/(UUID) ext4 rw,suid,dev,exec,auto,user,async,relatime 0 2

    I can't seem to find a way to spin these disks down. Any help would be appreciated.
    Last edited by ThePol1; April 13th, 2011 at 01:45 PM.

  2. #2
    Join Date
    May 2007
    Beans
    2,337

    Re: Disk Spindown Problem

    Hi,

    I imagine the problem is that the drives are mounted. All file systems write to the drivs every so often even if no application has written anything. So only mount the drives when your doing a backup.

    I have 3 2tb wd drives in a RAID array that I use for backup, and I only mount the array when I'm doing a backup. I've kust checked and the drives are powered down at the moment. Also you should use the device name (/dev/sdf) not the partition number for hdparm.

    Regards
    Ian Dobson
    Walking on water and writing software to specification is easy if they're frozen.

    My corner of the internet http://www.planet-ian.com

  3. #3
    Join Date
    Jan 2010
    Beans
    62

    Re: Disk Spindown Problem

    That's it! I modified my backup script to mount (when it starts) and then umount (when it completes) and both drives now spin down. Thanks!
    Last edited by ThePol1; April 13th, 2011 at 01:47 PM.

  4. #4
    Join Date
    Jan 2010
    Beans
    62

    Re: Disk Spindown Problem

    I spoke too soon. One of the drives spins down and stays in standby mode. The other drive spins down and then, after some time, spins back up... very strange since both drives are unmounted. Any thoughts?

  5. #5
    Join Date
    May 2007
    Beans
    2,337

    Re: Disk Spindown Problem

    Hi,

    Could something be touching the drive/Smartdata or something like that.

    When the drive powers up do you see anything interesting in the syslog (/var/log/syslog) or dmesg?
    How often does the drive power up?
    Are both drives setup exactly the same?
    Maybe a different firmware on the drives?

    Regards
    Ian Dobson
    Walking on water and writing software to specification is easy if they're frozen.

    My corner of the internet http://www.planet-ian.com

  6. #6
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,133
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Disk Spindown Problem

    I would bet it's the SMART daemon waking them up. If it is, here's how I set mine up to prevent SMART from waking up idle disks.
    Code:
    nano /etc/default/smartmontools
    And add this...
    Code:
    smartd_opts=”-q never -i 7200"
    I have changed it to check every 2 hours, and to not spin the drive up if it is in standby.

    Finally,
    Code:
    nano /etc/smartd.conf
    and add this to the edit of your DEVICESCAN line
    Code:
    -n standby,q

  7. #7
    Join Date
    Jan 2010
    Beans
    62

    Re: Disk Spindown Problem

    I added "-n standby,q" to smartd.conf and both drives have gone to Standby mode and haven't spun up again. I'll monitor them over the next 24 hours or so... but I think this has solved the problem!

  8. #8
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,133
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Disk Spindown Problem

    Great, glad to hear that worked

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
  •