[arch-general] [PATCHES] About /var/run/ and /var/lock/ checks in daemons

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Thu Feb 12 17:51:53 EST 2009

Jan Spakula wrote:
> Excerpts from Jan Spakula's message of Thu Feb 12 09:22:00 +0100 2009:
>> Excerpts from Jan de Groot's message of Thu Feb 12 08:59:41 +0100 2009:
>>> On Thu, 2009-02-12 at 05:51 -0200, Gerardo Exequiel Pozzi wrote:
>>>> I interested to make Arch Linux suitable for use with a /var/run and
>>>> /var/lock that are mounted as tmpfs. But this also helps, in the case
>>>> that not mounted as tmpfs, to make more simple "purge function" for
>>>> these directories at rc.sysinit step.
>>>> In my case this is "just for fun!", but other users can be benefited by
>>>> this, for example "netbook users".
>>> If this requires patching so many packages, and given the fact
>>> that /var/run on tmpfs is not default in archlinux, maybe you should try
>>> building /var/run from an initial directory or something like that. This
>>> is also what I use for my OpenBSD router which runs from compactflash
>>> and has /var mounted on ramdisk.
>> I have a setup on my netbook where the whole /var is mounted as tmpfs and
>> rsynced from and to real directory (/var-sync in my case) on boot/shutdown.
>> Patches to rc.sysinit and rc.shutdown follow. [Note that whenever you update
>> initscripts, you need to patch at least rc.shutdown before rebooting :)]
> Well apparently attachments are scrubbed, so here you go
> http://rafb.net/p/ePKlct55.html
> http://rafb.net/p/yDQSPc95.html
> Advantages are mainly on netbooks, which have limited number of writes to
> their ssd drives, this eliminated a big source of uncontrolled writes.
Hi Jan Spakula,

Check the rsync manpage for the --inplace parameter, this reduces the
amout of writes to the destination, ideal for files that grows "in
appended form" like most of /var/log files.
But again read the manpage for what are the _risk_ of using this ;)

Gerardo Exequiel Pozzi ( djgera )
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D

More information about the arch-general mailing list