On LVM-based storages (e.g. iSCSI, FC, local LVM) XenServer by default creates a logical volume named as “MGT”. This is created for future purposes to store VM metadata automatically on the storage system. However it’s not used actively today. You can see this volume by issuing “lvscan” as command which should show something like:

ACTIVE        ‘/dev/VG_XenStorage-ac2d06f2-0644-0ea2-0624-f35b26389d8c/MGT’ [4.00 MB] inherit

It might happen that you are not able to re-attach a storage repository in specific circumstances. The reason might be that the MGT volume has inconsistent data. If that’s the case you could try to rename the MGT volume to force it being re-created automatically. This can be done by

lvrename /dev/VG_XenStorage-ac2d06f2-0644-0ea2-0624-f35b26389d8c/MGT /dev/VG_XenStorage-ac2d06f2-0644-0ea2-0624-f35b26389d8c/MGT-backup

In case MGT inconsistency was responsible for not being able to attach a SR, it should work afterwards again.

MGT does not contain data which is critical for production VMs today. However be aware that you run above commands on own risk. If you are in doubt affecting production, please contact technical support.