반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 같은폴더
- 랜카드인식불량
- M365필터
- swapon
- 날짜변경
- ssh
- docker image
- nmcli
- 엑셀파일명변경
- newbingai
- journalctl
- lvcreate
- chmod
- vagrant kubernetes
- MSBing
- chatGPT
- pvcreate
- HTTPD
- Kubernetes
- docker
- ansible
- docker network
- 리다이렉션
- 프로세스
- firewalld
- yum
- tar
- vgcreate
- permission
- mount
Archives
- Today
- Total
becool
20210723 (금) Manila 본문
반응형
Manila
오픈 스택 스토리지 관리 서비스 중에 하나
Cinder - 인스턴스에 볼륨을 연결해서 사용
Swift - URL/API 를 이용해서 직접 사용
Manila - 영구적인 스토리지 NFS, cifs, glusterFS, CephFS 등과 같이 네트워크를 통한 파일시스템 공유
Manila API, Manila Schduler, Manila share (컨트롤러 노드 : API, 스케쥴러, 컴퓨터 노드 : 쉐어)
1. 마리아 DB 구성
1) 서비스 데이터베이스 생성
2) 서비스 사용자 생성
3) 데이터베이스에 대한 사용자 권한 설정
2. 오픈스택 명령어 구성
1) 오픈스택 사용자 생성
2) 사용자 역할 설정
3) 오픈스택 서비스 생성
4) 오픈스택 서비스 엔드포인트 생성
3. 패키지 설치
4. 서비스 설정파일 설정
5. 서비스 활성화
MariaDB [mysql]> create database manila;
Query OK, 1 row affected (0.00 sec)
MariaDB [mysql]> grant all privileges on manila.* to
-> 'manila'@'localhost' identified by '1234';
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> grant all privileges on manila.* to 'manila'@'%' identified by '1234';
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> use mysql;
Database changed
MariaDB [mysql]> select user, password from user ;
+----------------+-------------------------------------------+
| user | password |
+----------------+-------------------------------------------+
| root | *0EB39F11E701BDD02E0B6D2AB7DC2782CC250619 |
| glance | *99C986BCFEF1894AFBBC236EBC8F6E33C0DD135B |
| gnocchi | *D2005BB295B0DDA50A42236548B25511FC64E9B3 |
| cinder | *EB6BEA690160A4881C108083975C8113BA666205 |
| aodh | *F8970521D37D3256E1E9DD7CB58B4CE16C9FD57D |
| heat | *44694A1721BCF83759DCB7F003CC49B1A2DB0355 |
| neutron | *AC10A5AE0E27821E8279702AA421619E6D443EDC |
| nova | *FFDFCF58B02E3B9441604E91369758871C127348 |
| nova_api | *FFDFCF58B02E3B9441604E91369758871C127348 |
| nova_placement | *FFDFCF58B02E3B9441604E91369758871C127348 |
| keystone_admin | *7EF47393A23E934491B0A093EC56D09B0E5E9219 |
| keystone_admin | *7EF47393A23E934491B0A093EC56D09B0E5E9219 |
| manila | *A4B6157319038724E3560894F7F932C8886EBFCF |
| manila | *A4B6157319038724E3560894F7F932C8886EBFCF |
+----------------+-------------------------------------------+
14 rows in set (0.00 sec)
MariaDB [mysql]> exit
Bye
[root@controller ~]# source keystonerc_admin
[root@controller ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 2322e7c1cfe7492c8b190399947f7d17 | services |
| f21117852a8c4b8282852213e79b96c6 | admin |
+----------------------------------+----------+
[root@controller ~(keystone_admin)]# openstack user create --domain default --project services --password servicepasswo
rd manila
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | 2322e7c1cfe7492c8b190399947f7d17 |
| domain_id | default |
| enabled | True |
| id | 7118983faeeb460bad894ebd91fd7d17 |
| name | manila |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
[root@controller ~(keystone_admin)]# openstack role add --project services --user manila admin
[root@controller ~(keystone_admin)]# openstack service create --name manila --description "OpenStack Shared Filesystem"
share
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Shared Filesystem |
| enabled | True |
| id | 6dcc0647fbbb4d30aac5897c20106e8d |
| name | manila |
| type | share |
+-------------+----------------------------------+
[root@controller ~(keystone_admin)]# openstack role assignment list
+----------------------------------+----------------------------------+-------+----------------------------------+----------------------------------+-----------+
| Role | User | Group | Project | Domain | Inherited |
+----------------------------------+----------------------------------+-------+----------------------------------+----------------------------------+-----------+
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 4e3de277acc8464ab83ec757e009de0a | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 5341ea57b3dc4108910dfb2a791b95f1 | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 66340923c64f4948bc162ddadb8074ef | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 7118983faeeb460bad894ebd91fd7d17 | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 723997ef1ac7400d88f6d3389b03a3d7 | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 731e8efee15942fba211cef52db1527b | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | 8b1276aceabe4e408ecc07b13ce4ce5c | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | b89ce6b7f49c4b4886bd578bcebc47a2 | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| 4e74e6e7c1634e2ca6240f8973f9811f | cc0969e98150489285b968ffe420490c | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | cc0969e98150489285b968ffe420490c | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | cc28d2cd16214bde8014522639c580ab | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | daf2cac7ad4f4f74abfb040636d5bd60 | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| 9dc9ac888e824df98498234f4276eb6e | e0acebc1c30b41c1961eaa0513737f31 | | f21117852a8c4b8282852213e79b96c6 | | False |
| 9fe2ff9ee4384b1894a90878d3e92bab | e0acebc1c30b41c1961eaa0513737f31 | | f21117852a8c4b8282852213e79b96c6 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | e0acebc1c30b41c1961eaa0513737f31 | | f21117852a8c4b8282852213e79b96c6 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | f669e8ebdd404c63b7f47f8fbceb6a2a | | 2322e7c1cfe7492c8b190399947f7d17 | | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | b726725a53574615b0092058edb89fef | | | b4821699d48e4e67b9cbac7062e04360 | False |
| e475bb6f095d47bdaa9ce2b15e08a4f9 | e0acebc1c30b41c1961eaa0513737f31 | | | | False |
+----------------------------------+----------------------------------+-------+----------------------------------+----------------------------------+-----------+
[root@controller ~(keystone_admin)]# openstack role assignment list --name --fit-width
+------------------+--------------------+-------+------------------+--------+-----------+
| Role | User | Group | Project | Domain | Inherited |
+------------------+--------------------+-------+------------------+--------+-----------+
| admin | glance@Default | | services@Default | | False |
| admin | heat@Default | | services@Default | | False |
| admin | swift@Default | | services@Default | | False |
| admin | manila@Default | | services@Default | | False |
| admin | neutron@Default | | services@Default | | False |
| admin | heat-cfn@Default | | services@Default | | False |
| admin | aodh@Default | | services@Default | | False |
| admin | nova@Default | | services@Default | | False |
| ResellerAdmin | ceilometer@Default | | services@Default | | False |
| admin | ceilometer@Default | | services@Default | | False |
| admin | cinder@Default | | services@Default | | False |
| admin | gnocchi@Default | | services@Default | | False |
| heat_stack_owner | admin@Default | | admin@Default | | False |
| _member_ | admin@Default | | admin@Default | | False |
| admin | admin@Default | | admin@Default | | False |
| admin | placement@Default | | services@Default | | False |
| admin | heat_admin@heat | | | heat | False |
| admin | admin@Default | | | | False |
+------------------+--------------------+-------+------------------+--------+-----------+
[root@controller ~(keystone_admin)]# openstack service create --name manilav2 --description "OpenStack Shared FileSystem V2" sharev2
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Shared FileSystem V2 |
| enabled | True |
| id | e1fb704ae32b42a69507de00a37e1d3a |
| name | manilav2 |
| type | sharev2 |
+-------------+----------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint list -c Region -c "Service Name" -c Interface -c URL
+-----------+--------------+-----------+---------------------------------------------+
| Region | Service Name | Interface | URL |
+-----------+--------------+-----------+---------------------------------------------+
| RegionOne | swift | internal | http://10.0.2.10:8080/v1/AUTH_%(tenant_id)s |
| RegionOne | heat-cfn | internal | http://10.0.2.10:8000/v1 |
| RegionOne | aodh | public | http://10.0.2.10:8042 |
| RegionOne | keystone | public | http://10.0.2.10:5000/v3 |
| RegionOne | ceilometer | internal | http://10.0.2.10:8777 |
| RegionOne | ceilometer | public | http://10.0.2.10:8777 |
| RegionOne | heat | internal | http://10.0.2.10:8004/v1/%(tenant_id)s |
| RegionOne | cinderv3 | admin | http://10.0.2.10:8776/v3/%(tenant_id)s |
| RegionOne | swift | admin | http://10.0.2.10:8080/v1/AUTH_%(tenant_id)s |
| RegionOne | heat | admin | http://10.0.2.10:8004/v1/%(tenant_id)s |
| RegionOne | nova | admin | http://10.0.2.10:8774/v2.1/%(tenant_id)s |
| RegionOne | cinderv3 | public | http://10.0.2.10:8776/v3/%(tenant_id)s |
| RegionOne | cinder | internal | http://10.0.2.10:8776/v1/%(tenant_id)s |
| RegionOne | cinderv2 | internal | http://10.0.2.10:8776/v2/%(tenant_id)s |
| RegionOne | neutron | internal | http://10.0.2.10:9696 |
| RegionOne | cinderv2 | admin | http://10.0.2.10:8776/v2/%(tenant_id)s |
| RegionOne | nova | internal | http://10.0.2.10:8774/v2.1/%(tenant_id)s |
| RegionOne | cinder | public | http://10.0.2.10:8776/v1/%(tenant_id)s |
| RegionOne | placement | internal | http://10.0.2.10:8778/placement |
| RegionOne | placement | public | http://10.0.2.10:8778/placement |
| RegionOne | nova | public | http://10.0.2.10:8774/v2.1/%(tenant_id)s |
| RegionOne | aodh | internal | http://10.0.2.10:8042 |
| RegionOne | glance | internal | http://10.0.2.10:9292 |
| RegionOne | keystone | internal | http://10.0.2.10:5000/v3 |
| RegionOne | glance | admin | http://10.0.2.10:9292 |
| RegionOne | heat-cfn | admin | http://10.0.2.10:8000/v1 |
| RegionOne | cinder | admin | http://10.0.2.10:8776/v1/%(tenant_id)s |
| RegionOne | gnocchi | internal | http://10.0.2.10:8041 |
| RegionOne | heat-cfn | public | http://10.0.2.10:8000/v1 |
| RegionOne | neutron | admin | http://10.0.2.10:9696 |
| RegionOne | keystone | admin | http://10.0.2.10:35357/v3 |
| RegionOne | ceilometer | admin | http://10.0.2.10:8777 |
| RegionOne | gnocchi | public | http://10.0.2.10:8041 |
| RegionOne | swift | public | http://10.0.2.10:8080/v1/AUTH_%(tenant_id)s |
| RegionOne | placement | admin | http://10.0.2.10:8778/placement |
| RegionOne | cinderv3 | internal | http://10.0.2.10:8776/v3/%(tenant_id)s |
| RegionOne | cinderv2 | public | http://10.0.2.10:8776/v2/%(tenant_id)s |
| RegionOne | aodh | admin | http://10.0.2.10:8042 |
| RegionOne | gnocchi | admin | http://10.0.2.10:8041 |
| RegionOne | heat | public | http://10.0.2.10:8004/v1/%(tenant_id)s |
| RegionOne | neutron | public | http://10.0.2.10:9696 |
| RegionOne | glance | public | http://10.0.2.10:9292 |
+-----------+--------------+-----------+---------------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne share public http://10.0.2.10:8786/v1/
%\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | ca559c7e777e4d9298437d8c6c70f2e6 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6dcc0647fbbb4d30aac5897c20106e8d |
| service_name | manila |
| service_type | share |
| url | http://10.0.2.10:8786/v1/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne share internal http://10.0.2.10:8786/v
1/%\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | 0d98d9a324764295ab623288fb23122d |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6dcc0647fbbb4d30aac5897c20106e8d |
| service_name | manila |
| service_type | share |
| url | http://10.0.2.10:8786/v1/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne share admin http://10.0.2.10:8786/v1/%
\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | 2462d70019e449769aafe0a8d667e31d |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6dcc0647fbbb4d30aac5897c20106e8d |
| service_name | manila |
| service_type | share |
| url | http://10.0.2.10:8786/v1/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne sharev2 public http://10.0.2.10:8786/v
2/%\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | 2b800cdc54464254a2807e94a2b2a227 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e1fb704ae32b42a69507de00a37e1d3a |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://10.0.2.10:8786/v2/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne sharev2 internal http://10.0.2.10:8786
/v2/%\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | a6933ae388ec401c85135520a338f9a8 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e1fb704ae32b42a69507de00a37e1d3a |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://10.0.2.10:8786/v2/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack endpoint create --region RegionOne sharev2 admin http://10.0.2.10:8786/v2
/%\(tenant_id\)s
+--------------+----------------------------------------+
| Field | Value |
+--------------+----------------------------------------+
| enabled | True |
| id | e07d9c447ad24321b1b15288f1f7f748 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e1fb704ae32b42a69507de00a37e1d3a |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://10.0.2.10:8786/v2/%(tenant_id)s |
+--------------+----------------------------------------+
[root@controller ~(keystone_admin)]# openstack service list
+----------------------------------+------------+----------------+
| ID | Name | Type |
+----------------------------------+------------+----------------+
| 014e3ff35c1c4adab1a2119ab302c93a | gnocchi | metric |
| 2b6a882b5ffd46419a19c5fcc8e35d55 | heat | orchestration |
| 2ea475a1d041431aa5d98167a0e21d9e | neutron | network |
| 41417542436f46be80c2f7249b92772f | keystone | identity |
| 5ad646701657441db233fcfc494a172e | nova | compute |
| 6dcc0647fbbb4d30aac5897c20106e8d | manila | share |
| 6e77b61beaef4f12aed56c5205d5daa7 | aodh | alarming |
| 7087a53e39d24013873b4acf576e3c1b | cinderv3 | volumev3 |
| 772cd02f23b54b478e0abe5db6551b9d | ceilometer | metering |
| 7b83e3b3760544f1b6d0ea3c6e6da66f | heat-cfn | cloudformation |
| a2e920b4768d46a898be7a023be18f23 | cinder | volume |
| b93242077d364ac28d239bd768861272 | glance | image |
| beb2f917275a4e92a642bb4d325ad2ba | swift | object-store |
| e1fb704ae32b42a69507de00a37e1d3a | manilav2 | sharev2 |
| eb9fdc98fe2446a2b8fea4682edfc19e | cinderv2 | volumev2 |
| fd1d3ca49bfb4e9aabcba5e43ae2fa55 | placement | placement |
+----------------------------------+------------+----------------+
[root@controller ~(keystone_admin)]# openstack catalog show manila
+-----------+-----------------------------------------------------------------------+
| Field | Value |
+-----------+-----------------------------------------------------------------------+
| endpoints | RegionOne |
| | internal: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | admin: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | public: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | |
| id | 6dcc0647fbbb4d30aac5897c20106e8d |
| name | manila |
| type | share |
+-----------+-----------------------------------------------------------------------+
[root@controller ~(keystone_admin)]# openstack catalog show manilav2
+-----------+-----------------------------------------------------------------------+
| Field | Value |
+-----------+-----------------------------------------------------------------------+
| endpoints | RegionOne |
| | public: http://10.0.2.10:8786/v2/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | internal: http://10.0.2.10:8786/v2/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | admin: http://10.0.2.10:8786/v2/f21117852a8c4b8282852213e79b96c6 |
| | |
| id | e1fb704ae32b42a69507de00a37e1d3a |
| name | manilav2 |
| type | sharev2 |
+-----------+-----------------------------------------------------------------------+
[root@controller ~(keystone_admin)]# openstack user list
+----------------------------------+------------+
| ID | Name |
+----------------------------------+------------+
| 4e3de277acc8464ab83ec757e009de0a | glance |
| 5341ea57b3dc4108910dfb2a791b95f1 | heat |
| 66340923c64f4948bc162ddadb8074ef | swift |
| 7118983faeeb460bad894ebd91fd7d17 | manila |
| 723997ef1ac7400d88f6d3389b03a3d7 | neutron |
| 731e8efee15942fba211cef52db1527b | heat-cfn |
| 8b1276aceabe4e408ecc07b13ce4ce5c | aodh |
| b726725a53574615b0092058edb89fef | heat_admin |
| b89ce6b7f49c4b4886bd578bcebc47a2 | nova |
| cc0969e98150489285b968ffe420490c | ceilometer |
| cc28d2cd16214bde8014522639c580ab | cinder |
| daf2cac7ad4f4f74abfb040636d5bd60 | gnocchi |
| e0acebc1c30b41c1961eaa0513737f31 | admin |
| f669e8ebdd404c63b7f47f8fbceb6a2a | placement |
+----------------------------------+------------+
[root@controller ~(keystone_admin)]# grep -v -e "^#" -e "^$" /etc/manila/manila.conf
[DEFAULT]
state_path = /var/lib/manila
my_ip = 10.0.2.10
default_share_type = default_share_type
enabled_share_protocols = NFS, CIFS
enabled_share_backends = lvm
rootwrap_config = /etc/manila/rootwrap.conf
api_paste_config = /etc/manila/api-paste.ini
auth_strategy = keystone
share_name_template = share-%s
transport_url = rabbit://guest:guest@10.0.2.10:5672/
driver_handles_share_servers = False
[cinder]
[cors]
[database]
connection = mysql+pymysql://manila:1234@10.0.2.10/manila
[healthcheck]
[keystone_authtoken]
auth_uri = http://10.0.2.10:5000
auth_url = http://10.0.2.10:35357
memcached_servers = 10.0.2.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = services
username = manila
password = 1234
[matchmaker_redis]
[neutron]
[nova]
[oslo_concurrency]
lock_path = $state_path/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[ssl]
[lvm]
share_backend_name = LVM
share_driver = manila.share.drivers.lvm.LVMShareDriver
driver_handles_share_servers = False
lvm_share_volume_group = manila-volumes
lvm_share_export_ip = 10.0.2.10
[root@controller ~(keystone_admin)]# systemctl restart openstack-manila-*
[root@controller ~(keystone_admin)]# systemctl restart nfs-server
[root@controller ~(keystone_admin)]# manila service-list
+----+------------------+----------------------------+------+---------+-------+----------------------------+
| Id | Binary | Host | Zone | Status | State | Updated_at |
+----+------------------+----------------------------+------+---------+-------+----------------------------+
| 1 | manila-scheduler | controller.cccr3.co.kr | nova | enabled | up | 2021-07-23T03:56:56.000000 |
| 2 | manila-share | controller.cccr3.co.kr@lvm | nova | enabled | up | 2021-07-23T03:57:16.000000 |
+----+------------------+----------------------------+------+---------+-------+----------------------------+
[root@controller ~(keystone_admin)]# manila type-list
+----+------+------------+------------+----------------------+----------------------+-------------+
| ID | Name | visibility | is_default | required_extra_specs | optional_extra_specs | Description |
+----+------+------------+------------+----------------------+----------------------+-------------+
+----+------+------------+------------+----------------------+----------------------+-------------+
[root@controller ~(keystone_admin)]# manila type-create default_share_type False
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| required_extra_specs | driver_handles_share_servers : False |
| Name | default_share_type |
| Visibility | public |
| is_default | - |
| ID | 416083b4-d4ae-4d8e-95ca-02ab4b1729f5 |
| optional_extra_specs | |
| Description | None |
+----------------------+--------------------------------------+
[root@controller ~(keystone_admin)]# manila type-list
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
| ID | Name | visibility | is_default | required_extra_specs
| optional_extra_specs | Description |
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
| 416083b4-d4ae-4d8e-95ca-02ab4b1729f5 | default_share_type | public | YES | driver_handles_share_servers : False | | None |
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
[root@controller ~(keystone_admin)]# manila type-list --fit-width
usage: manila [--version] [-d] [--os-cache] [--os-reset-cache]
[--os-user-id <auth-user-id>] [--os-username <auth-user-name>]
[--os-password <auth-password>]
[--os-tenant-name <auth-tenant-name>]
[--os-project-name <auth-project-name>]
[--os-tenant-id <auth-tenant-id>]
[--os-project-id <auth-project-id>]
[--os-user-domain-id <auth-user-domain-id>]
[--os-user-domain-name <auth-user-domain-name>]
[--os-project-domain-id <auth-project-domain-id>]
[--os-project-domain-name <auth-project-domain-name>]
[--os-auth-url <auth-url>] [--os-region-name <region-name>]
[--os-token <token>] [--bypass-url <bypass-url>]
[--service-type <service-type>] [--service-name <service-name>]
[--share-service-name <share-service-name>]
[--endpoint-type <endpoint-type>]
[--os-share-api-version <share-api-ver>]
[--os-cacert <ca-certificate>] [--retries <retries>]
[--os-cert <certificate>]
<subcommand> ...
error: unrecognized arguments: --fit-width
Try 'manila help ' for more information.
[root@controller ~(keystone_admin)]# vim /etc/^C
[root@controller ~(keystone_admin)]# openstack catalog show manila
+-----------+-----------------------------------------------------------------------+
| Field | Value |
+-----------+-----------------------------------------------------------------------+
| endpoints | RegionOne |
| | internal: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | admin: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | RegionOne |
| | public: http://10.0.2.10:8786/v1/f21117852a8c4b8282852213e79b96c6 |
| | |
| id | 6dcc0647fbbb4d30aac5897c20106e8d |
| name | manila |
| type | share |
+-----------+-----------------------------------------------------------------------+
[root@controller ~(keystone_admin)]# manila service-list
+----+------------------+----------------------------+------+---------+-------+----------------------------+
| Id | Binary | Host | Zone | Status | State | Updated_at |
+----+------------------+----------------------------+------+---------+-------+----------------------------+
| 1 | manila-scheduler | controller.cccr3.co.kr | nova | enabled | up | 2021-07-23T05:53:48.000000 |
| 2 | manila-share | controller.cccr3.co.kr@lvm | nova | enabled | up | 2021-07-23T05:53:46.000000 |
+----+------------------+----------------------------+------+---------+-------+----------------------------+
[root@controller ~(keystone_admin)]# openstack project list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 2322e7c1cfe7492c8b190399947f7d17 | services |
| f21117852a8c4b8282852213e79b96c6 | admin |
+----------------------------------+----------+
[root@controller ~(keystone_admin)]# manila type-list
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
| ID | Name | visibility | is_default | required_extra_specs
| optional_extra_specs | Description |
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
| 416083b4-d4ae-4d8e-95ca-02ab4b1729f5 | default_share_type | public | YES | driver_handles_share_servers : False | | None |
+--------------------------------------+--------------------+------------+------------+--------------------------------------+----------------------+-------------+
[root@controller ~(keystone_admin)]# manila create NFS 2 --name share1
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| status | creating |
| share_type_name | default_share_type |
| description | None |
| availability_zone | None |
| share_network_id | None |
| share_server_id | None |
| share_group_id | None |
| host | |
| revert_to_snapshot_support | False |
| access_rules_status | active |
| snapshot_id | None |
| create_share_from_snapshot_support | False |
| is_public | False |
| task_state | None |
| snapshot_support | False |
| id | f93949b8-867c-4788-b583-618aea7a9206 |
| size | 2 |
| source_share_group_snapshot_member_id | None |
| user_id | e0acebc1c30b41c1961eaa0513737f31 |
| name | share1 |
| share_type | 416083b4-d4ae-4d8e-95ca-02ab4b1729f5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2021-07-23T05:57:47.000000 |
| share_proto | NFS |
| mount_snapshot_support | False |
| project_id | f21117852a8c4b8282852213e79b96c6 |
| metadata | {} |
+---------------------------------------+--------------------------------------+
[root@controller ~(keystone_admin)]# manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------------------------+-------------------+
| f93949b8-867c-4788-b583-618aea7a9206 | share1 | 2 | NFS | available | False | default_share_type | controller.cccr3.co.kr@lvm#lvm-single-pool | nova |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------------------------+-------------------+
[root@controller ~(keystone_admin)]# cat /etc/exports
[root@controller ~(keystone_admin)]# manila show share1
+---------------------------------------+---------------------------------------------------------------------------------+
| Property | Value
|
+---------------------------------------+---------------------------------------------------------------------------------+
| status | available
|
| share_type_name | default_share_type
|
| description | None
|
| availability_zone | nova
|
| share_network_id | None
|
| export_locations |
|
| | path = 10.0.2.10:/var/lib/manila/mnt/share-d3d8d219-ed6a-4b3b-b8c4-c6bf9ca32d23 |
| | preferred = False
|
| | is_admin_only = False
|
| | id = 387edb5d-294e-40be-9e4f-dad0ef41d130
|
| | share_instance_id = d3d8d219-ed6a-4b3b-b8c4-c6bf9ca32d23
|
| share_server_id | None
|
| share_group_id | None
|
| host | controller.cccr3.co.kr@lvm#lvm-single-pool
|
| revert_to_snapshot_support | False
|
| access_rules_status | active
|
| snapshot_id | None
|
| create_share_from_snapshot_support | False
|
| is_public | False
|
| task_state | None
|
| snapshot_support | False
|
| id | f93949b8-867c-4788-b583-618aea7a9206
|
| size | 2
|
| source_share_group_snapshot_member_id | None
|
| user_id | e0acebc1c30b41c1961eaa0513737f31
|
| name | share1
|
| share_type | 416083b4-d4ae-4d8e-95ca-02ab4b1729f5
|
| has_replicas | False
|
| replication_type | None
|
| created_at | 2021-07-23T05:57:47.000000
|
| share_proto | NFS
|
| mount_snapshot_support | False
|
| project_id | f21117852a8c4b8282852213e79b96c6
|
| metadata | {}
|
+---------------------------------------+---------------------------------------------------------------------------------+
[root@controller ~(keystone_admin)]# ls /var/lib/manila/mnt/
share-d3d8d219-ed6a-4b3b-b8c4-c6bf9ca32d23
[root@controller ~(keystone_admin)]# manila access-allow
usage: manila access-allow [--access-level <access_level>]
<share> <access_type> <access_to>
error: too few arguments
Try 'manila help access-allow' for more information.
[root@controller ~(keystone_admin)]# manila access-allow share1 ip 10.0.2.0/24 --access-level rw
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| access_key | None |
| share_id | f93949b8-867c-4788-b583-618aea7a9206 |
| created_at | 2021-07-23T06:03:49.000000 |
| updated_at | None |
| access_type | ip |
| access_to | 10.0.2.0/24 |
| access_level | rw |
| state | queued_to_apply |
| id | 2d119dbf-a1c7-48aa-b2ae-0eb8a32d83d9 |
+--------------+--------------------------------------+
[root@controller ~(keystone_admin)]# cat /etc/exports
/var/lib/manila/mnt/share-d3d8d219-ed6a-4b3b-b8c4-c6bf9ca32d23 10.0.2.0/24(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=sys,rw,secure,no_root_squash,no_all_squash)
[root@controller ~(keystone_admin)]# openstack server list
[root@controller ~(keystone_admin)]# openstack server create --image 2mg --flavor 1fl --network 1netnet --wait 4vm
No Network found for 1netnet
[root@controller ~(keystone_admin)]# openstack server list
+--------------------------------------+------+--------+-----------------------+-------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+------+--------+-----------------------+-------+---------+
| 35912846-69d4-4dea-8c35-8bb0109cf934 | 1vm | ACTIVE | 1netnet=192.168.100.4 | 2mg | 1flavor |
+--------------------------------------+------+--------+-----------------------+-------+---------+
[root@controller ~(keystone_admin)]# manila show share1 |grep path |cut -d'|' -f3
path = 10.0.2.10:/var/lib/manila/mnt/share-d3d8d219-ed6a-4b3b-b8c4-c6bf9ca32d23
[root@controller ~(keystone_admin)]# ssh cirros@10.0.2.101
728x90
'openstack' 카테고리의 다른 글
20210719 (월) (0) | 2021.07.19 |
---|---|
20210716(금) 네트워크 실습 (0) | 2021.07.16 |
20210714 (수) cinder 실습 (0) | 2021.07.14 |
20210713 (화) ovs 브릿지 (0) | 2021.07.13 |
20210713 (화) 리눅스 브릿지 (0) | 2021.07.13 |
Comments