[lxc-users] storage pool on zfs root not possible ?

Fajar A. Nugraha list at fajar.net
Wed Dec 13 01:31:11 UTC 2017


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?
>
>

For dir, snap has limited access to filesystem.

You can do this with 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.


For your purpose, however, I think you want





>         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 do 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 packages, 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/179e6483/attachment.html>


More information about the lxc-users mailing list