The root cause is figured out:
by default, compute node lvg (nova-local) is using COW-image. If we need to use "local_lvm" we need to config compute node first by following steps:
step 1: lock compute node
# system host-lock m-compute-0 //if any active VMs running on the compute node, we need to stop them first, otherwise compute-0 cannot be locked
step 2: change nova-local to use lvm
system host-lvg-modify -b lvm m-compute-0 nova-local
step3: unlock compute node
Once the compute node is unlocked successfully, we can use the following cmd to check lvg "nova-local" and will see "lvm" is one of parameters now:
[wrsroot@controller-0 ~(keystone_admin)]$ system host-lvg-show m-compute-0 nova-local
+-----------------+-----------------------------------------------------------------------------------------------+
| Property | Value |
+-----------------+-----------------------------------------------------------------------------------------------+
| lvm_vg_name | nova-local |
| vg_state | provisioned |
| uuid | 5f871e21-3edc-4519-a846-c250281bb40d |
| ihost_uuid | c056ddfa-e560-4fa3-a922-64790db72dff |
| lvm_vg_access | wz--n- |
| lvm_max_lv | 0 |
| lvm_cur_lv | 2 |
| lvm_max_pv | 0 |
| lvm_cur_pv | 1 |
| lvm_vg_size_gib | 197.65 |
| lvm_vg_total_pe | 50599 |
| lvm_vg_free_pe | 2425 |
| created_at | 2018-11-02T03:14:13.314837+00:00 |
| updated_at | 2018-11-02T03:53:42.362393+00:00 |
| parameters | {u'concurrent_disk_operations': 2, u'instance_backing': u'lvm', 'instances_lv_size_gib': 5.0}
by now, we can create a flavor with "local_lvm" and create VMs.
Special NOTE: we need to make this cmd right:
# openstack flavor set --property aggregate_instance_extra_specs:storage=local_lvm m1.small
The root cause is figured out:
by default, compute node lvg (nova-local) is using COW-image. If we need to use "local_lvm" we need to config compute node first by following steps:
step 1: lock compute node
# system host-lock m-compute-0 //if any active VMs running on the compute node, we need to stop them first, otherwise compute-0 cannot be locked
step 2: change nova-local to use lvm
system host-lvg-modify -b lvm m-compute-0 nova-local
step3: unlock compute node
Once the compute node is unlocked successfully, we can use the following cmd to check lvg "nova-local" and will see "lvm" is one of parameters now: controller- 0 ~(keystone_admin)]$ system host-lvg-show m-compute-0 nova-local ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ 3edc-4519- a846-c250281bb4 0d | e560-4fa3- a922-64790db72d ff | 02T03:14: 13.314837+ 00:00 | 02T03:53: 42.362393+ 00:00 | disk_operations ': 2, u'instance_ backing' : u'lvm', 'instances_ lv_size_ gib': 5.0}
[wrsroot@
+------
| Property | Value |
+------
| lvm_vg_name | nova-local |
| vg_state | provisioned |
| uuid | 5f871e21-
| ihost_uuid | c056ddfa-
| lvm_vg_access | wz--n- |
| lvm_max_lv | 0 |
| lvm_cur_lv | 2 |
| lvm_max_pv | 0 |
| lvm_cur_pv | 1 |
| lvm_vg_size_gib | 197.65 |
| lvm_vg_total_pe | 50599 |
| lvm_vg_free_pe | 2425 |
| created_at | 2018-11-
| updated_at | 2018-11-
| parameters | {u'concurrent_
by now, we can create a flavor with "local_lvm" and create VMs. instance_ extra_specs: storage= local_lvm m1.small
Special NOTE: we need to make this cmd right:
# openstack flavor set --property aggregate_