<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 9:46 AM, Jinn Ko <span dir="ltr"><<a href="mailto:lxc-users@mx.ixido.net" target="_blank">lxc-users@mx.ixido.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    When you run 'lsof | grep /tmp/lol/disk2.img' does that say
    '(deleted)' next to it?  If so, it should also identify the process
    id holding the file handle open, which is preventing the release of
    the space.<br></div></blockquote><div><br></div><div>No, there is no entry in lsof for that file.</div><div><br></div><div>It also doesn't seem to show any entry even when lxc-start is running. I'm thinking perhaps it doesn't show up in here because it's a kernel module maybe, but my knowledge on that isn't great.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
    <br>
    From the log output it looks like the failure to mount /proc inside
    your container causes a failure, so I haven't understood how it is
    that lxc-execute works.  Therefore I'm wondering if the failure
    handling is missing the logic to release the mounted image.  I'm
    curious to know if the space is released when /proc is properly
    mounted and the container comes up cleanly.<br></div></blockquote><div><br></div><div>Sadly I'm still able to reproduce this problem when the container comes up cleanly.</div><div><br></div><div>Scenario here;</div>

<div><a href="http://pastebin.com/VB2iRQ6z">http://pastebin.com/VB2iRQ6z</a><br></div><div><br></div><div>Log here;</div><div><a href="http://pastebin.com/49m8Kgrn" target="_blank">http://pastebin.com/49m8Kgrn</a></div><div>
<br></div><div>Also, here are the versions;</div><div><br></div><div><div>$ uname -a</div><div>Linux <a href="http://b3.int">b3.int</a> 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux</div>
</div><div><br></div><div><div>$ lsb_release -a</div><div>No LSB modules are available.</div><div>Distributor ID:<span class="" style="white-space:pre">  </span>Ubuntu</div><div>Description:<span class="" style="white-space:pre"> </span>Ubuntu 12.04.3 LTS</div>
<div>Release:<span class="" style="white-space:pre">    </span>12.04</div><div>Codename:<span class="" style="white-space:pre">     </span>precise</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div bgcolor="#FFFFFF" text="#000000">
    <br>
    Jinn<div><div><br>
    <br>
    <br>
    <div>On 2013-12-13 05:29, Cal Leeming
      [Simplicity Media Ltd] wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">Also here is the debug log;
        <div><a href="http://pastebin.com/Fh45gDLg" target="_blank">http://pastebin.com/Fh45gDLg</a><br>
        </div>
        <div><br>
        </div>
        <div>There's an entry that says rootfs is mounted but nothing to
          say it's been unmounted, and a look through the source code
          but I'm a bit out of my depth.</div>
        <div><br>
        </div>
        <div>I've attempted to reproduce the bug directly using
          losetup/mount, but it works without problem;</div>
        <div><a href="http://pastebin.com/Vk4M360P" target="_blank">http://pastebin.com/Vk4M360P</a></div>
        <div><br>
        </div>
        <div>Cal</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, Dec 13, 2013 at 4:54 AM, Cal
          Leeming [Simplicity Media Ltd] <span dir="ltr"><<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
            <div dir="ltr">Sorry, I had sent the wrong link previously.
              <div><br>
              </div>
              <div>The correct link is;</div>
              <div><a href="http://pastebin.com/chBWt5u1" target="_blank">http://pastebin.com/chBWt5u1</a><span><font color="#888888"><br>
                  </font></span></div>
              <span><font color="#888888">
                  <div><br>
                  </div>
                  <div>Cal</div>
                </font></span></div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <br>
                  <div class="gmail_quote">On Fri, Dec 13, 2013 at 4:36
                    AM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr"><<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                      <div dir="ltr">Not sure if this helps but here is
                        a simple test scenario that will reproduce the
                        problem;
                        <div><a href="http://pastebin.com/V0GJsNcx" target="_blank">http://pastebin.com/V0GJsNcx</a><span><font color="#888888"><br>
                            </font></span></div>
                        <span><font color="#888888">
                            <div><br>
                            </div>
                            <div>Cal</div>
                          </font></span></div>
                      <div>
                        <div>
                          <div class="gmail_extra"><br>
                            <br>
                            <div class="gmail_quote">On Fri, Dec 13,
                              2013 at 3:59 AM, Cal Leeming [Simplicity
                              Media Ltd] <span dir="ltr"><<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                <div dir="ltr">Hello,
                                  <div><br>
                                  </div>
                                  <div>I'm able to create containers
                                    which use a single file for their
                                    rootfs;</div>
                                  <div><br>
                                  </div>
                                  <div>$ dd if=/dev/zero of=/rootfs.img
                                    bs=1 count=1024</div>
                                  <div>$ mkfs.ext4 /rootfs.img</div>
                                  <div>-- other debootstrap commands
                                    here --</div>
                                  <div><br>
                                  </div>
                                  <div>The image runs successfully in
                                    both lxc-start, lxc-start-ephemeral
                                    and lxc-execute.</div>
                                  <div><br>
                                  </div>
                                  <div>However if I then attempt to
                                    delete the rootfs image after
                                    running lxc-start or lxc-execute,
                                    the disk space is not given back and
                                    I have to reboot in order to reclaim
                                    the disk space.</div>
                                  <div><br>
                                  </div>
                                  <div>Does anyone know why this might
                                    be happening? Perhaps LXC is keeping
                                    a scale descriptor open somewhere?</div>
                                  <div><br>
                                  </div>
                                  <div>Any help would be really
                                    appreciated, can provide more
                                    info/debugging if needed.</div>
                                  <div><br>
                                  </div>
                                  <div>Thanks</div>
                                  <span><font color="#888888">
                                      <div><br>
                                        Cal</div>
                                    </font></span></div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
lxc-users mailing list
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users<br></a><br></blockquote></div></div></div>