[systemd-devel] what does --ephemeral really do on btrfs?

Lennart Poettering lennart at poettering.net
Fri Jul 3 01:00:13 PDT 2015


On Wed, 01.07.15 22:22, Johannes Ernst (johannes.ernst at gmail.com) wrote:

> If I run systemd-nspawn with —ephemeral, it creates a new temporary
> btrfs subvolume, the documentation says.

Correct.

> Mine takes an awful long time — blocking IO on the device in the
> awful long meantime — and I’m puzzled why. Does it perhaps copy
> (deep? references only?) the entire drive?

If the path you specifiy is not a btrfs subvolume itself then the code
falls back to doing a deep copy into into a new btrfs subvolume.

> Should I put the original directory on a separate subvolume, or how
> can I speed this up? If I just copied the image / directory, this
> might be faster.

Yes, if the source is a subvolume of its own the code can take a
snapshot efficiently. If it is just a normal subdir, then it has to
copy.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list