DPM upgrade to >= 1.6.0
Below, all the steps needed to upgrade the DPM from version < 1.6.0 to version >= 1.6.0.
Stop all daemons
In the following order, on the appropriate machines:
-
service dpm-gsiftp stop
on all disk servers
-
service srmv2 stop
on the SRM host
-
service srmv1 stop
on the SRM host
-
service dpm stop
on the DPM host
-
service rfiod stop
on all the disk servers
-
service dpnsdaemon stop
on the DPNS host
Install the new RPMs
All of them, on the appropriate node(s):
-
DPM-server
-
DPM-name-server
-
DPM-srm-server
-
DPM-rfio-server
-
DPM-gridftp-server
-
DPM-client
Database backup
IMPORTANT
As the migration script modifies the database content,
we highly recommend that you take a backup of the DPM database before running the migration script.
Please backup both databases
cns_db
and
dpm_db
beforehand.
Run the migration script
To support SRMv2.2, a database schema change is needed. The migration script is included in the
DPM-name-server
RPM.
Requirements:
- Perl-DBD (for Mysql or Oracle)
- Perl-DBI
NOTE Depending of the number of entries in the database, the script takes more or less time. So, be patient !
Example for a Mysql DPM
$ cd /opt/lcg/share/DPM/dpm-support-srmv2.2/
$ ./dpm_support_srmv2.2 --db-vendor MySQL --db localhost --user dpm_user --pwd-file /tmp/pwd \
--dpns-db cns_db --dpm-db dpm_db --verbose
Example for an Oracle DPM
cd /opt/lcg/share/DPM/dpm-support-srmv2.2/
$ ./dpm_support_srmv2.2 --db-vendor Oracle --db db_oracle_sid --user dpm_user --pwd-file /tmp/pwd --verbose
Troubleshooting
Existing indexes
Don't worry if you get the following "error" output, it is harmless.
It will appear if the
G_PFN_IDX
and
P_PFN_IDX
indexes already exist.
In this case, you can consider that the migration script has been successfully run.
failed to query and/or update the DPNS/DPM databases : DBD::mysql::db do failed:
Duplicate key name 'G_PFN_IDX' at UpdateDpmDatabase.pm line 264.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
Error on rename
We believe the following error
Error on rename
is due to a bug in Mysql.
failed: Error on rename of './dpm_db/#sql-4083_25' to './dpm_db/dpm_pool' (errno: 150)
at UpdateDpmDatabase.pm line 118.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
You should:
- drop the foreign key
- run the script again
- re-create the foreign key
mysql> use dpm_db;
mysql> alter table dpm_fs drop foreign key fk_fs;
$ ./dpm_support_srmv2.2 --db-vendor MySQL --db localhost --user dpm --pwd-file /tmp/pwd \
--dpns-db cns_db --dpm-db dpm_db --verbose
mysql> alter table dpm_fs add CONSTRAINT fk_fs FOREIGN KEY (poolname) REFERENCES dpm_pool (poolname);
Undefined subroutine
You get:
Undefined subroutine &UpdateDpmDatabase::modify_dpm_db_before_updating_fields_mysql
called at ./dpm_support_srmv2.2 line 113.
To solve this, you should (re)define the
$PERLLIB
environment variable:
$ export PERLLIB=/opt/lcg/share/DPM/dpm-support-srmv2.2:$PERLLIB
SRMv2.2 daemon
A new daemon - supporting SRMv2.2 - has to run.
Same step as for the other daemons:
cp /etc/sysconfig/srmv2.2.templ /etc/sysconfig/srmv2.2
Then, edit
/etc/sysconfig/srmv2.2
, and replace
and
according to your setup :
# - DPM host : please change !!!!!!
export DPM_HOST=<DPM_hostname>
# - DPM Name Server host : please change !!!!!!
export DPNS_HOST=<DPNS_hostname>
Chkconfig it on:
/sbin/chkconfig srmv2.2 on
Restart the daemons
-
service dpnsdaemon start
on the DPNS host
-
service rfiod start
on all the disk servers
-
service dpm start
on the DPM host
-
service srmv1 start
on the SRM host
-
service srmv2 start
on the SRM host
-
service srmv2.2 start
on the SRM host don't forget this new one
-
service dpm-gsiftp start
on all disk servers
--
SophieLemaitre - 20 Mar 2007