<div dir="ltr">Seems there's a few discussions about ramfs and pivot [1], and apparently it's unsupported [2].<div><br></div><div>As a workaround you could try to place overlayfs on top of your ramfs [3], you'd then place both your lower and upper dir on ramfs - YMMV.</div>
<div><br></div><div>Others may chime in with a different workaround, as I'm not sure if this would be the best way.</div><div><br></div><div>Hope this helps</div><div><br></div><div>Cal</div><div><div><br></div><div>[1] <a href="https://www.google.co.uk/search?q=pivot_root+tmpfs">https://www.google.co.uk/search?q=pivot_root+tmpfs</a><br>
</div><div>[2] <a href="http://www.slax.org/blog/18438-initramfs-pivot-root-solution.html">http://www.slax.org/blog/18438-initramfs-pivot-root-solution.html</a></div><div>[3] <a href="http://askubuntu.com/questions/109413/how-do-i-use-overlayfs">http://askubuntu.com/questions/109413/how-do-i-use-overlayfs</a><br>
<div><br></div><div><br></div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 14, 2013 at 7:18 AM, Qiang Huang <span dir="ltr"><<a href="mailto:h.huangqiang@huawei.com" target="_blank">h.huangqiang@huawei.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
<br>
I was trying to run a container from ramfs, to root filesystem is<br>
rootfs(ramfs), the template is put onto a mounted disk whose fs is<br>
ext3, and I got this error(I'll skip my config and version and os<br>
and so on, I think they are not keys):<br>
...<br>
lxc-start 1386999058.944 DEBUG    lxc_conf - mountpoint for old rootfs is '/usr/local/lib/lxc/rootfs/lxc_putold'<br>
lxc-start 1386999058.944 ERROR    lxc_conf - Invalid argument - pivot_root syscall failed<br>
lxc-start 1386999058.944 ERROR    lxc_conf - failed to setup pivot root<br>
lxc-start 1386999058.944 ERROR    lxc_conf - failed to set rootfs for 'hq91'<br>
lxc-start 1386999058.944 ERROR    lxc_start - failed to setup the container<br>
lxc-start 1386999058.944 ERROR    lxc_sync - invalid sequence number 1. expected 2<br>
lxc-start 1386999058.952 ERROR    lxc_start - failed to spawn 'hq91'<br>
<br>
I dug and figured out that pivot_root has some limitations with ramfs,<br>
So is it possible to run a container from ramfs? And how can we do that?<br>
<br>
Any comments are appreciated.<br>
<br>
<br>
<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">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</a><br>
</blockquote></div><br></div>