'Extend an existing volume\'s size.
:param volume:  volume object provided by the Manager
:param new_size:  new size in GB to be applied'

def _extend_lun(self, volume, new_size):

    v = self.vmem_mg
    typeid = volume['volume_type_id']
    if (typeid and (not self.vmem_mg.utility.is_external_head)):
        spec_value = self._get_volume_type_extra_spec(volume, 'dedup')
        if (spec_value and (spec_value.lower() == 'true')):
            msg = _('Dedup    luns    cannot    be    extended')
            raise exception.VolumeDriverException(message=msg)
    size_mb = (volume['size'] * units.Ki)
    new_size_mb = (new_size * units.Ki)
    delta_mb = (new_size_mb - size_mb)
    LOG.debug('Extending    lun    %(id)s,    from    %(size)s    to    %(new_size)s    MB.', {'id': volume['id'], 'size': size_mb, 'new_size': new_size_mb})
    try:
        self._send_cmd(v.lun.extend_lun, 'Expand    resource    successfully', volume['id'], delta_mb)
    except Exception:
        LOG.exception('LUN    extend    failed!')
        raise
