RHV-M `rhv-image-discrepancies` tool reports images with different attribute capacity.

Solution Verified - Updated -

Environment

  • Red Hat Virtualization (RHV-M) 4.3, 4.4, 4.4SP1

Issue

  • The rhv-image-discrepancies tool reports images with errors.
[root@my-rhvm ~]# rhv-image-discrepancies
IT IS HIGHLY RECOMMENDED YOU RUN THIS WITH RED HAT SUPPORT INVOLVED
Do you want to continue? [y/N]
y

Using host XX.XX.XX.XX on DC 9c4b1156-aa61-11ee-a46e-0a580a8200b2 to run the storage check
Collecting dump from SD edf2ae27-88e0-4599-ba79-cdbff5cacbe0...

        Checking discrepancies between SD/DB attributes...
        image 39731247-7b3e-4433-8a3b-edd69a3fa49e has a different attribute capacity on storage(10240) and on DB(134217728)

Resolution

  • Please open case with Red Hat Support to review data as correcting the image state will require changes to RHV-M database and Storage Domain.

  • Include the output of rhv-image-discrepancies tool and LogCollector logs from RHV-M.

Root Cause

  • The rhv-image-discrepancies tool reported the error for the image because it is preallocated (volume_type 1) and RAW (volume_format 5) but the size and actual_size are not same. For preallocated/RAW image, the size and actual_size should be the same.
  • Also the image exists in RHV-M and on the storage domain but there are no VM's associated with the image.
  • The VM was probably removed sometime in the past but the disks were not removed.

Diagnostic Steps

  • Checking the image_guid information in the RHV-M database, we see the image that was reported is Memory snapshot for VM my_vm and VM ID 0e306dfa-abd0-491a-b09b-7a4985b82cdf.
# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -x -c "SELECT FROM images WHERE image_guid = '39731247-7b3e-4433-8a3b-edd69a3fa49e'"

-[ RECORD 1 ]----+--------------------------------------------------------------------------------------------------------------------------
image_guid       | 39731247-7b3e-4433-8a3b-edd69a3fa49e
disk_id          | 4f308851-38c5-44b5-b778-0bb58b3a8119
disk_alias       | my_vm_snapshot_metadata
disk_description | Memory snapshot disk for snapshot '20201006' of VM 'my_vm' (VM ID: '0e306dfa-abd0-491a-b09b-7a4985b82cdf')
vm_snapshot_id   | 
parentid         | 00000000-0000-0000-0000-000000000000
imagestatus      | 1
volume_type      | 1
volume_format    | 5
active           | t
size             | 10240
actual_size      | 134217728
  • In the RHV-M DB, there are not VM's with VM ID 0e306dfa-abd0-491a-b09b-7a4985b82cdf.
# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "SELECT * FROM vms WHERE vm_guid = '0e306dfa-abd0-491a-b09b-7a4985b82cdf';"
(0 rows)
  • On the SPM host, the image/lv exists on the Storage Domain edf2ae27-88e0-4599-ba79-cdbff5cacbe0.
39731247-7b3e-4433-8a3b-edd69a3fa49e edf2ae27-88e0-4599-ba79-cdbff5cacbe0    1 -wi-------  128.00m  IU_4f308851-38c5-44b5-b778-0bb58b3a8119,MD_30,PU_00000000-0000-0000-0000-000000000000

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments