'Manages an existing LV.
Renames the LV to match the expected name for the volume.
Error checking done by manage_existing_get_size is not repeated.'

def manage_existing(self, volume, existing_ref):

    lv_name = existing_ref['source-name']
    self.vg.get_volume(lv_name)
    vol_id = volutils.extract_id_from_volume_name(lv_name)
    if volutils.check_already_managed_volume(vol_id):
        raise exception.ManageExistingAlreadyManaged(volume_ref=lv_name)
    try:
        self.vg.rename_volume(lv_name, volume['name'])
    except processutils.ProcessExecutionError as exc:
        exception_message = (_('Failed    to    rename    logical    volume    %(name)s,    error    message    was:    %(err_msg)s') % {'name': lv_name, 'err_msg': exc.stderr})
        raise exception.VolumeBackendAPIException(data=exception_message)
