SOLVED: XCP-NG can't see disks when storage is moved to different NFS namespace

I run a TrueNAS SAN for my VM storage.

I recently rebuilt the server and in the process changed the name of the pool. This results in a change to the NFS namespace. My SR was mounted from /mnt/Raid10/XenStorage.

Now, those same files are in /mnt/tank/XenStorage

Of course, xcp-ng can’t find them now ( I did shut them all down before doing all this). There doesn’t seem to be a way to just CHANGE the mounting settings for the SR that I can find.

So, using xcp-ng center, I removed the (now defunct) SR, and tried to import it. I put in the new path into the wizard and it saw the GUID under the import option.

When I do that, it seems to add the SR, but all of the metadata for my VDIs is missing. When I go into my VMs, all the VDIs are now missing. If I try to attach a disk, I have no way to know which disk is which since all the metadata in the SR is missing and the dropdown list only says just the name of the SR. No names, no sizes, not even GUIDs, so I can’t figure out how to reattach these disks to their rightful places, without VERY tiresome trial and error.

How can I fix this?

Here’s what my SR looks like:

Here’s what I see when I try to attach a disk to a VM.

I am not aware of any way to fix this automatically, you will have to go through and attach each drive back to the VM that it belonged to.

That’s what the xcp-ng forum is saying too. Here’s my other reply to them…

In one of my tests, I restored my metadata from backup and got the disk labels back, and the SR pointed to the new location, but when I try to connect that SR to my hosts, I get an error 73.

I tried even using a Symlink to create the original namespace (/mnt/Raid10/XenStorage) but NFS on the server didn’t like that.

If I could get my server to export the NFS under the old name, I could just “migrate” the VMs from one SR to the other.

If I restore the metadata and get back to that error 73 condition, is there a way to help me? Since all my VMs are linux, I guess it wouldn’t be terrible to mount them and then view /etc/hostname, but that still seems like a lot of work.

If you don’t think that I can deal with the error 73 problem, I’ll just get started with the annoying process (bleh)

You could try use the old UUID (If you know what it is) of the old NFS and the try to do a migration, maybe?

With some hints and guidance from the xcp-ng forum (and discovering bad “official” documentation), I found a solution. I’ll post a link to my thread over there in case people are looking for help with this in the future.

Moving SR to different NFS Namespace – ERROR