如果更改了host=cinder这个配置项,会导致云盘的host名字发生变化,这时无法删除老的云盘等影响,因此需要更新对应云盘的host名字。
因此可以使用下面的命令更新一下host信息
cinder-manage volume update_host --currenthost 2c510cg#LVM --newhost cinder@lvm#lvm
更新前:
# cinder show b768d9af-85db-4f4c-89f8-a3df27e5f2e8
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-05-19T01:33:37.000000 |
| description | None |
| encrypted | False |
| id | b768d9af-85db-4f4c-89f8-a3df27e5f2e8 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | 2c510cg#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 551aa3665faa49278651fe15a532f21e |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2017-05-19T01:44:11.000000 |
| user_id | fabb5ca69b1f463dbecb6244d887ed44 |
| volume_type | lvm |
+--------------------------------+--------------------------------------+
执行命令更新所有的2c510cg#LVM为cinder@lvm#lvm
# cinder-manage volume update_host --currenthost 2c510cg#LVM --newhost cinder@lvm#lvm
# cinder show b768d9af-85db-4f4c-89f8-a3df27e5f2e8
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-05-19T01:33:37.000000 |
| description | None |
| encrypted | False |
| id | b768d9af-85db-4f4c-89f8-a3df27e5f2e8 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | cinder@lvm#lvm |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 551aa3665faa49278651fe15a532f21e |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2017-05-19T01:45:11.000000 |
| user_id | fabb5ca69b1f463dbecb6244d887ed44 |
| volume_type | lvm |
+--------------------------------+--------------------------------------
余亚飞,云计算软件工程师,参与OpenStack开源项目,主要从事于存储服务和镜像服务的开发和维护。
网友评论