All of lore.kernel.org
 help / color / mirror / Atom feed
* Making /var/lib persistent
@ 2007-04-16 22:02 Koen Kooi
  2007-04-16 22:13 ` Patrick Steiner
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Koen Kooi @ 2007-04-16 22:02 UTC (permalink / raw)
  To: openembedded-devel

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?

regards,

Koen

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Patrick Steiner @ 2007-04-16 22:13 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

On Tuesday, 17. April 2007 00:02:03 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?
i always use this:

mount -o bind /etc/bluetooth/pairing/ /var/lib/bluetooth/

 patrick (law)

>
> regards,
>
> Koen
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



-- 
Patrick Steiner | patrick.steiner@a1.net
ICQ: 128261350
WWW: http://helmsdeep.homelinux.net/~pat
 
working on (tux4u.skynet):
Fedora Core release 6 (Zod)
GNU/Linux 2.6.20-1.2944.fc6



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  3 siblings, 0 replies; 16+ messages in thread
From: Erik Hovland @ 2007-04-16 22:40 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

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.

Heh, Todd Blummer brought up this very issue on the familiar dev list.
Note we have done nothing about it either.

The FHS is clear that this directory is the place to save app state
info, so keeping that dir across boots and suspend/resume cycles is
handy.

E

-- 
Erik Hovland
mail: erik@hovland.org
web: http://hovland.org/
PGP/GPG public key available on request




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  3 siblings, 0 replies; 16+ messages in thread
From: cyril Romain @ 2007-04-16 22:43 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions; +Cc: openembedded-devel

Hi,

Koen Kooi wrote:
> 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?
>   
I suggest the use of symlinks in /var/lib that point to a let's say
/srv/ directory.
thoses links will be created at boot time, e.g.:
ln -s /srv/bitlbee/lib /var/lib/bitlbee

Best regards,

  cyril



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  2007-04-16 22:02 Making /var/lib persistent Koen Kooi
                   ` (2 preceding siblings ...)
  2007-04-16 22:43 ` cyril Romain
@ 2007-04-18  9:02 ` Jamie Lenehan
  2007-04-18 14:24   ` Koen Kooi
  2007-04-19 23:32   ` Matthias Hentges
  3 siblings, 2 replies; 16+ messages in thread
From: Jamie Lenehan @ 2007-04-18  9:02 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

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>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  2007-04-18  9:02 ` Jamie Lenehan
@ 2007-04-18 14:24   ` Koen Kooi
  2007-04-19  1:49     ` Jamie Lenehan
  2007-04-19 23:32   ` Matthias Hentges
  1 sibling, 1 reply; 16+ messages in thread
From: Koen Kooi @ 2007-04-18 14:24 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

-----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-----



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  2007-04-18 14:24   ` Koen Kooi
@ 2007-04-19  1:49     ` Jamie Lenehan
  2007-04-19 17:37       ` Justin Patrin
                         ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Jamie Lenehan @ 2007-04-19  1:49 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
[...]
> Sound like a good idea, do you have a patch for this?

Try this out:

  http://twibble.org/dist/oe/var-volatiles-1.patch

I've tested it locally both with and without tmpfs mounted on
/var/volatile and all seems to work as expected.

I modified the base-files recipe to create the /var/volatile
directory and the various subdirectories in it and to create symlinks
from /var for those directories. This means that even if your not
using tmpfs these will still point into the volatile directory. It
was rather difficult to make it wotk without doing this.

So on the target I end up with this:

  root@titan:/$ find /var -exec ls -ld {} \;
  drwxr-xr-x    7 root     root          288 Apr 19  2007 /var
  drwxr-xr-x    4 root     root           96 Apr 19  2007 /var/lib
  drwxr-xr-x    2 root     root          168 Apr 19  2007 /var/lib/ipkg
  -rw-r--r--    1 root     root       196192 Apr 19  2007 /var/lib/ipkg/nynaeve-titan
  -rw-r--r--    1 root     root        14408 Apr 19  2007 /var/lib/ipkg/nynaeve-all
  -rw-r--r--    1 root     root      2670761 Apr 19  2007 /var/lib/ipkg/nynaeve-sh4
  drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/lib/misc
  lrwxrwxrwx    1 root     root           12 Apr 19  2007 /var/log -> volatile/log
  lrwxrwxrwx    1 root     root           12 Apr 19  2007 /var/run -> volatile/run
  lrwxrwxrwx    1 root     root           17 Apr 19  2007 /var/tmp -> volatile/tmp
  lrwxrwxrwx    1 root     root           13 Apr 19  2007 /var/lock -> volatile/lock
  lrwxrwxrwx    1 root     root           14 Apr 19  2007 /var/cache -> volatile/cache
  drwxr-sr-x    2 root     root           48 Apr 19  2007 /var/local
  drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/spool
  drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/backups
  drwxr-xr-x    7 root     root          140 Jan  1 00:32 /var/volatile
  drwxrwxrwt    2 root     root           40 Jan  1 00:32 /var/volatile/tmp
  drwxr-xr-x    2 root     root           60 Jan  1 00:32 /var/volatile/run
  -rw-rw-r--    1 root     root            0 Jan  1 00:33 /var/volatile/run/utmp
  drwxr-xr-x    2 root     root           60 Jan  1 00:32 /var/volatile/log
  -rw-rw-r--    1 root     root            0 Jan  1 00:33 /var/volatile/log/wtmp
  drwxrwxrwt    3 root     root           60 Jan  1 00:32 /var/volatile/lock
  drwxr-xr-x    2 root     root           40 Jan  1 00:32 /var/volatile/lock/subsys
  drwxr-xr-x    2 root     root           40 Jan  1 00:32 /var/volatile/cache
  root@titan:/$ mount | grep var
  tmpfs on /var/volatile type tmpfs (rw)
  root@titan:/$ 

-- 
 Jamie Lenehan <lenehan@twibble.org>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  2 siblings, 0 replies; 16+ messages in thread
From: Justin Patrin @ 2007-04-19 17:37 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

On 4/18/07, Jamie Lenehan <lenehan@twibble.org> wrote:
> On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
> [...]
> > Sound like a good idea, do you have a patch for this?
>
> Try this out:
>
>   http://twibble.org/dist/oe/var-volatiles-1.patch
>

I suggest attaching this patch to a bug in the bug tracker
(bugs.openembedded.org).

> I've tested it locally both with and without tmpfs mounted on
> /var/volatile and all seems to work as expected.
>
> I modified the base-files recipe to create the /var/volatile
> directory and the various subdirectories in it and to create symlinks
> from /var for those directories. This means that even if your not
> using tmpfs these will still point into the volatile directory. It
> was rather difficult to make it wotk without doing this.
>
> So on the target I end up with this:
>
>   root@titan:/$ find /var -exec ls -ld {} \;
>   drwxr-xr-x    7 root     root          288 Apr 19  2007 /var
>   drwxr-xr-x    4 root     root           96 Apr 19  2007 /var/lib
>   drwxr-xr-x    2 root     root          168 Apr 19  2007 /var/lib/ipkg
>   -rw-r--r--    1 root     root       196192 Apr 19  2007 /var/lib/ipkg/nynaeve-titan
>   -rw-r--r--    1 root     root        14408 Apr 19  2007 /var/lib/ipkg/nynaeve-all
>   -rw-r--r--    1 root     root      2670761 Apr 19  2007 /var/lib/ipkg/nynaeve-sh4
>   drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/lib/misc
>   lrwxrwxrwx    1 root     root           12 Apr 19  2007 /var/log -> volatile/log
>   lrwxrwxrwx    1 root     root           12 Apr 19  2007 /var/run -> volatile/run
>   lrwxrwxrwx    1 root     root           17 Apr 19  2007 /var/tmp -> volatile/tmp
>   lrwxrwxrwx    1 root     root           13 Apr 19  2007 /var/lock -> volatile/lock
>   lrwxrwxrwx    1 root     root           14 Apr 19  2007 /var/cache -> volatile/cache
>   drwxr-sr-x    2 root     root           48 Apr 19  2007 /var/local
>   drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/spool
>   drwxr-xr-x    2 root     root           48 Apr 19  2007 /var/backups
>   drwxr-xr-x    7 root     root          140 Jan  1 00:32 /var/volatile
>   drwxrwxrwt    2 root     root           40 Jan  1 00:32 /var/volatile/tmp
>   drwxr-xr-x    2 root     root           60 Jan  1 00:32 /var/volatile/run
>   -rw-rw-r--    1 root     root            0 Jan  1 00:33 /var/volatile/run/utmp
>   drwxr-xr-x    2 root     root           60 Jan  1 00:32 /var/volatile/log
>   -rw-rw-r--    1 root     root            0 Jan  1 00:33 /var/volatile/log/wtmp
>   drwxrwxrwt    3 root     root           60 Jan  1 00:32 /var/volatile/lock
>   drwxr-xr-x    2 root     root           40 Jan  1 00:32 /var/volatile/lock/subsys
>   drwxr-xr-x    2 root     root           40 Jan  1 00:32 /var/volatile/cache
>   root@titan:/$ mount | grep var
>   tmpfs on /var/volatile type tmpfs (rw)
>   root@titan:/$
>
> --
>  Jamie Lenehan <lenehan@twibble.org>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>


-- 
Justin Patrin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  2007-04-18  9:02 ` Jamie Lenehan
  2007-04-18 14:24   ` Koen Kooi
@ 2007-04-19 23:32   ` Matthias Hentges
  1 sibling, 0 replies; 16+ messages in thread
From: Matthias Hentges @ 2007-04-19 23:32 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

Am Mittwoch, den 18.04.2007, 19:02 +1000 schrieb Jamie Lenehan:
> 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
> 

Sounds fine to me.

-- 
Matthias 'CoreDump' Hentges 
Cologne / Germany

Webmaster of Hentges.net & Embedded Linux Developer
GPG ->  gpg --keyserver gpg-keyserver.de --recv-keys 0xAF3030D9

My OS: Debian SID: Geek by Nature, Linux by Choice



[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  2 siblings, 0 replies; 16+ messages in thread
From: Paul Sokolovsky @ 2007-04-23 11:53 UTC (permalink / raw)
  To: Jamie Lenehan; +Cc: openembedded-devel

Hello Jamie,

Thursday, April 19, 2007, 4:49:50 AM, you wrote:

> On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
> [...]
>> Sound like a good idea, do you have a patch for this?

> Try this out:

>   http://twibble.org/dist/oe/var-volatiles-1.patch

> I've tested it locally both with and without tmpfs mounted on
> /var/volatile and all seems to work as expected.

        I tried this with Angstrom builds, seems to work OK either.

> I modified the base-files recipe to create the /var/volatile

        The only concern is all this override files patchery. I wish
we had for fstab the same machinery as for autoconf site files -
ability to merge standard template with per-machine overrides. But
well, lack of such shouldn't be cause of delay with this patch, hope
to see it soon in mainline!

[]


-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
                           ` (2 more replies)
  2 siblings, 3 replies; 16+ messages in thread
From: Paul Sokolovsky @ 2007-05-10 15:00 UTC (permalink / raw)
  To: Jamie Lenehan; +Cc: openembedded-devel

Hello Jamie,

Thursday, April 19, 2007, 4:49:50 AM, you wrote:

> On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
> [...]
>> Sound like a good idea, do you have a patch for this?

> Try this out:

>   http://twibble.org/dist/oe/var-volatiles-1.patch

> I've tested it locally both with and without tmpfs mounted on
> /var/volatile and all seems to work as expected.

        Any news on this? I've been running with this patch soon since
its original post and don't see any issues. One small nuisance is that
ls -l /var/log doesn't show what you want, but hardly something can be
done about that, plus shell completion uses /var/log/ immediately.

        I suggest committing this patch.

[]

-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  2 siblings, 0 replies; 16+ messages in thread
From: Koen Kooi @ 2007-05-10 19:23 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:
> Hello Jamie,
> 
> Thursday, April 19, 2007, 4:49:50 AM, you wrote:
> 
>> On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
>> [...]
>>> Sound like a good idea, do you have a patch for this?
> 
>> Try this out:
> 
>>   http://twibble.org/dist/oe/var-volatiles-1.patch
> 
>> I've tested it locally both with and without tmpfs mounted on
>> /var/volatile and all seems to work as expected.
> 
>         Any news on this? I've been running with this patch soon since
> its original post and don't see any issues. One small nuisance is that
> ls -l /var/log doesn't show what you want, but hardly something can be
> done about that, plus shell completion uses /var/log/ immediately.
> 
>         I suggest committing this patch.

same here.

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGQ3EyMkyGM64RGpERAoBNAJ4uabEzcebJd5+x/dtQAKTfYMI8oQCgrza3
buax9m6pqJ+/DZfchJcjlvA=
=hzmX
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  2 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2007-05-10 23:06 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 2007-05-10 at 18:00 +0300, Paul Sokolovsky wrote:
> Hello Jamie,
> 
> Thursday, April 19, 2007, 4:49:50 AM, you wrote:
> 
> > On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
> > [...]
> >> Sound like a good idea, do you have a patch for this?
> 
> > Try this out:
> 
> >   http://twibble.org/dist/oe/var-volatiles-1.patch
> 
> > I've tested it locally both with and without tmpfs mounted on
> > /var/volatile and all seems to work as expected.
> 
>         Any news on this? I've been running with this patch soon since
> its original post and don't see any issues. One small nuisance is that
> ls -l /var/log doesn't show what you want, but hardly something can be
> done about that, plus shell completion uses /var/log/ immediately.
> 
>         I suggest committing this patch.

The idea sounded sane to me when I read about it so if its working, I
say go for it...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  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
  2 siblings, 1 reply; 16+ messages in thread
From: Koen Kooi @ 2007-05-14 12:06 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:
> Hello Jamie,
> 
> Thursday, April 19, 2007, 4:49:50 AM, you wrote:
> 
>> On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
>> [...]
>>> Sound like a good idea, do you have a patch for this?
> 
>> Try this out:
> 
>>   http://twibble.org/dist/oe/var-volatiles-1.patch
> 
>> I've tested it locally both with and without tmpfs mounted on
>> /var/volatile and all seems to work as expected.
> 
>         Any news on this? I've been running with this patch soon since
> its original post and don't see any issues. One small nuisance is that
> ls -l /var/log doesn't show what you want, but hardly something can be
> done about that, plus shell completion uses /var/log/ immediately.
> 
>         I suggest committing this patch.

After I have fixed up the rejects I'll commit and push it.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGSFDDMkyGM64RGpERArsZAJ0aPIXjYQW8TcJ4qd5z01RWFbSAUACfWBU0
zg9Qmq0tPnSryt6WDAOki3o=
=DO2J
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
  2007-05-14 12:06         ` Koen Kooi
@ 2007-05-14 12:21           ` Koen Kooi
  0 siblings, 0 replies; 16+ messages in thread
From: Koen Kooi @ 2007-05-14 12:21 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Koen Kooi schreef:

>>>   http://twibble.org/dist/oe/var-volatiles-1.patch

> After I have fixed up the rejects I'll commit and push it.

Ok, it's in, please report any errors/bugs/features

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGSFQ6MkyGM64RGpERAnezAKCfPi397VPH5q72q+wxpLKl9wFtMQCfdHQg
kozdbu7EzNnNWf5zgwr4oBw=
=qZ8t
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Making /var/lib persistent
@ 2007-05-14 17:15 [cc]smart
  0 siblings, 0 replies; 16+ messages in thread
From: [cc]smart @ 2007-05-14 17:15 UTC (permalink / raw)
  To: openembedded-devel

Hi list.

i must admit i am a bit late on the discussion but nonetheless... i
noticed the change on the tree and i would like to comment volatiles use
and the patch:

http://www.openembedded.org/viewmtn/revision.psp?id=d8f8ffd537ebb6baa3cabe50d3f8267cdd28f3b7

The discussion on the list was accompanied by:

>        The only concern is all this override files patchery. I wish 
>we had for fstab the same machinery as for autoconf site files - 
>ability to merge standard template with per-machine overrides. But 
>well, lack of such shouldn't be cause of delay with this patch, hope 
>to see it soon in mainline! 
> 
>Best regards, 
> Paul                            mailto:pmiscml at gmail.com


I would like to take you back a few years into history of volatiles,
because originally, it was invented primarily to assist in modular
configuration.

I'd like to start with the explanation given in the main volatiles
config file:


# This configuration file lists filesystem objects that should get
verified 
# during startup and be created if missing. 
# 
# Every line must either be a comment starting with # 
# or a definition of format: 
# <type> <owner> <group> <mode> <path> <linksource> 
# where the items are separated by whitespace ! 
# 
# <type> : d|f|l : (d)irectory|(f)ile|(l)ink 
# 
# A linking example: 
# l root root 0777 /var/test /tmp/testfile 
# f root root 0644 /var/test none 
# 
# Understanding links: 
# When populate-volatile is to verify/create a directory or file, it
will first 
# check it's existence. If a link is found to exist in the place of the
target, 
# the path of the target is replaced with the target the link points
to. 
# Thus, if a link is in the place to be verified, the object will be
created 
# in the place the link points to instead. 
# This explains the order of "link before object" as in the example
above, where 
# a link will be created at /var/test pointing to /tmp/testfile and due
to this 
# link the file defined as /var/test will actually be created
as /tmp/testfile.


FWIW, i think it has never been observed to create links before the
actual object. Why was it done like that despite it seems
counterintuitive.

Because it is part of the modulartity.

This main file should contain only basic, and only "real object"
descriptions. That is what it was at the beginning. All the redirection
into tmpfs space is NOT meant to be done in this file.

Basically it should roughly be kept like this (mind you, specifying
"none" in the end was not needed originally):

d root root 0755 /var/cache none 
d root root 1777 /var/lock none 
d root root 0755 /var/log none 
d root root 0755 /var/run none 
d root root 1777 /var/tmp none 
d root root 0755 /var/lock/subsys none 
f root root 0664 /var/log/wtmp none 
f root root 0664 /var/run/utmp none

In fstab, there should neither be tmpf on /var nor on /var/volatile but
for example under /media/ram only.

Now let your mind go back to the rule "link before object".

The default is a physical world. Volatiles would set up your directories
as described in it's configuration "ohysically".

If you create a distro for a device on flash, you would deliver your
image with links in var pointing to /media/ram. For example there would
be a link "/var/run" pointing to "/media/ram/run".

Automagically, volatiles would use the line

d root root 0755 /var/run none

to create a directory in "/media/ram". No need for changing the
volatiles base configuration (i hope that no change in volatiles as
broken this, otherwise IMHO it should be fixed to behave like that
again).

Subsequently turnup would only have to remove links in "/var" to get
that distro going on HD.

The second idea in the original design of volatiles is to have a tool
that allows adding and removing directory requirements per package. So a
package can drop in a specification in volatiles config directory. these
are numbered like runlevels.

This allows to have separate specification files. One defines the real
objects, like the base files does, and it's seq. number should be n+1 .

Additionally you may have a redirection config (possibly per distro)
with seq. number n which may redirect to volatile space, like
"/media/ram" .

Basically in thinking you always start physical and then deviate to
volatile.

All in all i would recommend to:

- revert volatiles main config to physical objects only 
- remove all /var based tmpfs's from /etc/fstab and make it more or less
a static thing. 
- get distros pre provide main redirection links in "/var" where needed.

Greetings, 
[cc]smart





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-05-14 17:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.