Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Ubuntu 12.04 on my Laptop with two hard disks. The primary one is a SSD, whereas the second one is a spinning hard disk. Most of the time I don't need the second hard disk, I just use it for some larger files like movies etc.. Hence I send it to sleep with 'hdparm -Y /dev/sdb'.

However after resuming from suspend the hard disk is switched on again, which is quite annoying... Does anyone know a solution to avoid waking up the second hd?

Thank you,

Leon

share|improve this question
    
Thank you. But I would like to avoid unnecessary spin-ups to increase the lifetime of my disk. –  user70600 Jun 14 '12 at 14:18

1 Answer 1

I would send the suspend command to the drive on resume.

under /etc/apm/resume.d/ you can add a script that does that.

it would probably look like this

 #!/bin/sh
 # sleep drive when resuming


 case "$1" in
   resume) /sbin/hdparm -Y /dev/sdb;; 
 esac
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.