manila/doc/source/admin/shared-file-systems-share-resize.rst
zhongjun 0d4a317adb [Doc] Add share group in doc
Separate add share group description in other API or CLI echo in
this patch from add share group itself description in other patches:
Added share group iteslf in api-ref [1]
Added share api admin doc [2]
Added share group in driver requirements [3]

[1] I852d264eb120027aad32997dc64a6ca428ee55a4
[2] Ia0cc534e0bfb2ca5e495e575237e9911c746691b
[3] Iedde5a9a774a60e760b47d5eb2973f42d79227d4

Change-Id: Iedde5a9a774a60e760b47d5eb2973f42d79127d3
2017-09-28 14:49:29 +00:00

8.8 KiB

Resize share

To change file share size, use the manila extend command and the manila shrink command. For most drivers it is safe operation. If you want to be sure that your data is safe, you can make a share back up by creating a snapshot of it.

You can extend and shrink the share with the manila extend and manila shrink commands respectively, and specify the share with the new size that does not exceed the quota. For details, see Quotas and Limits <shared_file_systems_quotas>. You also cannot shrink share size to 0 or to a greater value than the current share size.

While extending, the share has an extending status. This means that the increase share size request was issued successfully.

To extend the share and check the result, run:

$ manila extend docs_resize 2
$ manila show docs_resize
+----------------------+--------------------------------------------------------------------------+
| Property             | Value                                                                    |
+----------------------+--------------------------------------------------------------------------+
| status               | available                                                                |
| share_type_name      | my_type                                                                  |
| description          | None                                                                     |
| availability_zone    | nova                                                                     |
| share_network_id     | None                                                                     |
| export_locations     |                                                                          |
|                      | path = 1.0.0.4:/shares/manila_share_b8afc508_8487_442b_b170_ea65b07074a8 |
|                      | preferred = False                                                        |
|                      | is_admin_only = False                                                    |
|                      | id = 3ffb76f4-92b9-4639-83fd-025bc3e302ff                                |
|                      | share_instance_id = b8afc508-8487-442b-b170-ea65b07074a8                 |
|                      | path = 2.0.0.3:/shares/manila_share_b8afc508_8487_442b_b170_ea65b07074a8 |
|                      | preferred = False                                                        |
|                      | is_admin_only = True                                                     |
|                      | id = 1f0e263f-370d-47d3-95f6-1be64088b9da                                |
|                      | share_instance_id = b8afc508-8487-442b-b170-ea65b07074a8                 |
| share_server_id      | None                                                                     |
| share_group_id       | None                                                                     |
| host                 | manila@paris#shares                                                      |
| access_rules_status  | active                                                                   |
| snapshot_id          | None                                                                     |
| is_public            | False                                                                    |
| task_state           | None                                                                     |
| snapshot_support     | True                                                                     |
| id                   | b07dbebe-a328-403c-b402-c8871c89e3d1                                     |
| size                 | 2                                                                        |
| name                 | docs_resize                                                              |
| share_type           | 14ee8575-aac2-44af-8392-d9c9d344f392                                     |
| has_replicas         | False                                                                    |
| replication_type     | None                                                                     |
| created_at           | 2016-03-25T15:33:18.000000                                               |
| share_proto          | NFS                                                                      |
| project_id           | 907004508ef4447397ce6741a8f037c1                                         |
| metadata             | {}                                                                       |
+----------------------+--------------------------------------------------------------------------+

While shrinking, the share has a shrinking status. This means that the decrease share size request was issued successfully. To shrink the share and check the result, run:

$ manila shrink docs_resize 1
$ manila show docs_resize
+----------------------+--------------------------------------------------------------------------+
| Property             | Value                                                                    |
+----------------------+--------------------------------------------------------------------------+
| status               | available                                                                |
| share_type_name      | my_type                                                                  |
| description          | None                                                                     |
| availability_zone    | nova                                                                     |
| share_network_id     | None                                                                     |
| export_locations     |                                                                          |
|                      | path = 1.0.0.4:/shares/manila_share_b8afc508_8487_442b_b170_ea65b07074a8 |
|                      | preferred = False                                                        |
|                      | is_admin_only = False                                                    |
|                      | id = 3ffb76f4-92b9-4639-83fd-025bc3e302ff                                |
|                      | share_instance_id = b8afc508-8487-442b-b170-ea65b07074a8                 |
|                      | path = 2.0.0.3:/shares/manila_share_b8afc508_8487_442b_b170_ea65b07074a8 |
|                      | preferred = False                                                        |
|                      | is_admin_only = True                                                     |
|                      | id = 1f0e263f-370d-47d3-95f6-1be64088b9da                                |
|                      | share_instance_id = b8afc508-8487-442b-b170-ea65b07074a8                 |
| share_server_id      | None                                                                     |
| share_group_id       | None                                                                     |
| host                 | manila@paris#shares                                                      |
| access_rules_status  | active                                                                   |
| snapshot_id          | None                                                                     |
| is_public            | False                                                                    |
| task_state           | None                                                                     |
| snapshot_support     | True                                                                     |
| id                   | b07dbebe-a328-403c-b402-c8871c89e3d1                                     |
| size                 | 1                                                                        |
| name                 | docs_resize                                                              |
| share_type           | 14ee8575-aac2-44af-8392-d9c9d344f392                                     |
| has_replicas         | False                                                                    |
| replication_type     | None                                                                     |
| created_at           | 2016-03-25T15:33:18.000000                                               |
| share_proto          | NFS                                                                      |
| project_id           | 907004508ef4447397ce6741a8f037c1                                         |
| metadata             | {}                                                                       |
+----------------------+--------------------------------------------------------------------------+