Jump to: navigation, search

Difference between revisions of "MigrateToCinder"

m (Text replace - "__NOTOC__" to "")
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
== Migrate From Nova-Volumes to Cinder ==
 
== Migrate From Nova-Volumes to Cinder ==
  
 
The process for migrating from nova-volumes to cinder is as follows.
 
The process for migrating from nova-volumes to cinder is as follows.
  
# upgrade your nova install to folsom
+
# upgrade nova install to folsom
# upgrade your nova database using `nova-manage db sync`
+
# upgrade nova database using `nova-manage db sync`
# install the folsom version of cinder
+
# install folsom version of Cinder
# create a cinder database using `cinder-manage db sync`
+
# create a cinder user in keystone as an admin in services tenant and edit '/etc/cinder/api-past.ini' to reflect the correct `admin_user`,`admin_tenant_name`, and `admin_password`
# copy data from nova database using `cinder-manage migrate import_db --src=$NOVA_SQL_CONN --dest=$CINDER_SQL_CONN`
+
# create Cinder database and database user
# disable the nova-volume-api in enabled apis in /etc/nova/nova.conf `sed -i "s/osapi_volume,// /etc/nova/nova.conf"`
+
# check that `sql_connection` in `/etc/cinder/cinder.conf` is correct
 +
# create empty database tables with <code><nowiki>cinder-manage db sync</nowiki></code>
 +
# copy over volume tables using `cinder-manage migrate import_db --src=$NOVA_SQL_CONN --dest=$CINDER_SQL_CONN`
 +
 
 +
    '''NOTE:''' Do not include the database names in --src or --dest; cinder-manage assumes your source database is named "nova" and that your destination database is named "cinder", and appends these to the strings you supply.
 +
 
 +
# copy over iSCSI target information with <code><nowiki> cinder-manage migrate copy_ptgt_files --src=/var/lib/nova-volume/volumes --dest=/var/lib/cinder/volumes </nowiki></code>
 +
# set the correct volume api class in nova.conf `volume_api_class=nova.volume.cinder.API`
 +
# disable the nova-volume-api in enabled apis in /etc/nova/nova.conf <code><nowiki>sed -i "s/osapi_volume,// /etc/nova/nova.conf"</nowiki></code>, if you do not have enabled_apis set explicitly set it to `enabled_apis=ec2,osapi_compute,metadata` as osapi_volume is included by default
 
# restart nova-api
 
# restart nova-api
 
# start cinder-api
 
# start cinder-api
 +
# be sure that `/etc/tgt/conf.d/cinder.conf` exists and has an include line that matches <code><nowiki>volumes_dir</nowiki></code> option in `cinder.conf` in the default case this is `include /var/lib/cinder/volumes/*`, if you edit this file restart the tgtd service

Latest revision as of 23:31, 17 February 2013

Migrate From Nova-Volumes to Cinder

The process for migrating from nova-volumes to cinder is as follows.

  1. upgrade nova install to folsom
  2. upgrade nova database using `nova-manage db sync`
  3. install folsom version of Cinder
  4. create a cinder user in keystone as an admin in services tenant and edit '/etc/cinder/api-past.ini' to reflect the correct `admin_user`,`admin_tenant_name`, and `admin_password`
  5. create Cinder database and database user
  6. check that `sql_connection` in `/etc/cinder/cinder.conf` is correct
  7. create empty database tables with cinder-manage db sync
  8. copy over volume tables using `cinder-manage migrate import_db --src=$NOVA_SQL_CONN --dest=$CINDER_SQL_CONN`
   NOTE: Do not include the database names in --src or --dest; cinder-manage assumes your source database is named "nova" and that your destination database is named "cinder", and appends these to the strings you supply.
  1. copy over iSCSI target information with cinder-manage migrate copy_ptgt_files --src=/var/lib/nova-volume/volumes --dest=/var/lib/cinder/volumes
  2. set the correct volume api class in nova.conf `volume_api_class=nova.volume.cinder.API`
  3. disable the nova-volume-api in enabled apis in /etc/nova/nova.conf sed -i "s/osapi_volume,// /etc/nova/nova.conf", if you do not have enabled_apis set explicitly set it to `enabled_apis=ec2,osapi_compute,metadata` as osapi_volume is included by default
  4. restart nova-api
  5. start cinder-api
  6. be sure that `/etc/tgt/conf.d/cinder.conf` exists and has an include line that matches volumes_dir option in `cinder.conf` in the default case this is `include /var/lib/cinder/volumes/*`, if you edit this file restart the tgtd service