[lxc-users] Questions on how to "lxd init" again, reinstall, upgrade and downgrade

Simos Xenitellis simos.lists at googlemail.com
Wed Mar 15 23:38:47 UTC 2017


On Tue, Mar 14, 2017 at 2:11 AM, Simos Xenitellis
<simos.lists at googlemail.com> wrote:
> Hi All,
>
> I am writing a post on LXD and
> 1. how to run "lxd init" again (keeping the ZFS allocated space)
> 2. how to run "lxd init" again (clearing up the ZFS allocated space,
> allocate fresh space)
> 3. how to upgrade to the latest (currently 2.11) version
> 4. how to downgrade
>
> Here is how I plan to tackle these issues:
> 1. how to run "lxd init" again (keeping the ZFS allocated space)
>>> requires to "sudo systemctl stop lxd.service"
>>> requires to "sudo zpool destroy mylxdpool"
>>> then "nmcli connection delete lxdbr0" (to delete the bridge)
> |--> now "lxd init" and select to reuse the ZFS device
>
> 2. how to run "lxd init" again (clearing up the ZFS allocated space,
> allocate fresh space)
>>> requires to "sudo systemctl stop lxd.service"
>>> requires to "sudo zpool destroy mylxdpool"
>>> then "nmcli connection delete lxdbr0"
>>> remove everything in /var/lib/lxd/
>>> remove everything in /var/log/lxd/
> |--> now "lxd init" and select to reuse the ZFS device
>
> 3. how to upgrade to the latest (currently 2.11) version
>>> Enable the lxd-stable PPA (has 2.11)
> |--> then "sudo apt install lxd", which will bring in "lxd-client".
>
> 4. how to downgrade
> (AFAIK, downgrading is not expected to be tested, so it requires to
> remove everything (case [2]),
> downgrade "lxd" and "lxd-client", then "lxd init".
>
>
> If there is any big no-no in the above, I would love to hear about it!
>

I completed the first installment,
https://blog.simos.info/how-to-initialize-lxd-again/

It talks about what to look for when you need to run "lxd init" again.
I strategically added other interesting info so it should be
educational in general.

I do not talk about removing the lxdbr0 bridge as it still works fine
even if it exists.
The upside is that there are no extra "dnsmasq" processes lying
around, which would have to be taken care of.

I am now again "rm -fr /var/log/lxd/" unless there is a good reason
(currently: only when downgrading LXD).

My next endevour is how to upgrade (to lxd-stable: 2.11) or downgrade
(back to 2.0.9 in 16.04).
As far as I understand, upgrading is being tested, so it just works.
For downgrading, it needs to "rm -fr /var/lib/lxd/".

Simos


More information about the lxc-users mailing list