[lxc-users] About creating a BTRFS file instead of a BTRFS partition

Fajar A. Nugraha list at fajar.net
Wed Jun 4 11:16:12 UTC 2014


On Wed, Jun 4, 2014 at 6:04 PM, Marcel Sánchez Toledano <
marcelsanchezt at gmail.com> wrote:

> Partially yes. Thanks for that.
>
> Maybe is a bit offtopic, but.. Do you know any manual or website where I
> can found information about creating a image file with BRTFS?
>

have you ever created an image file with ANY filesystem?


> I have tried with no luck...
>
>
What have you tried?

The generic method would be
- create a file with appropriate size (truncate, dd, whatever)
- mkfs (e.g mkfs.btrfs, mkfs.ext4, whatever)
- mount -o loop ...
- fill the mounted fs (debootstrap, rsync, whatever)

If your question is "how to create a rootfs image suitable for lxc", then
the easiest method is to simply use lxc templates to create
directory-backed container, and then copy the files to the image.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140604/3e3e3754/attachment-0001.html>


More information about the lxc-users mailing list