Last modified 13 years ago
Last modified on 01/17/08 17:45:02
Space Manager V1 to V2 db migration
- run the regular rpm upgrade procedure
- do not start the SRM after running install.sh, instead
- run the provided migration script (replace localhost with the name of your Database machine if necessary):
/opt/d-cache/install/upgrade_space_manager_schema.sh -jdbcUrl=jdbc:postgresql://localhost/dcache -jdbcDriver=org.postgresql.Driver -dbUser=srmdcache -dbPass=srmdcache
Sites that use the '.pgpass' file to authenticate to the database should
replace '-dbPass=xxx' by '-pgPasss=/path/to/.pgpass'
Depending on the number of valid reservations, this procedure can take up to several hours You can find out the number of valid reservations by issuing the following SQL query:
select count(*) from srmspace where state=0;
If this is in the order of 1,000 then the migration script may take a few minutes. If the number of reservations is in the order of 1,000,000, the process may take ~5 hours.
Under no circumstances should this procedure be interrupted !- you can monitor this process by running the following SQL query directly on your database :
select count(*) from srmspace where usedspaceinbytes>0;
Don't do it too often so not to interfere with the main task
Example migration
$./upgrade_space_manager_schema.sh -jdbcUrl=jdbc:postgresql://f/dcache -jdbcDriver=org.postgresql.Driver -dbUser=xxxx -dbPass=xxxxx Constructor called VERY IMPORTANT We discovered that your current space manager schema version is 1. We are upgrading to schema version 2. We are going to update infromation in srmspace ans srmlinkgroup execute these two queries: +--------------------------------------------------------+ | FOR THE SPACE RESERVATIONS TO WORK CORRECTLY | | IT IS ABSOLUTELY IMPORTANT TO LET THESE QUERIES FINISH | | IT MAY TAKE A LONG TIME (MINUTES), PLEASE BEAR WITH US | | DO NOT INTERRUPT | | THIS ACTION WILL NOT BE REPEATED IN SUBSEQUENT STARTUPS| +--------------------------------------------------------+ Found 141 space reservations to update Found 3 linkgroups to update SUCCESSFULLY UPDATED SPACE MANAGER SCHEMA TO VERSION 2 IT IS SAFE TO START SRM Starting SRM
Last Modified Fri Feb 26 14:24:55 2021