From: Serge Hallyn Date: Fri, 8 Feb 2013 22:58:01 +0000 (-0600) Subject: Add man page for lxc-clone X-Git-Tag: lxc-0.9.0.alpha3~1^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11cddd70eb8c285287b73562ba4208d74e1b9fde;p=thirdparty%2Flxc.git Add man page for lxc-clone And doing so pointed out a bug in lxc-clone itself - it claims default fssize is 2G. It's not. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/configure.ac b/configure.ac index 8963e3dc7..6402024fb 100644 --- a/configure.ac +++ b/configure.ac @@ -302,6 +302,7 @@ AC_CONFIG_FILES([ config/Makefile doc/Makefile + doc/lxc-clone.sgml doc/lxc-create.sgml doc/lxc-destroy.sgml doc/lxc-execute.sgml diff --git a/doc/Makefile.am b/doc/Makefile.am index e5392546e..e54a08782 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,6 +7,7 @@ EXTRA_DIST = \ if ENABLE_DOCBOOK man_MANS = \ + lxc-clone.1 \ lxc-create.1 \ lxc-destroy.1 \ lxc-execute.1 \ diff --git a/doc/lxc-clone.sgml.in b/doc/lxc-clone.sgml.in new file mode 100644 index 000000000..e3eb94603 --- /dev/null +++ b/doc/lxc-clone.sgml.in @@ -0,0 +1,194 @@ + + + + +]> + + + + @LXC_GENERATE_DATE@ + + + lxc-clone + 1 + + + + lxc-clone + + + clone a new container from an existing one. + + + + + + lxc-clone + -o orig + -n new + -s + -L fssize + -v vgname + -p lxc_lv_prefix + -t fstype + + + + + Description + + + lxc-clone Creates a new container as a copy of an existing + container. When the original container's rootfs is an LVM block device or + is on a btrfs filesystem, then a snapshotted clone can be created, taking up + very little initial disk space. + + + + + + + Options + + + + + + + + + + The name of the original container to clone. + + + + + + + + + + + The name of the new container to create. + + + + + + + + + + + The new container's rootfs should be a LVM or btrfs snapshot of the original. + + + + + + + + + + + In the case of a LVM-backed container, a size for the new + block device. By default, the new device will be made the + same size as the original. + + + + + + + + + + + For an LVM-backed container, the volume group name to use. By + default it is 'lxc'. + + + + + + + + + + + For an LVM-backed container, a string to prefix to the container name to + form the logical volume name. For instance, specifying + -n c1 -p lxc_ will cause the container rootfs to + be on a logical volume called lxc_c1. + + + + + + + + + + + For a non-snapshot LVM clone, the file system to use for the new + container. Note this option is ignored when requesting a + snapshotted container. + + + + + + + + + &seealso; + + + Author + Serge Hallyn serge.hallyn@ubuntu.com + + + + + diff --git a/src/lxc/lxc-clone.in b/src/lxc/lxc-clone.in index fcf34a921..291db30fd 100755 --- a/src/lxc/lxc-clone.in +++ b/src/lxc/lxc-clone.in @@ -37,7 +37,7 @@ help() { echo " -o ORIG_NAME specify the name of the original container" >&2 echo " -n NEW_NAME specify the name of the new container" >&2 echo " -s make the new rootfs a snapshot of the original" >&2 - echo " -L FS_SIZE specify the new filesystem size (default: 2G)" >&2 + echo " -L FS_SIZE specify the new filesystem size (default: same as original)" >&2 echo " -v VG_NAME specify the new LVM volume group name (default: lxc)" >&2 echo " -p LV_PREFIX add a prefix to new LVM logical volume names" >&2 echo " -t FS_TYPE specify the new filesystem type (default: ext3;" >&2 @@ -56,7 +56,6 @@ optarg_check() { . @DATADIR@/lxc/lxc.functions snapshot=no -lxc_defsize=2G lxc_size=_unset lxc_vg=lxc lxc_lv_prefix=""