Unable to Delete Differential Disks from LVM and ext3 Storages with Error Displayed on XenCenter

Unable to Delete Differential Disks from LVM and ext3 Storages with Error Displayed on XenCenter

book

Article ID: CTX136908

calendar_today

Updated On:

Description

Unable to delete differential disks from Logical Volume Manager (LVM) or ext3 storages. The error message is displayed on XenCenter as "Vdi_delete: EXCEPTION SR.SROSError, Failed to mark VDI hidden [opterr=error 22] or attempt to mark VDI as hidden failed."

Resolution

To resolve this, complete the following procedure:

  1. Ensure that you have a functional back up of your corrupted Vhd, because you need to remove the same from your shared or local storage.

  2. If the affected Virtual Disk Image (VDI) resides on Logical Volume Manager (LVM), run the following command to remove the Vhd:
    lvremove /dev/VG_XenStorage-<uuid from LUN which the VDI resides>/vhd-<uuid of affected VDI>
    Note: To get the Universally Unique Identifier (UUID) of the VM, run xe vm-list name-label=<Name of the VM>.
    Example:
    Ivremove /dev/VG_XenStorage-b0a1ad60-dbdc-92a4-eba1-e2da7803097c/VHD-71cc1048-4481-410a-9aeb-f79eb42894c3

  3. If the affected VDI resides on ext3, complete the following procedure to remove the Vhd:
    1. Change directory to the affected Storage Repository, by running the command cd /var/run/sr-mount/<uuid of the storage>.
    2. Run xe vdi-forget <uuid of the affected VDI> to forget the affected VDI.
    3. Run rm –f <uuid of the affected VDI >.vhd to remove the affected VDI.
Examples:

cd /var/run/sr-mount/b0a1ad60-dbdc-92a4-eba1-e2da7803097c
xe vdi-forget 71cc1048-4481-410a-9aeb-f79eb42894c3.vhd
rm –f 71cc1048-4481-410a-9aeb-f79eb42894c3.vhd

Common error messages seen in the logs and XenCenter

The following screen shots display the common error messages seen in the logs and XenCenter:

User-added image

User-added image


Problem Cause

This error occurs because of the corrupted VDI.

Issue/Introduction

Unable to delete differential disks from Logical Volume Manager (LVM) or ext3 storages. The error message is displayed on XenCenter as “Vdi_delete: EXCEPTION SR.SROSError, Failed to mark VDI hidden [opterr=error 22] or attempt to mark VDI as hidden failed.”

Additional Information

CTX133465 - Possible Virtual Machine Corruption if XenServer Hotfix is not Applied