'Ensure that the backend exists and can accept the volume.'

def migrate_volume(self, context, volume, backend, force_copy, request_spec, filter_properties):

    self._wait_for_scheduler()
    def _migrate_volume_set_error(self, context, ex, request_spec):
        if (volume.status == 'maintenance'):
            previous_status = (volume.previous_status or 'maintenance')
            volume_state = {'volume_state': {'migration_status': 'error', 'status': previous_status}}
        else:
            volume_state = {'volume_state': {'migration_status': 'error'}}
        self._set_volume_state_and_notify('migrate_volume_to_host', volume_state, context, ex, request_spec)
    try:
        tgt_backend = self.driver.backend_passes_filters(context, backend, request_spec, filter_properties)
    except exception.NoValidBackend as ex:
        _migrate_volume_set_error(self, context, ex, request_spec)
    except Exception as ex:
        with excutils.save_and_reraise_exception():
            _migrate_volume_set_error(self, context, ex, request_spec)
    else:
        volume_rpcapi.VolumeAPI().migrate_volume(context, volume, tgt_backend, force_copy)
