[lxc-users] Rootfs Changes?

Serge Hallyn serge.hallyn at ubuntu.com
Thu Mar 3 06:34:11 UTC 2016


Yeah, lxd doesn't quite work like that.  You can either tell lxd
to use lvm as a backing store (search for 'lvm' in the readme at
https://github.com/lxc/lxd) or pre-mount it as you did.

Quoting Pete Osborne (pete at pwo.ca):
> Hello,
> 
> I upgraded one of my LXD hyper-visors to the latest LXD and all of my
> containers are complaining about the rootfs not (no longer) allowing the
> source to be set.
> 
> Specifically, when I attempt to edit the configuration, lxd adds a new
> root: disk and provides this error:
> Config parsing error: Root disk entry may not have a "source" property set.
> Press enter to start the editor again
> 
> Perhaps I am using LXD in an unsupported way... I'm using lvm and I have 2
> volume groups, one is made up of hdd's, and the other is ssd's. Both have a
> thinpool which I use to create logical volumes.
> 
> When I created my containers I wasn't having much luck with the lvm backend
> so I created the containers on disk instead, I then shut down the
> container, moved the rootfs into a pre-created ext4 logical volume, I then
> set the source on the disk in my configuration, added some additional
> disks, and boot the system back up. I've done this with several containers
> and it has been working great.
> 
> I have been able to work around the issue by simply mounting my logical
> volume to /var/lib/lxd/containers/<container>/rootfs
> 
> But lxd used to mount/use the device automatically which was pretty cool.
> Wondering if anyone else has encountered the issue and if there is a better
> solution than what I've come up with. Is lxd now more aware of the
> preferred backend storage and is intentionally trying to prevent me from
> doing something bad?
> 
> Here's what my config used to look like:
> 
> name: gitlab-runner6
> profiles:
> - privileged
> config:
>   volatile.base_image:
> 2b5b105c717b0ee854b6717c9f6999fba40b1fc2447f31d6f87b520e28a163bb
>   volatile.eth0.hwaddr: 00:16:3e:25:18:73
>   volatile.eth0.name: eth0
>   volatile.last_state.idmap: '[]'
> devices:
>   homedir:
>     path: /home
>     source: /dev/sdd_group/gitlab-runner6-home
>     type: disk
>   rootfs:
>     path: /
>     type: disk
>     source: /dev/hdd_group/gitlab-runner6
> ephemeral: false
> 
> Thanks,
> Pete

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list