I'm now curious about your implementation and still unsure about your environment.
But I am basing this comment around a few assumptions:
- You have access to a Linux shell prompt (CLI).
- You have downloaded/installed LXC and btrfs-tools.
- You have loaded the btrfs kernel module.
I would have thought that if you were to clone an lxc container, there would still be a root filesystem backend entry, as this is what defines the rootfs type. Saying that, from my experience with cloning full virtualisation environments, there always seems to be conflicting problems.
Also, have you created the actual btrfs filesystem or just defined it in the lxc-create command? It may not be showing because the actual block device may not be defined.
I'm not too sure what the overall issue may be, but it does sound like it is clone related. i.e. new container still pointing to the original containers dir block device for storage, or something like that.
let me give some points that may help troubleshoot it.
The way I would create an LXC container with BTRFS backing store would be.
Install BTRFS (Sounds like you've done this):
apt-get -y install btrfs-tools
Load the kernel module (Sounds like you've done this):
Make the btrfs filesystem (Sounds like you've done this):
mkfs -t btrfs /dev/sda
The filesystem on the block device would then be mounted.
mkdir /home/btrfs-mnt (or wherever the desired location is)
mount /dev/sda /home/btrfs-mnt
That would be the the steps that I would take to make a usable filesystem for the LXC containers.
If you are making a bunch of btrfs containers then:
file -s /dev/sda (shows that the type of file is a btrfs filesystem).
btrfs filesystem show (shows btrfs filesystems).
btrfs subvolume show /home/btrfs-mnt (identifies the btrfs root directory).
cat /proc/mounts | grep btrfs (shows mounted btrfs block devices).
btrfs filesystem df /home/btrfs-mnt (shows btrfs disk usage).
After the btrfs block device is created and LXC is installed, I can make a container. The path to the btrfs mount will be defined using the --lxcpath= option and the btrfs rootfs type is defined using the --bdev option. Because the path to the default lxc location is now different, a symbolic link is required to re-direct to the actual location.
Create the btrfs backed LXC container:
lxc-create --bdev btrfs --lxcpath=/home/btrfs-mnt --name mybtrfscontainerfoo --template ubuntu
create the symbolic link to the actual config file.
ln -s /home/btrfs-mnt/mybtrfscontainerfoo/config /var/lib/lxc/mybtrfscontainerfoo/config
It sounds to me like your trying to setup btrfs containers or copy them so hopefully this helps. OpenWRT, I'm not sure what your doing there. I've only used it to get non-standard firmware on a home router.
Hopefully this helps, if not then maybe describing your environment a little more, may help me get a clearer picture.
let me know how you get on.