[CRIU] [PATCH 5/5] criu(8): describe --external option

Kir Kolyshkin kir at openvz.org
Wed Nov 2 10:59:12 PDT 2016


This adds the description of --external option for all the supported
cases, both for dump and restore.

References: https://criu.org/CLI/opt/--external

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Documentation/criu.txt | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 4550d37..2a50b43 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -147,6 +147,45 @@ In other words, do not use it unless really needed.
 *-s*, *--leave-stopped*::
     Leave tasks in stopped state after checkpoint, instead of killing.
 
+*--external* 'type'*[*'id'*]:*'value'::
+    Dump an instance of an external resource. The generic syntax is
+    'type' of resource, followed by resource 'id' (enclosed in literal
+    square brackets), and optional 'value' (prepended by a literal semicolon).
+    The following resource types are currently supported: *mnt*, *dev*,
+    *file*, *tty*, *unix*. Syntax depends on type.
+    Note to restore external resources, either *--external* or *--inherit-fd*
+    is used, depending on resource type.
+
+*--external mnt[*'mountpoint'*]:*'name'::
+    Dump an external bind mount referenced by 'mountpoint', saving it
+    to image under the identifier 'name'.
+
+*--external mnt[]:*'flags'::
+    Dump all external bind mounts, autodetecting those. Optional 'flags'
+    can contain *m* to also dump external master mounts, *s* to also
+    dump external shared mounts (default behavior is to abort dumping
+    if such mounts are found). If 'flags' are not provided, semicolon
+    is optional.
+
+*--external dev[*'major'*/*'minor'*]:*'name'::
+    Allow to dump a mount namespace having a real block device mounted.
+    A block device is identified by its 'major' and 'minor' numbers,
+    and *criu* saves its information to image under the identifier 'name'.
+
+*--external file[*'mnt_id'*:*'inode'*]*::
+    Dump an external file, i.e. an opened file that is can not be resolved
+    from the current mount namespace, which can not be dumped without using
+    this option. The file is identified by 'mnt_id' (a field obtained from
+    */proc/*'pid'*/fdinfo/*'N') and 'inode' (as returned by *stat*(2)).
+
+*--external tty[*'rdev'*:*'dev'*]*::
+    Dump an external TTY, identified by *st_rdev* and *st_dev* fields
+    returned by *stat*(2).
+
+*--external unix[*'id'*]*::
+    Tell *criu* that one end of a pair of UNIX sockets (created by
+    *socketpair*(2)) with 'id' is OK to be disconnected.
+
 *--freeze-cgroup*::
    Use cgroup freezer to collect processes.
 
@@ -304,6 +343,39 @@ usually need to be escaped from shell.
 *-r*, *--root* 'path'::
     Change the root filesystem to 'path' (when run in a mount namespace).
 
+*--external* 'type'*[*'id'*]:*'value'::
+    Restore an instance of an external resource. The generic syntax is
+    'type' of resource, followed by resource 'id' (enclosed in literal
+    square brackets), and optional 'value' (prepended by a literal semicolon).
+    The following resource types are currently supported: *mnt*, *dev*,
+    *veth*, *macvlan*. Syntax depends on type. Note to restore external
+    resources dealing with opened file descriptors (such as dumped with
+    the help of *--external* *file*, *tty*, and *unix* options), option
+    *--inherit-fd* should be used.
+
+*--external mnt[*'name'*]:*'mountpoint'::
+    Restore an external bind mount referenced in the image by 'name',
+    bind-mounting it from the host 'mountpoint' to a proper mount point.
+
+*--external mnt[]*::
+    Restore all external bind mounts (dumped with the help of
+    *--external mnt[]* auto-detection).
+
+*--external dev[*'name'*]:*'/dev/path'::
+    Restore an external mount device, identified in the image by 'name',
+    using the existing block device '/dev/path'.
+
+*--external veth[*'inner_dev'*]:*'outer_dev'*@*'bridge'::
+    Set the outer VETH device name (corresponding to 'inner_dev' being
+    restored) to 'outer_dev'. If optional *@*'bridge' is specified,
+    'outer_dev' is added to that bridge. If the option is not used,
+    'outer_dev' will be autogenerated by the kernel.
+
+*--external macvlan[*'inner_dev'*]:*'outer_dev'::
+    When restoring an image that have a MacVLAN device in it, this option
+    must be used to specify to which 'outer_dev' (an existing network device
+    in CRIU namespace) the restored 'inner_dev' should be bound to.
+
 *--manage-cgroups* ['mode']::
     Restore cgroups configuration associated with a task from the image.
     Controllers are always restored in an optimistic way -- if already present
-- 
2.7.4



More information about the CRIU mailing list