<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_1438821478285_10888"><span>Hi,</span></div><div id="yui_3_16_0_1_1438821478285_10887"><span><br></span></div><div id="yui_3_16_0_1_1438821478285_10857"><span id="yui_3_16_0_1_1438821478285_10867">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 id="yui_3_16_0_1_1438821478285_10857"><span><br></span></div><div id="yui_3_16_0_1_1438821478285_10857"><span id="yui_3_16_0_1_1438821478285_10977">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.&nbsp;</span></div><div id="yui_3_16_0_1_1438821478285_10857"><span><br></span></div><div id="yui_3_16_0_1_1438821478285_10857" dir="ltr"><span id="yui_3_16_0_1_1438821478285_10980">Then, what's should I put as --root? &nbsp;Thank you.</span></div><div id="yui_3_16_0_1_1438821478285_10857"><span><br></span></div><div id="yui_3_16_0_1_1438821478285_10857"><span id="yui_3_16_0_1_1438821478285_10981">Best Regards</span></div><br>  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1438821478285_10773"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1438821478285_10772"> <div dir="ltr" id="yui_3_16_0_1_1438821478285_10782"> <hr size="1">  <font size="2" face="Arial" id="yui_3_16_0_1_1438821478285_10982"> <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><span style="font-weight: bold;">Sent:</span></b> Thursday, August 6, 2015 1:14 AM<br> <b id="yui_3_16_0_1_1438821478285_10984"><span style="font-weight: bold;" id="yui_3_16_0_1_1438821478285_10983">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_1438821478285_10771"><br><div id="yiv2950959640"><div id="yui_3_16_0_1_1438821478285_10770"><div dir="ltr" id="yui_3_16_0_1_1438821478285_10769"><br clear="none"><div class="yiv2950959640gmail_extra" id="yui_3_16_0_1_1438821478285_10768"><br clear="none"><div class="yiv2950959640gmail_quote" id="yui_3_16_0_1_1438821478285_10767">On Wed, Aug 5, 2015 at 8:18 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="yiv2950959640gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_1_1438821478285_10766"><span class="yiv2950959640">On 08/05/2015 05:24 AM, Z F wrote:<br clear="none">
&gt; Hi,<br clear="none">
&gt;<br clear="none">
</span><span class="yiv2950959640">&gt; About file sizes:<br clear="none">
&gt;<br clear="none">
&gt; //In containers<br clear="none">
&gt; bash-4.2# ls -lt /usr/bin/bash<br clear="none">
&gt; -rwxr-xr-x. 1 root root 960392 Sep 25&nbsp; 2014 /usr/bin/bash<br clear="none">
&gt; bash-4.2#<br clear="none">
&gt; //In host<br clear="none">
&gt; [root@compute2 dockerbins]# ls -lt /usr/bin/bash<br clear="none">
&gt; -rwxr-xr-x. 1 root root 960384 Sep 26&nbsp; 2014 /usr/bin/bash<br clear="none">
&gt; [root@compute2 dockerbins]#<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; About FS: I am using VFS.<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt;<br clear="none">
&gt; As explained in the <a rel="nofollow" shape="rect" target="_blank" href="http://criu.org/Docker">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/&lt;container-id&gt;/. Is that correct?<br clear="none"></span></blockquote><div><br clear="none"></div><div><div>I know it can be confusing...&nbsp; I didn't mean the --root command line option.&nbsp; I was saying the root of the container has be bind mounted onto itself.&nbsp; This is implicitly done for AUFS when it's set up but for VFS, has to be done explicitly.&nbsp; You can look at prep_restore() in contrib/docker_cr.sh.<div class="qtdSeparateBR"><br><br></div><div class="yiv2950959640yqt6917979281" id="yiv2950959640yqtfd36205"><br clear="none"></div></div></div><div class="yiv2950959640yqt6917979281" id="yiv2950959640yqtfd61767"><div><br clear="none"></div><div>&nbsp;</div><blockquote class="yiv2950959640gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_1_1438821478285_10826"><span class="yiv2950959640">
&gt;<br clear="none">
&gt; About mount, 3 cases tested:<br clear="none">
&gt; 1. No --root, no mount --rbind:&nbsp; bad file size error.<br clear="none">
&gt; 2. No --root, mount --rbind: bad file size error.<br clear="none">
&gt; 3. docker_cr.sh:<br clear="none">
&gt; (00.011447)&nbsp; &nbsp; &nbsp; 1: Error (mount.c:1861): Can't mount at ./proc: No such file or directory<br clear="none">
&gt; (00.034211) Error (cr-restore.c:1219): 63981 exited, status=1<br clear="none">
&gt; (00.034228) Error (cr-restore.c:1912): Restoring FAILED.<br clear="none">
<br clear="none">
</span>(00.011392)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./etc/resolv.conf<br clear="none">
(00.011395)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./etc/hostname<br clear="none">
(00.011397)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./etc/hosts<br clear="none">
(00.011404)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./proc/sys<br clear="none">
(00.011407)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./proc/sysrq-trigger<br clear="none">
(00.011409)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./proc/irq<br clear="none">
(00.011411)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; Try to validate ./proc/bus<br clear="none">
(00.011413)&nbsp; &nbsp; &nbsp; 1: ----------------------------&gt; 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)&nbsp; &nbsp; &nbsp; 1: 146:./ private 1 shared 0 slave 0<br clear="none">
(00.011420)&nbsp; &nbsp; &nbsp; 1: Start with 146:./<br clear="none">
(00.011423)&nbsp; &nbsp; &nbsp; 1:&nbsp; &nbsp; &nbsp;Mounting unsupported @./ (0)<br clear="none">
(00.011428)&nbsp; &nbsp; &nbsp; 1:&nbsp; &nbsp; &nbsp;Mounting proc @./proc (0)<br clear="none">
<span class="yiv2950959640">(00.011447)&nbsp; &nbsp; &nbsp; 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 class="yiv2950959640HOEnZb"><font color="#888888"><br clear="none">
-- Pavel<br clear="none">
</font></span></blockquote></div></div><div class="yiv2950959640yqt6917979281" id="yiv2950959640yqtfd27527"><br clear="none"></div></div></div></div></div><br><br></div> </div> </div>  </div></body></html>