Important : YAIM takes care of this migration automatilly.
To upgrade to the DPM version >= 1.4.1, you need to do two things :
- run a migration script, so that multiple domains are supported,
- upgrade the database schema, to add missing indexes
Multi Domain DPM
Do you need to do anything ?
As from DPM version >= ?, the DPM supports disk pools in different domains.
In LCG_2_7_0, even if the DPM server and the pool nodes are in the same domain,
YOU MUST RUN THE MIGRATION SCRIPT !!!!!! ( After the installation of the new version of the software but before configuring it !)
There are several cases :
- case 1 : you are setting up a DPM from scratch,
- case 2 : you already have a DPM installed
For
case 1, the standard installation is enough. See the
DPM Administrators' Guide.
For
case 2, you
must run the updateDomainName
script, that comes with the
DPM-name-server
RPM. The arguments are slightly different depending if the DPM database backend is
MysQL
or
Oracle
.
Requirements
To run the
updateDomainName
script, you need to install :
corresponding to the DPM database backend (
MySQL
or
Oracle
).
(The rpms are: perl-DBD-mysql or perl-DBD-Oracle )
Note: if using Mysql >= 4.1, perl-DBD-mysql >= 2.9003 should be used.
At CERN, the useful RPMs are located in
/afs/cern.ch/project/linux/cern/slc304/i386/SL/RPMS/
:
perl-Tk-804.027-1.i386.rpm
CERN-dummy-afs-provides-1-1.i386.rpm
perl-DBD-Oracle-1.15-3.cern.i386.rpm
perl-DBI-1.32-9.i386.rpm
perl-DBD-MySQL-2.1021-3.i386.rpm
For help about perl, go to
http://www.cpan.org
Then, run the
updateDomainName
script : it will update the
host
and
sfn
fields in the
Cns_file_replica
table with the fully qualified host names of the disk servers. It will also update the
server
field in the
dpm_fs
table.
Mysql
You have to specify :
- the domain name, for instance
cern.ch
- the database vendor, here
MySQL
- the Mysql server host name, for instance
my_mysql_server
- the DPNS and DPM database user, for instance
dpm
- the file containing the DPM database user's password, for instance
dpm_password_file
- the Mysql database name, for instance
cns_db
$ cd /opt/lcg/share/DPM/multiple-domains/
$ ./updateDomainName --domain-name "cern.ch" --db-vendor MySQL --db my_mysql_server --user dpm --pwd-file /path/to/dpm_password_file --dpns-db cns_db --dpm-db dpm_db --verbose
The file containing the DPM user password should be readable only by you, and deleted afterwards.
Note : make sure the DPM user has access to the
cns_db
and
dpm_db
databases from the host you are running the script.
GRANT ALL PRIVILEGES ON cns_db.* TO 'dpm'@my_host IDENTIFIED BY 'dpm_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON dpm_db.* TO 'dpm'@my_host IDENTIFIED BY 'dpm_password' WITH GRANT OPTION;
Oracle
You have to specify :
- the domain name, for instance
cern.ch
- the database vendor, here
Oracle
- the Oracle database SID, for instance
LFC
- the DPNS database user, for instance
dpm
- the file containing the DPM database user password, for instance
dpm_password_file
Make sure that the following environment variables are set :
$ cd /opt/lcg/share/DPM/multiple-domains/
$ ./updateDomainName --domain-name "cern.ch" --db-vendor Oracle --db LFC --user dpm --pwd-file /path/to/dpm_password_file --verbose
The file containing the DPM user password should be readable only by you, and deleted afterwards.
Check
To check that the migration run well,
execute :
$ dpm-qryconf
after you finished the configuration (ex. yaim's configure_node)
The disk servers should appear with the domain name.
When adding a new disk server, you should now specify the fully qualified hostname :
dpm-addfs --poolname Volatile --server se001.domain.name --fs /data01
Database schema upgrade
To add missing indexes in the database schema, you also have to run another script :
Mysql
$ mysql -u dpm_user -pdpm_password --database dpm_db < /opt/lcg/share/DPM/migrate-mysql-schema-to-2-1-0.sql
Oracle
$ sqlplus dpm_user/dpm_password@database_sid < /opt/lcg/share/DPM/migrate-oracle-schema-to-2-1-0.sql
Troubleshooting
In case the script complains about
NLS_XXXX
parameters, just unset all the
NLS_XXXX
environment variables before running the script :
unset NLS_LANG
unset ORA_NLS33
unset NLS_DATE_FORMAT
Help !
For help or in case you have any question, please contact
hep-service-dpm@cernNOSPAMPLEASE.ch (remove the NOSPAM!).
--
SophieLemaitre - 25 Apr 2006