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 <jschaeffer0...@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@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@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@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@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
signature.asc
Description: PGP signature
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users