Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 7. Performing operations with the Shared File Systems service (manila)

download PDF

Cloud users can create and manage shares from the available share types in the Shared File Systems service (manila). You use the Shared File Systems service command-line client to manage shared file systems.

7.1. Listing share types

As a cloud user, you must specify a share type when you create a share. There must be at least one available share type to use the Shared File Systems service (manila), and you can only create shares that match the available share types. Cloud administrators configure share types to define the type of service that the Shared File Systems service scheduler uses to make scheduling decisions and that drivers use to control share creation.

Procedure

  • List the available share types:

    $ manila type-list

    The command output lists the name and ID of the available share types.

7.2. Creating NFS, CephFS, or CIFS shares

Cloud users can create CephFS-NFS, native CephFS, or CIFS shares to read and write data.

When you create a share, you must specify the share protocol and the size of the share in gigabytes. You can also include the share-type, share-network and name command options:

$ manila create [--share-type <share_type>] \
        [--share-network <share_network>]  \
        [--name <share_name>] <share_protocol> <GB>

In the command example, replace the following values:

  • <share_type>: Applies settings associated with the specified share type:

    • Optional. If you do not specify a share type, the default share type is used.
  • <share_network>: The name of the share network:

    • Required if the share type has driver_handles_share_servers set to true.
    • Unsupported if the share type has driver_handles_share_servers set to false.
    • Unsupported for CephFS-NFS and native CephFS. These protocols do not support share types that have driver_handles_share_servers set to true.
  • <share_name>: The name of the share:

    • Optional. Shares are not required to have a name, and the name does not need to be unique.
  • <share_protocol>: The share protocol you want to use:

    • For CephFS-NFS, replace <share_protocol> with nfs.
    • For native CephFS, replace <share_protocol> with cephfs.
    • For other storage back ends that support NFS or CIFS protocols, for example, NetApp or Dell EMC storage back ends, replace <share_protocol> with nfs or cifs.
  • <GB>: The size of the share in gigabytes.

7.2.1. Creating NFS or CIFS shares with DHSS=true

When cloud administrators activate self-service share networks by using the share type extra specification, driver_handles_share_servers=true, cloud users can add their own security services to a share network to create and export NFS or CIFS shares. The native CephFS protocol does not support share networks.

To add a security service, you must create a share network and a security service resource to represent your Active Directory server. You can then associate the security service to the share network to create and export NFS or CIFS shares.

Procedure

  1. Create a share network:

    $ manila share-network-create --name <network-name> \
        --neutron-net-id <25d1e65c-d961-4f22-9476-1190f55f118f> \
        --neutron-subnet-id <8ba20dce-0ca5-4efd-bf1c-608d6bceffe1>
    • Replace <network-name> with the share network name that you want to use for your NFS or CIFS shares.
    • Replace the neutron-net-id and neutron-subnet-id with the correct values for your share network.
  2. Create a security service resource to represent your Active Directory server:

    $ manila security-service-create <active_directory> \
              --dns-ip <192.02.12.10> \
              --domain <domain-name.com> \
              --user <Administrator> \
              --password <password> \
              --name <AD-service>
    • Replace the values in angle brackets <> with the correct details for your security service resource.
  3. Associate the security service resource to the share network:

    $ manila share-network-security-service-add \
      <network-name> <AD-service>
  4. Create an NFS or CIFS share:

    • 10 GB NFS example:

      $ manila create --name <nfs-share> --share-type <netapp> \
          --share-network <nfs-network> nfs 10
    • 20 GB CIFS example:

      $ manila create --name <cifs-share> --share-type dhss_true \
          --share-network <cifs-network> cifs 20
      • Replace the values in angle brackets <> with the correct details for your NFS or CIFS share.

7.2.2. Creating NFS, CephFS, or CIFS shares with DHSS=false

When cloud administrators deactivate self-service share networks by using the share type extra specification, driver_handles_share_servers=false, they must pre-configure an Active Directory service to the storage system. For information about how to perform this configuration, see the storage vendor’s documentation.

When DHSS=false, the shared storage network is pre-configured by the cloud administrator, and cloud users can create shares without using the share-network command option.

Procedure

  • Create an NFS, native CephFS, or CIFS share when DHSS=false. These examples specify a name, but they do not specify the share-type or share-network. They use the default share type and the shared storage network configured by the cloud administrator:

    • Create a 10 GB NFS share named share-01.

      $ manila create --name share-01 nfs 10
    • Create a 15 GB native CephFS share named share-02:

      $ manila create --name share-02 cephfs 15
    • Create a 20 GB CIFS share named share-03:

      $ manila create --name share-03 cifs 20

7.3. Listing shares and exporting information

To verify that you have successfully created NFS, CephFS, or CIFS shares in the Shared File Systems service (manila), complete the following steps to list the shares and view their export locations and parameters.

Procedure

  1. List the shares:

    $ manila list
    
    +--------------------------------------+----------+-----+-----------+
    | ID                                   | Name     | ... | Status    ...
    +--------------------------------------+----------+-----+-----------+
    | 8c3bedd8-bc82-4100-a65d-53ec51b5fe81 | share-01 | ... | available ...
    +--------------------------------------+----------+-----+-----------+
  2. View the export locations of the share:

    $ manila share-export-location-list <share>
    
     +------------------------------------------------------------------
     | Path
     |  198.51.100.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01
     +------------------------------------------------------------------
    • Replace <share> with either the share name or the share ID.
  3. View the parameters for the share:

    $ manila share-export-location-show <share-id>
    Note

    You use the export location to mount the share, as described in Section 7.8.2, “Mounting NFS, native CephFS, or CIFS shares”.

7.4. Creating a snapshot of data on a shared file system

A snapshot is a read-only, point-in-time copy of data on a share. You can use a snapshot to recover data lost through accidental data deletion or file system corruption. Snapshots are more space efficient than backups, and they do not impact the performance of the Shared File Systems service (manila).

Prerequisites

  • The snapshot_support parameter must equal true on the parent share. You can run the following command to verify:

    $ manila show | grep snapshot_support

Procedure

  1. As a cloud user, create a snapshot of a share:

    $ manila snapshot-create [--name <snapshot_name>] <share>
    • Replace <share> with the name or ID of the share for which you want to create a snapshot.
    • Optional: Replace <snapshot_name> with the name of the snapshot.

      Example output

      +-------------------+--------------------------------------+
      | Property      	| Value                            	|
      +-------------------+--------------------------------------+
      | id            	| dbdcb91b-82ba-407e-a23d-44ffca4da04c |
      | share_id      	| ee7059aa-5887-4b87-b03e-d4f0c27ed735 |
      | share_size    	| 1                                	|
      | created_at    	| 2022-01-07T14:20:55.541084       	|
      | status        	| creating                         	|
      | name          	| snapshot_name                    	|
      | description   	| None                             	|
      | size          	| 1                                	|
      | share_proto   	| NFS                              	|
      | provider_location | None                             	|
      | user_id       	| 6d414c62237841dcbe63d3707c1cdd90 	|
      | project_id    	| 041ff9e24eba469491d770ad8666682d 	|
      +-------------------+--------------------------------------+

  2. Confirm that you created the snapshot:

    $ manila snapshot-list --share-id <share>

    Replace <share> with the name or ID of the share from which you created the snapshot.

7.4.1. Creating a share from a snapshot

You can create a share from a snapshot. If the parent share the snapshot was created from has a share type with driver_handles_share_servers set to true, the new share is created on the same share network as the parent.

Note

If the share type of the parent share has driver_handles_share_servers set to true, you cannot change the share network for the share you create from the snapshot.

Prerequisites

  • The create_share_from_snapshot_support share attribute is set to true.

    For more information about share types, see Comparing common capabilities of share types.

  • The status attribute of the snapshot is set to available.

Procedure

  1. Retrieve the ID of the share snapshot that contains the data that you require for your new share:

    $ manila snapshot-list
  2. A share created from a snapshot can be larger, but not smaller, than the snapshot. Retrieve the size of the snapshot:

    $ manila snapshot-show <snapshot-id>
  3. Create a share from a snapshot:

    $ manila create <share_protocol> <size> \
       --snapshot-id <snapshot_id> \
       --name <name>
    • Replace <share_protocol> with the protocol, such as NFS.
    • Replace <size> with the size of the share to be created, in GiB.
    • Replace <snapshot_id> with the ID of the snapshot.
    • Replace <name> with the name of the new share.
  4. List the shares to confirm that the share was created successfully:

    $ manila list
  5. View the properties of the new share:

    $ manila show <name>

Verification

After you create a snapshot, confirm that the snapshot is available.

  • List the snapshots to confirm that they are available:

    $ manila snapshot-list

7.4.2. Deleting a snapshot

When you create a snapshot of a share, you cannot delete the share until you delete all of the snapshots created from that share.

Procedure

  1. Identify the snapshot you want to delete and retrieve its ID:

    $ manila snapshot-list
  2. Delete the snapshot:

    $ manila snapshot-delete <snapshot>
    Note

    Repeat this step for each snapshot that you want to delete.

  3. After you delete the snapshot, run the following command to confirm that you deleted the snapshot:

    $ manila snapshot-list

7.5. Connecting to a shared network to access shares

When the driver_handles_share_servers parameter (DHSS) equals false, shares are exported to the shared provider network that the cloud administrator made available. As an end user, you must connect your client, such as a Compute instance, to the shared provider network to access your shares.

In this example procedure, the shared provider network is called StorageNFS. StorageNFS is configured when director deploys the Shared File Systems service (manila) with the CephFS-NFS back end. Follow similar steps to connect to the network made available by your cloud administrator.

Note

The steps in the example procedure use IPv4 addressing, but the steps are identical for IPv6.

Procedure

  1. Create a security group for the StorageNFS port that allows packets to egress the port but does not allow ingress packets from unestablished connections:

    $ 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''
  2. Create a port on the StorageNFS network with security enforced by the no-ingress security group.

    $ 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='198.51.100.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'
    Note

    In this example, the StorageNFS subnet on the StorageNFS network assigned IP address 198.51.100.160 to nfs-port0. For more information about the StorageNFS subnet, see Configuring the shared provider StorageNFS network in Deploying Red Hat Ceph Storage and Red Hat OpenStack Platform together with director.

  3. Add nfs-port0 to a Compute instance.

    $ openstack server add port instance0 nfs-port0
    $ openstack server list -f yaml
    - Flavor: m1.micro
      ID: 0b878c11-e791-434b-ab63-274ecfc957e8
      Image: manila-test
      Name: demo-instance0
      Networks: demo-network=198.51.100.4, 10.0.0.53; StorageNFS=198.51.100.160
      Status: ACTIVE

    In addition to its private and floating addresses, the Compute instance is assigned a port with the IP address 198.51.100.160 on the StorageNFS network. You can use this IP address to mount NFS shares when access is granted to that address for the shares.

    Note

    You might need to adjust the networking configuration on the Compute instance and restart the services for the Compute instance to activate an interface with this address.

7.6. Configuring an IPv6 interface between the network and an instance

When the shared network to which shares are exported uses IPv6 addressing, you might experience an issue with DHCPv6 on the secondary interface. If this issue occurs, configure an IPv6 interface manually on the instance.

Prerequisites

  • Connection to a shared network to access shares

Procedure

  1. Log in to the instance.
  2. Configure the IPv6 interface address:

    $ sudo ip address add fd00:fd00:fd00:7000::c/64 dev eth1
  3. Activate the interface:

    $ sudo ip link set dev eth1 up
  4. Ping the IPv6 address in the export location of the share to test interface connectivity:

    $ ping -6  fd00:fd00:fd00:7000::21
  5. Alternatively, verify that you can reach the NFS server through Telnet:

    $ sudo dnf install -y telnet
    $ telnet fd00:fd00:fd00:7000::21 2049

7.7. Granting share access for end-user clients

You must grant end-user clients access to the share so that users can read data from and write data to the share.

You grant a client compute instance access to an NFS share through the IP address of the instance. The user rules for CIFS shares and cephx rules for CephFS shares follow a similar pattern. With user and cephx access types, you can use the same clientidentifier across multiple clients, if required.

Before you can mount a share on a client, such as a compute instance, you must grant the client access to the share by using a command similar to the following command:

$ manila access-allow <share> <accesstype> \
  --access-level <accesslevel>  <clientidentifier>

Replace the following values:

  • share: The share name or ID of the share created, as described in Section 7.2, “Creating NFS, CephFS, or CIFS shares”.
  • 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.
    • cephx: Use to authenticate by native CephFS client username.

      Note

      The type of access depends on the protocol of the share. For CIFS, you can use user. For NFS shares, you must use ip. For native CephFS shares, you must use cephx.

  • accesslevel: Optional; the default is rw.

    • rw: Read-write access to shares.
    • ro: Read-only access to shares.
  • clientidentifier: Varies depending on accesstype.

    • Use an IP address for ip accesstype.
    • Use a CIFS user or group for user accesstype.
    • Use a username string for cephx accesstype.

7.7.1. Granting access to an NFS share

Cloud users can provide access to NFS shares through IP addresses.

Note

You can use the following procedure with IPv4 or IPv6 addresses.

Procedure

  • Retrieve the IP address of the client compute instance where you plan to mount the share. Make sure that you select the IP address that corresponds to the network that can reach the shares. In this example, it is the IP address of the StorageNFS network:

    $ openstack server list -f yaml
    - Flavor: m1.micro
      ID: 0b878c11-e791-434b-ab63-274ecfc957e8
      Image: manila-test
      Name: demo-instance0
      Networks: demo-network=198.51.100.4, 10.0.0.53;
      StorageNFS=198.51.100.160
      Status: ACTIVE
    
    $ manila access-allow <share> ip 198.51.100.160
    Note

    Access to the share has its own ID, accessid.

    +-----------------+---------------------------------------+
    | 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       | 198.51.100.160
    | access_level    | rw
    | state           | queued_to_apply
    | id              | 875c6251-c17e-4c45-8516-fe0928004fff
    +-----------------+---------------------------------------+

Verification

  • Verify that the access configuration was successful:

    $ manila access-list <share>
    
    +--------------+-------------+--------------+--------------+--------+ ...
    | id           | access_type | access_to    | access_level | state  | ...
    +--------------+-------------+--------------+--------------+--------+
    | 875c6251-... | ip          | 198.51.100.160 | rw       	 | active | ...
    +--------------+------------+--------------+--------------+---------+ ...

7.7.2. Granting access to a native CephFS share

Cloud users can provide access to native CephFS shares through Ceph client usernames. The Shared File Systems service (manila) prevents the use of pre-existing Ceph users so you must create unique Ceph client usernames.

To mount a share, you need a Ceph client username and an access key. You can retrieve access keys by using the Shared File Systems service API. By default, access keys are visible to all users in a project namespace. You can provide the same user with access to different shares in the project namespace. Users can then access the shares by using the CephFS kernel client on the client machine.

Important

Use the native CephFS driver with trusted clients only. For information about native CephFS back-end security, see Native CephFS back-end security in Deploying Red Hat Ceph Storage and Red Hat OpenStack Platform together with director.

Procedure

  1. Grant users access to the native CephFS share:

    $ manila access-allow <share> cephx <user>
    • Replace <share> with either the share name or the share ID.
    • Replace <user> with the cephx user.
  2. Collect the access key for the user:

    $ manila access-list <share>

7.7.3. Granting access to a CIFS share

Cloud users grant access to CIFS shares through usernames that exist in the Active Directory service. The Shared File Systems service (manila) does not create new users on the Active Directory server. It only validates usernames through the security service, and access rules with invalid user names result in an error status.

If the cloud administrator sets the value of the driver_handles_share_servers parameter (DHSS) to true, then the cloud user configures the Active Directory service by adding a security service. If the cloud administrator sets the value of the DHSS parameter to false, then the cloud administrator configures the Active Directory service and associates it with the storage network.

To mount a share, you must specify the user’s Active Directory username and password. You cannot obtain this password through the Shared File Systems service.

Procedure

  • Grant users access to a CIFS share:

    $ manila access-allow <share> user <user>
    • Replace <share> with either the share name or the share ID.
    • Replace <user> with the username corresponding to the Active Directory user.

7.7.4. Revoking access to a share

The owner of a share can revoke access to the share for any reason. Complete the following steps to revoke access that was previously granted to a share.

Procedure

  • Revoke access to a share:

    $ manila access-deny <share> <access-id>
    • Replace <share> with either the share name or the share ID.
    • Replace <access-id> with the access ID of the share.

      For example:

      $ manila access-list share-01
      +--------------+-------------+--------------+--------------+--------+
      | id           | access_type | access_to    | access_level | state  | ...
      +--------------+-------------+--------------+--------------+--------+ ...
      | 875c6251-... | ip          | 198.51.100.160 | rw         | active | ...
      +--------------+-------------+--------------+--------------+--------+
      
      $ manila access-deny share-01 875c6251-c17e-4c45-8516-fe0928004fff
      
      $ manila access-list share-01
      
      +--------------+------------+--------------+--------------+--------+ ...
      | id           | access_type| access_to    | access_level | state  | ...
      +--------------+------------+--------------+--------------+--------+ ...
      +--------------+------------+--------------+--------------+--------+ ...
Note

If you have an existing client that has read-write permissions, you must revoke their access to a share and add a read-only rule if you want the client to have read-only permissions.

7.8. Mounting shares on compute instances

After you grant share access to clients, the clients can mount and use the shares. Any type of client can access shares as long as there is network connectivity to the client.

The steps used to mount an NFS share on a virtual compute instance are similar to the steps to mount an NFS share on a bare-metal compute instance. For more information about how to mount shares on OpenShift containers, see Product Documentation for OpenShift Container Platform.

Note

Client packages for the different protocols must be installed on the Compute instance that mounts the shares. For example, for the Shared File Systems service with CephFS-NFS, the NFS client packages must support NFS 4.1.

7.8.1. Listing share export locations

Retrieve the export locations of shares so that you can mount a share.

Procedure

  • Retrieve the export locations of a share:

    $ manila share-export-location-list share-01

    When multiple export locations exist, choose one for which the value of the preferred metadata field equals True. If no preferred locations exist, you can use any export location.

7.8.2. Mounting NFS, native CephFS, or CIFS shares

When you create NFS, native CephFS, or CIFS shares and grant share access to end-user clients, users can mount the shares on the client to enable access to data, as long as there is network connectivity.

Prerequisites

  • To mount NFS shares, the nfs-utils package must be installed on the client machine.
  • To mount native CephFS shares, the ceph-common package must be installed on the client machine. Users access native CephFS shares by using the CephFS kernel client on the client machine.
  • To mount CIFS shares, the cifs-utils package must be installed on the client machine.

Procedure

  1. Log in to the instance:

    $ openstack server ssh demo-instance0 --login user
  2. Mount an NFS share. Refer to the following example for sample syntax:

    $ mount -t nfs \
      -v <198.51.100.13:/volumes/_nogroup/e840b4ae-6a04-49ee-9d6e-67d4999fbc01>  \
      /mnt
  3. Mount a native CephFS share. Refer to the following example for sample syntax:

    $  mount -t ceph \
      <192.0.2.125:6789,192.0.2.126:6789,192.0.2.127:6789:/volumes/_nogroup/4c55ad20-9c55-4a5e-9233-8ac64566b98c> \
      -o name=<user>,secret='<AQA8+ANW/<4ZWNRAAOtWJMFPEihBA1unFImJczA==>'
  4. Mount a CIFS share. Refer to the following example for sample syntax:

    $  mount -t cifs \
      -o user=<user>,pass=<password> \
      <\\192.0.2.128/share_11265e8a_200c_4e0a_a40f_b7a1117001ed>
    • Replace <user> with the Active Directory user who has access to the share.
    • Replace <password> with the user’s Active Directory password.
    • Replace <\\192.0.2.128/share_11265e8a_200c_4e0a_a40f_b7a1117001ed> with the export location of the share.
    • Retrieve the export location as described in Section 7.8.1, “Listing share export locations”.

Verification

  • Verify that the mount command succeeded:

    $ df -k

7.9. Deleting shares

The Shared File Systems service (manila) provides no protections to prevent you from deleting your data. The Shared File Systems service does not check whether clients are connected or workloads are running. When you delete a share, you cannot retrieve it.

Warning

Back up your data before you delete a share.

Prerequisites

  • If you created snapshots from a share, you must delete all of the snapshots and replicas before you can delete the share. For more information, see Deleting a snapshot.

Procedure

  • Delete a share:

    $ manila delete <share>
  • Replace <share> with either the share name or the share ID.

7.10. Listing resource limits of the Shared File Systems service

As a cloud user, you can list the current resource limits. This can help you plan workloads and prepare for any action based on your resource consumption.

Procedure

  • List the resource limits and current resource consumption for the project:

    $ manila absolute-limits
    +------------------------------+-------+
    | Name                         | Value |
    +------------------------------+-------+
    | maxTotalReplicaGigabytes     | 1000  |
    | maxTotalShareGigabytes       | 1000  |
    | maxTotalShareGroupSnapshots  | 50    |
    | maxTotalShareGroups          | 49    |
    | maxTotalShareNetworks        | 10    |
    | maxTotalShareReplicas        | 100   |
    | maxTotalShareSnapshots       | 50    |
    | maxTotalShares               | 50    |
    | maxTotalSnapshotGigabytes    | 1000  |
    | totalReplicaGigabytesUsed    | 22    |
    | totalShareGigabytesUsed      | 25    |
    | totalShareGroupSnapshotsUsed | 0     |
    | totalShareGroupsUsed         | 9     |
    | totalShareNetworksUsed       | 2     |
    | totalShareReplicasUsed       | 9     |
    | totalShareSnapshotsUsed      | 4     |
    | totalSharesUsed              | 12    |
    | totalSnapshotGigabytesUsed   | 4     |
    +------------------------------+-------+

7.11. Troubleshooting operation failures

In the event that Shared File Systems (manila) operations, such as create share or create share group, fail asynchronously, as an end user, you can run queries from the command line for more information about the errors.

7.11.1. Fixing create share or create share group failures

In this example, the goal of the end user is 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.

Procedure

  1. 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.

  2. To use a share type that specifies the 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 project 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 |
    +--------------------------------------+-------+
  3. 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                              | {}                                   |
    +---------------------------------------+--------------------------------------+
  4. 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.

  5. To view the user support message, run 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, notice that the Shared File Systems service failed to create the share because of a capabilities mismatch.

  6. To view more message information, run the message-show command, followed by the ID of the message from the message-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                                                                                                      |
    +---------------+----------------------------------------------------------------------------------------------------------+
  7. As the cloud user, you can check 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                    |             |
    +--------------------------------------+-------------+------------+------------+--------------------------------------+--------------------------------------------+-------------+
  8. 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.

  9. 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 |
    +--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+

    The service does not expect a share network for the share type that you used.

  10. 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                              | {}                                   |
    +---------------------------------------+--------------------------------------+
  11. Ensure that the share was created successfully:

    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              |
    +--------------------------------------+----------------+------+-------------+-----------+-----------+-----------------+------+-------------------+
  12. 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 |
    +----+---------------+-------------+-----------+--------------+-----------+------------+
    +----+---------------+-------------+-----------+--------------+-----------+------------+

7.11.2. Debugging share mounting failures

If you experience an issue when you mount shares, use these verification steps to identify the root cause.

Procedure

  1. Verify the access control list of the share to ensure that the rule that corresponds to your client is correct and has been successfully applied.

    $ manila access-list share-01

    In a successful rule, the state attribute equals active.

  2. If the share type parameter is configured to driver_handles_share_servers=false, copy the hostname or IP address from the export location and ping it to confirm connectivity to the NAS server:

    $ ping -c 1 198.51.100.13
    PING 198.51.100.13 (198.51.100.13) 56(84) bytes of data.
    64 bytes from 198.51.100.13: icmp_seq=1 ttl=64 time=0.048 ms--- 198.51.100.13 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 7.851/7.851/7.851/0.000 ms
    If using the NFS protocol, you may verify that the NFS server is ready to respond to NFS rpcs on the proper port:
    $ rpcinfo -T tcp -a 198.51.100.13.8.1 100003 4
    program 100003 version 4 ready and waiting
    Note

    The IP address is written in universal address format (uaddr), which adds two extra octets (8.1) to represent the NFS service port, 2049.

If these verification steps fail, there might be a network connectivity issue, or your shared file system back-end storage has failed. Collect the log files and contact Red Hat Support.

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.