Bug 88645 - MSG: nspawn: improve error text if --template= is used with non-btrfs file system
Summary: MSG: nspawn: improve error text if --template= is used with non-btrfs file sy...
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 00:10 UTC by Elias Probst
Modified: 2016-11-24 01:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Elias Probst 2015-01-21 00:10:08 UTC
Kernel: 3.18.2 with btrfs builtin
systemd git 72521ab

rootfs of "host": ext4

Running
systemd-nspawn -b -D /media/test-intra --template=/media/centos7-base

fails with:
Couldn't create snapshot /media/test-intra from /media/centos7-base: Inappropriate ioctl for device

This looks to me like systemd-nspawn doesn't verify whether the FS providing -D is btrfs or not and just blindly tries to create a btrfs snapshot on top of it.


IMHO this needs at least to be handled a bit more graceful - letting the user know what's the problem.

Besides that, if there's no sane way to create a btrfs snapshot (e.g. using an image file) on top of another filesystem, this should be made clear in the systemd-nspawn manpage.
Comment 1 Lennart Poettering 2015-02-04 13:54:45 UTC
I am pretty sure we should issue the ioctl always, regardless what the backing fs is. Maybe one day the ioctls for snapshotting become generically used...

We can certainly improve the log message though, and tell the use that he needs btrfs as source if we encounter ENOTTY here...
Comment 2 Lennart Poettering 2016-11-24 01:06:32 UTC
nspawn in current git now supports --template= on non-btrfs file systems, hence this bug is probably obsolete. Closing.


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.