openstack_multiple_cinder_backend

Openstack multiple cinder backend

Ceph backend 사용시 cinder의 기본 backend pool인 volumes외에 추가 pool을 사용하고자 하는 경우 CinderRbdExtraPools 속성을 추가한다.

parameter_defaults:
  CephClientKey: AQDwDCdiAAAAABAACo5BC/EwTx16sAxTSzyT5Q==
  CephClusterFSID: 78150b72-0a47-44fd-bea0-c38af1e74077
  CephExternalMonHost: 172.16.1.31, 172.16.1.32, 172.16.1.33

  CephAnsiblePlaybookVerbosity: 1

  CinderRbdExtraPools: hddpool,ssdpool

위와같이 추가하게 되면 hddpool, ssdpool 을 추가 volume backend로 사용할 수 있게 된다.

(overcloud) [stack@director ~]$ openstack volume service list
+------------------+--------------------------------+------+---------+-------+----------------------------+
| Binary           | Host                           | Zone | Status  | State | Updated At                 |
+------------------+--------------------------------+------+---------+-------+----------------------------+
| cinder-scheduler | overcloud-controller-1         | nova | enabled | up    | 2022-03-10T09:01:58.000000 |
| cinder-scheduler | overcloud-controller-2         | nova | enabled | up    | 2022-03-10T09:01:58.000000 |
| cinder-scheduler | overcloud-controller-0         | nova | enabled | up    | 2022-03-10T09:01:58.000000 |
| cinder-volume    | hostgroup@tripleo_ceph         | nova | enabled | up    | 2022-03-10T09:01:56.000000 |
| cinder-volume    | hostgroup@tripleo_ceph_hddpool | nova | enabled | up    | 2022-03-10T09:01:56.000000 |
| cinder-volume    | hostgroup@tripleo_ceph_ssdpool | nova | enabled | up    | 2022-03-10T09:01:56.000000 |
+------------------+--------------------------------+------+---------+-------+----------------------------+

2가지 볼륨 서비스가 추가로 기동된것을 확인 할 수 있다.

이후 볼륨 타입을 추가해준다.

(overcloud) [stack@director ~]$ cinder type-list
+--------------------------------------+-------------+---------------------+-----------+
| ID                                   | Name        | Description         | Is_Public |
+--------------------------------------+-------------+---------------------+-----------+
| 98653d20-8229-4ce1-9b63-855c5acfa85b | tripleo     | -                   | True      |
| bda85913-bd4a-48e5-b054-3fa6060f9573 | __DEFAULT__ | Default Volume Type | True      |
+--------------------------------------+-------------+---------------------+-----------+
(overcloud) [stack@director ~]$ cinder type-create ssd
+--------------------------------------+------+-------------+-----------+
| ID                                   | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 6924bd4d-db05-48e3-97b7-e29204a405a3 | ssd  | -           | True      |
+--------------------------------------+------+-------------+-----------+
(overcloud) [stack@director ~]$ cinder type-key ssd set volume_backend_name=tripleo_ceph_ssdpool
(overcloud) [stack@director ~]$ cinder type-show ssd
+---------------------------------+--------------------------------------------+
| Property                        | Value                                      |
+---------------------------------+--------------------------------------------+
| description                     | None                                       |
| extra_specs                     | volume_backend_name : tripleo_ceph_ssdpool |
| id                              | 6924bd4d-db05-48e3-97b7-e29204a405a3       |
| is_public                       | True                                       |
| name                            | ssd                                        |
| os-volume-type-access:is_public | True                                       |
| qos_specs_id                    | None                                       |
+---------------------------------+--------------------------------------------+
(overcloud) [stack@director ~]$ cinder create 100 --name testdisk1 --volume-type ssd
+--------------------------------+-----------------------------------------------------+
| Property                       | Value                                               |
+--------------------------------+-----------------------------------------------------+
| attachments                    | []                                                  |
| availability_zone              | nova                                                |
| bootable                       | false                                               |
| consistencygroup_id            | None                                                |
| created_at                     | 2022-03-10T08:52:45.000000                          |
| description                    | None                                                |
| encrypted                      | False                                               |
| id                             | 5d02afcb-8ef4-47d1-b0e4-397247c815e0                |
| metadata                       | {}                                                  |
| migration_status               | None                                                |
| multiattach                    | False                                               |
| name                           | testdisk1                                           |
| os-vol-host-attr:host          | hostgroup@tripleo_ceph_ssdpool#tripleo_ceph_ssdpool |
| os-vol-mig-status-attr:migstat | None                                                |
| os-vol-mig-status-attr:name_id | None                                                |
| os-vol-tenant-attr:tenant_id   | eec3f6c05c8d418bbfe1bf9c1ae53fa8                    |
| replication_status             | None                                                |
| size                           | 100                                                 |
| snapshot_id                    | None                                                |
| source_volid                   | None                                                |
| status                         | creating                                            |
| updated_at                     | 2022-03-10T08:52:46.000000                          |
| user_id                        | 3108f8a70f9e4db3a57e4234eec30e60                    |
| volume_type                    | ssd                                                 |
+--------------------------------+-----------------------------------------------------+
(overcloud) [stack@director ~]$ cinder list
+--------------------------------------+-----------+-----------+------+-------------+----------+-------------+
| ID                                   | Status    | Name      | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-----------+------+-------------+----------+-------------+
| 5d02afcb-8ef4-47d1-b0e4-397247c815e0 | available | testdisk1 | 100  | ssd         | false    |             |
+--------------------------------------+-----------+-----------+------+-------------+----------+-------------+

이 구성은 아예 Ceph Cluster를 2개 이상 사용하고자 하는 경우에 사용한다.

parameter_defaults:
  ControllerExtraConfig:
    cinder::config::cinder_config:

        rbd-ssd/volume_backend_name:
            value: rbd-ssd
        rbd-ssd/volume_driver:
            value: cinder.volume.drivers.rbd.RBDDriver
        rbd-ssd/rbd_ceph_conf:
            value: /etc/ceph/ceph2.conf
        rbd-ssd/rbd_user:
            value: openstack
        rbd-ssd/rbd_pool:
            value: volumes
        rbd-ssd/rbd_flatten_volume_from_snapshot:
            value: False
        rbd-ssd/rbd_secret_uuid:
            value: b90a96f8-7bee-41b2-ac0e-bea083261177
        rbd-ssd/report_discard_supported:
            value: True

    cinder_user_enabled_backends: ['rbd-ssd']
로그인하면 댓글을 남길 수 있습니다.
  • openstack_multiple_cinder_backend.txt
  • 마지막으로 수정됨: 2022/03/10 09:05
  • 저자 koov