LVM ドライバーを使って共有を作成する前に DHSS を無効にします。
管理者クレデンシャルを読み込み、管理者専用 CLI コマンドへのアクセス権を取得します。
$ . admin-openrc
DHSS が無効になったデフォルトの共有種別を作成します。
$ 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 | 3df065c8-6ca4-4b80-a5cb-e633c0439097 |
| optional_extra_specs | snapshot_support : True |
+----------------------+--------------------------------------+
demo クレデンシャルを読み込み、非管理プロジェクトとして以下の手順を実行します。
$ . demo-openrc
NFS 共有を作成します。
$ manila create NFS 1 --name share1
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | default_share_type |
| description | None |
| availability_zone | None |
| share_network_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+--------------------------------------+
少し経つと、共有のステータスが creating から available に変わるはずです。
$ manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| 55c401b3-3112-4294-aa9f-3cc355a4e361 | share1 | 1 | NFS | available | False | default_share_type | storage@lvm#lvm-single-pool | nova |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
その共有の公開 IP アドレスを確認します。
$ 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.0.41:/var/lib/manila/mnt/share-8e13a98f-c310-41df-ac90-fc8bce4910b8 |
| | id = 3c8d0ada-cadf-48dd-85b8-d4e8c3b1e204 |
| | preferred = False |
| host | storage@lvm#lvm-single-pool |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+------------------------------------------------------------------------------------+
ネットワーク経由で共有をマウントする前に、新しい共有にユーザーアクセス権を設定します。
$ manila access-allow share1 ip INSTANCE_IP_ADDRESS
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| access_type | ip |
| access_to | 10.0.0.41 |
| access_level | rw |
| state | new |
| id | f88eab01-7197-44bf-ad0f-d6ca6f99fc96 |
+--------------+--------------------------------------+
INSTANCE_IP_ADDRESS はインスタンスの IP アドレスで置き換えます。
注釈
インスタンスは、ストレージノードの管理 IP アドレスへ到達できる必要があります。
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.