[oe] Making /var/lib persistent
Koen Kooi
koen at dominion.kabel.utwente.nl
Wed Apr 18 14:24:15 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jamie Lenehan schreef:
> On Tue, Apr 17, 2007 at 12:02:03AM +0200, Koen Kooi wrote:
>> Hi,
>>
>> Marcel Holtmann just pointed me to the fact that OE mount /var as tmpfs for
>> almost all machines, which wipes /var/lib at boot, which will break bluez and
>> dpkg.
>>
>> What would be the best way to preserve /var/lib (and maybe others) across boots?
>
> This has been brought up a few times and no one has really had a good
> answer for it. I think /var/lib at a minimum needs to be made
> persistent.
>
> After thinking about it a bit I've got the following proposal:
>
> - make /var a standard directory (no tmpfs)
>
> - make /var/volatile a tmpfs filesystems (or /var/tmpfs)
>
> - symlink things that are to be made volatile from /var into
> /var/volatile
>
> So the default /var would end up looking like this:
>
> /var/volatile tmpfs mount
> /var/volatile/lock *
> /var/volatile/run *
> /var/volatile/tmp *
> /var/volatile/cache *
> /var/volatile/log *
> /var/backups
> /var/lib
> /var/lock symlink to /var/volatile/lock
> /var/run symlink to /var/volatile/run
> /var/tmp symlink to /var/volatile/tmp
> /var/cache symlink to /var/volatile/cache
> /var/local
> /var/log symlink to /var/volatile/log
> /var/spool
> /var/www
>
> * == created by the existing volatiles system
>
> (According to the FHS /var/tmp should also persist over reboots.)
>
> This also has an advantage in the situation where I want to make
> something persistent I just have to break the symlink. So for the
> logs for example I could just have "rm /var/log && mv
> /var/volatile/log /var/log" and from then on the logs would remain.
Sound like a good idea, do you have a patch for this?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFGJioPMkyGM64RGpERAtdLAKCTf6YqOUnM4+5bKPQPN6eMIorcTwCffjnL
IP97PHEx2lA0PkrRN9um1RM=
=GNuM
-----END PGP SIGNATURE-----
More information about the Openembedded-devel
mailing list