mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
Added AUFS support.
The AUFS support code handles the "bad" information that we get from the kernel in /proc/<pid>/map_files and /proc/<pid>/mountinfo files. For details see comments in sysfs_parse.c. The main motivation for this work was dumping and restoring Docker containers which by default use the AUFS graph driver. For dump, --aufs-root <container_root> should be added to the command line options. For restore, there is no need for AUFS-specific command line options but the container's AUFS filesystem should already be set up before calling criu restore. [ xemul: With AUFS files sometimes, in particular -- in case of a mapping of an executable file (likekely the one created at elf load), in the /proc/pid/map_files/xxx link target we see not the path by which the file is seen in AUFS, but the path by which AUFS accesses this file from one of its "branches". In order to fix the path we get the info about branches from sysfs and when we meet such a file, we cut the branch part of the path. ] Signed-off-by: Saied Kazemi <saied@google.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
1514284d84
commit
d8b41b6525
@@ -172,6 +172,7 @@ int main(int argc, char *argv[])
|
||||
{ "exec-cmd", no_argument, 0, 59},
|
||||
{ "manage-cgroups", no_argument, 0, 60},
|
||||
{ "cgroup-root", required_argument, 0, 61},
|
||||
{ "aufs-root", required_argument, 0, 62},
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -397,6 +398,9 @@ int main(int argc, char *argv[])
|
||||
case 'h':
|
||||
usage_error = false;
|
||||
goto usage;
|
||||
case 62:
|
||||
opts.aufs_root = optarg;
|
||||
break;
|
||||
default:
|
||||
goto usage;
|
||||
}
|
||||
@@ -549,6 +553,9 @@ usage:
|
||||
" --exec-cmd execute the command specified after '--' on successful\n"
|
||||
" restore making it the parent of the restored process\n"
|
||||
"\n"
|
||||
"* AUFS support (applicable to dump only):\n"
|
||||
" --aufs-root root pathname of the AUFS filesystem\n"
|
||||
"\n"
|
||||
"* Special resources support:\n"
|
||||
" -x|--" USK_EXT_PARAM " allow external unix connections\n"
|
||||
" --" SK_EST_PARAM " checkpoint/restore established TCP connections\n"
|
||||
|
Reference in New Issue
Block a user