The cinder.volume.drivers.zfssa.zfssanfs Module

ZFS Storage Appliance NFS Cinder Volume Driver

class ZFSSANFSDriver(*args, **kwargs)

Bases: cinder.volume.drivers.nfs.NfsDriver

ZFSSA Cinder NFS volume driver.

Version history:

1.0.1:
    Backend enabled volume migration.
    Local cache feature.
1.0.2:
    Volume manage/unmanage support.
CI_WIKI_NAME = 'Oracle_ZFSSA_CI'
VERSION = '1.0.2'
check_for_setup_error()

Check that driver can login.

Check also for properly configured pool, project and share Check that the http and nfs services are enabled

clone_image(*args, **kwargs)

Create a volume efficiently from an existing image.

Verify the image ID being used:

(1) If there is no existing cache volume, create one and transfer image data to it. Take a snapshot.

(2) If a cache volume already exists, verify if it is either alternated or updated. If so try to remove it, raise exception if removal fails. Create a new cache volume as in (1).

Clone a volume from the cache volume and returns it to Cinder.

A file lock is placed on this method to prevent: (a) a race condition when a cache volume has been verified, but then gets deleted before it is cloned.

(b) failure of subsequent clone_image requests if the first request is still pending.

create_cloned_volume(volume, src_vref)

Creates a snapshot and then clones the snapshot into a volume.

create_snapshot(snapshot)

Creates a snapshot of a volume.

create_volume(volume)
create_volume_from_snapshot(volume, snapshot, method='COPY')
delete_snapshot(snapshot)

Deletes a snapshot.

delete_volume(volume)
do_setup(context)
driver_prefix = 'nfs'
driver_volume_type = 'nfs'
manage_existing(volume, existing_ref)

Manage an existing volume in the ZFSSA backend.

Parameters:
  • volume – Reference to the new volume.
  • existing_ref – Reference to the existing volume to be managed.
manage_existing_get_size(volume, existing_ref)

Return size of the volume to be managed by manage_existing.

migrate_volume(ctxt, volume, host)
protocol = 'nfs'
unmanage(volume)

Remove an existing volume from cinder management.

Parameters:volume – Reference to the volume to be unmanaged.
update_migrated_volume(ctxt, volume, new_volume, original_volume_status)

Return model update for migrated volume.

Parameters:
  • volume – The original volume that was migrated to this backend
  • new_volume – The migration volume object that was created on this backend as part of the migration process
  • original_volume_status – The status of the original volume
Returns:

model_update to update DB with any needed changes

volume_backend_name = 'ZFSSA_NFS'
factory_zfssa()

Previous topic

The cinder.volume.drivers.zfssa.zfssaiscsi Module

Next topic

The cinder.volume.drivers.zfssa.zfssarest Module

Project Source

This Page