How to stop a sleeping hard disk from waking up at system halt?

July 23rd, 2012 - 07:30 am ET by Teemu Likonen | Report spam
I have a hard disk that's sole purpose is backup. Soon after day's first
boot a new backup is made and then the backup filesystem is unmounted
and the disk can go to sleep (hdparm -S 240). The backup filesystem is
on an encrypted (LUKS) partition which is automatically opened using
/etc/crypttab settings.

All this works nicely but a little before the system is shut down the
backup hard disk wakes up and starts spinning. I'd guess the cause is
one of these init scripts:

/etc/rc0.d:
lrwxrwxrwx 1 root root 20 2012-06-25 21:02 K10cryptdisks -> ../init.d/cryptdisks
lrwxrwxrwx 1 root root 14 2012-06-25 21:02 K11lvm2 -> ../init.d/lvm2
lrwxrwxrwx 1 root root 26 2012-06-25 21:02 K12cryptdisks-early -> ../init.d/cryptdisks-early

How can I stop this unnecessary spinning and keep the disk sleeping when
shutting down the system?


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/87k3xug2k3.fsf@mithlond.arda
email Follow the discussionReplies 2 repliesReplies Make a reply

Similar topics

Replies

#1 Jochen Spieker
July 23rd, 2012 - 09:50 am ET | Report spam

Teemu Likonen:
All this works nicely but a little before the system is shut down the
backup hard disk wakes up and starts spinning. I'd guess the cause is
one of these init scripts:

/etc/rc0.d:
lrwxrwxrwx 1 root root 20 2012-06-25 21:02 K10cryptdisks -> ../init.d/cryptdisks
lrwxrwxrwx 1 root root 14 2012-06-25 21:02 K11lvm2 -> ../init.d/lvm2
lrwxrwxrwx 1 root root 26 2012-06-25 21:02 K12cryptdisks-early -> ../init.d/cryptdisks-early

How can I stop this unnecessary spinning and keep the disk sleeping when
shutting down the system?



You need to luksClose the crypto container and deactivate the volume
group (vgchange -an) yourself if you don't want that to happen on
shutdown.

J.
My medicine shelf is my altar.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODAT...2.html>





To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/
Replies Reply to this message
#2 Teemu Likonen
July 23rd, 2012 - 11:20 am ET | Report spam

Jochen Spieker [2012-07-23 15:43:43 +0200] wrote:

Teemu Likonen:
How can I stop this unnecessary spinning and keep the disk sleeping
when shutting down the system?



You need to luksClose the crypto container and deactivate the volume
group (vgchange -an) yourself if you don't want that to happen on
shutdown.



Thanks. There are no LVM volumes on that disk but I tried to just
luksClose it and add the hard disk to LVM's filter so it's not even
scanned by LVM. That seems to work and the backup disk can sleep
peacefully.




To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Archive: http://lists.debian.org/
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search