Update admin and user guide for Manila CLI
This patch updates admin and user guide for Manila CLI. Change-Id: I29961d91f35b1e57b1c84733014cf7a5112d4e5a
This commit is contained in:
parent
9f927b4461
commit
de8f0d0ed0
@ -14,6 +14,7 @@ OpenStack command-line clients
|
||||
cli_manage_services.rst
|
||||
common/cli_manage_images.rst
|
||||
common/cli_manage_volumes.rst
|
||||
cli_manage_shares.rst
|
||||
cli_manage_flavors.rst
|
||||
cli_admin_manage_environment.rst
|
||||
cli_set_quotas.rst
|
||||
|
38
doc/user-guide-admin/source/cli_manage_shares.rst
Normal file
38
doc/user-guide-admin/source/cli_manage_shares.rst
Normal file
@ -0,0 +1,38 @@
|
||||
.. _share:
|
||||
|
||||
=============
|
||||
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.
|
||||
|
||||
Migrate a share
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
As an administrator, you can migrate a share with its data from one
|
||||
location to another in a manner that is transparent to users and
|
||||
workloads.
|
||||
|
||||
Possible use cases for data migration include:
|
||||
|
||||
- Bring down a physical storage device for maintenance without
|
||||
disrupting workloads.
|
||||
|
||||
- Modify the properties of a share.
|
||||
|
||||
- Free up space in a thinly-provisioned back end.
|
||||
|
||||
Migrate a share with the :command:`manila migrate` command, as shown in the
|
||||
following example::
|
||||
|
||||
$ manila migrate shareID destinationHost --force-host-copy True|False
|
||||
|
||||
In this example, ``--force-host-copy True`` forces the generic
|
||||
host-based migration mechanism and bypasses any driver optimizations.
|
||||
``destinationHost`` is in this format ``host#pool`` which includes
|
||||
destination host and pool.
|
||||
|
||||
.. note::
|
||||
|
||||
If the user is not an administrator, the migration fails.
|
@ -11,6 +11,7 @@ OpenStack command-line clients
|
||||
common/cli_set_environment_variables_using_openstack_rc.rst
|
||||
common/cli_manage_images.rst
|
||||
common/cli_manage_volumes.rst
|
||||
cli_manage_shares.rst
|
||||
cli_nova_configure_access_security_for_instances.rst
|
||||
cli_launch_instances.rst
|
||||
cli_manage_instances_hosts.rst
|
||||
|
458
doc/user-guide/source/cli_manage_shares.rst
Normal file
458
doc/user-guide/source/cli_manage_shares.rst
Normal file
@ -0,0 +1,458 @@
|
||||
.. _share:
|
||||
|
||||
=============
|
||||
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.
|
||||
|
||||
Create a share network
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Create a share network::
|
||||
|
||||
$ manila share-network-create --name mysharenetwork --description "My Manila network" --neutron-net-id 394246ed-d3fd-4a30-a456-7042ce3429b9 --neutron-subnet-id 8f56d97d-8495-4a5b-8544-9ae4ee9390fc
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+--------------------------------------+
|
||||
| name | mysharenetwork |
|
||||
| segmentation_id | None |
|
||||
| created_at | 2015-08-17T21:13:29.607489 |
|
||||
| neutron_subnet_id | 8f56d97d-8495-4a5b-8544-9ae4ee9390fc |
|
||||
| updated_at | None |
|
||||
| network_type | None |
|
||||
| neutron_net_id | 394246ed-d3fd-4a30-a456-7042ce3429b9 |
|
||||
| ip_version | None |
|
||||
| nova_net_id | None |
|
||||
| cidr | None |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| description | My Manila network |
|
||||
+-------------------+--------------------------------------+
|
||||
|
||||
#. List share networks::
|
||||
|
||||
$ manila share-network-list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+----------------+
|
||||
| id | name |
|
||||
+--------------------------------------+----------------+
|
||||
| ccd6b453-8b05-4508-bbce-93bfe660451f | mysharenetwork |
|
||||
+--------------------------------------+----------------+
|
||||
|
||||
Create a share
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
#. Create a share::
|
||||
|
||||
$ manila create --name myshare --description "My Manila share" --share-network ccd6b453-8b05-4508-bbce-93bfe660451f NFS 1
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+--------------------------------------+
|
||||
| status | creating |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | [] |
|
||||
| host | None |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 1 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.777696 |
|
||||
| export_location | None |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+--------------------------------------+
|
||||
|
||||
#. Show a share::
|
||||
|
||||
$ manila show 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+--------------------------------------+
|
||||
| status | creating |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | [] |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 1 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.000000 |
|
||||
| export_location | None |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+--------------------------------------+
|
||||
|
||||
#. List shares::
|
||||
|
||||
$ manila list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+---------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| ID | Name | Size | Share Proto | Status | Is Public | Share Type | Export location | Host |
|
||||
+--------------------------------------+---------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| 2fe736d1-08ac-46f9-a482-8f224405f2a7 | myshare | 1 | NFS | available | False | default | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 | ubuntuManila@generic1#GENERIC1 |
|
||||
+--------------------------------------+---------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
|
||||
Allow access
|
||||
~~~~~~~~~~~~
|
||||
|
||||
#. Allow access::
|
||||
|
||||
$ manila access-allow 2fe736d1-08ac-46f9-a482-8f224405f2a7 ip 192.100.00.168
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+--------------+--------------------------------------+
|
||||
| share_id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| deleted | False |
|
||||
| created_at | 2015-08-17T21:36:52.025125 |
|
||||
| updated_at | None |
|
||||
| access_type | ip |
|
||||
| access_to | 192.100.00.168 |
|
||||
| access_level | rw |
|
||||
| state | new |
|
||||
| deleted_at | None |
|
||||
| id | d73d04ca-a97e-42bb-94b1-e01c72c8e50e |
|
||||
+--------------+--------------------------------------+
|
||||
|
||||
|
||||
#. List access::
|
||||
|
||||
$ manila access-list 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+-------------+----------------+--------------+--------+
|
||||
| id | access type | access to | access level | state |
|
||||
+--------------------------------------+-------------+----------------+--------------+--------+
|
||||
| d73d04ca-a97e-42bb-94b1-e01c72c8e50e | ip | 192.100.00.168 | rw | active |
|
||||
+--------------------------------------+-------------+----------------+--------------+--------+
|
||||
|
||||
The access is created.
|
||||
|
||||
Deny access
|
||||
~~~~~~~~~~~
|
||||
|
||||
#. Deny access::
|
||||
|
||||
$ manila access-deny 2fe736d1-08ac-46f9-a482-8f224405f2a7 d73d04ca-a97e-42bb-94b1-e01c72c8e50e
|
||||
|
||||
#. List access::
|
||||
|
||||
$ manila access-list 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+----+-------------+-----------+--------------+-------+
|
||||
| id | access type | access to | access level | state |
|
||||
+----+-------------+-----------+--------------+-------+
|
||||
+----+-------------+-----------+--------------+-------+
|
||||
|
||||
The access is removed.
|
||||
|
||||
Create snapshot
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
#. Create a snapshot::
|
||||
|
||||
$ manila snapshot-create --name mysnapshot --description "My Manila snapshot" 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------+--------------------------------------+
|
||||
| status | creating |
|
||||
| share_id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| name | mysnapshot |
|
||||
| created_at | 2015-08-17T21:50:53.295017 |
|
||||
| share_proto | NFS |
|
||||
| id | 1a411703-baef-495f-8e9c-b60e68f2e657 |
|
||||
| size | 1 |
|
||||
| share_size | 1 |
|
||||
| description | My Manila snapshot |
|
||||
+-------------+--------------------------------------+
|
||||
|
||||
#. List snapshots::
|
||||
|
||||
$ manila snapshot-list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
| ID | Share ID | Status | Name | Share Size |
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
| 1a411703-baef-495f-8e9c-b60e68f2e657 | 2fe736d1-08ac-46f9-a482-8f224405f2a7 | available | mysnapshot | 1 |
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
|
||||
Create share from snapshot
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Create a share from a snapshot::
|
||||
|
||||
$ manila create --snapshot-id 1a411703-baef-495f-8e9c-b60e68f2e657 --share-network ccd6b453-8b05-4508-bbce-93bfe660451f --name mysharefromsnap NFS 1
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+--------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+--------------------------------------+
|
||||
| status | creating |
|
||||
| description | None |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | [] |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | 1a411703-baef-495f-8e9c-b60e68f2e657 |
|
||||
| is_public | False |
|
||||
| id | bcc5b2a7-862b-418a-9607-5d669619d652 |
|
||||
| size | 1 |
|
||||
| name | mysharefromsnap |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:54:43.000000 |
|
||||
| export_location | None |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+--------------------------------------+
|
||||
|
||||
|
||||
#. List shares::
|
||||
|
||||
$ manila list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| ID | Name | Size | Share Proto | Status | Is Public | Share Type | Export location | Host |
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| 2fe736d1-08ac-46f9-a482-8f224405f2a7 | myshare | 1 | NFS | available | False | default | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 | ubuntuManila@generic1#GENERIC1 |
|
||||
| bcc5b2a7-862b-418a-9607-5d669619d652 | mysharefromsnap | 1 | NFS | creating | False | default | None | ubuntuManila@generic1#GENERIC1 |
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
|
||||
#. Show the share created from snapshot::
|
||||
|
||||
$ manila show bcc5b2a7-862b-418a-9607-5d669619d652
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| status | available |
|
||||
| description | None |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | 10.254.0.3:/shares/share-bcc5b2a7-862b-418a-9607-5d669619d652 |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | 1a411703-baef-495f-8e9c-b60e68f2e657 |
|
||||
| is_public | False |
|
||||
| id | bcc5b2a7-862b-418a-9607-5d669619d652 |
|
||||
| size | 1 |
|
||||
| name | mysharefromsnap |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:54:43.000000 |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
|
||||
Delete share
|
||||
~~~~~~~~~~~~
|
||||
|
||||
#. Delete a share::
|
||||
|
||||
$ manila delete bcc5b2a7-862b-418a-9607-5d669619d652
|
||||
|
||||
#. List shares::
|
||||
|
||||
$ manila list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| ID | Name | Size | Share Proto | Status | Is Public | Share Type | Export location | Host |
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
| 2fe736d1-08ac-46f9-a482-8f224405f2a7 | myshare | 1 | NFS | available | False | default | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 | ubuntuManila@generic1#GENERIC1 |
|
||||
| bcc5b2a7-862b-418a-9607-5d669619d652 | mysharefromsnap | 1 | NFS | deleting | False | default | 10.254.0.3:/shares/share-bcc5b2a7-862b-418a-9607-5d669619d652 | ubuntuManila@generic1#GENERIC1 |
|
||||
+--------------------------------------+-----------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------+
|
||||
|
||||
The share is being deleted.
|
||||
|
||||
Delete snapshot
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
#. List snapshots before deleting::
|
||||
|
||||
$ manila snapshot-list
|
||||
|
||||
.. code::
|
||||
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
| ID | Share ID | Status | Name | Share Size |
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
| 1a411703-baef-495f-8e9c-b60e68f2e657 | 2fe736d1-08ac-46f9-a482-8f224405f2a7 | available | mysnapshot | 1 |
|
||||
+--------------------------------------+--------------------------------------+-----------+------------+------------+
|
||||
|
||||
#. Delete a snapshot::
|
||||
|
||||
$ manila snapshot-delete 1a411703-baef-495f-8e9c-b60e68f2e657xyang@ubuntuManila:~/devstack$ manila snapshot-list
|
||||
|
||||
#. List snapshots after deleting::
|
||||
|
||||
.. code::
|
||||
|
||||
+----+----------+--------+------+------------+
|
||||
| ID | Share ID | Status | Name | Share Size |
|
||||
+----+----------+--------+------+------------+
|
||||
+----+----------+--------+------+------------+
|
||||
|
||||
The snapshot is deleted.
|
||||
|
||||
Extend share
|
||||
~~~~~~~~~~~~
|
||||
|
||||
#. Extend share::
|
||||
|
||||
$ manila extend 2fe736d1-08ac-46f9-a482-8f224405f2a7 2
|
||||
|
||||
#. Show the share while it is being extended::
|
||||
|
||||
$ manila show 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| status | extending |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 1 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.000000 |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
|
||||
#. Show the share after it is extended::
|
||||
|
||||
$ manila show 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| status | available |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 2 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.000000 |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
|
||||
Shrink share
|
||||
~~~~~~~~~~~~
|
||||
|
||||
#. Shrink a share::
|
||||
|
||||
$ manila shrink 2fe736d1-08ac-46f9-a482-8f224405f2a7 1
|
||||
|
||||
#. Show the share while it is being shrunk::
|
||||
|
||||
$ manila show 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| status | shrinking |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 2 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.000000 |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
|
||||
#. Show the share after it is being shrunk::
|
||||
|
||||
$ manila show 2fe736d1-08ac-46f9-a482-8f224405f2a7
|
||||
|
||||
.. code::
|
||||
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| Property | Value |
|
||||
+-------------------+---------------------------------------------------------------+
|
||||
| status | available |
|
||||
| description | My Manila share |
|
||||
| availability_zone | nova |
|
||||
| share_network_id | ccd6b453-8b05-4508-bbce-93bfe660451f |
|
||||
| export_locations | 10.254.0.3:/shares/share-2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| host | ubuntuManila@generic1#GENERIC1 |
|
||||
| snapshot_id | None |
|
||||
| is_public | False |
|
||||
| id | 2fe736d1-08ac-46f9-a482-8f224405f2a7 |
|
||||
| size | 1 |
|
||||
| name | myshare |
|
||||
| share_type | default |
|
||||
| created_at | 2015-08-17T21:17:23.000000 |
|
||||
| share_proto | NFS |
|
||||
| project_id | d80a6323e99f4f22a26ad2accd3ec791 |
|
||||
| metadata | {} |
|
||||
+-------------------+---------------------------------------------------------------+
|
Loading…
Reference in New Issue
Block a user