The cinder.volume.drivers.netapp.dataontap.utils.data_motion Module

NetApp Data ONTAP data motion library.

This library handles transferring data from a source to a destination. Its responsibility is to handle this as efficiently as possible given the location of the data’s source and destination. This includes cloning, SnapMirror, and copy-offload as improvements to brute force data transfer.

class DataMotionMixin

Bases: object

break_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Break SnapMirror relationship.

  1. Quiesce any ongoing SnapMirror transfers
  2. Wait until SnapMirror finishes transfers and enters quiesced state
  3. Break SnapMirror
  4. Mount the destination volume so it is given a junction path
break_snapmirrors(config, src_backend_name, src_flexvol_names, chosen_target)

Break all existing SnapMirror relationships for a given back end.

create_destination_flexvol(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Create a SnapMirror mirror target FlexVol for a given source.

create_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Set up a SnapMirror relationship b/w two FlexVols (cinder pools)

  1. Create SnapMirror relationship
  2. Initialize data transfer asynchronously

If a SnapMirror relationship already exists and is broken off or quiesced, resume and re-sync the mirror.

delete_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name, release=True)

Ensure all information about a SnapMirror relationship is removed.

  1. Abort SnapMirror
  2. Delete the SnapMirror
  3. Release SnapMirror to cleanup SnapMirror metadata and snapshots
ensure_snapmirrors(config, src_backend_name, src_flexvol_names)

Ensure all the SnapMirrors needed for whole-backend replication.

get_replication_backend_names(config)

Get the backend names for all configured replication targets.

get_replication_backend_stats(config)

Get the driver replication info for merging into volume stats.

get_snapmirrors(src_backend_name, dest_backend_name, src_flexvol_name=None, dest_flexvol_name=None)

Get info regarding SnapMirror relationship/s for given params.

quiesce_then_abort(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Quiesce a SnapMirror and wait with retries before aborting.

resume_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Resume SnapMirror relationship from a quiesced state.

resync_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Re-sync (repair / re-establish) SnapMirror relationship.

update_snapmirror(src_backend_name, dest_backend_name, src_flexvol_name, dest_flexvol_name)

Schedule a SnapMirror update on the backend.

update_snapmirrors(config, src_backend_name, src_flexvol_names)

Update all existing SnapMirror relationships on a given back end.