[lxc-users] root device isn't being inherited on ZFS storage pool

Joshua Schaeffer jschaeffer0922 at gmail.com
Wed May 31 18:01:29 UTC 2017


Thanks for the explanation Stéphane, I will add the device locally. I
figured it was a change in versions that caused my discrepancy.

Joshua Schaeffer

On Wed, May 31, 2017 at 11:25 AM, Stéphane Graber <stgraber at ubuntu.com>
wrote:

> On Wed, May 31, 2017 at 11:01:39AM -0600, Joshua Schaeffer wrote:
> > I guess I should have mentioned an important change. When I switched from
> > BTRFS to ZFS I also went from LXD 2.0 to 2.13.
>
> Right and with LXD 2.8 we moved from always adding a container-local
> disk device to having it be inherited from the profile, which is what's
> causing the confusion here.
>
> >
> > On Wed, May 31, 2017 at 10:27 AM, Joshua Schaeffer <
> jschaeffer0922 at gmail.com
> > > wrote:
> >
> > > I've recently switch from using BTRFS to ZFS backend, and my
> containers on
> > > the ZFS backend aren't inheriting the root device from my default
> profile:
> > >
> > >     lxduser at raynor:~$ lxc config show fenix
> > >     architecture: x86_64
> > >     [snip]
> > >     devices: {}
> > >     ephemeral: false
> > >     profiles:
> > >     - default
> > >     - 30_vlan_mgmt_server
>
> They ar inheriting it but you won't see the inherited stuff unless you
> pass --expanded to "lxc config show".
>
> > > The default profile, which the container is using has the root device
> with
> > > a pool specified:
> > >
> > >     lxduser at raynor:~$ lxc profile show default
> > >     config: {}
> > >     description: Default LXD profile
> > >     devices:
> > >       root:
> > >         path: /
> > >         pool: lxdpool
> > >         type: disk
> > >     name: default
> > >
> > > But the container isn't showing a root device (or any device for that
> > > matter), and I get an error when I try to set a size limit on the root
> > > device for that container:
> > >
> > >     lxduser at raynor:~$ lxc config device set fenix root size 50G
> > >     error: The device doesn't exist
>
> That's because it's an inherited device rather than one set at the
> container level. To override the inherited device you must add a new
> local device with the same name.
>
> lxc config device add fenix root disk pool=lxdpool path=/ size=50GB
>
> That should do the trick and will then show up in "lxc config show"
> (without --expanded) since it will be a container-local device.
>
> > > Is there a ZFS property that has to be set to get it to inherit the
> > > device? I was able to successfully create the root device on another
> > > container, but I don't want to create the device on each container, I
> just
> > > want to set it on the profile. I'm on LXD 2.13. Here is my storage
> device:
> > >
> > >     lxduser at raynor:~$ lxc storage list
> > >     +---------+--------+---------+---------+
> > >     |  NAME   | DRIVER | SOURCE  | USED BY |
> > >     +---------+--------+---------+---------+
> > >     | lxdpool | zfs    | lxdpool | 15      |
> > >     +---------+--------+---------+---------+
> > >
> > > Thanks,
> > > Joshua Schaeffer
>
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170531/b67ece75/attachment-0001.html>


More information about the lxc-users mailing list