Transfer share ownership

You can transfer NFS, native CephFS, or CIFS shares to another project when the share type extra specification, driver_handles_share_servers (DHSS), is set to false and the shares are not created in a share network.

Before you begin

  • For native CephFS shares, all access rules must be removed before transferring.

About this task

You cannot transfer the following types of shares:

  • Shares that were created by using the DHSS=true share type.
  • Shares with CephX access rules because CephX users are assigned to a project, and they are unique in a Red Hat Ceph Storage cluster.
  • Shares that are in transitional states, possess replicas, or are in share groups.

Procedure

  1. Access the remote shell for the openstackclient pod from your workstation:
    $ oc rsh -n openstack openstackclient
  2. Create a share transfer:
    $ openstack share transfer create <share_id> --name <share_transfer_name>
    • Replace <share_id> with the ID of the share you want to transfer.
    • Replace <share_transfer_name> with a name for your share transfer.

      Example output:

      +------------------------+--------------------------------------+
      | Field                  | Value                                |
      +------------------------+--------------------------------------+
      | id                     | 1c56314e-7e97-455a-bbde-83828db038d4 |
      | created_at             | 2025-09-22T13:45:41.376091           |
      | name                   | share-transfer                       |
      | resource_type          | share                                |
      | resource_id            | 4f508574-e1c8-4bf9-adc4-8a1d34ac13a6 |
      | source_project_id      | 7dd704e2ab5c42c0afe83bfad076fcb4     |
      | destination_project_id | None                                 |
      | accepted               | False                                |
      | expires_at             | 2025-09-22T13:50:41.375594           |
      | auth_key               | af429e22e0abc31d                     |
      +------------------------+--------------------------------------+
    • Store the transfer id and auth_key to share with the user in a different project so they can accept the share transfer. You must save the transfer ID when you create the transfer because you cannot obtain the auth_key from the service again later. If you do not have the auth_key to share with another user later, you must delete the transfer and start the process again.
  3. View a list of share transfers in your project to verify that your share transfer is created:
    $ openstack share transfer list

    Example output:

    +--------------------------------------+----------------+---------------+--------------------------------------+
    | ID                                   | Name           | Resource Type | Resource Id                          |
    +--------------------------------------+----------------+---------------+--------------------------------------+
    | 1c56314e-7e97-455a-bbde-83828db038d4 | share-transfer | share         | 4f508574-e1c8-4bf9-adc4-8a1d34ac13a6 |
    +--------------------------------------+----------------+---------------+--------------------------------------+
  4. View details of the share transfer:
    $ openstack share transfer show <share_transfer_id>
    • Replace <share_transfer_id> with the share transfer ID, for example 1c56314e-7e97-455a-bbde-83828db038d4.

      Example output:

      +------------------------+--------------------------------------+
      | Field                  | Value                                |
      +------------------------+--------------------------------------+
      | id                     | 181773b2-e359-45f4-9d7d-31ee8b722fd3 |
      | created_at             | 2025-09-22T13:45:41.376091           |
      | name                   | share-transfer                       |
      | resource_type          | share                                |
      | resource_id            | 4f508574-e1c8-4bf9-adc4-8a1d34ac13a6 |
      | source_project_id      | 7dd704e2ab5c42c0afe83bfad076fcb4     |
      | destination_project_id | None                                 |
      | accepted               | False                                |
      | expires_at             | 2025-09-22T13:50:41.375594           |
      +------------------------+--------------------------------------+
    • To delete a share transfer, you can run the following command:
      $ openstack share transfer delete <share_transfer_id>
  5. Exit the openstackclient pod:
    $ exit
  6. Share the transfer id and auth_key with the user who accepts the share transfer in a different project.
    • The user accepts the share transfer by using the following command. In this example, 1c56314e-7e97-455a-bbde-83828db038d4 is the share transfer ID and af429e22e0abc31d is the authorization key:

      Example:

      $ openstack share transfer accept 1c56314e-7e97-455a-bbde-83828db038d4  af429e22e0abc31d