이 섹션에서는 코드네임 cinder라 불리는 블록 스토리지 서비스를 컨트롤러 노드에 설치하고 설정하는 방법을 설명합니다. 이 서비스는 볼륨을 인스턴스에 재공할 최소한 한대의 추가 노드를 요구합니다.
Block 스토리지 서비스를 설치 및 구성하기 전에, 데이터베이스, 서비스 credential 및 API 엔드 포인트를 생성해야 합니다.
데이터베이스를 생성하기 위하여, 다음 과정을 완료해야 합니다:
데이터베이스 액세스 클라이언트를 사용하여 데이터베이스  서버에 root 사용자로 연결합니다:
# mysql
cinder 데이터베이스를 생성합니다:
MariaDB [(none)]> CREATE DATABASE cinder;
cinder 데이터베이스에 올바른 액세스를 부여합니다:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
  IDENTIFIED BY 'CINDER_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
  IDENTIFIED BY 'CINDER_DBPASS';
CINDER_DBPASS 를 적절한 암호로 변경합니다.
데이터베이스 접속 클라이언트를 종료합니다.
admin credential을 소스로 사용하여 관리자 전용 CLI 명령어에 대한 액세스를 갖습니다:
$ . admin-openrc
서비스 credential을 생성하기 위해, 다음 스텝들을 완료합니다:
cinder 사용자를 생성합니다:
$ openstack user create --domain default --password-prompt cinder
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 9d7e33de3e1a498390353819bc7d245d |
| name                | cinder                           |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
admin role을 cinder 사용자에 추가합니다:
$ openstack role add --project service --user cinder admin
주석
이 명령어는 출력이 없습니다.
``cinderv2 `` 및 ``cinderv3 `` 서비스 엔티티를 생성합니다:
$ openstack service create --name cinderv2 \
  --description "OpenStack Block Storage" volumev2
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Block Storage          |
| enabled     | True                             |
| id          | eb9fd245bdbc414695952e93f29fe3ac |
| name        | cinderv2                         |
| type        | volumev2                         |
+-------------+----------------------------------+
$ openstack service create --name cinderv3 \
  --description "OpenStack Block Storage" volumev3
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Block Storage          |
| enabled     | True                             |
| id          | ab3bbbef780845a1a283490d281e7fda |
| name        | cinderv3                         |
| type        | volumev3                         |
+-------------+----------------------------------+
주석
블록 스토리지 서비스는 두 서비스 엔티티를 필요로 합니다.
블록 스토리지 서비스 API 엔드 포인트를 생성합니다:
$ openstack endpoint create --region RegionOne \
  volumev2 public http://controller:8776/v2/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | 513e73819e14460fb904163f41ef3759         |
| interface    | public                                   |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | eb9fd245bdbc414695952e93f29fe3ac         |
| service_name | cinderv2                                 |
| service_type | volumev2                                 |
| url          | http://controller:8776/v2/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
  volumev2 internal http://controller:8776/v2/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | 6436a8a23d014cfdb69c586eff146a32         |
| interface    | internal                                 |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | eb9fd245bdbc414695952e93f29fe3ac         |
| service_name | cinderv2                                 |
| service_type | volumev2                                 |
| url          | http://controller:8776/v2/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
  volumev2 admin http://controller:8776/v2/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | e652cf84dd334f359ae9b045a2c91d96         |
| interface    | admin                                    |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | eb9fd245bdbc414695952e93f29fe3ac         |
| service_name | cinderv2                                 |
| service_type | volumev2                                 |
| url          | http://controller:8776/v2/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
  volumev3 public http://controller:8776/v3/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | 03fa2c90153546c295bf30ca86b1344b         |
| interface    | public                                   |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | ab3bbbef780845a1a283490d281e7fda         |
| service_name | cinderv3                                 |
| service_type | volumev3                                 |
| url          | http://controller:8776/v3/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
  volumev3 internal http://controller:8776/v3/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | 94f684395d1b41068c70e4ecb11364b2         |
| interface    | internal                                 |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | ab3bbbef780845a1a283490d281e7fda         |
| service_name | cinderv3                                 |
| service_type | volumev3                                 |
| url          | http://controller:8776/v3/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
  volumev3 admin http://controller:8776/v3/%\(project_id\)s
+--------------+------------------------------------------+
| Field        | Value                                    |
+--------------+------------------------------------------+
| enabled      | True                                     |
| id           | 4511c28a0f9840c78bacb25f10f62c98         |
| interface    | admin                                    |
| region       | RegionOne                                |
| region_id    | RegionOne                                |
| service_id   | ab3bbbef780845a1a283490d281e7fda         |
| service_name | cinderv3                                 |
| service_type | volumev3                                 |
| url          | http://controller:8776/v3/%(project_id)s |
+--------------+------------------------------------------+
주석
블록 스토리지 서비스는 각 서비스 엔티티에 대한 엔드 포인트를 필요로 합니다.
패키지를 설치하십시오:
# apt install cinder-api cinder-scheduler
/etc/cinder/cinder.conf 파일을 편집하여 다음 작업을 완료합니다:
[database] 섹션에서, 데이터베이스 액세스를 구성합니다:
[database]
# ...
connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
CINDER_DBPASS 를 블록 스토리지 데이터베이스를 위해 선택했던 암호로 변경합니다.
[DEFAULT] 섹션에서, RabbitMQ 메시지 큐 액세스를 구성합니다:
[DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller
RABBIT_PASS 를 RabbitMQ 에서 openstack 계정에 대해 선택한 암호로 변경합니다.
[DEFAULT] 및 [keystone_authtoken] 섹션에서는, Identity 서비스 액세스를 구성합니다:
[DEFAULT]
# ...
auth_strategy = keystone
[keystone_authtoken]
# ...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = CINDER_PASS
CINDER_PASS``를 Identity 서비스에서 ``cinder 사용자에 대해 선택했던 암호로 변경합니다.
주석
[keystone_authtoken] 섹션 내 다른 옵션들을 주석 처리 또는 제거합니다.
[DEFAULT] 섹션에서, 컨트롤러 노드의 관리 인터페이스 IP 주소를 사용하기 위해 my_ip 옵션을 구성합니다:
[DEFAULT]
# ...
my_ip = 10.0.0.11
[oslo_concurrency] 섹션에서, lock 경로를 구성합니다:
[oslo_concurrency]
# ...
lock_path = /var/lib/cinder/tmp
블록 스토리지 데이터베이스를 넣어줍니다:
# su -s /bin/sh -c "cinder-manage db sync" cinder
주석
출력물 중 deprecation 메시지는 무시합니다.
/etc/nova/nova.conf 파일을 수정하여 다음을 추가합니다:
[cinder]
os_region_name = RegionOne
Compute API 서비스를 재시작합니다:
# service nova-api restart
블록 스토리지 서비스를 재시작합니다:
# service cinder-scheduler restart
# service apache2 restart
 
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.