[Bug 1159464] Re: make persistent storage pathnames fully configurable
Ian Bruce
ian_bruce at fastmail.net
Mon Mar 25 13:01:45 UTC 2013
Perhaps I did not understand the full intent of the comment in the
original code, "FIXME: add a custom mounts configurable system".
It might be that what the author of that comment had in mind was
not just full configurability of the names and locations of the root
and user persistent filesystem images, but generalizing the code
to allow arbitrary filesystem mount points, and the possibility of
more than two of them.
For example, we could introduce a new boot option for persistent
filesystems:
persist=<fs-mount>:<fs-image>[, ...]
This would allow any number of persistent overlay filesystems, and
their mount points, to be specified. The current situation, with one
root and one user overlay filesystem, would be just one possible
case, specified like this:
persist=/:/casper-rw,/home:/home-rw
It appears that given the existing infrastructure for overlay filesystems,
this would be fairly easy to write, consisting of not much more than
the code to interpret and apply the boot option proposed above.
One obvious use for this functionality would be to have the persistent
data for different users contained in separate filesystems, to make it
possible to move them around independently of each other.
Is there any interest in pursuing this feature? If so, I would volunteer
to write code for it, although I would also want to consult with other
people who were familiar with the issues involved.
-- Ian Bruce
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/1159464
Title:
make persistent storage pathnames fully configurable
Status in “casper” package in Ubuntu:
New
Bug description:
I am working on a project which allows the installation of multiple Linux live ISO images
on a single USB flashdrive.
http://sourceforge.net/projects/multibootusb/
We would like to make use of the Ubuntu live ISO feature wherein persistent changes
to the live ISO filesystem may be saved on the same USB flashdrive, and restored across
reboots.
From inspection of the casper source code, it appears that persistent data may be stored
in two different filesystem images; one for system data, and the other for user data.
Since our project expects that several bootable distributions will coexist on the same
flashdrive, it would clearly be a bad thing if changes to one operating system affected
the others, and thus persistent system data ought NOT to be shared between them.
However, it would be quite inconvenient for users if files that they had saved while
running one distribution were not available from another, and therefore persistent
user data SHOULD be shared between the installed distributions.
Unfortunately, it appears that it is not currently possible to accomplish this outcome,
because the names of the persistent filesystem images are not configurable; they
must be "casper-rw" for the system data, and "home-rw" for the user data. The only
thing that may be configured is the directory within which these two filesystem images
reside. Thus either both filesystems, or neither, may be shared between different
distributions. It is not possible to have one shared and the other unshared.
The attached patch removes this limitation, by making the full pathnames of the two
persistent filesystem images independently configurable. It does this by introducing
two new initrd boot options: "persistent-root=" and "persistent-home=". These were
chosen in conformance with the existing boot option "persistent-path=", whose function
remains unchanged if neither of the new options is used (except that it is no longer
necessary to also specify the flag option "persistent" when it is present).
It is intended that the new options will specify the full pathnames of the persistent
filesystem images (or possibly only one of them), relative to the root directory of
some attached device, as does the "persistent-path=" option. If they are not used,
the code functions exactly as it did before, ensuring full backward compatibility with
other interacting software. There is some amount of overlap with the code for "snapshots",
which I did not entirely understand, but I took care that its function would be completely
unaffected.
I would point out that the current code contains this comment:
# FIXME: add a custom mounts configurable system
I believe that this is exactly what I have just done.
*******
I am aware that a new version of Ubuntu will be released soon, according to the standard
schedule. Because this patch is extremely small and self-contained, yet provides a significant
improvement in functionality, as described above, I would ask that it be considered for the
upcoming release. I should say that my description of multiple (Ubuntu-based) distributions
coexisting on the same flashdrive, and sharing the same set of persistent user data, is not
hypothetical. It is already working perfectly in our development version. We cannot yet
enable (unshared) persistent system data, for reasons already discussed, but this will also
be functional as soon as this patch is accepted into released ISO images.
Thanks for your consideration.
-- Ian Bruce
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1159464/+subscriptions
More information about the foundations-bugs
mailing list