Jeremy Katz wrote:
On Wed, 2008-06-04 at 19:12 +0100, Pedro Silva wrote:
> So, how does the persistance work:
>
> - Persistance is created with livecd-iso-to-disk, if I run it again
> without the overlay flag, previous persistance overlay is deleted?
Yes. Also, the overlay is specific to the *exact* filesystem image that
it is created for.
... and for the gory details. The way that persistence is implemented
is that the persistence file is used as the backing store for the device
mapper snapshot that we build on top of the "base" filesystem image.
This means that it contains just changed blocks from the base image and
that changes continue to build up over time, never reusing blocks from
the snapshot.
This is not actually true. It's not that it never reuses blocks from
teh snapshot, it's that it doesn't try to.
If say you have a 256MB overlay, half used, and half of that wasted
(e.g. you copy two 128MB files to /home, then delete one of them). Then
currently there will be about 2G of free blocks on 4G of rootfs, and
128MB of those currently in a wasted state on the overlay. Assuming
ext3 is roughly random in its choice of free block to use, that means
that each new block written has about a 1/16 chance of actually
reclaiming overlay space, instead of using more space. Theoretically if
you have a 4G overlay, you'll never run out of space, though at some
point you'll run into the issues of why you didn't just install fedora
to a 4G partition on that device to start with.
-dmc