[CRIU] File size is not same on restore
Tycho Andersen
tycho.andersen at canonical.com
Tue Nov 10 07:11:15 PST 2015
On Tue, Nov 10, 2015 at 04:54:10PM +0300, Pavel Emelyanov wrote:
> On 11/10/2015 04:07 PM, 上司陽平 wrote:
>
> > I didn't declare --root option. When I set this option container's rootfs
> > [/var/lib/lxc/u1/rootfs], I faced the following error.
> >
> > Path `/var/lib/lxc/u1/rootfs' resolved to `./' mountpoint
> > Error (mount.c:2727): New root and old root are the same
The root needs to be a mount point (and should probably also be
mounted either MS_SLAVE or MS_PRIVATE). See do_restore in
/src/lxc/criu.c in the LXC tree for how lxc does it.
> > Would you please tell me how to decide a correct path?
> >
> >
> >
> > I show the dump and restore options.
> >
> > criu dump --skip-mnt /sys/kernel/debug/tracing -o dump.log
> > --tcp-established --file-locks --link-remap --force-irmap
> > --manage-cgroups -D ~/checkpoint --ext-mount-map auto
> > --enable-external-sharing --enable-external-masters
> > --enable-fs hugetlbfs -v4
> >
> > criu restore -o restore.log
> > --tcp-established --file-locks --link-remap --force-irmap
> > --manage-cgroups -D ~/checkpoint --ext-mount-map auto
> > --enable-external-sharing --enable-external-masters
> > --enable-fs hugetlbfs -v4
> > --restore-detached --restore-sibling
>
> The --root one is missing on restore. Not sure how to properly
> configure one for LXC containers, maybe Tycho would advise.
>
> But why don't you use the native lxc-checkpoint? It will put proper
> options and call CRIU for you.
Indeed, without help from LXC you can't re-integrate the container
into the LXC tools. Is there something lxc-checkpoint isn't doing for
you?
Tycho
More information about the CRIU
mailing list