On Mon, 10 Mar 2003 18:00:31 +0100 Emile van Bergen <emile-deb@evbergen.xs4all.nl> wrote: [snip] > I use something like that on my notebook to prevent things like ntpd's > drift file from spinning up the disk all the time: I have /tmp as ext2 > on a ramdisk (could just as well be shmfs though) and have a > /tmp/preserved which I create from /var/tmp-preserved at bootup and > copy back to /var/tmp-preserved at shutdown, and have /var/lib/ntp > symlinked to /var/tmp-preserved/ntp. > > Of course, using /tmp in such a way goes a bit far, but why not do it > like this then: > > * keep /tmp as it is now; > * keep /var as it is now; > * add /mem, which is RAM-based, writable /very/ early, and initialised > in full from /var/mem at bootup, allowing the admin to define a > desired initial state; > * have part of it, eg. /mem/preserved, written back to > /var/mem/preserved at > shutdown. > > Pidfiles, locks, ifstate, dhcp stuff, mtab, etc. that now need > cleaning up at boot time would be perfect candidates for /mem, things > like ntp.drift could go in /mem/preserved, and some parts parts of > /var/state could be moved to either. s/mem/state It sounds like everything that you are proposing to live in /mem is statfull info that generally makes no sense after a reboot. A /state/preserved directory even make more sense for things like the ntp.drift file that does have meaning over reboots. Does the default kernel shipped with debian have support for tmpfs/shmfs? (woody uses 2.2 by default, will sarge use a 2.4 kernel?) > This is good for your disks, good for your batteries, simplifies state > cleanup at startup, and solves the writable-etc-or-no-networked-var > issue with ifstate to boot. > > It "just" needs to be added to FHS. A list of changing files currently held in /etc or /var that might be nice to have in /state: /etc/mtab /etc/resolv.conf /etc/network/ifstate /var/run/* Thomas [snip]
Attachment:
pgpNef9oUQV28.pgp
Description: PGP signature