add zfs support to lxc-create and lxc-destroy
This is based on patch from Papp Tamas (thanks). It also does some
reorganizing of lxc-create to commonize some of the backingstore handling.
I played with it using:
sudo lvcreate -L 100G -n zfs vg0
sudo zpool create lxc /dev/vg0/zfs
sudo lxc-create -B zfs --zfsroot lxc -t ubuntu -n dir2
or you could
qemu-img create zfs.img 100G
sudo qemu-nbd -c /dev/nbd0 zfs.img
sudo zpool create lxc /dev/nbd0
sudo lxc-create -B zfs --zfsroot lxc -t ubuntu -n dir2
I'll write the bdev.c handler and hook up lxc-clone next.
This also fixses a bug in the sed expression to extract the rootfs from
container config, which prepended an extra '/' to the rootdev. (That
caused the zfs list entry not to match at destroy)
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: Papp Tamas <tompos@martos.bme.hu>
Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
Showing
Please
register
or
sign in
to comment