[CRIU] CRIU Docker Restore with Error: Bad File Size

Saied Kazemi saied at google.com
Fri Aug 7 07:17:45 PDT 2015


No problem, I am glad it worked for you.  You can use VFS, AUFS, and
OverlayFS.

--Saied


On Fri, Aug 7, 2015 at 12:54 AM, Z F <full015zf at yahoo.com> wrote:

> Hi,
>
> Yes, I was using devicemapper.  Then I turned to VFS and migration in host
> and between hosts both succeeded.
>
> Thank you very much and sorry for my ignorance.
>
> Best Regards
> Zhang Fan
>
> ------------------------------
> *From:* Saied Kazemi <saied at google.com>
> *To:* Z F <full015zf at yahoo.com>
> *Cc:* "criu at openvz.org" <criu at openvz.org>; Pavel Emelyanov <
> xemul at parallels.com>
> *Sent:* Thursday, August 6, 2015 9:30 PM
>
> *Subject:* Re: [CRIU] CRIU Docker Restore with Error: Bad File Size
>
>
>
> On Thu, Aug 6, 2015 at 1:01 AM, Z F <full015zf at yahoo.com> wrote:
>
> Hi,
>
> When no --root specified, the root of container would be mounted to host's
> /. I can tail host's /foo when the bad size error workaround. And that's
> the cause of bad file size.
>
> When docker_cr.sh used, as log attached in last mail, the container's root
> would be in /var/lib/docker/devicemapper/mnt/container-id. The directory
> was cleared by docker when dump succeeded and no /proc could be found in
> restore.
>
>
> Hmm.  Are you using the Device Mapper as your storage driver?  C/R
> currently only works with VFS, AUFS, and OverlayFS.  Device Mapper is not
> supported.
>
>
>
> Then, what's should I put as --root?  Thank you.
>
>
> If you use docker_cr.sh and turn on verbose mode (i.e., -v), it will print
> the criu command line that it invokes and you'll see the --root argument.
>
> --Saied
>
>
>
>
> Best Regards
>
> ------------------------------
> *From:* Saied Kazemi <saied at google.com>
> *To:* full015zf at yahoo.com
> *Cc:* "criu at openvz.org" <criu at openvz.org>; Pavel Emelyanov <
> xemul at parallels.com>
> *Sent:* Thursday, August 6, 2015 1:14 AM
> *Subject:* Re: [CRIU] CRIU Docker Restore with Error: Bad File Size
>
>
>
> On Wed, Aug 5, 2015 at 8:18 AM, Pavel Emelyanov <xemul at parallels.com>
> wrote:
>
> On 08/05/2015 05:24 AM, Z F wrote:
> > Hi,
> >
> > About file sizes:
> >
> > //In containers
> > bash-4.2# ls -lt /usr/bin/bash
> > -rwxr-xr-x. 1 root root 960392 Sep 25  2014 /usr/bin/bash
> > bash-4.2#
> > //In host
> > [root at compute2 dockerbins]# ls -lt /usr/bin/bash
> > -rwxr-xr-x. 1 root root 960384 Sep 26  2014 /usr/bin/bash
> > [root at compute2 dockerbins]#
> >
> >
> >
> > About FS: I am using VFS.
> >
> >
> >
> > As explained in the http://criu.org/Docker, --root is necessary for
> AUFS only. Then I suppose --root is not necessary for VFS, then the
> container's root filesystem would be at the default
> /var/lib/docker/containers/<container-id>/. Is that correct?
>
>
> I know it can be confusing...  I didn't mean the --root command line
> option.  I was saying the root of the container has be bind mounted onto
> itself.  This is implicitly done for AUFS when it's set up but for VFS, has
> to be done explicitly.  You can look at prep_restore() in
> contrib/docker_cr.sh.
>
>
>
>
>
>
> >
> > About mount, 3 cases tested:
> > 1. No --root, no mount --rbind:  bad file size error.
> > 2. No --root, mount --rbind: bad file size error.
> > 3. docker_cr.sh:
> > (00.011447)      1: Error (mount.c:1861): Can't mount at ./proc: No such
> file or directory
> > (00.034211) Error (cr-restore.c:1219): 63981 exited, status=1
> > (00.034228) Error (cr-restore.c:1912): Restoring FAILED.
>
> (00.011392)      1: ----------------------------> Try to validate
> ./etc/resolv.conf
> (00.011395)      1: ----------------------------> Try to validate
> ./etc/hostname
> (00.011397)      1: ----------------------------> Try to validate
> ./etc/hosts
> (00.011404)      1: ----------------------------> Try to validate
> ./proc/sys
> (00.011407)      1: ----------------------------> Try to validate
> ./proc/sysrq-trigger
> (00.011409)      1: ----------------------------> Try to validate
> ./proc/irq
> (00.011411)      1: ----------------------------> Try to validate
> ./proc/bus
> (00.011413)      1: ----------------------------> Try to validate
> ./proc/kcore
>
> There's no such print-s in criu code :)
>
> (00.011416)      1: 146:./ private 1 shared 0 slave 0
> (00.011420)      1: Start with 146:./
> (00.011423)      1:     Mounting unsupported @./ (0)
> (00.011428)      1:     Mounting proc @./proc (0)
> (00.011447)      1: Error (mount.c:1861): Can't mount at ./proc: No such
> file or directory
>
> Hm... No proc directory in the root you've specified.
>
> -- Pavel
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150807/f1768710/attachment.html>


More information about the CRIU mailing list