On sze, máj 07, 2014 at 13:06:07 -0700, Philip Guenther wrote: > On Fri, May 2, 2014 at 1:27 AM, LEVAI Daniel <l...@ecentrum.hu> wrote: > > > I've recently upgraded one of my systems to 55 from 54 (btw, for me, the > > most painful upgrade since ~3.9; I don't know what happened but > > everything was against me), and one of the obstacles was the openldap > > upgrade. I was using openldap-2.4 with bdb on 5.4 also, so I thought it > > would be a clean cut. After trying to start slapd, it barked about the > > bdb's consistency: > > > > __db.001: unable to find environment > > txn_checkpoint interface requires an environment configured for the > > transaction subsystem > > ... etc ... (the precise error message would require the restore of the > > old db files, but what's important is there) > > > > Ah yes. The __db.0* 'environment' files are just the backing-store for the > shared memory images. As a result, their internal layouts are dependent on > the sizes of many system types, as well as on bdb's compile time debugging > flags. As a result, they can be removed without loss of data whenever the > database isn't open in any process.
Ah, wow, thanks Philip. I didn't know much about bdb... I would have never dared to delete those files, given that one of them is more than 320MiB (I mean, look at that size; there has to be *something* important there :D ). But you are of course absolutely right, and simply deleting th __db files and starting slapd would have sufficed during the upgrade process. > If closed cleanly, then it can be opened again without having to > perform recovery, though many application just always perform recovery > on the first open, to make sure. (So performing transaction > checkpoints regularly and just before closing is good.) > > So: when upgrading, you should be removing the __db.* files for openldap. Right, simple as that. If only I had even a little knowledge about BDB beforehand... :) > (That's *not* the case with the actual database file formats (btree, hash, > queue, recno): those use fixed-size types internally. On the gripping > hand, the actual data that the application is storing in the databases' > keys and values *may* be dependent on the system types!) So, is this a good start (I've tried to reproduce Philip's technical insight by copying his relevant sentences): --- upgrade55.html 2014-05-08 15:13:33.541722106 +0200 +++ upgrade55.html.new 2014-05-08 15:21:12.922729991 +0200 @@ -843,6 +843,19 @@ This is in addition to the database sche usual for Icinga-web/NDOUtils users (see the pkg-readme for more information). +<p> +<li><b>openldap-bdb:</b> +The __db.* 'environment' files are the backing-store for the shared memory +images. As a result, their internal layouts are dependent on the size of many +system types, and the __db.* file format on 32-bit architectures will not be +compatible. +<p> +After upgradeing bdb (along with OpenLDAP), the __db.* files must +be removed from the openldap-data directory, to be able to start slapd. This is +a safe procedure, and can be done without loss of data, <b>but only if the +database is not open in any process.</b> +<p> +This is not necessary on 64-bit architectures (amd64, sparc64, etc). </ul> <p> -- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F