Vastdata Share Driver

Vastdata can be used as a storage back end for the OpenStack Shared File System service. Shares in the Shared File System service are mapped 1:1 to Vastdata volumes. Access is provided via NFS protocol and IP-based authentication. The Vastdata Manila driver uses the Vastdata API service.

Supported shared filesystems

The driver supports NFS shares.

Operations supported

The driver supports NFS shares.

The following operations are supported:

  • Create a share.

  • Delete a share.

  • Allow share access.

  • Deny share access.

  • Extend a share.

  • Shrink a share.

Requirements

  • Trash API must be enabled on Vastdata cluster.

Driver options

The following table contains the configuration options specific to the share driver.

Description of Vastdata share driver configuration options

Configuration option = Default value

Description

[DEFAULT]

vast_mgmt_host =

(String) Hostname or IP address VAST storage system management VIP.

vast_mgmt_port = 443

(String) Port for VAST management API.

vast_vippool_name =

(String) Name of Virtual IP pool.

vast_root_export = manila

(String) Base path for shares.

vast_mgmt_user =

(String) Username for VAST management API.

vast_mgmt_password =

(String) Password for VAST management API.

Vastdata driver configuration example

The following parameters shows a sample subset of the manila.conf file, which configures two backends and the relevant [DEFAULT] options. A real configuration would include additional [DEFAULT] options and additional sections that are not discussed in this document:

[DEFAULT]
enabled_share_backends = vast
enabled_share_protocols = NFS

[vast]
share_driver = manila.share.drivers.vastdata.driver.VASTShareDriver
share_backend_name = vast
driver_handles_share_servers = False
snapshot_support = True
vast_mgmt_host = {vms_ip}
vast_mgmt_port = {vms_port}
vast_mgmt_user = {mgmt_user}
vast_mgmt_password = {mgmt_password}
vast_vippool_name = {vip_pool}
vast_root_export = {root_export}

Restrictions

The Vastdata driver has the following restrictions:

  • Only IP access type is supported for NFS.

The manila.share.drivers.vastdata.driver Module

VAST’s Share Driver

Configuration:

[DEFAULT] enabled_share_backends = vast

[vast] share_driver = manila.share.drivers.vastdata.driver.VASTShareDriver share_backend_name = vast snapshot_support = true driver_handles_share_servers = false vast_mgmt_host = v11 vast_vippool_name = vippool-1 vast_root_export = manila vast_mgmt_user = admin vast_mgmt_password = 123456

class VASTShareDriver(*args, **kwargs)

Bases: ShareDriver

Driver for the VastData Filesystem.

VERSION = '1.0'
create_share(context, share, share_server=None)

Is called to create share.

create_snapshot(context, snapshot, share_server=None)

Is called to create snapshot.

delete_share(context, share, share_server=None)

Called to delete a share

delete_snapshot(context, snapshot, share_server=None)

Is called to remove share.

do_setup(context)

Driver initialization

ensure_shares(context, shares)

Invoked to ensure that shares are exported.

Driver can use this method to update the “status” and/or list of export locations of the shares if they change. To do that, a dictionary of shares should be returned. In addition, the driver can seek to “reapply_access_rules” (boolean) on a per-share basis. When this property exists and is set to True, the share manager service will invoke “update_access” with all the access rules from the service database. :shares: A list of all shares for updates. :returns: None or a dictionary of updates in the format.

Example:

{
    '09960614-8574-4e03-89cf-7cf267b0bd08': {
        'export_locations': [{...}, {...}],
        'status': 'error',
        'reapply_access_rules': False,
    },

    '28f6eabb-4342-486a-a7f4-45688f0c0295': {
        'export_locations': [{...}, {...}],
        'status': 'available',
        'reapply_access_rules': True,
    },

}
extend_share(share, new_size, share_server=None)

uses resize_share to extend a share

get_backend_info(context)

Get driver and array configuration parameters.

Driver can use this method to get the special configuration info and return for assessment. The share manager service uses this assessment to invoke “ensure_shares” during service startup.

Returns:

A dictionary containing driver-specific info.

Example:

{
     'version': '2.23'
     'port': '80',
     'logicalportip': '1.1.1.1',
      ...
}

get_network_allocations_number()

Returns number of network allocations for creating VIFs.

Drivers that use Nova for share servers should return zero (0) here same as Generic driver does. Because Nova will handle network resources allocation. Drivers that handle networking itself should calculate it according to their own requirements. It can have 1+ network interfaces.

shrink_share(share, new_size, share_server=None)

uses resize_share to shrink a share

update_access(context, share, access_rules, add_rules, delete_rules, share_server=None)

Update access rules for share.

policy_payload_from_rules(rules, policy, action)

Convert list of manila rules

into vast compatible payload for updating/creating policy.

validate_access_rule(access_rule)