In the aftermath I had a corrupted storage repository, that manifested like this:
- Unable to scan the SR:
Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=Error scanning VDI <uuid> ]
- Unable to copy VDIs from or to the SR
This was nasty, because this meant it wasn't possible to backup virtual disks.
The log looks like this:
***** VHD scan error: vhd=VHD-<uuid> scan-error=-22 error-message='invalid footer'I verified this by running
*** vhd-scan error: <uuid>
Raising exception [46, The VDI is not available [opterr=Error scanning VDI <uuid>]]
/usr/sbin/vhd-util scan -f -m "VHD-*" -l VG_XenStorage-<storage-reporitory-uuid> -pWhich, amongst others, gave me this line:
vhd=VHD-<uuid> scan-error=-22 error-message='invalid footer'Now many people recommended running vdi-forget to get rid of this VDI. I tried that, but that didn't fix anything. Others recommended running vdi-destroy. After I ran vdi-forget I wasn't able to run vdi-destroy anymore. So I had to work it out using lvremove like this:
lvremove /dev/VG_XenStorage-<storage-repository-uuid>/VHD-<uuid>This gave me a few warnings like "open failed: Read-only file system" but in the end it did the trick. I re-scanned the storage repository and it finally worked. A few orphaned VDIs showed up which I promptly removed. Subsequent rescans of my SR coalesced VDIs without problems.
I found these links to be helpful: CTX122001 and Thread: Issue with reclaiming disk space in xenserver 6.0.
For the record, I'm running XenServer 5.6 SP2.
3 comments:
Thanks a LOT..!! mate.. this little note of yours saved the day for us.
Thanks a lot, I reclaimed my "free" local SR completely.
Hi,
Thanks for the information, I'm another person who was helped.
Post a Comment