Quoting Stéphane Graber (stgra...@ubuntu.com): > On 04/25/2013 10:18 PM, Serge Hallyn wrote: > > 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.hal...@ubuntu.com> > > Cc: Papp Tamas <tom...@martos.bme.hu> > > The only potential annoyance I can see is if we ever try to auto-detect > LVM as it's way more verbose than the other checks and will throw a > bunch of weird errors to the user who just wanted auto-detect.
Not sure how you envision the autodetect. Note that in bdev.c lvm is actually detected by looking for 'LVM-' at the start of the block device. So autodetect for clone and lxc-info and lxc-list will be silent. Eventually I'd like to re-write lxc-create with the api as well. Then the logic at lxc-create will be something like: 1. If backing store is specified on command line, use it 2. If backing store is specified in /etc/lxc/lxc.conf, use it 3. If $lxcpath is btrfs, use btrfs 4. if there is a VG called lxc, use lvm 5. if there is a zfsroot called lxc, use it -serge ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel