0

I have small server, mainly for backups. System is Ubuntu 9.10. Because backup is once a day, most of the time the server is idle. So I wanted disk to spin down, but it is always running. I can spin it down by

hdpparm -y /dev/sda

But then after few seconds it is spinning again.

I tracked (by inotify) that usually it is /var/spool/postfix/<something> accessed. Looks like postfix reads it every few seconds. Can I force postfix to access disk not so frequently?

4 Answers 4

3

The problem you're having, I'll bet, is that every time Postfix reads the spool directories looking for new mail, the atime of the directory is being updated. Try running mount -o remount,noatime,nodiratime /whatever/partition/postfix/is/on and see if the writes drop off. If they do, persist those atime options in fstab; if they don't, provide a dump of the inotify data you're seeing and perhaps some more pertinent facts will emerge.

0

The fast answer is, probably not.

Do you know what process specifically is doing the writing? Chances are Postfix is not going to participate well in power saving as it is really intended for a mail server, and servers are just now becoming power friendly.

That said, if the mail is not critical, can you make /var/spool/postfix into a ram disk? Then it won't need to touch physical hardware in order to do its thing. If undelivered mail is in the queue when it loses power/reboots, you will lose it, but do you really expect this to be an issue?

0

Postfix is presumably checking its spool for new mail messages so that it can deliver them. What you could do if you don't want to keep the spool on disk is to put it in an in-memory tmpfs. Just move the contents of /var/spool/postfix/ to a temporary location, then mount -t tmpfs tmpfs /var/spool/postfix/ and move them back.

One drawback to this is that you will lose everything there when the system shuts down. It's a good idea to keep the original copy around in another location, and synchronize to it from a shutdown script. The drawback here being of course that you will lose any unsynchronized changes if your system crashes or loses power.

0

Do you need to have a full blown MTA on that system?

If not something like ssmtp can still send outbound emails without having to check any spools. The downside is that if there are any failures in delivery ssmtp doesn't spool them to reattempt delivery but puts them in ~/dead.letter

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .