跳转到: 导航, 搜索

迁移到Cinder

从 Nova-Volumes 迁移到 Cinder

从 nova-volumes 迁移到 cinder 的过程如下。

  1. 将 nova 安装升级到 folsom
  2. 使用 `nova-manage db sync` 升级 nova 数据库
  3. 安装 folsom 版本的 Cinder
  4. 在 keystone 中创建一个 cinder 用户,作为 services tenant 中的管理员,并编辑 '/etc/cinder/api-past.ini' 以反映正确的 `admin_user`、`admin_tenant_name` 和 `admin_password`
  5. 创建 Cinder 数据库和数据库用户
  6. 检查 `/etc/cinder/cinder.conf` 中的 `sql_connection` 是否正确
  7. 使用 cinder-manage db sync 创建空的数据库表
  8. 使用 `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. 使用 cinder-manage migrate copy_ptgt_files --src=/var/lib/nova-volume/volumes --dest=/var/lib/cinder/volumes 复制 iSCSI 目标信息
  2. 在 nova.conf 中设置正确的卷 API 类 `volume_api_class=nova.volume.cinder.API`
  3. 禁用 /etc/nova/nova.conf 中已启用的 API 中的 nova-volume-api sed -i "s/osapi_volume,// /etc/nova/nova.conf",如果您没有显式设置 enabled_apis,请将其设置为 `enabled_apis=ec2,osapi_compute,metadata`,因为 osapi_volume 默认包含在内
  4. 重启 nova-api
  5. 启动 cinder-api
  6. 确保 `/etc/tgt/conf.d/cinder.conf` 存在,并且包含一个与 `cinder.conf` 中的 `volumes_dir` 选项匹配的 include 行,默认情况下为 `include /var/lib/cinder/volumes/*`,如果编辑此文件,请重启 tgtd 服务