<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body 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>
    <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>
    <br>
    Jinn<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2013-12-13 05:29, Cal Leeming
      [Simplicity Media Ltd] wrote:<br>
    </div>
    <blockquote
cite="mid:CAHKQagF3KqZxz_F6B_QTR3aqr-_7UMy30RhoE5jUAs86Y=M7cQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Also here is the debug log;
        <div><a moz-do-not-send="true"
            href="http://pastebin.com/Fh45gDLg">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 moz-do-not-send="true"
            href="http://pastebin.com/Vk4M360P">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
              moz-do-not-send="true"
              href="mailto:cal.leeming@simplicitymedialtd.co.uk"
              target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc 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 moz-do-not-send="true"
                  href="http://pastebin.com/chBWt5u1" target="_blank">http://pastebin.com/chBWt5u1</a><span
                  class="HOEnZb"><font color="#888888"><br>
                  </font></span></div>
              <span class="HOEnZb"><font color="#888888">
                  <div><br>
                  </div>
                  <div>Cal</div>
                </font></span></div>
            <div class="HOEnZb">
              <div class="h5">
                <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 moz-do-not-send="true"
                        href="mailto:cal.leeming@simplicitymedialtd.co.uk"
                        target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc 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 moz-do-not-send="true"
                            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
                                  moz-do-not-send="true"
                                  href="mailto:cal.leeming@simplicitymedialtd.co.uk"
                                  target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc 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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>