이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Shared File Systems service
The OpenStack Shared File Systems service (manila) enables users to provision shared file systems that can be consumed by multiple compute instances.
4.1. Back Ends
When cloud administrators use OpenStack director to deploy the Shared File System service, they may choose either of the two supported back ends:
For a complete list of supported back end appliances and drivers, see Component, Plug-In, and Driver Support in RHEL OpenStack Platform.
4.2. Creating and Managing Share Types
When creating a share, share types are used to select an appropriate storage back end. OpenStack director configures the Shared File System service with a default share type named default
, but does not itself create the share type.
After deploying the overcloud, as the cloud administrator, create this share type by running the following command:
# manila type-create default <spec_driver_handles_share_servers>
The
<spec_driver_handles_share_servers>
parameter is a boolean value:-
For CephFS via NFS, the value is
false
. For NetApp back ends, the value can be
true
orfalse
; set<spec_driver_handles_share_servers>
to match the value of theManilaNetappDriverHandlesShareServers
parameter, as described in the NetApp Back End Guide for the Shared File System Service guide.The cloud administrator can add additional specifications to the default share type and create additional share types, if that is useful for multiple configured back ends.
For example:
-
For CephFS via NFS, the value is
Set up the
default
share type to select a CephFS back end and an additional share type that picks a NetAppdriver_handles_share_servers=True
back end using the following commands:(overcloud) [stack@undercloud-0 ~]$ manila type-create default false --extra-specs share_backend_name='cephfs' (overcloud) [stack@undercloud-0 ~]$ manila type-create netapp true --extra-specs share_backend_name='tripleo_netapp'
NoteBy default, share types are public, which means they are visible to and usable by all cloud tenants. It is also possible to create private share types for use within specific projects. To make private share types, or to set additional share-type options, see the Security and Hardening Guide.
4.2.1. Creating a share
Create a share by using a command similar to the following:
$ manila create [--share-type <SHARETYPE>] [--name <SHARENAME>] PROTO GB
Where:
SHARETYPE
applies settings associated with the specified share type.-
OPTIONAL: if not supplied, the
default
share type is used.
-
OPTIONAL: if not supplied, the
SHARENAME
is the name of the share.- OPTIONAL: shares are not required to have a name, nor is the name guaranteed to be unique.
PROTO
is the share protocol you want to use.-
For CephFS with NFS, PROTO is
nfs
. -
For NetApp, PROTO is
nfs
orcifs
.
-
For CephFS with NFS, PROTO is
-
GB
is the size of the share in gigabytes.
For example, in Section 4.2, “Creating and Managing Share Types”, the cloud administrator created a default
share type that selects a CephFS back end and another share type named netapp
that selects a NetApp back end.
Using these share types, create a 10 GB NFS share named
share-01
on the CephFS back end by running the following command:(user) [stack@undercloud-0 ~]$ manila create --name share-01 nfs 10 +---------------------------------------+---------------------------- | Property | Value +---------------------------------------+---------------------------- | status | creating | share_type_name | default | description | None | availability_zone | None | share_network_id | None | share_group_id | None | revert_to_snapshot_support | False | access_rules_status | active | snapshot_id | None | create_share_from_snapshot_support | False | is_public | False | task_state | None | snapshot_support | False | id | 8c3bedd8-bc82-4100-a65d-53ec51b5fe81 | size | 10 | source_share_group_snapshot_member_id | None | user_id | 19f014d7b5fd43519363c5bd75da864c | name | share-01 | share_type | 89415974-3f82-4a73-8efc-9a4f9970dc00 | has_replicas | False | replication_type | None | created_at | 2018-09-17T16:00:07.000000 | share_proto | NFS | mount_snapshot_support | False | project_id | b0434b7f2c5943e797a24edd958d95e6 | metadata | {} |+--------------------------------------+----------------------------
Optionally, create a 20 GB NFS share named
share-02
on the NetApp back end by running the following command:(user) [stack@undercloud-0 ~]$ manila create --name share-02 --share-type netapp --share-network mynet nfs 20 +-----------------------------------------+---------------------------- | Property | Value +-----------------------------------------+---------------------------- | status | creating | share_type_name | netapp | description | None | availability_zone | None | share_network_id | mynet | share_group_id | None | revert_to_snapshot_support | True | access_rules_status | active | snapshot_id | None | create_share_from_snapshot_support | True | is_public | False | task_state | None | snapshot_support | False | id | db3bedd8-bc82-4100-a65d-53ec51b5cba3 | size | 20 | source_share_group_snapshot_member_id | None | user_id | 19f014d7b5fd43519363c5bd75da864c | name | share-02 | share_type | abcde974-3f82-4a73-8efc-9a4f9970abab | has_replicas | False | replication_type | None | created_at | 2018-09-17T16:00:07.000000 | share_proto | NFS | mount_snapshot_support | False | project_id | b0434b7f2c5943e797a24edd958d95e6 | metadata | {} +---------------------------------------+----------------------------
4.2.2. Listing shares and exporting information
To verify that the shares were created successfully, complete the following steps:
Run the following command:
(user) [stack@undercloud-0 ~]$ manila list +--------------------------------------+----------+-----+-----------+ | ID | Name | ... | Status ... +--------------------------------------+----------+-----+-----------+ | 8c3bedd8-bc82-4100-a65d-53ec51b5fe81 | share-01 | ... | available ... +--------------------------------------+----------+-----+-----------+
Run the
manila share-export-location-list
command to see the share’s export locations:(user) [stack@undercloud-0 ~]$ manila share-export-location-list share-01 +------------------------------------------------------------------ | Path | 172.17.5.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01 +------------------------------------------------------------------
NoteThis information is used to mount the share in Section 4.2.6.2, “Mounting the share”.
4.2.3. Ensuring network connectivity to the share
The Shared File System service serves storage over networks. Therefore, compute instances intended for mounting a file share must have network connectivity to one or more of the export locations for that share.
There are many ways to configure OpenStack networking with the Shared File System service, including using network plugins as described in Networking requirements for manila.
For back ends where driver_handles_share_servers=True
, a cloud user can create a share network with the details of a network to which the compute instance attaches and then reference it when creating shares.
-
For back ends where
driver_handles_share_servers=False
, a cloud administrator sets up the requisite networking in advance rather than dynamically in the Shared File System back end. - For the CephFS via NFS back end, a cloud administrator deploys OpenStack director with isolated networks and environment arguments as documented in Installing OpenStack with CephFS via NFS and a custom network_data file to create an isolated StorageNFS network for NFS exports. After deployment, before the overcloud is used, the administrator creates a corresponding Networking service (neutron) StorageNFS shared provider network that maps to the data center’s isolated StorageNFS network.
For a compute instance to connect to this shared provider network, the user must add an additional neutron port.
To ensure network connectivity to the share, complete the following steps:
Create a security group for the StorageNFS port that allows packets to egress the port (which is required to initiate an NFS mount) but that does not allow ingress packets for unestablished connections.
(user) [stack@undercloud-0 ~]$ openstack security group create no-ingress -f yaml created_at: '2018-09-19T08:19:58Z' description: no-ingress id: 66f67c24-cd8b-45e2-b60f-9eaedc79e3c5 name: no-ingress project_id: 1e021e8b322a40968484e1af538b8b63 revision_number: 2 rules: 'created_at=''2018-09-19T08:19:58Z'', direction=''egress'', ethertype=''IPv4'', id=''6c7f643f-3715-4df5-9fef-0850fb6eaaf2'', updated_at=''2018-09-19T08:19:58Z'' created_at=''2018-09-19T08:19:58Z'', direction=''egress'', ethertype=''IPv6'', id=''a8ca1ac2-fbe5-40e9-ab67-3e55b7a8632a'', updated_at=''2018-09-19T08:19:58Z''' updated_at: '2018-09-19T08:19:58Z'
Create a port on the StorageNFS network with security enforced by the
no-ingress
security group:(user) [stack@undercloud-0 ~]$ openstack port create nfs-port0 --network StorageNFS --security-group no-ingress -f yaml admin_state_up: UP allowed_address_pairs: '' binding_host_id: null binding_profile: null binding_vif_details: null binding_vif_type: null binding_vnic_type: normal created_at: '2018-09-19T08:03:02Z' data_plane_status: null description: '' device_id: '' device_owner: '' dns_assignment: null dns_name: null extra_dhcp_opts: '' fixed_ips: ip_address='172.17.5.160', subnet_id='7bc188ae-aab3-425b-a894-863e4b664192' id: 7a91cbbc-8821-4d20-a24c-99c07178e5f7 ip_address: null mac_address: fa:16:3e:be:41:6f name: nfs-port0 network_id: cb2cbc5f-ea92-4c2d-beb8-d9b10e10efae option_name: null option_value: null port_security_enabled: true project_id: 1e021e8b322a40968484e1af538b8b63 qos_policy_id: null revision_number: 6 security_group_ids: 66f67c24-cd8b-45e2-b60f-9eaedc79e3c5 status: DOWN subnet_id: null tags: '' trunk_details: null updated_at: '2018-09-19T08:03:03Z'
NoteStorageNFSSubnet
assigned IP address 172.17.5.160 tonfs-port0
.-
Add
nfs-port0
to a compute instance:
(user) [stack@undercloud-0 ~]$ openstack server add port instance0 nfs-port0 (user) [stack@undercloud-0 ~]$ openstack server list -f yaml - Flavor: m1.micro ID: 0b878c11-e791-434b-ab63-274ecfc957e8 Image: manila-test Name: demo-instance0 Networks: demo-network=172.20.0.4, 10.0.0.53; StorageNFS=172.17.5.160 Status: ACTIVE
In addition to its private and floating addresses, notice that the compute instance is assigned a port with the IP address 172.17.5.160 on the StorageNFS network, which can be used to mount NFS shares when access is granted to that address for the share in question.
Networking configuration on the compute instance may need to be adjusted and the services restarted for the compute instance to activate an interface with this address.
4.2.4. Granting share access
Before you can mount a share on an instance, you must grant the instance access to the share by using a command similar to the following:
# manila access-allow <SHARE> <ACCESSTYPE> --access-level <ACCESSLEVEL> <CLIENTIDENTIFIER>
Where:
-
SHARE
- the share name or ID of the share created in Section 4.2.1, “Creating a share”. ACCESSTYPE
- the type of access to be requested on the share. Some types include:-
user
: use to authenticate by user or group name. ip
: use to authenticate an instance through its IP address.NoteThe type of access depends on the protocol of the share. For NFS shares, only
ip
access type is allowed. For CIFS,user
access type is appropriate.
-
ACCESSLEVEL
- optional, default isrw
-
rw
: read-write access to shares -
ro
: read-only access to shares
-
CLIENTIDENTIFIER
- varies depending onACCESSTYPE
-
Use an IP address for
ip
ACCESSTYPE
-
Use CIFS user or group for
user
ACCESSTYPE
-
Use an IP address for
For example:
To grant read-write access to
share-01
to a compute instance with a StorageNFS network port with the IP address 172.17.5.160, run the following command:(user) [stack@undercloud-0 ~]$ openstack server list -f yaml - Flavor: m1.micro ID: 0b878c11-e791-434b-ab63-274ecfc957e8 Image: manila-test Name: demo-instance0 Networks: demo-network=172.20.0.4, 10.0.0.53; StorageNFS=172.17.5.160 Status: ACTIVE (user) [stack@undercloud-0 ~]$ manila access-allow share-01 ip 172.17.5.160 +-----------------+---------------------------------------+ | Property | Value | +-----------------+---------------------------------------+ | access_key | None | share_id | db3bedd8-bc82-4100-a65d-53ec51b5cba3 | created_at | 2018-09-17T21:57:42.000000 | updated_at | None | access_type | ip | access_to | 172.17.5.160 | access_level | rw | state | queued_to_apply | id | 875c6251-c17e-4c45-8516-fe0928004fff +-----------------+---------------------------------------+
NoteAccess to the share has its own ID (
ACCESSID
).Enter the following command to verify that the access configuration was successful:
(user) [stack@undercloud-0 ~]$ manila access-list share-01 +--------------+-------------+--------------+--------------+--------+ ... | id | access_type | access_to | access_level | state | ... +--------------+-------------+--------------+--------------+--------+ | 875c6251-... | ip | 172.17.5.160 | rw | active | ... +--------------+------------+--------------+--------------+---------+ ...
4.2.5. Revoking access to a share
Complete the following steps to revoke previously-granted access to a share:
Run the following command:
# manila access-deny <SHARE> <ACCESSID>
NoteIn the example command,
<SHARE>
can be either the share name or the share ID.For example:
(user) [stack@undercloud-0 ~]$ manila access-list share-01 +--------------+-------------+--------------+--------------+--------+ | id | access_type | access_to | access_level | state | ... +--------------+-------------+--------------+--------------+--------+ ... | 875c6251-... | ip | 172.17.5.160 | rw | active | ... +--------------+-------------+--------------+--------------+--------+ (user) [stack@undercloud-0 ~]$ manila access-deny share-01 875c6251-c17e-4c45-8516-fe0928004fff (user) [stack@undercloud-0 ~]$ manila access-list share-01 +--------------+------------+--------------+--------------+--------+ ... | id | access_type| access_to | access_level | state | ... +--------------+------------+--------------+--------------+--------+ ... +--------------+------------+--------------+--------------+--------+ ...
4.2.6. Mounting a share on an instance
After configuring the share to authenticate an instance, verify the functionality of the environment and then mount the share.
NFS client packages supporting version 4.1 must be installed on the compute instance that mounts the shares.
4.2.6.1. Verifying the environment
To verify the functionality of the environment, complete the following steps:
Run the following command to get the virtual IP (VIP) for the NFS-Ganesha service:
(user) [stack@undercloud-0 ~]$ manila share-export-location-list share-01 172.17.5.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01
From the VM in which you will mount the share, ensure that the VIP is reachable via ping:
# ping 172.17.5.13 PING 172.17.5.13 (172.17.5.13) 56(84) bytes of data. 64 bytes from 172.17.5.13: icmp_seq=1 ttl=64 time=0.048 ms 64 bytes from 172.17.5.13: icmp_seq=2 ttl=64 time=0.061 ms ^C --- 172.17.5.13 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.048/0.054/0.061/0.009 ms
Verify the VIP is ready to respond to NFS rpcs on the proper port:
# rpcinfo -T tcp -a 172.17.5.13.8.1 100003 4
NoteThe IP address is written in universal address format (uaddr), which adds two extra octets (
8.1
) to represent the NFS service port, 2049.
4.2.6.2. Mounting the share
To mount the share from ] on the instance from xref:shares-access[, complete the following steps:
Log in to the instance and run the following command:
(user) [stack@undercloud-0 ~]$ openstack server ssh demo-instance0 --login root # hostname demo-instance0
Mount the share using the export location from Section 4.2.2, “Listing shares and exporting information”:
# mount.nfs -v 172.17.5.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01 /mnt mount.nfs: timeout set for Wed Sep 19 09:14:46 2018 mount.nfs: trying text-based options 'vers=4.2,addr=172.17.5.13,clientaddr=172.17.5.160' 172.17.5.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01 on /mnt type nfs # mount | grep mnt 172.17.5.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01 on /mnt type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=172.17.5.160,local_lock=none,addr=172.17.5.13)
4.2.7. Deleting a share
To delete a share, complete the following step:
Run the following command:
# manila delete <SHARE>
NoteIn the example command, <SHARE> can be either the share name or the share ID.
For example:
# manila delete share-01
4.2.8. Quotas in the Shared File System service
To prevent system capacities from being exhausted without notification, you can set up quotas. Quotas are operational limits. To list the quotas for a project or user, use the manila quota-show
command. If you include the optional --user
parameter, you can view the quotas for this user in the specified project. If you omit this parameter, you get the quotas for the specified project. You can update and delete quotas. You can update the shares, snapshots, gigabytes, snapshot-gigabytes, share-networks, share_groups, share_group_snapshots, and share-type quotas.
To see the usage statements:
# manila --help quota-show # manila --help quota-update # manila --help quota-delete
4.2.9. Troubleshooting asynchronous failures
If manila operations such as create share
or create share group
fail asynchronously, you can use the command line to query for more information about the error.
4.2.9.1. Scenario
In this example, the user wants to create a share to host software libraries on several virtual machines. The example deliberately introduces two share creation failures to illustrate how to use the command line to retrieve user support messages.
To create the share, you can use a share type that specifies some capabilities that you want the share to have. Cloud administrators can create share types. View the available share types:
clouduser1@client:~$ manila type-list +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+ | ID | Name | visibility | is_default | required_extra_specs | optional_extra_specs | Description | +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+ | 1cf5d45a-61b3-44d1-8ec7-89a21f51a4d4 | dhss_false | public | YES | driver_handles_share_servers : False | create_share_from_snapshot_support : True | None | | | | | | | mount_snapshot_support : False | | | | | | | | revert_to_snapshot_support : False | | | | | | | | snapshot_support : True | | | 277c1089-127f-426e-9b12-711845991ea1 | dhss_true | public | - | driver_handles_share_servers : True | create_share_from_snapshot_support : True | None | | | | | | | mount_snapshot_support : False | | | | | | | | revert_to_snapshot_support : False | | | | | | | | snapshot_support : True | | +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+
In this example, two share types are available.
To use a share type that specifies driver_handles_share_servers=True capability, you must create a share network on which to export the share. Create a share network from a private tenant network.
clouduser1@client:~$ openstack subnet list +--------------------------------------+---------------------+--------------------------------------+---------------------+ | ID | Name | Network | Subnet | +--------------------------------------+---------------------+--------------------------------------+---------------------+ | 78c6ac57-bba7-4922-ab81-16cde31c2d06 | private-subnet | 74d5cfb3-5dd0-43f7-b1b2-5b544cb16212 | 10.0.0.0/26 | | a344682c-718d-4825-a87a-3622b4d3a771 | ipv6-private-subnet | 74d5cfb3-5dd0-43f7-b1b2-5b544cb16212 | fd36:18fc:a8e9::/64 | +--------------------------------------+---------------------+--------------------------------------+---------------------+ clouduser1@client:~$ manila share-network-create --name mynet --neutron-net-id 74d5cfb3-5dd0-43f7-b1b2-5b544cb16212 --neutron-subnet-id 78c6ac57-bba7-4922-ab81-16cde31c2d06 +-------------------+--------------------------------------+ | Property | Value | +-------------------+--------------------------------------+ | network_type | None | | name | mynet | | segmentation_id | None | | created_at | 2018-10-09T21:32:22.485399 | | neutron_subnet_id | 78c6ac57-bba7-4922-ab81-16cde31c2d06 | | updated_at | None | | mtu | None | | gateway | None | | neutron_net_id | 74d5cfb3-5dd0-43f7-b1b2-5b544cb16212 | | ip_version | None | | cidr | None | | project_id | cadd7139bc3148b8973df097c0911016 | | id | 0b0fc320-d4b5-44a1-a1ae-800c56de550c | | description | None | +-------------------+--------------------------------------+ clouduser1@client:~$ manila share-network-list +--------------------------------------+-------+ | id | name | +--------------------------------------+-------+ | 6c7ef9ef-3591-48b6-b18a-71a03059edd5 | mynet | +--------------------------------------+-------+
Create the share:
clouduser1@client:~$ manila create nfs 1 --name software_share --share-network mynet --share-type dhss_true +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | status | creating | | share_type_name | dhss_true | | description | None | | availability_zone | None | | share_network_id | 6c7ef9ef-3591-48b6-b18a-71a03059edd5 | | share_server_id | None | | share_group_id | None | | host | | | revert_to_snapshot_support | False | | access_rules_status | active | | snapshot_id | None | | create_share_from_snapshot_support | False | | is_public | False | | task_state | None | | snapshot_support | False | | id | 243f3a51-0624-4bdd-950e-7ed190b53b67 | | size | 1 | | source_share_group_snapshot_member_id | None | | user_id | 61aef4895b0b41619e67ae83fba6defe | | name | software_share | | share_type | 277c1089-127f-426e-9b12-711845991ea1 | | has_replicas | False | | replication_type | None | | created_at | 2018-10-09T21:12:21.000000 | | share_proto | NFS | | mount_snapshot_support | False | | project_id | cadd7139bc3148b8973df097c0911016 | | metadata | {} | +---------------------------------------+--------------------------------------+
View the status of the share:
clouduser1@client:~$ manila list +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+ | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+ | 243f3a51-0624-4bdd-950e-7ed190b53b67 | software_share | 1 | NFS | error | False | dhss_true | | None | +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+
In this example, an error occurred during the share creation.
To view the user support message, use the
message-list
command. Use the --resource-id to filter to the specific share you want to find out about.clouduser1@client:~$ manila message-list +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | ID | Resource Type | Resource ID | Action ID | User Message | Detail ID | Created At | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | 7d411c3c-46d9-433f-9e21-c04ca30b209c | SHARE | 243f3a51-0624-4bdd-950e-7ed190b53b67 | 001 | allocate host: No storage could be allocated for this share request, Capabilities filter didn't succeed. | 008 | 2018-10-09T21:12:21.000000 | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+
In the User Message column, you can see that the Shared File System service failed to create the share because of a capabilities mismatch.
To view more message information, use the
message-show
command, followed by the ID of the message from themessage-list
command:clouduser1@client:~$ manila message-show 7d411c3c-46d9-433f-9e21-c04ca30b209c +---------------+----------------------------------------------------------------------------------------------------------+ | Property | Value | +---------------+----------------------------------------------------------------------------------------------------------+ | request_id | req-0a875292-6c52-458b-87d4-1f945556feac | | detail_id | 008 | | expires_at | 2018-11-08T21:12:21.000000 | | resource_id | 243f3a51-0624-4bdd-950e-7ed190b53b67 | | user_message | allocate host: No storage could be allocated for this share request, Capabilities filter didn't succeed. | | created_at | 2018-10-09T21:12:21.000000 | | message_level | ERROR | | id | 7d411c3c-46d9-433f-9e21-c04ca30b209c | | resource_type | SHARE | | action_id | 001 | +---------------+----------------------------------------------------------------------------------------------------------+
As the cloud user, you know about capabilities through the share type so you can review the share types available. The difference between the two share types is the value of driver_handles_share_servers:
clouduser1@client:~$ manila type-list +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+ | ID | Name | visibility | is_default | required_extra_specs | optional_extra_specs | Description | +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+ | 1cf5d45a-61b3-44d1-8ec7-89a21f51a4d4 | dhss_false | public | YES | driver_handles_share_servers : False | create_share_from_snapshot_support : True | None | | | | | | | mount_snapshot_support : False | | | | | | | | revert_to_snapshot_support : False | | | | | | | | snapshot_support : True | | | 277c1089-127f-426e-9b12-711845991ea1 | dhss_true | public | - | driver_handles_share_servers : True | create_share_from_snapshot_support : True | None | | | | | | | mount_snapshot_support : False | | | | | | | | revert_to_snapshot_support : False | | | | | | | | snapshot_support : True | | +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+
Create a share with the other available share type:
clouduser1@client:~$ manila create nfs 1 --name software_share --share-network mynet --share-type dhss_false +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | status | creating | | share_type_name | dhss_false | | description | None | | availability_zone | None | | share_network_id | 6c7ef9ef-3591-48b6-b18a-71a03059edd5 | | share_group_id | None | | revert_to_snapshot_support | False | | access_rules_status | active | | snapshot_id | None | | create_share_from_snapshot_support | True | | is_public | False | | task_state | None | | snapshot_support | True | | id | 2d03d480-7cba-4122-ac9d-edc59c8df698 | | size | 1 | | source_share_group_snapshot_member_id | None | | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | | name | software_share | | share_type | 1cf5d45a-61b3-44d1-8ec7-89a21f51a4d4 | | has_replicas | False | | replication_type | None | | created_at | 2018-10-09T21:24:40.000000 | | share_proto | NFS | | mount_snapshot_support | False | | project_id | cadd7139bc3148b8973df097c0911016 | | metadata | {} | +---------------------------------------+--------------------------------------+
In this example, the second share creation attempt fails.
View the user support message:
clouduser1@client:~$ manila list +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+ | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+ | 2d03d480-7cba-4122-ac9d-edc59c8df698 | software_share | 1 | NFS | error | False | dhss_false | | nova | | 243f3a51-0624-4bdd-950e-7ed190b53b67 | software_share | 1 | NFS | error | False | dhss_true | | None | +--------------------------------------+----------------+------+-------------+--------+-----------+-----------------+------+-------------------+ clouduser1@client:~$ manila message-list +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | ID | Resource Type | Resource ID | Action ID | User Message | Detail ID | Created At | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | ed7e02a2-0cdb-4ff9-b64f-e4d2ec1ef069 | SHARE | 2d03d480-7cba-4122-ac9d-edc59c8df698 | 002 | create: Driver does not expect share-network to be provided with current configuration. | 003 | 2018-10-09T21:24:40.000000 | | 7d411c3c-46d9-433f-9e21-c04ca30b209c | SHARE | 243f3a51-0624-4bdd-950e-7ed190b53b67 | 001 | allocate host: No storage could be allocated for this share request, Capabilities filter didn't succeed. | 008 | 2018-10-09T21:12:21.000000 | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+
You can see that the service does not expect a share network for the share type used.
Without consulting the administrator, you can discover that the administrator has not made available a storage back end that supports exporting shares directly on to your private neutron network. Create the share without the share-network parameter:
clouduser1@client:~$ manila create nfs 1 --name software_share --share-type dhss_false +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | status | creating | | share_type_name | dhss_false | | description | None | | availability_zone | None | | share_network_id | None | | share_group_id | None | | revert_to_snapshot_support | False | | access_rules_status | active | | snapshot_id | None | | create_share_from_snapshot_support | True | | is_public | False | | task_state | None | | snapshot_support | True | | id | 4d3d7fcf-5fb7-4209-90eb-9e064659f46d | | size | 1 | | source_share_group_snapshot_member_id | None | | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | | name | software_share | | share_type | 1cf5d45a-61b3-44d1-8ec7-89a21f51a4d4 | | has_replicas | False | | replication_type | None | | created_at | 2018-10-09T21:25:40.000000 | | share_proto | NFS | | mount_snapshot_support | False | | project_id | cadd7139bc3148b8973df097c0911016 | | metadata | {} | +---------------------------------------+--------------------------------------+
To ensure that the share was created successfully, use the
manila list
command:clouduser1@client:~$ manila list +--------------------------------------+----------------+------+-------------+-----------+-----------+-----------------+------+-------------------+ | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | +--------------------------------------+----------------+------+-------------+-----------+-----------+-----------------+------+-------------------+ | 4d3d7fcf-5fb7-4209-90eb-9e064659f46d | software_share | 1 | NFS | available | False | dhss_false | | nova | | 2d03d480-7cba-4122-ac9d-edc59c8df698 | software_share | 1 | NFS | error | False | dhss_false | | nova | | 243f3a51-0624-4bdd-950e-7ed190b53b67 | software_share | 1 | NFS | error | False | dhss_true | | None | +--------------------------------------+----------------+------+-------------+-----------+-----------+-----------------+------+-------------------+
Delete the shares and support messages:
clouduser1@client:~$ manila message-list +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | ID | Resource Type | Resource ID | Action ID | User Message | Detail ID | Created At | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ | ed7e02a2-0cdb-4ff9-b64f-e4d2ec1ef069 | SHARE | 2d03d480-7cba-4122-ac9d-edc59c8df698 | 002 | create: Driver does not expect share-network to be provided with current configuration. | 003 | 2018-10-09T21:24:40.000000 | | 7d411c3c-46d9-433f-9e21-c04ca30b209c | SHARE | 243f3a51-0624-4bdd-950e-7ed190b53b67 | 001 | allocate host: No storage could be allocated for this share request, Capabilities filter didn't succeed. | 008 | 2018-10-09T21:12:21.000000 | +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+ clouduser1@client:~$ manila delete 2d03d480-7cba-4122-ac9d-edc59c8df698 243f3a51-0624-4bdd-950e-7ed190b53b67 clouduser1@client:~$ manila message-delete ed7e02a2-0cdb-4ff9-b64f-e4d2ec1ef069 7d411c3c-46d9-433f-9e21-c04ca30b209c clouduser1@client:~$ manila message-list +----+---------------+-------------+-----------+--------------+-----------+------------+ | ID | Resource Type | Resource ID | Action ID | User Message | Detail ID | Created At | +----+---------------+-------------+-----------+--------------+-----------+------------+ +----+---------------+-------------+-----------+--------------+-----------+------------+