ganto / copr-lxc3

RPM spec files for building lxc-3 on Fedora COPR
MIT License
8 stars 2 forks source link

Version 3.20 breaks LVM pool compatibility #22

Closed resdigita closed 4 years ago

resdigita commented 4 years ago

With version 3.20 it is no longer possible to create an LVM pool in a VG where LVs already reside (which should be the common case). According an ongoing discussion there might be a solution in future releases. In the meantime I have to go back to version 3.18 where this was still possible (considered a bug by developers).

Are there 3.18 (or earlier) packages for Epel 8 available anywhere? Unfortunately, I could only find 3.20 rpms so far.

ganto commented 4 years ago

Hmn, that's unfortunate. I'm also using LXD with lvm2. However, I've simply updated the package so I didn't notice yet this issue yet.

According an ongoing discussion there might be a solution in future releases.

Do you have any link about that? I'd be interested.

I just re-built the EPEL-8 packages for lxd-3.18-0.2. You can manually download them from: https://linuxmonk.ch/packages/lxc3/epel/8/

Unfortunately COPR only keeps the latest successful built. I'm trying to setup a COPR package archive, so that old packages continue to be available for such cases in the future.

resdigita commented 4 years ago

As long as you just update an existing installation you won't notice. I updated from CentOS 7 to 8 which is a new installation and got stuck. The discussion is here: (https://discuss.linuxcontainers.org/t/error-when-trying-to-use-an-existing-lvm-pool-with-a-new-installation/6809)

And thank you very much for version 3.18! I just downloaded everything. Thankfully I don't have to wait for the new version.

Many thanks!

resdigita commented 4 years ago

Just finished the reconstruction of the LXD runtime on two of our servers including restore of the most important containers using the 3.18 version you provided. Got a little late (or very early, depending on perspective), but I'm glad that it all worked out perfectly.

Again, many thanks!

mrmateo commented 4 years ago

@resdigita - how did you downgrade? I am getting the following: Error: Error creating database: schema version '39' is more recent than expected '38' after downgrading on my system from 3.20 -> 3.18.

resdigita commented 4 years ago

@mrmateo - I didn't downgrade an existing and working installation. I upgraded from CentOS 7 to 8, so I had to perform a completely new installation. I use a procedure to perform a backup of each container. In CentOS 8 I created a new lvm pool and restored each container from that backup.

Good luck!

ganto commented 4 years ago

how did you downgrade? I am getting the following: Error: Error creating database: schema version '39' is more recent than expected '38' after downgrading on my system from 3.20 -> 3.18.

I think downgrading is "officially" not supported. However LXD is creating a backup of the database before each upgrade. So if you want to downgrade you can try to copy back the /var/lib/lxd/database/local.db.bak to /var/lib/lxd/database/local.db.

mrmateo commented 4 years ago

Thanks for the info! I will remember that if I need to do it in the future.

I ended up fully removing the sub-volumes and then doing a fresh install and that worked. Had to re-create my containers but that didn't take too long. I guess it's a learning experience to test the upgrade first before doing it on the system where I'm actually using it :)

ganto commented 4 years ago

I few days ago, I built lxd-3.22-0.1 that should restore the LVM support on an VG with existing LVs.

See release notes of 3.22:

lxd/storage/drivers/driver/lvm: Adds lvm.vg.force_reuse config option

There is still a build problem with the >=Fedora 32 packages but since you were using CentOS I'm going close this issue.