[lxc-users] storage pool on zfs root not possible ?
Fajar A. Nugraha
list at fajar.net
Wed Dec 13 01:36:54 UTC 2017
Sorry, hit send to soon. Here's the correctly-edited response
On Wed, Nov 22, 2017 at 5:36 PM, support at translators.at <
support at translators.at> wrote:
>
>
> hi folks,
>
> have a zfs-root-raid system with
> dedicated zfsroot/opt partitioned.
> upon zfs-root running ubuntu 16.04 lts.
> already installed snap-lxd.
>
> now want to attach containers to zfsroot/opt.
> no chance because of :
> «error: custom loop file locations are not supported»
>
> then tried
> lxc storage create testpool dir source=zfsroot
> «error: custom loop file locations are not supported»
>
> any idea?
>
Snap has restricted access to filesystem, limiting what directories it can
access.
On ubuntu 16.04, you can specify custom loop file location with newer lxd
package (e.g. "apt install -t xenial-backports lxd") instead of snap:
lxc storage create testpool dir source=/zfsroot/opt
Note that you need to specify the directory/mount point when using "dir",
not the dataset. And "dir" might not be what you want, look at "zfs" driver
instead.
> regards
> karl
>
> ps.: if you run zfs-root with auto-snapshots and so on,
> why do lxd nesting zfs storage in those tricky ways?
>
You mean "why lxd use zfs on top of image on top of zfs root"?
You don't have to. Loopback zfs is the default setup that would fit
"beginners" usage scenario, but should be change for production (e.g. using
zfs driver, lvm, or btrfs)
> other way round:
> wouldn't it be better during «lxd init» to be asked whether
> you want to have zfs additionally or not? plain <dir> is
>
If you use lxd package, you can just run
lxc storage create testpool zfs source=zfsroot/opt
Note that in this case you specifiy the pool or dataset name, not the
mountpoint.
not the answer. basically it doesn't matter what you choose
> everythings will be in the /var/snap/lxd - cage. the
>
That is because you use snap.
> consequences are put lxd on extra disk. but what when
> not possible?
>
Don't use snap for that purpose. Use normal lxd package.
--
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20171213/3f1c7ceb/attachment-0001.html>
More information about the lxc-users
mailing list