'Return size of the volume to be managed by manage_existing.'

def manage_existing_get_size(self, volume, existing_ref):

    existing_vol_name = self._get_existing_vol_name(existing_ref)
    local_share_mount = self._get_mount_point_for_share(self._mounted_shares[0])
    local_vol_path = os.path.join(local_share_mount, existing_vol_name)
    try:
        if os.path.isfile(local_vol_path):
            size = int(math.ceil((float(utils.get_file_size(local_vol_path)) / units.Gi)))
    except (OSError, ValueError):
        err_msg = (_('Failed    to    get    size    of    existing    volume:    %(vol)s.    Volume    Manage    failed.'), {'vol': existing_vol_name})
        LOG.error(err_msg)
        raise exception.VolumeBackendAPIException(data=err_msg)
    LOG.debug('Size    volume:    %(vol)s    to    be    migrated    is:    %(size)s.', {'vol': existing_vol_name, 'size': size})
    return size
