LFC migration HOWTO
Contents
Introduction
This guide describes the procedure to migrate an old LFC_mysql glite3.2 service to the latest EMI version stored at EGI UMD. We make some assumptions:
- We will migrate our LFC system from machine A (gLite3.2) to B (EMI).
- A and B have the same hostname and host certificate (LFC domain name does not change.)
- We will use UMD repository to install EMI middleware.
Backup old LFC (A)
This machine will be replaced by machine B. We have to backup our current LFC DB.
First steps (A)
Remember: First of all create a scheduled downtime for your LFC in GOCDB. - When scheduled downtime starts stop LFC services except mysql.
Backup your LFC_mysql database (A)
- In A you must dump and put in a safe place your LFC database. This point is critical to maintain your LFC catalog information. As root (look for root mysql pass in your site-info.def file):
mysqldump --opt -u root -p'*****' cns_db > cns_db.sql
Copy this file in a safe place (outside A).
Backup your yaim conf and host certs (A)
We will use the same conf and VOs for B so we can backup our yaim conf files: groups.conf, site-info.def, users.conf and vo.d
- Copy your hosts certs in a safe place:
/etc/grid-security/hostcert.pem /etc/grid-security/hostkey.pem
Copy these files in a safe place (outside A). - After that we can shutdown our old machine and we can start with B installation.
New LFC_mysql installation (B)
Installing the UMD repository (B)
We will use an x86_64 SL5 OS to start. Preparing the system to install the UMD software, http://repository.egi.eu/category/umd_releases/distribution/umd_1/
1. Remove all UMD and EPEL related configuration files that may exist from /etc/yum.repos.d so that there is no misconfigured epel or UMD repositories.
Note be careful not to remove the OS or other necessary repo configuration files
execute rm /etc/yum.repos.d/UMD* /etc/yum.repos.d/epel*
2. Install epel-release-5-4.noarch.rpm
execute wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum install epel-release-5-4.noarch.rpm
3. Install yum-priorities RPM
execute yum install yum-priorities
4. Install the umd-release RPM that adds all missing repositories that are needed for the installation of UMD products and configures yum priorities
execute wget http://repository.egi.eu/sw/production/umd/1/sl5/x86_64/updates/umd-release-1.0.2-1.el5.noarch.rpm
yum install umd-release-1.0.2-1.el5.noarch.rpm- The Production sites will need to configure the following repositories
* The Main OS Repository
* EGI Trust Anchor Repository: use the .repo files at EGI CAs repository, http://repository.egi.eu/sw/production/cas/1/current/repo-files/
* UMD Production Repository: use the .repo files at UMD repository, http://repository.egi.eu/sw/production/umd/1/repofiles/
It is required to set the UMD repository with the highest priority in order to avoid possible discrepancies with EPEL.
- In order to do this, you will need to install yum-priorities package and verify that the .repo file for UMD has
protect=1 priority=1 Also make sure that your /etc/yum/pluginconf.d/priorities.conf file has [main] enabled = 1 check_obsoletes = 1
Install LFC_mysql middleware (B)
- Install the new middleware (In this case we will install lfc_mysql file catalog). Run:
yum clean all yum install emi-lfc_mysql yum install mysql-server
- Copy yaim conf backup files to B and run yaim.
/opt/glite/yaim/bin/yaim -c -s site-info.def -n emi_lfc_mysql
At this point you have a new LFC service using UMD repos. You must recover your old database to find your old files catalog.
Recover LFC information (B)
We will recover all LFC info in our new service, like in A we have to stop all LFC services except mysql daemon.
Copy mysql dump to B and recover the database running this command. (time for a coffee break
)
mysql -u root -p'*****' cns_db < cns_db.sql
Now for clean up some things and update your database schema we can re-run yaim conf. (It will check our database schema and restart lfc services).
/opt/glite/yaim/bin/yaim -c -s site-info.def -n emi_lfc_mysql
After this reconfiguration our old catalog it will available in our new LFC box.
