[systemd-devel] nspawn --ephemeral
Johannes Ernst
johannes.ernst at gmail.com
Tue Jun 16 16:14:20 PDT 2015
Aha! Works in 220. (It’s still in testing in Arch, so I had been on 219)
I’m still unclear why there’s an (empty) /var/lib/machines in the container.
> On Jun 16, 2015, at 15:22, Lennart Poettering <lennart at poettering.net> wrote:
>
> On Tue, 16.06.15 14:53, Johannes Ernst (johannes.ernst at gmail.com <mailto:johannes.ernst at gmail.com>) wrote:
>
>> I have a root filesystem directory in foo/
>>
>> I boot with nspawn, and immediately, in the container:
>> systemctl poweroff
>>
>> This works fine if invoked as:
>> sudo systemd-nspawn --directory foo --boot -n
>>
>> But if I add --ephemeral (and it is a btrfs filesystem)
>> sudo systemd-nspawn --directory foo --boot -n --ephemeral
>> I get:
>> Sending SIGTERM to remaining processes...
>> Sending SIGKILL to remaining processes...
>> Powering off.
>> Container ... has been shut down.
>> Cannot remove subvolume '/home/.../.#foo...', ignoring: Directory not empty
>>
>> btrfs subvolume list reports two new subvolumes:
>> …/.#foo...
>> …/.#foo.../var/lib/machines
>>
>> Indeed I cannot remove subvol …/.#foo… unless I first remove subvol …/.#foo.../var/lib/machines
>>
>> Further, foo/ does not actually contain /var/lib/machines
>> but in the booted container, it actually lists two subvolumes with that path:
>> # btrfs subvolume list /
>> ID 351 gen 250192 top level 5 path var/lib/machines
>> ID 371 gen 256382 top level 5 path home/…/.#foo
>> ID 372 gen 256382 top level 371 path var/lib/machines
>> On the host, we have the same, but the second one has the prefix i.e. home/…/.#foo/var/lib/machines
>>
>> Hmm …?
>
> Do you use systemd v220? only in v220 we support recursively removing
> subvolumes, and there's a tmpfiles snippet that creates
> /var/lib/machines as subvolume.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150616/8e2a4f54/attachment-0001.html>
More information about the systemd-devel
mailing list