<div dir="ltr">No problem, I am glad it worked for you. You can use VFS, AUFS, and OverlayFS.<div><br></div><div>--Saied</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 12:54 AM, Z F <span dir="ltr"><<a href="mailto:full015zf@yahoo.com" target="_blank">full015zf@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div><span>Hi, </span></div><div><span><br></span></div><div><span>Yes, I was using devicemapper. Then I turned to VFS and migration in host and between hosts both succeeded. </span></div><div><span><br></span></div><div><span>Thank you very much and sorry for my ignorance.</span></div><div><span><br></span></div><div><span>Best Regards</span></div><div><span>Zhang Fan</span></div><br> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold">From:</span></b> Saied Kazemi <<a href="mailto:saied@google.com" target="_blank">saied@google.com</a>><br> <b><span style="font-weight:bold">To:</span></b> Z F <<a href="mailto:full015zf@yahoo.com" target="_blank">full015zf@yahoo.com</a>> <br><span class=""><b><span style="font-weight:bold">Cc:</span></b> "<a href="mailto:criu@openvz.org" target="_blank">criu@openvz.org</a>" <<a href="mailto:criu@openvz.org" target="_blank">criu@openvz.org</a>>; Pavel Emelyanov <<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>> <br> </span><b><span style="font-weight:bold">Sent:</span></b> Thursday, August 6, 2015 9:30 PM<div><div class="h5"><br> <b><span style="font-weight:bold">Subject:</span></b> Re: [CRIU] CRIU Docker Restore with Error: Bad File Size<br> </div></div></font> </div><div><div class="h5"> <div><br><div><div><div dir="ltr"><br clear="none"><div><br clear="none"><div>On Thu, Aug 6, 2015 at 1:01 AM, Z F <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:full015zf@yahoo.com" target="_blank">full015zf@yahoo.com</a>></span> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div><span>Hi,</span></div><div><span><br clear="none"></span></div><div><span>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.</span></div><div><span><br clear="none"></span></div><div><span>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. </span></div></div></div></blockquote><div><br clear="none"></div><div>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.</div><div><br clear="none"></div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div>Then, what's should I put as --root? Thank you.<br clear="none"></div></div></blockquote><div><br clear="none"></div><div>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.</div><div><br clear="none"></div><div>--Saied</div><div><br><br></div><div><div><br clear="none"></div><div><br clear="none"></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div>Best Regards<br clear="none"></div><br clear="none"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"><span> <b><span style="font-weight:bold">From:</span></b> Saied Kazemi <<a rel="nofollow" shape="rect" href="mailto:saied@google.com" target="_blank">saied@google.com</a>><br clear="none"> <b><span style="font-weight:bold">To:</span></b> <a rel="nofollow" shape="rect" href="mailto:full015zf@yahoo.com" target="_blank">full015zf@yahoo.com</a> <br clear="none"><b><span style="font-weight:bold">Cc:</span></b> "<a rel="nofollow" shape="rect" href="mailto:criu@openvz.org" target="_blank">criu@openvz.org</a>" <<a rel="nofollow" shape="rect" href="mailto:criu@openvz.org" target="_blank">criu@openvz.org</a>>; Pavel Emelyanov <<a rel="nofollow" shape="rect" href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>> <br clear="none"> </span><b><span style="font-weight:bold">Sent:</span></b> Thursday, August 6, 2015 1:14 AM<span><br clear="none"> <b><span style="font-weight:bold">Subject:</span></b> Re: [CRIU] CRIU Docker Restore with Error: Bad File Size<br clear="none"> </span></font> </div> <div><br clear="none"><div><div><div dir="ltr"><br clear="none"><div><div><div><br clear="none"><div>On Wed, Aug 5, 2015 at 8:18 AM, Pavel Emelyanov <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 08/05/2015 05:24 AM, Z F wrote:<br clear="none">
> Hi,<br clear="none">
><br clear="none">
</span><span>> About file sizes:<br clear="none">
><br clear="none">
> //In containers<br clear="none">
> bash-4.2# ls -lt /usr/bin/bash<br clear="none">
> -rwxr-xr-x. 1 root root 960392 Sep 25 2014 /usr/bin/bash<br clear="none">
> bash-4.2#<br clear="none">
> //In host<br clear="none">
> [root@compute2 dockerbins]# ls -lt /usr/bin/bash<br clear="none">
> -rwxr-xr-x. 1 root root 960384 Sep 26 2014 /usr/bin/bash<br clear="none">
> [root@compute2 dockerbins]#<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> About FS: I am using VFS.<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> As explained in the <a rel="nofollow" shape="rect" href="http://criu.org/Docker" target="_blank">http://criu.org/Docker</a>, --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?<br clear="none"></span></blockquote><div><br clear="none"></div><div><div>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.<div><br clear="none"><br clear="none"></div><div><br clear="none"></div></div></div><div><div><br clear="none"></div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
><br clear="none">
> About mount, 3 cases tested:<br clear="none">
> 1. No --root, no mount --rbind: bad file size error.<br clear="none">
> 2. No --root, mount --rbind: bad file size error.<br clear="none">
> 3. docker_cr.sh:<br clear="none">
> (00.011447) 1: Error (mount.c:1861): Can't mount at ./proc: No such file or directory<br clear="none">
> (00.034211) Error (cr-restore.c:1219): 63981 exited, status=1<br clear="none">
> (00.034228) Error (cr-restore.c:1912): Restoring FAILED.<br clear="none">
<br clear="none">
</span>(00.011392) 1: ----------------------------> Try to validate ./etc/resolv.conf<br clear="none">
(00.011395) 1: ----------------------------> Try to validate ./etc/hostname<br clear="none">
(00.011397) 1: ----------------------------> Try to validate ./etc/hosts<br clear="none">
(00.011404) 1: ----------------------------> Try to validate ./proc/sys<br clear="none">
(00.011407) 1: ----------------------------> Try to validate ./proc/sysrq-trigger<br clear="none">
(00.011409) 1: ----------------------------> Try to validate ./proc/irq<br clear="none">
(00.011411) 1: ----------------------------> Try to validate ./proc/bus<br clear="none">
(00.011413) 1: ----------------------------> Try to validate ./proc/kcore<br clear="none">
<br clear="none">
There's no such print-s in criu code :)<br clear="none">
<br clear="none">
(00.011416) 1: 146:./ private 1 shared 0 slave 0<br clear="none">
(00.011420) 1: Start with 146:./<br clear="none">
(00.011423) 1: Mounting unsupported @./ (0)<br clear="none">
(00.011428) 1: Mounting proc @./proc (0)<br clear="none">
<span>(00.011447) 1: Error (mount.c:1861): Can't mount at ./proc: No such file or directory<br clear="none">
<br clear="none">
</span>Hm... No proc directory in the root you've specified.<br clear="none">
<span><font color="#888888"><br clear="none">
-- Pavel<br clear="none">
</font></span></blockquote></div></div><div><br clear="none"></div></div></div></div></div></div></div><br clear="none"><br clear="none"></div> </div> </div> </div></blockquote></div></div><div><br clear="none"></div></div></div></div></div><br><br></div> </div></div></div> </div> </div></div></blockquote></div><br></div>