From bce5429d1ac89a26110f4221179a6fcef736107a Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Thu, 6 Aug 2020 23:39:37 -0700 Subject: [PATCH] Update "Create and manage shares" doc This is the basic user guide for manila: - Update examples and outputs - Add limits and metadata examples - Add descriptions about common concepts including share type extra specifications - Add contents for easy navigation Change-Id: Idf374866a63e0da2c4af3157ac5f471af6173d5e Closes-Bug: #1652375 Signed-off-by: Goutham Pacha Ravi --- doc/source/user/create-and-manage-shares.rst | 1217 ++++++++++------- doc/source/user/share-network-operations.rst | 7 + .../user/share-network-subnet-operations.rst | 8 + 3 files changed, 721 insertions(+), 511 deletions(-) diff --git a/doc/source/user/create-and-manage-shares.rst b/doc/source/user/create-and-manage-shares.rst index 47c9e64104..991324fe39 100644 --- a/doc/source/user/create-and-manage-shares.rst +++ b/doc/source/user/create-and-manage-shares.rst @@ -1,236 +1,389 @@ .. _share: -============= -Manage shares -============= +======================== +Create and manage shares +======================== -A share is provided by file storage. You can give access to a share to -instances. To create and manage shares, you use ``manila`` client commands. +.. contents:: :local: -Create a share network -~~~~~~~~~~~~~~~~~~~~~~ +General Concepts +~~~~~~~~~~~~~~~~ -#. Create a share network. +A ``share`` is filesystem storage that you can create with manila. You can pick +a network protocol for the underlying storage, manage access and perform +lifecycle operations on the share via the ``manila`` command line tool. - .. code-block:: console +Before we review the operations possible, lets take a look at certain +important terms: - $ manila share-network-create \ - --name mysharenetwork \ - --description "My Manila network" \ - --neutron-net-id dca0efc7-523d-43ef-9ded-af404a02b055 \ - --neutron-subnet-id 29ecfbd5-a9be-467e-8b4a-3415d1f82888 - +-------------------+--------------------------------------+ - | Property | Value | - +-------------------+--------------------------------------+ - | name | mysharenetwork | - | segmentation_id | None | - | created_at | 2016-03-24T14:13:02.888816 | - | neutron_subnet_id | 29ecfbd5-a9be-467e-8b4a-3415d1f82888 | - | updated_at | None | - | network_type | None | - | neutron_net_id | dca0efc7-523d-43ef-9ded-af404a02b055 | - | ip_version | None | - | cidr | None | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | description | My Manila network | - +-------------------+--------------------------------------+ +- ``share network``: This is a network that your shares can be exported to. + Exporting shares to your own self-service isolated networks allows manila to + provide ``hard network path`` data isolation guarantees in a multi-tenant + cloud. To do so, under the hood, manila creates isolated ``share + servers``, and plugs them into your network. These share servers manage + exports of your shares, and can connect to authentication domains that you + determine. Manila performs all the lifecycle operations necessary on share + servers, and you needn't worry about them. The important thing to note is + that your cloud administrator must have made a share type with extra-spec + ``driver_handles_share_servers=True`` for you to be able to use share + networks and create shares on them. See :doc:`share-network-operations` and + :doc:`share-network-subnet-operations` for more details. -#. List share networks. +- ``share type``: A share type is a template made available by your + administrator. You must always specify a share type when creating a share, + unless you would like to use the default share type. It's possible that + your cloud administrator has not made a default share type accessible to + you. Share types specify some capabilities for your use: - .. code-block:: console ++------------------------------------+-------------------------+---------------------------------------------------------+ +| Capability | Possible values | Consequence | ++====================================+=========================+=========================================================+ +| driver_handles_share_servers | true or false | you can or cannot use share networks to create shares | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| snapshot_support | true or false | you can or cannot create snapshots of shares | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| create_share_from_snapshot_support | true or false | you can or cannot create clones of share snapshots | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| revert_to_snapshot_support | true or false | you can or cannot revert your shares in-place to the | +| | | most recent snapshot | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| mount_snapshot_support | true or false | you can or cannot export your snapshots and mount them | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| replication_type | dr | you can create replicas for disaster recovery, only one | +| | | active export allowed at a time | +| +-------------------------+---------------------------------------------------------+ +| | readable | you can create read-only replicas, only one writable | +| | | active export allowed at a time | +| +-------------------------+---------------------------------------------------------+ +| | writable | you can create read/write replicas, any number | +| | | of active exports per share | ++------------------------------------+-------------------------+---------------------------------------------------------+ +| availability_zones | a list of one or | shares are limited to these availability zones | +| | more availability zones | | ++------------------------------------+-------------------------+---------------------------------------------------------+ - $ manila share-network-list - +--------------------------------------+----------------+ - | id | name | - +--------------------------------------+----------------+ - | c895fe26-92be-4152-9e6c-f2ad230efb13 | mysharenetwork | - +--------------------------------------+----------------+ +.. note:: + + - When ``replication_type`` extra specification is not present in the + share type, you cannot create share replicas + - When the ``availability_zones`` extra specification is not present in + the share type, the share type can be used in all availability zones of + the cloud. + +- ``status`` of resources: Resources that you create or modify with manila + may not be "available" immediately. The API service is designed to respond + immediately and the resource being created or modified is worked upon by the + rest of the service stack. To indicate the readiness of resources, there are + several attributes on the resources themselves and the user can watch these + fields to know the state of the resource. For example, the ``status`` attribute + in shares can convey some busy states such as "creating", "extending", "shrinking", + "migrating". These "-ing" states end in a "available" state if everything goes + well. They may end up in an "error" state in case there is an issue. See + :doc:`troubleshooting-asynchronous-failures` to determine if you can rectify + these errors by yourself. If you cannot, consulting a more privileged user, + usually a cloud administrator, might be useful. + +- ``snapshot``: This is a point-in-time copy of a share. In manila, snapshots + are meant to be crash consistent, however, you may need to quiesce any applications + using the share to ensure that the snapshots are application consistent. + Cloud administrators can enable or disable snapshots via share type extra + specifications. + +- ``security service``: This is an authentication domain that you define and associate + with your share networks. It could be an Active Directory server, a Lightweight + Directory Access Protocol server, or Kerberos. When used, access to shares can + be controlled via these authentication domains. You may even combine multiple + authentication domains. + + +Usage and Limits +~~~~~~~~~~~~~~~~ + +* List the resource limits and usages that apply to your project + + .. code-block:: console + + $ manila absolute-limits + +----------------------------+-------+ + | Name | Value | + +----------------------------+-------+ + | maxTotalReplicaGigabytes | 1000 | + | maxTotalShareGigabytes | 1000 | + | maxTotalShareNetworks | 10 | + | maxTotalShareReplicas | 100 | + | maxTotalShareSnapshots | 50 | + | maxTotalShares | 50 | + | maxTotalSnapshotGigabytes | 1000 | + | totalReplicaGigabytesUsed | 0 | + | totalShareGigabytesUsed | 4 | + | totalShareNetworksUsed | 1 | + | totalShareReplicasUsed | 0 | + | totalShareSnapshotsUsed | 1 | + | totalSharesUsed | 4 | + | totalSnapshotGigabytesUsed | 1 | + +----------------------------+-------+ + +Share types +~~~~~~~~~~~ + +* List share types + + .. code-block:: console + + $ manila type-list + +--------------------------------------+-----------------------------------+------------+------------+--------------------------------------+--------------------------------------------+---------------------------------------------------------+ + | ID | Name | visibility | is_default | required_extra_specs | optional_extra_specs | Description | + +--------------------------------------+-----------------------------------+------------+------------+--------------------------------------+--------------------------------------------+---------------------------------------------------------+ + | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | dhss_true | public | - | driver_handles_share_servers : True | snapshot_support : True | None | + | | | | | | create_share_from_snapshot_support : True | | + | | | | | | revert_to_snapshot_support : True | | + | | | | | | mount_snapshot_support : True | | + | c39d3565-cee0-4a64-9e60-af06991ea4f7 | default | public | YES | driver_handles_share_servers : False | snapshot_support : True | None | + | | | | | | create_share_from_snapshot_support : True | | + | | | | | | revert_to_snapshot_support : True | | + | | | | | | mount_snapshot_support : True | | + | e88213ca-66e6-4ae1-ba1b-d9d2c65bae12 | dhss_false | public | - | driver_handles_share_servers : False | snapshot_support : True | None | + | | | | | | create_share_from_snapshot_support : True | | + | | | | | | revert_to_snapshot_support : True | | + | | | | | | mount_snapshot_support : True | | + +--------------------------------------+-----------------------------------+------------+------------+--------------------------------------+--------------------------------------------+---------------------------------------------------------+ + +Share networks +~~~~~~~~~~~~~~ + +* Create a share network. + + .. code-block:: console + + $ manila share-network-create \ + --name mysharenetwork \ + --description "My Manila network" \ + --neutron-net-id 23da40b4-0d5e-468c-8ac9-3766e9ceaacd \ + --neutron-subnet-id 4568bc9b-42fe-45ac-a49b-469e8276223c + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | name | mysharenetwork | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | created_at | 2020-08-07T04:47:53.000000 | + | updated_at | None | + | description | My Manila network | + | share_network_subnets | [{'id': '187dcd27-8478-45c1-bd5e-5423cafd15ae', 'availability_zone': None, 'created_at': '2020-08-07T04:47:53.000000', 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '23da40b4-0d5e-468c-8ac9-3766e9ceaacd', 'neutron_subnet_id': '4568bc9b-42fe-45ac-a49b-469e8276223c', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] | + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: + + This Manila API does not validate the subnet information you supply right + away. The validation is performed when creating a share with the share + network. This is why, you do not see some subnet information populated on + the share network resource until at least one share is created with it. + +* List share networks. + + .. code-block:: console + + $ manila share-network-list + +--------------------------------------+----------------+ + | id | name | + +--------------------------------------+----------------+ + | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | mysharenetwork | + +--------------------------------------+----------------+ Create a share ~~~~~~~~~~~~~~ -#. Create a share. +* Create a share - .. code-block:: console + .. note:: - $ manila create NFS 1 \ - --name myshare \ - --description "My Manila share" \ - --share-network mysharenetwork \ - --share-type default - +-----------------------------+--------------------------------------+ - | Property | Value | - +-----------------------------+--------------------------------------+ - | status | creating | - | share_type_name | default | - | description | My Manila share | - | availability_zone | None | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | share_server_id | None | - | share_group_id | None | - | host | | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 1 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+--------------------------------------+ + If you use a share type that has the extra specification + ``driver_handles_share_servers=False``, + you cannot use a share network to create your shares. -#. Show a share. + .. code-block:: console - .. code-block:: console + $ manila create NFS 1 \ + --name myshare \ + --description "My Manila share" \ + --share-network mysharenetwork \ + --share-type dhss_true + +---------------------------------------+--------------------------------------+ + | Property | Value | + +---------------------------------------+--------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 1 | + | availability_zone | None | + | created_at | 2020-08-07T05:24:14.000000 | + | status | creating | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | None | + +---------------------------------------+--------------------------------------+ - $ manila show myshare - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | available | - | share_type_name | default | - | description | My Manila share | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = False | - | | id = b6bd76ce-12a2-42a9-a30a-8a43b503867d | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | path = 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = True | - | | id = 6921e862-88bc-49a5-a2df-efeed9acd583 | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 1 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ +* Show a share. -#. List shares. + .. code-block:: console - .. code-block:: console + $ manila show myshare + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 1 | + | availability_zone | nova | + | created_at | 2020-08-07T05:24:14.000000 | + | status | available | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | + | | path = 10.0.0.11:/sharevolumes_10034/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = True | + | | id = 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | + | | path = 10.0.0.10:/sharevolumes_10034/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - $ manila list - +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | - +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | myshare | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | - +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ +* List shares. -#. List share export locations. + .. code-block:: console - .. code-block:: console + $ manila list + +--------------------------------------+--------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+ + | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | + +--------------------------------------+--------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+ + | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | myshare | 1 | NFS | available | False | dhss_true | | nova | + +--------------------------------------+--------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+ - $ manila share-export-location-list myshare - +--------------------------------------+--------------------------------------------------------+-----------+ - | ID | Path | Preferred | - +--------------------------------------+--------------------------------------------------------+-----------+ - | 6921e862-88bc-49a5-a2df-efeed9acd583 | 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | False | - | b6bd76ce-12a2-42a9-a30a-8a43b503867d | 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | False | - +--------------------------------------+--------------------------------------------------------+-----------+ +* List share export locations. + + .. code-block:: console + + $ manila share-export-location-list myshare + +--------------------------------------+---------------------------------------------------------------------------------------------------------------+-----------+ + | ID | Path | Preferred | + +--------------------------------------+---------------------------------------------------------------------------------------------------------------+-----------+ + | 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | 10.0.0.10:/sharevolumes_10034/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | False | + | 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | 10.0.0.11:/sharevolumes_10034/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | True | + +--------------------------------------+---------------------------------------------------------------------------------------------------------------+-----------+ Allow read-write access ~~~~~~~~~~~~~~~~~~~~~~~ -#. Allow access. +* Allow access. - .. code-block:: console + .. code-block:: console - $ manila access-allow myshare ip 10.0.0.0/24 --metadata key1=value1 - +--------------+--------------------------------------+ - | Property | Value | - +--------------+--------------------------------------+ - | id | 0c8470ca-0d77-490c-9e71-29e1f453bf97 | - | share_id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | access_level | rw | - | access_to | 10.0.0.0/24 | - | access_type | ip | - | state | queued_to_apply | - | access_key | None | - | created_at | 2016-03-24T14:51:36.000000 | - | updated_at | None | - | metadata | {'key1': 'value1'} | - +--------------+--------------------------------------+ + $ manila access-allow myshare ip 10.0.0.0/24 --metadata key1=value1 + +--------------+--------------------------------------+ + | Property | Value | + +--------------+--------------------------------------+ + | id | e30bde96-9217-4f90-afdc-27c092af1c77 | + | share_id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | access_level | rw | + | access_to | 10.0.0.0/24 | + | access_type | ip | + | state | queued_to_apply | + | access_key | None | + | created_at | 2020-08-07T05:27:27.000000 | + | updated_at | None | + | metadata | {'key1': 'value1'} | + +--------------+--------------------------------------+ .. note:: Since API version 2.45, metadata can be added, removed and updated for - share access rules in a form of key=value pairs. + share access rules in a form of key=value pairs. Metadata can help you + identify and filter access rules. +* List access. -#. List access. + .. code-block:: console - .. code-block:: console + $ manila access-list myshare + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ + | id | access_type | access_to | access_level | state | access_key | created_at | updated_at | + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ + | e30bde96-9217-4f90-afdc-27c092af1c77 | ip | 10.0.0.0/24 | rw | active | None | 2020-08-07T05:27:27.000000 | None | + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - $ manila access-list myshare - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - | id | access_type | access_to | access_level | state | access_key | created_at | updated_at | - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - | 0c8470ca-0d77-490c-9e71-29e1f453bf97 | ip | 10.0.0.0/24 | rw | active | None | 2016-03-24T14:51:36.000000 | None | - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - - The access is created. + An access rule is created. Allow read-only access ~~~~~~~~~~~~~~~~~~~~~~ -#. Allow access. +* Allow access. - .. code-block:: console + .. code-block:: console - $ manila access-allow myshare ip 20.0.0.0/24 --access-level ro - +--------------+--------------------------------------+ - | Property | Value | - +--------------+--------------------------------------+ - | id | f151ad17-654d-40ce-ba5d-98a5df67aadc | - | share_id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | access_level | ro | - | access_to | 20.0.0.0/24 | - | access_type | ip | - | state | queued_to_apply | - | access_key | None | - | created_at | 2016-03-24T14:54:11.000000 | - | updated_at | None | - | metadata | {} | - +--------------+--------------------------------------+ + $ manila access-allow myshare ip 20.0.0.0/24 --access-level ro + +--------------+--------------------------------------+ + | Property | Value | + +--------------+--------------------------------------+ + | id | 45b0a030-306a-4305-9e2a-36aeffb2d5b7 | + | share_id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | access_level | ro | + | access_to | 20.0.0.0/24 | + | access_type | ip | + | state | queued_to_apply | + | access_key | None | + | created_at | 2020-08-07T05:28:35.000000 | + | updated_at | None | + | metadata | {} | + +--------------+--------------------------------------+ -#. List access. +* List access. - .. code-block:: console + .. code-block:: console - $ manila access-list myshare - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - | id | access_type | access_to | access_level | state | access_key | created_at | updated_at | - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - | 0c8470ca-0d77-490c-9e71-29e1f453bf97 | ip | 10.0.0.0/24 | rw | active | None | 2016-03-24T14:51:36.000000 | None | - | f151ad17-654d-40ce-ba5d-98a5df67aadc | ip | 20.0.0.0/24 | ro | active | None | 2016-03-24T14:54:11.000000 | None | - +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ + $ manila access-list myshare + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ + | id | access_type | access_to | access_level | state | access_key | created_at | updated_at | + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ + | 45b0a030-306a-4305-9e2a-36aeffb2d5b7 | ip | 20.0.0.0/24 | ro | active | None | 2020-08-07T05:28:35.000000 | None | + | e30bde96-9217-4f90-afdc-27c092af1c77 | ip | 10.0.0.0/24 | rw | active | None | 2020-08-07T05:27:27.000000 | None | + +--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+ - The access is created. + Another access rule is created. Update access rules metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -280,401 +433,443 @@ Update access rules metadata Deny access ~~~~~~~~~~~ -#. Deny access. +* Deny access. - .. code-block:: console + .. code-block:: console - $ manila access-deny myshare 0c8470ca-0d77-490c-9e71-29e1f453bf97 - $ manila access-deny myshare f151ad17-654d-40ce-ba5d-98a5df67aadc + $ manila access-deny myshare 45b0a030-306a-4305-9e2a-36aeffb2d5b7 + $ manila access-deny myshare e30bde96-9217-4f90-afdc-27c092af1c77 -#. List access. +* List access. - .. code-block:: console + .. code-block:: console - $ manila access-list myshare - +----+-------------+-----------+--------------+-------+ - | id | access type | access to | access level | state | - +----+-------------+-----------+--------------+-------+ - +----+-------------+-----------+--------------+-------+ + $ manila access-list myshare + +----+-------------+-----------+--------------+-------+------------+------------+------------+ + | id | access_type | access_to | access_level | state | access_key | created_at | updated_at | + +----+-------------+-----------+--------------+-------+------------+------------+------------+ + +----+-------------+-----------+--------------+-------+------------+------------+------------+ - The access is removed. + The access rules are removed. Create snapshot ~~~~~~~~~~~~~~~ -#. Create a snapshot. +* Create a snapshot. - .. code-block:: console + .. note:: - $ manila snapshot-create --name mysnapshot --description "My Manila snapshot" myshare - +-------------+--------------------------------------+ - | Property | Value | - +-------------+--------------------------------------+ - | status | creating | - | share_id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | - | description | My Manila snapshot | - | created_at | 2016-03-24T14:40:30.000000 | - | size | 1 | - | share_proto | NFS | - | id | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | share_size | 1 | - | name | mysnapshot | - +-------------+--------------------------------------+ + To create a snapshot, the share type of the share must contain the + capability extra-spec ``snapshot_support=True``. -#. List snapshots. + .. code-block:: console - .. code-block:: console + $ manila snapshot-create --name mysnapshot --description "My Manila snapshot" myshare + +-------------+--------------------------------------+ + | Property | Value | + +-------------+--------------------------------------+ + | id | 8a18aa77-7500-4e56-be8f-6081146f47f1 | + | share_id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | share_size | 1 | + | created_at | 2020-08-07T05:30:26.649430 | + | status | creating | + | name | mysnapshot | + | description | My Manila snapshot | + | size | 1 | + | share_proto | NFS | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + +-------------+--------------------------------------+ - $ manila snapshot-list - +--------------------------------------+--------------------------------------+-----------+------------+------------+ - | ID | Share ID | Status | Name | Share Size | - +--------------------------------------+--------------------------------------+-----------+------------+------------+ - | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | available | mysnapshot | 1 | - +--------------------------------------+--------------------------------------+-----------+------------+------------+ +* List snapshots. + + .. code-block:: console + + $ manila snapshot-list + +--------------------------------------+--------------------------------------+-----------+------------+------------+ + | ID | Share ID | Status | Name | Share Size | + +--------------------------------------+--------------------------------------+-----------+------------+------------+ + | 8a18aa77-7500-4e56-be8f-6081146f47f1 | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | available | mysnapshot | 1 | + +--------------------------------------+--------------------------------------+-----------+------------+------------+ Create share from snapshot ~~~~~~~~~~~~~~~~~~~~~~~~~~ -#. Create a share from a snapshot. +* Create a share from a snapshot. - .. code-block:: console + .. note:: - $ manila create NFS 1 \ - --snapshot-id e744ca47-0931-4e81-9d9f-2ead7d7c1640 \ - --share-network mysharenetwork \ - --name mysharefromsnap - +-----------------------------+--------------------------------------+ - | Property | Value | - +-----------------------------+--------------------------------------+ - | status | creating | - | share_type_name | default | - | description | None | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | share_server_id | None | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | e73ebcd3-4764-44f0-9b42-fab5cf34a58b | - | size | 1 | - | name | mysharefromsnap | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:41:36.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+--------------------------------------+ + To create a share from a snapshot, the share type of the parent share + must contain the capability extra-spec + ``create_share_from_snapshot_support=True``. -#. List shares. + .. code-block:: console - .. code-block:: console + $ manila create NFS 1 \ + --snapshot-id 8a18aa77-7500-4e56-be8f-6081146f47f1 \ + --share-network mysharenetwork \ + --name mysharefromsnap + +---------------------------------------+--------------------------------------+ + | Property | Value | + +---------------------------------------+--------------------------------------+ + | id | 2a9336ea-3afc-4443-80bb-398f4bdb3a93 | + | size | 1 | + | availability_zone | nova | + | created_at | 2020-08-07T05:34:12.000000 | + | status | creating | + | name | mysharefromsnap | + | description | None | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | 8a18aa77-7500-4e56-be8f-6081146f47f1 | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | None | + +---------------------------------------+--------------------------------------+ - $ manila list - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | myshare | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | - | e73ebcd3-4764-44f0-9b42-fab5cf34a58b | mysharefromsnap | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ +* List shares. -#. Show the share created from snapshot. + .. code-block:: console - .. code-block:: console + $ manila list + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ + | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ + | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | myshare | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | + | 2a9336ea-3afc-4443-80bb-398f4bdb3a93 | mysharefromsnap | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - $ manila show mysharefromsnap - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | available | - | share_type_name | default | - | description | None | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-4c00cb49-51d9-478e-abc1-d1853efaf6d3 | - | | preferred = False | - | | is_admin_only = False | - | | id = 5419fb40-04b9-4a52-b08e-19aa1ce13a5c | - | | share_instance_id = 4c00cb49-51d9-478e-abc1-d1853efaf6d3 | - | | path = 10.0.0.3:/share-4c00cb49-51d9-478e-abc1-d1853efaf6d3 | - | | preferred = False | - | | is_admin_only = True | - | | id = 26f55e4c-6edc-4e55-8c55-c62b7db1aa9f | - | | share_instance_id = 4c00cb49-51d9-478e-abc1-d1853efaf6d3 | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | e73ebcd3-4764-44f0-9b42-fab5cf34a58b | - | size | 1 | - | name | mysharefromsnap | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:41:36.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ +* Show the share created from snapshot. + + .. code-block:: console + + $ manila show mysharefromsnap + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 2a9336ea-3afc-4443-80bb-398f4bdb3a93 | + | size | 1 | + | availability_zone | nova | + | created_at | 2020-08-07T05:34:12.000000 | + | status | available | + | name | mysharefromsnap | + | description | None | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | 8a18aa77-7500-4e56-be8f-6081146f47f1 | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 7928b361-cada-4505-a62e-4cefb1cf6fc5 | + | | path = 10.0.0.11:/path/to/fake/share/share_2a9336ea_3afc_4443_80bb_398f4bdb3a93_97de2abe_d114_49a9_9d01_ce5e71337e48 | + | | preferred = True | + | | id = e48d19ba-dee5-4492-b156-5181530955be | + | | path = 10.0.0.10:/path/to/fake/share/share_2a9336ea_3afc_4443_80bb_398f4bdb3a93_97de2abe_d114_49a9_9d01_ce5e71337e48 | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Delete share ~~~~~~~~~~~~ -#. Delete a share. +* Delete a share. - .. code-block:: console + .. code-block:: console - $ manila delete mysharefromsnap + $ manila delete mysharefromsnap -#. List shares. +* List shares. - .. code-block:: console + .. code-block:: console - $ manila list - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | myshare | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | - | e73ebcd3-4764-44f0-9b42-fab5cf34a58b | mysharefromsnap | 1 | NFS | deleting | False | default | nosb-devstack@london#LONDON | nova | - +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ + $ manila list + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ + | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ + | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | myshare | 1 | NFS | available | False | default | nosb-devstack@london#LONDON | nova | + | 2a9336ea-3afc-4443-80bb-398f4bdb3a93 | mysharefromsnap | 1 | NFS | deleting | False | default | nosb-devstack@london#LONDON | nova | + +--------------------------------------+-----------------+------+-------------+-----------+-----------+-----------------+-----------------------------+-------------------+ - The share is being deleted. + The share is being deleted. Delete snapshot ~~~~~~~~~~~~~~~ -#. List snapshots before deleting. +* Delete a snapshot. - .. code-block:: console + .. code-block:: console - $ manila snapshot-list - +--------------------------------------+--------------------------------------+-----------+------------+------------+ - | ID | Share ID | Status | Name | Share Size | - +--------------------------------------+--------------------------------------+-----------+------------+------------+ - | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | available | mysnapshot | 1 | - +--------------------------------------+--------------------------------------+-----------+------------+------------+ + $ manila snapshot-delete mysnapshot -#. Delete a snapshot. +* List snapshots after deleting. - .. code-block:: console + .. code-block:: console - $ manila snapshot-delete mysnapshot + $ manila snapshot-list -#. List snapshots after deleting. + +----+----------+--------+------+------------+ + | ID | Share ID | Status | Name | Share Size | + +----+----------+--------+------+------------+ + +----+----------+--------+------+------------+ - .. code-block:: console - - $ manila snapshot-list - - +----+----------+--------+------+------------+ - | ID | Share ID | Status | Name | Share Size | - +----+----------+--------+------+------------+ - +----+----------+--------+------+------------+ - - The snapshot is deleted. + The snapshot is deleted. Extend share ~~~~~~~~~~~~ -#. Extend share. +* Extend share. - .. code-block:: console + .. code-block:: console - $ manila extend myshare 2 + $ manila extend myshare 2 -#. Show the share while it is being extended. +* Show the share while it is being extended. - .. code-block:: console + .. code-block:: console - $ manila show myshare - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | extending | - | share_type_name | default | - | description | My Manila share | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = False | - | | id = b6bd76ce-12a2-42a9-a30a-8a43b503867d | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | path = 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = True | - | | id = 6921e862-88bc-49a5-a2df-efeed9acd583 | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 1 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ + $ manila show myshare + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 1 | + | availability_zone | nova | + | created_at | 2020-08-07T05:24:14.000000 | + | status | extending | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | + | | path = 10.0.0.11:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = True | + | | id = 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | + | | path = 10.0.0.10:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ -#. Show the share after it is extended. +* Show the share after it is extended. - .. code-block:: console + .. code-block:: console - $ manila show myshare - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | available | - | share_type_name | default | - | description | My Manila share | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = False | - | | id = b6bd76ce-12a2-42a9-a30a-8a43b503867d | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | path = 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = True | - | | id = 6921e862-88bc-49a5-a2df-efeed9acd583 | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 2 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ + $ manila show myshare + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 2 | + | availability_zone | nova | + | created_at | 2020-08-07T05:24:14.000000 | + | status | available | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | + | | path = 10.0.0.11:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = True | + | | id = 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | + | | path = 10.0.0.10:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Shrink share ~~~~~~~~~~~~ -#. Shrink a share. +* Shrink a share. - .. code-block:: console + .. code-block:: console - $ manila shrink myshare 1 + $ manila shrink myshare 1 -#. Show the share while it is being shrunk. +* Show the share while it is being shrunk. - .. code-block:: console + .. code-block:: console - $ manila show myshare - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | shrinking | - | share_type_name | default | - | description | My Manila share | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = False | - | | id = b6bd76ce-12a2-42a9-a30a-8a43b503867d | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | path = 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = True | - | | id = 6921e862-88bc-49a5-a2df-efeed9acd583 | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 2 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ + $ manila show myshare + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 2 | + | availability_zone | nova | + | created_at | 2020-08-07T05:24:14.000000 | + | status | shrinking | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | + | | path = 10.0.0.11:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = True | + | | id = 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | + | | path = 10.0.0.10:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ -#. Show the share after it is being shrunk. +* Show the share after it is being shrunk. - .. code-block:: console + .. code-block:: console - $ manila show myshare - +-----------------------------+---------------------------------------------------------------+ - | Property | Value | - +-----------------------------+---------------------------------------------------------------+ - | status | available | - | share_type_name | default | - | description | My Manila share | - | availability_zone | nova | - | share_network_id | c895fe26-92be-4152-9e6c-f2ad230efb13 | - | export_locations | | - | | path = 10.254.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = False | - | | id = b6bd76ce-12a2-42a9-a30a-8a43b503867d | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | path = 10.0.0.3:/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | | preferred = False | - | | is_admin_only = True | - | | id = 6921e862-88bc-49a5-a2df-efeed9acd583 | - | | share_instance_id = e1c2d35e-fe67-4028-ad7a-45f668732b1d | - | share_server_id | 2e9d2d02-883f-47b5-bb98-e053b8d1e683 | - | share_group_id | None | - | host | nosb-devstack@london#LONDON | - | access_rules_status | active | - | snapshot_id | None | - | is_public | False | - | task_state | None | - | snapshot_support | True | - | id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | size | 1 | - | name | myshare | - | share_type | bf6ada49-990a-47c3-88bc-c0cb31d5c9bf | - | has_replicas | False | - | replication_type | None | - | created_at | 2016-03-24T14:15:34.000000 | - | share_proto | NFS | - | project_id | 907004508ef4447397ce6741a8f037c1 | - | metadata | {} | - +-----------------------------+---------------------------------------------------------------+ + $ manila show myshare + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | Property | Value | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | + | size | 1 | + | availability_zone | nova | + | created_at | 2020-08-07T05:24:14.000000 | + | status | available | + | name | myshare | + | description | My Manila share | + | project_id | d9932a60d9ee4087b6cff9ce6e9b4e3b | + | snapshot_id | None | + | share_network_id | c4bfdd5e-7502-4a65-8876-0ce8b9914a64 | + | share_proto | NFS | + | metadata | {} | + | share_type | af7b64ec-cdb3-4a5f-93c9-51672d72e172 | + | is_public | False | + | snapshot_support | True | + | task_state | None | + | share_type_name | dhss_true | + | access_rules_status | active | + | replication_type | None | + | has_replicas | False | + | user_id | 2cebd96a794f431caa06ce5215e0da21 | + | create_share_from_snapshot_support | True | + | revert_to_snapshot_support | True | + | share_group_id | None | + | source_share_group_snapshot_member_id | None | + | mount_snapshot_support | True | + | progress | 100% | + | export_locations | | + | | id = 908e5a28-c5ea-4627-b17c-1cfeb894ccd1 | + | | path = 10.0.0.11:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = True | + | | id = 395244a1-8aa9-44af-9fda-f7d6036ce2b9 | + | | path = 10.0.0.10:/path/to/fake/share/share_83b0772b_00ad_4e45_8fad_106b9d4f1719_da404d59_4280_4b32_847f_6cfa4f730bbd | + | | preferred = False | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +Share metadata +~~~~~~~~~~~~~~ + +* Set metadata items on your share + + .. code-block:: console + + $ manila metadata myshare set purpose='storing financial data for analysis' year_started=2020 + +* Show share metadata + + .. code-block:: console + + $ manila metadata-show myshare + +--------------+-------------------------------------+ + | Property | Value | + +--------------+-------------------------------------+ + | purpose | storing financial data for analysis | + | year_started | 2020 | + +--------------+-------------------------------------+ + +* Query share list with metadata + + .. code-block:: console + + $ manila list --metadata year_started=2020 + +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+------+-------------------+ + | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | + +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+------+-------------------+ + | 83b0772b-00ad-4e45-8fad-106b9d4f1719 | myshare | 1 | NFS | available | False | dhss_true | | nova | + +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+------+-------------------+ + +* Unset share metadata + + .. code-block:: console + + $ manila metadata myshare unset year_started diff --git a/doc/source/user/share-network-operations.rst b/doc/source/user/share-network-operations.rst index d189789e9e..7c5689b642 100644 --- a/doc/source/user/share-network-operations.rst +++ b/doc/source/user/share-network-operations.rst @@ -4,6 +4,8 @@ Create and manage share networks ================================ +.. contents:: :local: + A share network stores network information to create and manage shares. A share network provides a way to designate a network to export shares upon. In the most common use case, you can create a share network with a private OpenStack @@ -17,6 +19,11 @@ In either case, as long as the underlying network is connected to the clients (virtual machines, containers or bare metals), there will exist a direct path to communicate with shares exported on the share networks. +.. important:: + + In order to use share networks, the share type you choose must have the + extra specification ``driver_handles_share_servers`` set to True. + Create share networks ~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/user/share-network-subnet-operations.rst b/doc/source/user/share-network-subnet-operations.rst index 7e72057ef4..f7c3cc7459 100644 --- a/doc/source/user/share-network-subnet-operations.rst +++ b/doc/source/user/share-network-subnet-operations.rst @@ -4,6 +4,8 @@ Create and manage share network subnets ======================================= +.. contents:: :local: + A share network subnet stores network information to create and manage shares. To create and manage your share network subnets, you can use ``manila`` client commands. You can create multiple subnets in a share network, and if you do @@ -12,6 +14,12 @@ considered default by the Shared File Systems service. The default subnet spans all availability zones. You cannot have more than one default subnet per share network. + +.. important:: + + In order to use share networks, the share type you choose must have the + extra specification ``driver_handles_share_servers`` set to True. + Create a subnet in an existing share network ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~