The cinder.volume.drivers.nfs Module

The cinder.volume.drivers.nfs Module

class NfsDriver(execute=<function execute>, *args, **kwargs)

Bases: cinder.volume.drivers.remotefs.RemoteFSSnapDriverDistributed, cinder.volume.driver.ExtendVD

NFS based cinder driver.

Creates file on NFS share for using it as block device on hypervisor.

CI_WIKI_NAME = 'Cinder_Jenkins'
VERSION = '1.4.0'

Apply locking to the create snapshot operation.


Apply locking to the create volume operation.


Apply locking to the delete snapshot operation.


Deletes a logical volume.


Any initialization the volume driver does while starting.

driver_prefix = 'nfs'
driver_volume_type = 'nfs'
extend_volume(volume, new_size)

Extend an existing volume to the new size.

initialize_connection(volume, connector)

Determine the setting to use for Secure NAS options.

Value of each NAS Security option is checked and updated. If the option is currently ‘auto’, then it is set to either true or false based upon if this is a new Cinder installation. The RemoteFS variable ‘_execute_as_root’ will be updated for this driver.

Parameters:is_new_cinder_install – bool indication of new Cinder install
update_migrated_volume(ctxt, volume, new_volume, original_volume_status)

Return the keys and values updated from NFS for migrated volume.

This method should rename the back-end volume name(id) on the destination host back to its original name(id) on the source host.

  • ctxt – The context used to run the method update_migrated_volume
  • 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

model_update to update DB with any needed changes

volume_backend_name = 'Generic_NFS'
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.