Thursday, June 18, 2009

DPM 1.7.0 upgrade

I took advantage of a downtime to upgrade our DPM server. We need the upgrade as we want to move files around using dpm-drain and don't want to lose space token associations. As we don't use YAIM I had to run the upgrade script manually, but it wasn't too difficult. Something like this should work (after putting the password in a suitable file):


./dpm_db_310_to_320 --db-vendor MySQL --db $DPM_HOST --user dpmmgr --pwd-file /tmp/dpm-password --dpm-db dpm_db


I discovered a few things to watch out for along the way though. Here's my checklist:

  1. Make sure you have enough space on your system disk: I got bitten by this on a test server. The upgrade script needs a good chunk of space (comparable to that already used by the MySQL DB?) to perform the upgrade
  2. There's a mysql setting you probably need to tweak first: add set-variable=innodb_buffer_pool_size=256M to the [mysqld] section in /etc/mysql.conf and restart mysql. Otherwise you get this cryptic error:

    Thu Jun 18 09:02:30 2009 : Starting to update the DPNS/DPM database.
    Please wait...
    failed to query and/or update the DPM database : DBD::mysql::db do failed: The total number of locks exceeds the lock table size at UpdateDpmDatabase.pm line 19.
    Issuing rollback() for database handle being DESTROY'd without explicit disconnect().


    Also worth noting is that if this happens to you, when you try to re-run the script (or YAIM) you will get this error:

    failed to query and/or update the DPM database : DBD::mysql::db do failed: Duplicate column name 'r_uid' at UpdateDpmDatabase.pm line 18.
    Issuing rollback() for database handle being DESTROY'd without explicit disconnect().


    This is because the script has already done this step. You need to edit /opt/lcg/share/DPM/dpm-db-310-to-320/UpdateDpmDatabase.pm and comment out this line:

    $dbh_dpm->do ("ALTER TABLE dpm_get_filereq ADD r_uid INTEGER");


    You should then be able to run the script to completion.

2 comments:

Sam Skipsey said...

Ah, on the second point, it seems reasonable to set your buffer pool size to a large number anyway, as it improves the database performance. We've had it set to a suitable chunk of the total system memory at Glasgow for a while.

Unknown said...

Stephen,

Thanks for the information, I was bitten by the same problem today...!!! I'll try your receipe.

Michel