[lxc-devel] [PATCH] lxc-create: make 'none' bdev type work again
Serge Hallyn
serge.hallyn at ubuntu.com
Thu May 1 17:10:50 UTC 2014
Quoting Stéphane Graber (stgraber at ubuntu.com):
> On Thu, May 01, 2014 at 11:33:05AM -0500, Serge Hallyn wrote:
> > This should address https://github.com/lxc/lxc/issues/199
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
>
> Why fix none and also remove the reference from the manpage? Is there
> any reason not to keep it documented (should make it harder for us to
> drop my mistake again)?
I didn't drop it from the manpage. I updated the manpage reference
to reflect the new reality (it's a alias, no longer distinguished
from 'dir' at all).
>
> > ---
> > doc/lxc-create.sgml.in | 9 +++++----
> > src/lxc/lxc_create.c | 3 +++
> > 2 files changed, 8 insertions(+), 4 deletions(-)
> >
> > diff --git a/doc/lxc-create.sgml.in b/doc/lxc-create.sgml.in
> > index 2cb6bb5..9735460 100644
> > --- a/doc/lxc-create.sgml.in
> > +++ b/doc/lxc-create.sgml.in
> > @@ -126,13 +126,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > </term>
> > <listitem>
> > <para>
> > - 'backingstore' is one of 'none', 'dir', 'lvm', 'loop', 'btrfs', or 'best'. The
> > - default is 'none', meaning that the container root filesystem
> > + 'backingstore' is one of 'dir', 'lvm', 'loop', 'btrfs', or 'best'. The
> > + default is 'dir', meaning that the container root filesystem
> > will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
> > - 'dir' has the same meaning as 'none', but also allows the optional
> > + This backing store type allows the optional
> > <replaceable>--dir ROOTFS</replaceable> to be specified, meaning
> > that the container rootfs should be placed under the specified path,
> > - rather than the default. If 'btrfs' is specified, then the
> > + rather than the default. (The 'none' backingstore type is an alias for
> > + 'dir'.) If 'btrfs' is specified, then the
> > target filesystem must be btrfs, and the container rootfs will be
> > created as a new subvolume. This allows snapshotted clones to be
> > created, but also causes rsync --one-filesystem to treat it as a
> > diff --git a/src/lxc/lxc_create.c b/src/lxc/lxc_create.c
> > index 6b595f9..caca056 100644
> > --- a/src/lxc/lxc_create.c
> > +++ b/src/lxc/lxc_create.c
> > @@ -218,6 +218,9 @@ int main(int argc, char *argv[])
> > if (!validate_bdev_args(&my_args))
> > exit(1);
> >
> > + if (strcmp(my_args.bdevtype, "none") == 0)
> > + my_args.bdevtype = "dir";
> > +
> > if (geteuid()) {
> > if (mkdir_p(my_args.lxcpath[0], 0755)) {
> > exit(1);
> > --
> > 1.9.1
> >
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list