<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1438735894657_3118"><span>Hi,</span></div><div id="yui_3_16_0_1_1438735894657_3118"><span><br></span></div><div id="yui_3_16_0_1_1438735894657_3118"><span id="yui_3_16_0_1_1438735894657_3348">About file sizes:&nbsp;</span></div><div id="yui_3_16_0_1_1438735894657_3118"><span><br></span></div><div id="yui_3_16_0_1_1438735894657_3118" class="">//In containers</div><div id="yui_3_16_0_1_1438735894657_3118" class="">bash-4.2# ls -lt /usr/bin/bash</div><div id="yui_3_16_0_1_1438735894657_3118" class="">-rwxr-xr-x. 1 root root 960392 Sep 25 &nbsp;2014 /usr/bin/bash</div><div id="yui_3_16_0_1_1438735894657_3118" class="">bash-4.2#&nbsp;</div><div id="yui_3_16_0_1_1438735894657_3118" class="">//In host</div><div id="yui_3_16_0_1_1438735894657_3118" class="">[root@compute2 dockerbins]# ls -lt /usr/bin/bash</div><div id="yui_3_16_0_1_1438735894657_3118" class="">-rwxr-xr-x. 1 root root 960384 Sep 26 &nbsp;2014 /usr/bin/bash</div><div id="yui_3_16_0_1_1438735894657_3118"></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class="">[root@compute2 dockerbins]#&nbsp;</div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class="">About FS: I am using VFS.</div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3118" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3594" dir="ltr">As explained in the&nbsp;<a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker" id="yui_3_16_0_1_1438735894657_4566" style="background-color: rgb(255, 255, 255);" class="">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&nbsp;filesystem would be at the default /var/lib/docker/containers/&lt;container-id&gt;/. Is that correct?</div><div id="yui_3_16_0_1_1438735894657_3594" dir="ltr"><br></div><div id="yui_3_16_0_1_1438735894657_3594" dir="ltr">About mount, 3 cases tested:<br></div><div id="yui_3_16_0_1_1438735894657_3596">1. No --root, no mount --rbind: &nbsp;bad file size error.</div><div id="yui_3_16_0_1_1438735894657_3596">2. No --root, mount --rbind: bad file size error.</div><div id="yui_3_16_0_1_1438735894657_3596">3. docker_cr.sh:</div><div id="yui_3_16_0_1_1438735894657_3596">(00.011447) &nbsp; &nbsp; &nbsp;1: Error (mount.c:1861): Can't mount at ./proc: No such file or directory<br></div><div id="yui_3_16_0_1_1438735894657_3596" class="">(00.034211) Error (cr-restore.c:1219): 63981 exited, status=1</div><div id="yui_3_16_0_1_1438735894657_3596" dir="ltr" class="">(00.034228) Error (cr-restore.c:1912): Restoring FAILED.</div><div id="yui_3_16_0_1_1438735894657_3596" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3596" dir="ltr" class="">The logs about mount failure attached. Thank you very much!</div><div id="yui_3_16_0_1_1438735894657_3596" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1438735894657_3596" dir="ltr" class=""><br></div>  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1438735894657_3109"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1438735894657_3108"> <div dir="ltr" id="yui_3_16_0_1_1438735894657_3107"> <hr size="1" id="yui_3_16_0_1_1438735894657_3119">  <font size="2" face="Arial" id="yui_3_16_0_1_1438735894657_3106"> <b><span style="font-weight:bold;">From:</span></b> Saied Kazemi &lt;saied@google.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> full015zf@yahoo.com <br><b><span style="font-weight: bold;">Cc:</span></b> "criu@openvz.org" &lt;criu@openvz.org&gt;; Pavel Emelyanov &lt;xemul@parallels.com&gt; <br> <b id="yui_3_16_0_1_1438735894657_3800"><span style="font-weight: bold;" id="yui_3_16_0_1_1438735894657_3799">Sent:</span></b> Wednesday, August 5, 2015 3:17 AM<br> <b id="yui_3_16_0_1_1438735894657_3132"><span style="font-weight: bold;" id="yui_3_16_0_1_1438735894657_3131">Subject:</span></b> Re: [CRIU] CRIU Docker Restore with Error: Bad File Size<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1438735894657_3120"><br><div id="yiv9227152265"><div id="yui_3_16_0_1_1438735894657_3123"><div dir="ltr" id="yui_3_16_0_1_1438735894657_3122"><div id="yui_3_16_0_1_1438735894657_3121">Hi Zhang,</div><div id="yui_3_16_0_1_1438735894657_3124"><br clear="none"></div><div id="yui_3_16_0_1_1438735894657_3125">Since you're not using AUFS, I assume you're using VFS.&nbsp; Can you confirm please?</div><div id="yui_3_16_0_1_1438735894657_3126"><br clear="none"></div><div id="yui_3_16_0_1_1438735894657_3415">As <a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker" id="yui_3_16_0_1_1438735894657_4566">http://criu.org/Docker</a> explains, you need to bind mount the container's root filesystem before attempting to restore.&nbsp; Also, can you try the docker_cr.sh helper script that is in the contrib subdirectory of CRIU sources to checkpoint and restore your container?</div><div id="yui_3_16_0_1_1438735894657_3271"><br clear="none"></div><div id="yui_3_16_0_1_1438735894657_4567">--Saied</div><div id="yui_3_16_0_1_1438735894657_4568"><br clear="none"></div></div><div class="yiv9227152265gmail_extra" id="yui_3_16_0_1_1438735894657_3276"><br clear="none"><div class="yiv9227152265gmail_quote" id="yui_3_16_0_1_1438735894657_3275">On Tue, Aug 4, 2015 at 10:21 AM, Pavel Emelyanov <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:xemul@parallels.com" target="_blank" href="mailto:xemul@parallels.com">xemul@parallels.com</a>&gt;</span> wrote:<br clear="none"><blockquote class="yiv9227152265gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_1_1438735894657_3274"><span class="yiv9227152265">On 08/04/2015 11:04 AM, Z F wrote:<br clear="none">
&gt; Hi,<br clear="none">
&gt;<br clear="none">
</span>&gt; I am trying criu docker checkpoint/restore&nbsp; external example (without AUFS) provided by Docker &lt;<a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker#Restore_Prework_for_External_C.2FR">http://criu.org/Docker#Restore_Prework_for_External_C.2FR</a>&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; Docker &lt;<a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker#Restore_Prework_for_External_C.2FR">http://criu.org/Docker#Restore_Prework_for_External_C.2FR</a>&gt;<br clear="none">
<span class="yiv9227152265">&gt; This HOWTO page describes how to checkpoint and restore a Docker container.<br clear="none">
</span>&gt; View on <a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/">criu.org</a> &lt;<a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker#Restore_Prework_for_External_C.2FR">http://criu.org/Docker#Restore_Prework_for_External_C.2FR</a>&gt;<br clear="none">
<span class="yiv9227152265">&gt;<br clear="none">
&gt; Preview by Yahoo<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; The experiment was in the same host. And the restore failed with error:<br clear="none">
&gt;<br clear="none">
&gt; (00.210352)&nbsp; &nbsp; &nbsp; 1: Error (files-reg.c:1055): File usr/bin/bash has bad size 960384 (expect 960392)<br clear="none">
&gt; (00.210357)&nbsp; &nbsp; &nbsp; 1: Error (cr-restore.c:255): Can't fixup VMA's fd<br clear="none">
&gt; (00.214642) Error (cr-restore.c:1912): Restoring FAILED.<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; The cause is that the /usr/bin/bash in host and container have different size.<br clear="none">
<br clear="none">
</span>That's weird. CRIU should pick the bash from container. So which bash is which? Is<br clear="none">
the actual size the host's one and expected the container's or vice-versa?<br clear="none">
<span class="yiv9227152265"><br clear="none">
&gt; While in my mind, restore of container would load the container's image and file system and load the container's bash. Anything wrong with my experiment?<br clear="none">
&gt;<br clear="none">
&gt; Test log and criu log attached. Thank you very much!<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; Best Regards<br clear="none">
&gt; Zhang Fan<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
</span>&gt; _______________________________________________<br clear="none">
&gt; CRIU mailing list<br clear="none">
&gt; <a rel="nofollow" shape="rect" ymailto="mailto:CRIU@openvz.org" target="_blank" href="mailto:CRIU@openvz.org" id="yui_3_16_0_1_1438735894657_4505">CRIU@openvz.org</a><br clear="none">
&gt; <a rel="nofollow" shape="rect" target="_blank" href="https://lists.openvz.org/mailman/listinfo/criu">https://lists.openvz.org/mailman/listinfo/criu</a><div class="qtdSeparateBR"><br><br></div><div class="yiv9227152265yqt1129133183" id="yiv9227152265yqtfd85734"><br clear="none">
&gt;<br clear="none">
<br clear="none">
_______________________________________________<br clear="none">
CRIU mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:CRIU@openvz.org" target="_blank" href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.openvz.org/mailman/listinfo/criu" id="yui_3_16_0_1_1438735894657_4902">https://lists.openvz.org/mailman/listinfo/criu</a><br clear="none">
</div></blockquote></div><div class="yiv9227152265yqt1129133183" id="yiv9227152265yqtfd10094"><br clear="none"></div></div></div></div><br><br></div> </div> </div>  </div></body></html>