Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Jamie Lenehan <lenehan@twibble.org>
To: openembedded-devel@lists.openembedded.org
Cc: Koen Kooi <k.kooi@student.utwente.nl>
Subject: Re: Making /var/lib persistent
Date: Wed, 18 Apr 2007 19:02:36 +1000	[thread overview]
Message-ID: <20070418090235.GA21841@twibble.org> (raw)
In-Reply-To: <1176760923.4623f25b913f9@dominion.kabel.utwente.nl>

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.

-- 
 Jamie Lenehan <lenehan@twibble.org>



  parent reply	other threads:[~2007-04-18  9:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 22:02 Making /var/lib persistent Koen Kooi
2007-04-16 22:13 ` Patrick Steiner
2007-04-16 22:40 ` Erik Hovland
2007-04-16 22:43 ` cyril Romain
2007-04-18  9:02 ` Jamie Lenehan [this message]
2007-04-18 14:24   ` Koen Kooi
2007-04-19  1:49     ` Jamie Lenehan
2007-04-19 17:37       ` Justin Patrin
2007-04-23 11:53       ` Paul Sokolovsky
2007-05-10 15:00       ` Paul Sokolovsky
2007-05-10 19:23         ` Koen Kooi
2007-05-10 23:06         ` Richard Purdie
2007-05-14 12:06         ` Koen Kooi
2007-05-14 12:21           ` Koen Kooi
2007-04-19 23:32   ` Matthias Hentges
  -- strict thread matches above, loose matches on Subject: below --
2007-05-14 17:15 [cc]smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070418090235.GA21841@twibble.org \
    --to=lenehan@twibble.org \
    --cc=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox