オプション 1 - share サーバーの管理機能なしでの共有の作成

オプション 1 - share サーバーの管理機能なしでの共有の作成

共有種別の作成

LVM ドライバーを使って共有を作成する前に DHSS を無効にします。

  1. 管理者クレデンシャルを読み込み、管理者専用 CLI コマンドへのアクセス権を取得します。

    $ . admin-openrc
    
  2. 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              |
    +----------------------+--------------------------------------+
    

共有の作成

  1. demo クレデンシャルを読み込み、非管理プロジェクトとして以下の手順を実行します。

    $ . demo-openrc
    
  2. 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                    | {}                                   |
    +-----------------------------+--------------------------------------+
    
  3. 少し経つと、共有のステータスが 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              |
    +--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
    
  4. その共有の公開 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                    | {}                                                                                 |
    +-----------------------------+------------------------------------------------------------------------------------+
    
  5. ネットワーク経由で共有をマウントする前に、新しい共有にユーザーアクセス権を設定します。

    $ 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 アドレスへ到達できる必要があります。

インスタンスからの共有のマウント

  1. マウントを配置するフォルダーを作成します。

    $ mkdir ~/test_folder
    
  2. 共有の公開場所を指定して、インスタンス内で NFS 共有をマウントします。

    # mount -t nfs 10.0.0.41:/var/lib/manila/mnt/share-b94a4dbf-49e2-452c-b9c7-510277adf5c6 ~/test_folder
    

共有の管理方法の詳細は、 OpenStack エンドユーザーガイドの 共有の管理 を参照してください。

インスタンスの起動 に戻ります。

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.