Bug 1580130

Summary: [RFE] Need an FSCK-like tool to find and clean up inconsistencies between the database and storage domains
Product: Red Hat Enterprise Virtualization Manager Reporter: Greg Scott <gscott>
Component: ovirt-engineAssignee: Yaniv Lavi <ylavi>
Status: CLOSED DUPLICATE QA Contact: Elad <ebenahar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.2.3CC: ableisch, gveitmic, lsurette, michal.skrivanek, mkalinin, Rhev-m-bugs, srevivo, tcarlin
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-23 15:01:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Greg Scott 2018-05-20 14:19:21 UTC
There are cases, such as deleting volumes, where engine deletes a volume from the database, VDSM marks the volume for deletion, but the deletion fails. 

For now, to locate half deleted or half created volumes on storage, we can use:

lvs -o vg_name,lv_name,tags | grep '(OVIRT_VOL_INITIALIZING|_remove_me_)'

You can find these tags:
- OVIRT_VOL_INITIALIZING - volume creation was interrupted.
- _remove_me_<image-uuid> - volume of disk disk-uuid marked for deletion
- _remove_me_ZERO_<image-uuid> - volume of disk disk-uuid marked for
  zeroing and deletion

<image-uuid> is the vdsm term for disk-uuid in engine UI.

The tags are implementation details we should not depend on normally,
but since they are part of the storage format, they are unlikely to change.

Ideally we should have a fsck-like tool that locate such volumes
and delete them.

Comment 5 Germano Veit Michel 2018-05-23 23:17:17 UTC
(In reply to Greg Scott from comment #0)
> You can find these tags:
> - OVIRT_VOL_INITIALIZING - volume creation was interrupted.
> - _remove_me_<image-uuid> - volume of disk disk-uuid marked for deletion
> - _remove_me_ZERO_<image-uuid> - volume of disk disk-uuid marked for
>   zeroing and deletion

There are other cases where you may end up with orphan volumes and they dont actually have these tags.

This RFE should be covered by BZ1489145, we plan to cross DB and SD information and shout out loud on any differences.

Comment 7 Marina Kalinin 2018-07-23 15:01:12 UTC
I am closing this bug as a duplicate of bz#1489145.

*** This bug has been marked as a duplicate of bug 1489145 ***