GlusterFS driver

GlusterFS driver uses GlusterFS, an open source distributed file system, as the storage backend for serving file shares to Manila clients.

Supported shared filesystems

  • NFS (access by IP)

Supported Operations

  • Create NFS Share
  • Delete NFS Share
  • Allow NFS Share access
  • Deny NFS Share access

Requirements

  • Install glusterfs-server package, version >= 3.5.x, on the storage backend.
  • Install glusterfs and glusterfs-fuse package, version >=3.5.x, on the Manila host.
  • Establish network connection between the Manila host and the storage backend.

Manila driver configuration setting

The following parameters in the Manila’s configuration file need to be set:

  • share_driver = manila.share.drivers.glusterfs.GlusterfsShareDriver

  • If the backend GlusterFS server runs on the Manila host machine,
    • glusterfs_target = <glustervolserver>:/<glustervolid>
    And if the backend GlusterFS server runs remotely,
    • glusterfs_target = <username>@<glustervolserver>:/<glustervolid>

The following configuration parameters are optional:

  • glusterfs_mount_point_base = <base path of GlusterFS volume mounted on

    Manila host>

  • glusterfs_path_to_private_key = <path to Manila host’s private key file>

  • glusterfs_server_password = <password of remote GlusterFS server machine>

Known Restrictions

  • The driver does not support network segmented multi-tenancy model instead works over a flat network, where the tenants share a network.
  • NFSv3 is the only protocol that can be used to access the shares. This is because the shares are mediated in the backend GlusterFS by the Gluster-NFS server that supports only NFSv3 protocol.
  • All Manila shares, which map to subdirectories within a GlusterFS volume, are currently created within a single GlusterFS volume of a GlusterFS storage pool.

The manila.share.drivers.glusterfs Module

Flat network GlusterFS Driver.

Manila shares are subdirectories within a GlusterFS volume. The access to the shares is currently mediated by the Gluster-NFS server running in the GlusterFS backend storage pool. The Gluster-NFS server supports only NFSv3 protocol so it’s the only protocol that can be used to access the shares.

TODO(rraja): support SMB protocol.

class GaneshaNFSHelper(execute, config_object, **kwargs)

Bases: manila.share.drivers.ganesha.GaneshaNASHelper

class GlusterManager(address, execf, path_to_private_key=None, remote_server_password=None, has_volume=True)

Bases: object

Interface with a GlusterFS volume.

check_gluster_version(minvers)

Retrieve and check GlusterFS version.

Parameters:minvers – minimum version to require (given as tuple of integers, example: (3, 6))
get_gluster_version()

Retrieve GlusterFS version.

Returns:version (as tuple of strings, example: (‘3’, ‘6’, ‘0beta2’))
get_gluster_vol_option(option)

Get the value of an option set on a GlusterFS volume.

make_gluster_call(execf)

Execute a Gluster command locally or remotely.

static numreduct(vers)

The numeric reduct of a tuple of strings.

That is, applying an integer conversion map on the longest initial segment of vers which consists of numerals.

scheme = <_sre.SRE_Pattern object at 0x7f8a8c931030>
class GlusterNFSHelper(execute, config_object, **kwargs)

Bases: manila.share.drivers.ganesha.NASHelperBase

Manage shares with Gluster-NFS server.

allow_access(base, share, access)

Allow access to a share.

deny_access(base, share, access)

Deny access to a share.

init_helper()
class GlusterfsShareDriver(db, *args, **kwargs)

Bases: manila.share.driver.ExecuteMixin, manila.share.driver.GaneshaMixin, manila.share.driver.ShareDriver

Execute commands relating to Shares.

allow_access(context, share, access, share_server=None)

Allow access to the share.

check_for_setup_error()
create_share(ctx, share, share_server=None)

Create a sub-directory/share in the GlusterFS volume.

create_share_from_snapshot(context, share, snapshot, share_server=None)

Is called to create share from snapshot.

create_snapshot(context, snapshot, share_server=None)

TBD: Is called to create snapshot.

delete_share(context, share, share_server=None)

Remove a sub-directory/share from the GlusterFS volume.

delete_snapshot(context, snapshot, share_server=None)

TBD: Is called to remove snapshot.

deny_access(context, share, access, share_server=None)

Deny access to the share.

do_setup(context)

Prepares the backend and appropriate NAS helpers.

ensure_share(context, share, share_server=None)

Might not be needed?

get_network_allocations_number()