Bug 89975 - RFE: nspawn: --template should support overlayfs too
Summary: RFE: nspawn: --template should support overlayfs too
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-10 16:18 UTC by Damjan Georgievski
Modified: 2019-08-19 10:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damjan Georgievski 2015-04-10 16:18:46 UTC
The --template option in systemd-nspawn will take a filesystem, make a btrfs snapshot of it, and run the container in the snapshot, then destroy the snapshot when it's over.

The same functionality could be implemented with overlay(fs) in kernels newer or equal than 3.18, for systems not running on btrfs. The base filesystem would be the read-only lower layer of the overlay, and the write layer can be in a tmpfs or anywhere else on the real filesystem.


Additionally, the overlay(fs) now also supports more than one read-only layer.

Also food for thought, it might be an interesting option to have the write layer persistent - but that would diverge from the btrfs usage.
Comment 1 Damjan Georgievski 2015-05-22 11:00:23 UTC
I guess this is fixed in systemd 220 and the new --overlay= and --overlay-ro= options:

http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--overlay=
Comment 2 Lennart Poettering 2015-05-22 11:04:27 UTC
(In reply to Damjan Georgievski from comment #1)
> I guess this is fixed in systemd 220 and the new --overlay= and
> --overlay-ro= options:
> 
> http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--
> overlay=

Not really. We don't support this in --template=.
Comment 3 Lennart Poettering 2019-08-19 10:11:27 UTC
There's now --volatile=overlayfs since 242. Let's close this. If there's anything else missing in this, please file an RFE issue on the github instance instead.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.