Manila Command Line Interface (CLI)

 Manila Service Verfification

In this section, we use the Manila CLI to verify that the configuration presented in the section called “manila.conf has been properly initialized by Manila.

[stack@scspr0030615001 devstack]$ manila service-list
+----+------------------+-------------------------------+------+---------+-------+----------------------------+
| Id | Binary           | Host                          | Zone | Status  | State | Updated_at                 |
+----+------------------+-------------------------------+------+---------+-------+----------------------------+
| 1  | manila-scheduler | scspr0030615001               | nova | enabled | up    | 2015-03-25T12:25:12.000000 |
| 2  | manila-share     | scspr0030615001@cdotSingleSVM | nova | enabled | up    | 2015-03-25T12:25:15.000000 |
+----+------------------+-------------------------------+------+---------+-------+----------------------------+
                

 Creating and Defining Manila Share Types

In this section, we create a variety of Manila Share Types that leverage both the default capabilities of each driver, as well as the NetApp specific extra specs described in Table 6.6, “NetApp supported Extra Specs for use with Manila Share Types”.

  • The general type provisions Manila shares onto the cDOT backend using all the default settings.
  • The flash type provisions Manila shares onto any pool that contains SSD disks within the aggregate.
  • The archive type provisions Manila shares onto any pool that contains SAS drives within the aggregate, and also creates thin provisioned FlexVol volumes.
  • The default type provisions Manila shares onto any pool of any driver without share server management.

[stack@scspr0030615001 devstack]$ manila type-create general False
+--------------------------------------+---------+------------+------------+--------------------------------------+
| ID                                   | Name    | Visibility | is_default | required_extra_specs                 |
+--------------------------------------+---------+------------+------------+--------------------------------------+
| deadeebf-19a2-47b1-9d7f-1c3806cfcb72 | general | public     | -          | driver_handles_share_servers : False |
+--------------------------------------+---------+------------+------------+--------------------------------------+
[stack@scspr0030615001 devstack]$ manila type-create flash False
+--------------------------------------+---------+------------+------------+--------------------------------------+
| ID                                   | Name    | Visibility | is_default | required_extra_specs                 |
+--------------------------------------+---------+------------+------------+--------------------------------------+
| 37fb9f7e-4ffe-4900-8dba-c6d4251e588f | flash   | public     | -          | driver_handles_share_servers : False |
+--------------------------------------+---------+------------+------------+--------------------------------------+
[stack@scspr0030615001 devstack]$ manila type-create archive False
+--------------------------------------+---------+------------+------------+--------------------------------------+
| ID                                   | Name    | Visibility | is_default | required_extra_specs                 |
+--------------------------------------+---------+------------+------------+--------------------------------------+
| 20e4b58d-aab6-42ae-8e9b-8f9d44f17276 | archive | public     | -          | driver_handles_share_servers : False |
+--------------------------------------+---------+------------+------------+--------------------------------------+

[stack@scspr0030615001 devstack]$ manila type-key general set \
    share_backend_name=cdotSingleSVM driver_handles_share_servers=False
[stack@scspr0030615001 devstack]$ manila type-key flash set \
    netapp_disk_type=SSD driver_handles_share_servers=False
[stack@scspr0030615001 devstack]$ manila type-key archive set \
    netapp:thin_provisioned=True netapp_disk_type=SAS driver_handles_share_servers=False
[stack@scspr0030615001 devstack]$ manila extra-specs-list
+--------------------------------------+---------+--------------------------------------+
| ID                                   | Name    | all_extra_specs                      |
+--------------------------------------+---------+--------------------------------------+
| 20e4b58d-aab6-42ae-8e9b-8f9d44f17276 | archive | driver_handles_share_servers : False |
|                                      |         | netapp_disk_type : SAS               |
|                                      |         | netapp:thin_provisioned : True       |
| 37fb9f7e-4ffe-4900-8dba-c6d4251e588f | flash   | netapp_disk_type : SSD               |
|                                      |         | driver_handles_share_servers : False |
| 447732be-4cf2-42b0-83dc-4b6f4ed5368d | default | driver_handles_share_servers : False |
| deadeebf-19a2-47b1-9d7f-1c3806cfcb72 | general | share_backend_name : cdotSingleSVM   |
|                                      |         | driver_handles_share_servers : False |
+--------------------------------------+---------+--------------------------------------+
                

 Creating Manila Shares with Shares Types

In this section, we create shares with the default type, as well as each of the previously defined share types.

[stack@scspr0030615001 devstack]$ manila create --name myDefault NFS 1
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| status            | creating                             |
| description       | None                                 |
| availability_zone | nova                                 |
| share_network_id  | None                                 |
| export_locations  | []                                   |
| share_server_id   | None                                 |
| host              | None                                 |
| snapshot_id       | None                                 |
| is_public         | False                                |
| id                | 63bd5bef-298d-4e49-bea0-49a4cfb143f9 |
| size              | 1                                    |
| name              | myDefault                            |
| share_type        | 447732be-4cf2-42b0-83dc-4b6f4ed5368d |
| created_at        | 2015-03-25T12:44:11.794842           |
| export_location   | None                                 |
| share_proto       | NFS                                  |
| project_id        | 5bf3e15106dd4333b1f55742fa08f90e     |
| metadata          | {}                                   |
+-------------------+--------------------------------------+

[stack@scspr0030615001 devstack]$ manila create --name myGeneral --share-type general NFS 1
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| status            | creating                             |
| description       | None                                 |
| availability_zone | nova                                 |
| share_network_id  | None                                 |
| export_locations  | []                                   |
| share_server_id   | None                                 |
| host              | None                                 |
| snapshot_id       | None                                 |
| is_public         | False                                |
| id                | 95f49ca6-723f-42d0-92f3-4be79c9ad7e6 |
| size              | 1                                    |
| name              | myGeneral                            |
| share_type        | deadeebf-19a2-47b1-9d7f-1c3806cfcb72 |
| created_at        | 2015-03-25T12:44:47.223548           |
| export_location   | None                                 |
| share_proto       | NFS                                  |
| project_id        | 5bf3e15106dd4333b1f55742fa08f90e     |
| metadata          | {}                                   |
+-------------------+--------------------------------------+

[stack@scspr0030615001 devstack]$ manila create --name myFlash --share-type flash NFS 1
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| status            | creating                             |
| description       | None                                 |
| availability_zone | nova                                 |
| share_network_id  | None                                 |
| export_locations  | []                                   |
| share_server_id   | None                                 |
| host              | None                                 |
| snapshot_id       | None                                 |
| is_public         | False                                |
| id                | ec5d2ddb-4573-4ee1-a1e8-2c8532c68e3d |
| size              | 1                                    |
| name              | myFlash                              |
| share_type        | 37fb9f7e-4ffe-4900-8dba-c6d4251e588f |
| created_at        | 2015-03-25T12:44:59.374780           |
| export_location   | None                                 |
| share_proto       | NFS                                  |
| project_id        | 5bf3e15106dd4333b1f55742fa08f90e     |
| metadata          | {}                                   |
+-------------------+--------------------------------------+

[stack@scspr0030615001 devstack]$ manila create --name myArchive --share-type archive NFS 1
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| status            | creating                             |
| description       | None                                 |
| availability_zone | nova                                 |
| share_network_id  | None                                 |
| export_locations  | []                                   |
| share_server_id   | None                                 |
| host              | None                                 |
| snapshot_id       | None                                 |
| is_public         | False                                |
| id                | e4774a70-3e70-4a7c-ab76-886f010efe0a |
| size              | 1                                    |
| name              | myArchive                            |
| share_type        | 20e4b58d-aab6-42ae-8e9b-8f9d44f17276 |
| created_at        | 2015-03-25T12:45:11.124722           |
| export_location   | None                                 |
| share_proto       | NFS                                  |
| project_id        | 5bf3e15106dd4333b1f55742fa08f90e     |
| metadata          | {}                                   |
+-------------------+--------------------------------------+

[stack@scspr0030615001 devstack]$ manila list
+--------------------------------------+-----------+------+-------------+-----------+-----------+------------+----------------------------------------------------------+-------------------------------------+
| ID                                   | Name      | Size | Share Proto | Status    | Is Public | Share Type | Export location                                          | Host                                |
+--------------------------------------+-----------+------+-------------+-----------+-----------+------------+----------------------------------------------------------+-------------------------------------+
| 63bd5bef-298d-4e49-bea0-49a4cfb143f9 | myDefault | 1    | NFS         | available | False     | default    | 10.63.40.153:/share_63bd5bef_298d_4e49_bea0_49a4cfb143f9 | scspr0030615001@cdotSingleSVM#aggr1 |
| 95f49ca6-723f-42d0-92f3-4be79c9ad7e6 | myGeneral | 1    | NFS         | available | False     | general    | 10.63.40.153:/share_95f49ca6_723f_42d0_92f3_4be79c9ad7e6 | scspr0030615001@cdotSingleSVM#aggr1 |
| e4774a70-3e70-4a7c-ab76-886f010efe0a | myArchive | 1    | NFS         | available | False     | archive    | 10.63.40.153:/share_e4774a70_3e70_4a7c_ab76_886f010efe0a | scspr0030615001@cdotSingleSVM#aggr1 |
| ec5d2ddb-4573-4ee1-a1e8-2c8532c68e3d | myFlash   | 1    | NFS         | error     | False     | flash      | None                                                     | None                                |
+--------------------------------------+-----------+------+-------------+-----------+-----------+------------+----------------------------------------------------------+-------------------------------------+

We'll now look at the CLI output from the Data ONTAP cluster to see what FlexVol volumes were created for the Manila share objects, as well as the provisioning strategy (thin or thick) for each share. Note how the name of the FlexVol volume corresponds to the share UUID as defined by Manila. You can see that share e4774a70_3e70_4a7c_ab76_886f010efe0a was thin provisioned, as declared by the archive share type. The rest of the shares were thick provisioned. Also note that the share of type myFlash failed to create, as this SVM does not have any aggregates with SSD drives, as seen in the command output below.

cluster-1::> volume show -vserver manila-vserver
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
manila-vserver
          share_63bd5bef_298d_4e49_bea0_49a4cfb143f9
                       aggr1        online     RW          1GB    972.7MB    5%
manila-vserver
          share_95f49ca6_723f_42d0_92f3_4be79c9ad7e6
                       aggr1        online     RW          1GB    972.7MB    5%
manila-vserver
          share_e4774a70_3e70_4a7c_ab76_886f010efe0a
                       aggr1        online     RW          1GB    972.7MB    5%
manila-vserver
          vol1         aggr1        online     RW         20MB    18.88MB    5%
4 entries were displayed.

cluster-1::>

cluster-1::> volume show -vserver manila-vserver -space-guarantee none
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
manila-vserver
          share_e4774a70_3e70_4a7c_ab76_886f010efe0a
                       aggr1        online     RW          1GB    972.7MB    5%

cluster-1::> volume show -vserver manila-vserver -space-guarantee volume
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
manila-vserver
          share_63bd5bef_298d_4e49_bea0_49a4cfb143f9
                       aggr1        online     RW          1GB    972.7MB    5%
manila-vserver
          share_95f49ca6_723f_42d0_92f3_4be79c9ad7e6
                       aggr1        online     RW          1GB    972.7MB    5%
manila-vserver
          vol1         aggr1        online     RW         20MB    18.88MB    5%
3 entries were displayed.

cluster-1::>

cluster-1::> disk show -type SSD
There are no entries matching your query.
                

We'll now add access rules for any IP-connected client to mount these NFS shares with full read/write privileges.

[stack@scspr0030615001 devstack]$ manila access-allow 63bd5bef-298d-4e49-bea0-49a4cfb143f9 ip 0.0.0.0/0
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| share_id     | 63bd5bef-298d-4e49-bea0-49a4cfb143f9 |
| deleted      | False                                |
| created_at   | 2015-03-25T13:25:24.577736           |
| updated_at   | None                                 |
| access_type  | ip                                   |
| access_to    | 0.0.0.0/0                            |
| access_level | rw                                   |
| state        | new                                  |
| deleted_at   | None                                 |
| id           | c400bdd7-7e4f-49a4-b73d-5aa417af95c3 |
+--------------+--------------------------------------+
[stack@scspr0030615001 devstack]$ manila access-allow 95f49ca6-723f-42d0-92f3-4be79c9ad7e6 ip 0.0.0.0/0
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| share_id     | 95f49ca6-723f-42d0-92f3-4be79c9ad7e6 |
| deleted      | False                                |
| created_at   | 2015-03-25T13:25:47.417271           |
| updated_at   | None                                 |
| access_type  | ip                                   |
| access_to    | 0.0.0.0/0                            |
| access_level | rw                                   |
| state        | new                                  |
| deleted_at   | None                                 |
| id           | 09f8f699-1cec-4519-8aaa-a30d346ad54c |
+--------------+--------------------------------------+
[stack@scspr0030615001 devstack]$ manila access-allow e4774a70-3e70-4a7c-ab76-886f010efe0a ip 0.0.0.0/0
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| share_id     | e4774a70-3e70-4a7c-ab76-886f010efe0a |
| deleted      | False                                |
| created_at   | 2015-03-25T13:26:03.344004           |
| updated_at   | None                                 |
| access_type  | ip                                   |
| access_to    | 0.0.0.0/0                            |
| access_level | rw                                   |
| state        | new                                  |
| deleted_at   | None                                 |
| id           | d0565115-8369-455e-ad8f-3dd7c56037ea |
+--------------+--------------------------------------+


loading table of contents...