'Extend a replication-enabled volume.
Cannot extend volumes in a synchronization pair. Must first break the
relationship, extend them separately, then recreate the pair
:param array: the array serial number
:param volume: the volume objcet
:param device_id: the volume device id
:param volume_name: the volume name
:param new_size: the new size the volume should be
:param extra_specs: extra specifications'

def extend_volume_is_replicated(self, array, volume, device_id, volume_name, new_size, extra_specs):

    if (self.extend_replicated_vol is True):
        try:
            (target_device, remote_array, rdf_group, local_vol_state, pair_state) = self.get_remote_target_device(array, volume, device_id)
            self.masking.remove_and_reset_members(array, device_id, volume_name, extra_specs, False)
            rep_extra_specs = self._get_replication_extra_specs(extra_specs, self.rep_config)
            self.masking.remove_and_reset_members(remote_array, target_device, volume_name, rep_extra_specs, False)
            LOG.info('Breaking    replication    relationship...')
            self.provision.break_rdf_relationship(array, device_id, target_device, rdf_group, rep_extra_specs, pair_state)
            LOG.info('Extending    source    volume...')
            self.provision.extend_volume(array, device_id, new_size, extra_specs)
            LOG.info('Extending    target    volume...')
            self.provision.extend_volume(remote_array, target_device, new_size, rep_extra_specs)
            LOG.info('Recreating    replication    relationship...')
            self.setup_volume_replication(array, volume, device_id, extra_specs, target_device)
        except Exception as e:
            exception_message = (_('Error    extending    volume.    Error    received    was    %(e)s') % {'e': e})
            LOG.exception(exception_message)
            raise exception.VolumeBackendAPIException(data=exception_message)
    else:
        exception_message = _('Extending    a    replicated    volume    is    not    permitted    on    this    backend.    Please    contact    your    administrator.')
        LOG.error(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
