[systemd-devel] systemd-nspawn trouble

Lennart Poettering lennart at poettering.net
Wed Apr 22 07:07:22 PDT 2015


On Wed, 22.04.15 15:19, Tobias Hunger (tobias.hunger at gmail.com) wrote:

> On Wed, Apr 22, 2015 at 3:12 PM, Tobias Hunger <tobias.hunger at gmail.com> wrote:
> > Hi Lennart,
> >
> > On Wed, Apr 22, 2015 at 1:46 PM, Lennart Poettering
> > <lennart at poettering.net> wrote:
> >>> I was trying to run "systemd-nspawn --ephemeral", but that failed
> >>> since I had a read-only image in /var/lib/machines. Why is that not
> >>> allowed? systemd-nspawn does create its own snapshot of that one after
> >>> all (which can be read-write). Why does the base image have to be
> >>> read-write, too?
> >>
> >> Hmm? This shouldn't fail. What's the precise error message you get?
> >
> > It complains about a read-only filesystem when trying to bind-mount
> > some directories into the machine.
> 
> Sorry, I forgot to attach the exact error message:
> 
> Apr 22 15:13:18 server systemd-nspawn[1804]: Failed to create mount
> point /var/lib/machines/.#vmbdd461661453a1b8/mnt/ftp: Read-only file
> system
> 
> Looking at the code I do not see why that subvolume should be
> read-only. Maybe it inherits the read-only from the one it is a
> snapshot off?

So, this is not inherited. 

THere are some trouble with setting the read only flag correctly when
we do recursive snapshots, I am working on fixing that now. That only
is triggered when --read-only and --ephemeral are combined though.

The error you run into confuses me a bit I must say. What's the
precise command line you trigger this with?

Does /mnt/tmp exist? Is /mnt a mount or so, and /mnt/tmp another?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list