Dear all, I have a 4-way multi-master openldap servers running in version 2.4.11. Let's say the servers name are A, B, C, D. I have another 4-way multi-master openldap servers running in version 2.4.40. Let's say the servers name are W,X,Y,Z. What's the proper procedure of migrating the data from servers A,B,C,D to W,X,Y,Z ? My procedure is as follows :- Export data from server A using slapcat command.- Delete the first 6 lines of the ldif files (the lines contains the contextCSN).- Shutdown the process slapd in servers W,X,Y,Z and remove all the openldap data files under /usr/local/var/openldap-data.- Import the ldif files to server W, then start the slapd process in server W.- Export the ldif files from server W.- Import the ldif files to server X,Y,Z respectively.- Start the slapd process in X,Y,Z. What I observe is that all four servers then has 100% CPU and never drop back to idle ? So, is there anything I do wrong ? Thanks
On Wed, Feb 04, 2015 at 08:56:08AM +0000, Gary Ho wrote:
What's the proper procedure of migrating the data from servers A,B,C,D to W,X,Y,Z ?
My procedure is as follows :
- Export data from server A using slapcat command.
- Delete the first 6 lines of the ldif files (the lines contains the
contextCSN).
- Shutdown the process slapd in servers W,X,Y,Z and remove all the openldap
data files under /usr/local/var/openldap-data.
- Import the ldif files to server W, then start the slapd process in server W.
- Export the ldif files from server W.
- Import the ldif files to server X,Y,Z respectively.
- Start the slapd process in X,Y,Z.
I don't think it needs to be that complex. I would do something more like this:
- Shutdown the process slapd in servers W,X,Y,Z and remove all the openldap data files under /usr/local/var/openldap-data. - Export data from server A using slapcat command. - Import the data to each of the new servers, taking care to use the -w flag on slapadd. - Start the slapd process in W,X,Y,Z.
Another option is to add the new servers one at a time to the existing topology (which would still involve export and import of LDIF if there is a significant amount of data). You could then migrate the clients gradually and eventually remove the old servers. This would achieve transition without a break in service.
What I observe is that all four servers then has 100% CPU and never drop back to idle ?
I have seen something like that before where the new servers were trying to fetch all entries from all other servers. They were spinning on locks as each syncrepl consumer thread was trying to write the same set of entries. Importing with the -w flag should reduce the risk of that.
Andrew
openldap-technical@openldap.org