Lost VMs disk after using new SR
-
xcp used dellr640 dis pool as vm store, 4TB, single disk. it was local SR.
Brought in trunas, set a SR device: /dev/sda, rebooted Dell, now VMs wont start.
Current issue:
Your SR metadata is partially lost.
Specifically:
The VDI files exist
But XAPI has lost the VM
VDI attachment records (VBDs)
That is why:
SR scan complains
VMs have no disks
XO only shows “Other install media”
This is classic SR metadata desync, usually caused by:
SR delete/recreate
Interrupted SR introduce
xapi restart during SR changes...
How can I still use my current VM data?I am deep in the chatGPT hole.
Any help is greatly warranted
. -
Hi,
Can you explain yourself (without the help of ChatGPT) exactly what you did in the first place to get into that situation? It's not clear to me

-
@DaleDibbadel said in Lost VMs disk after using new SR:
Brought in trunas, set a SR device: /dev/sda, rebooted Dell, now VMs wont start.
Please elaborate on the exact commands that you ran here. Also, you may want to provide the output from
lsblkto provide some additional context.Do you have a backup of your pool metadata?
-
@olivierlambert Hi, this was built out with x1 4tb ssd, used as local SR.
I add a truenas data set, and deleted the old SR, reboot Dell host, then VMs showed no disk.
Checked vates support, went to where metadata would be, the DIR showed empty, chat gpt declared data was still there but XCP-NG did not see it without metadata.I have since added another 4TB to the Dell460 host pool, giving xcp-ng 8TB.
Eventually I will add more 4TB to = x8, so far I have 2.
With Dell, I can add to it's pool and xcp will see.Question:
What is best practice for data recovery, so I do not have to rebuild again?
I can't seem to find where the snapshots and backup save to.
I plan to use snapshots this time, and backup VM to trunas
XO runs on a separate lenovo box.
I did view: https://docs.xcp-ng.org/management/backup/#xen-orchestraMy mind is telling me snapshots, and backup VM data to a truenas data set rather then local SR on XCP.
Do I have to back up vm data and it's metadata separate?
I am more so reaching for help on best backup practices, I am rebuilding VMs,

-
@Danp I do not, I did not know it was needed. Last cmd run, blew away old SR, using new pool.
Type "xsconsole" for access to the management console. [00:09 localhost ~]# xe sr-list uuid ( RO) : bda59d9a-5655-e903-c569-02c8e1c84465 name-label ( RW): VM-Pool name-description ( RW): host ( RO): localhost type ( RO): ext content-type ( RO): user uuid ( RO) : 5ee50bda-201e-633c-ea4c-4ba32b2a0428 name-label ( RW): casaHOS-NextCloud name-description ( RW): casaHOS-NextCloud host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : ae10e37f-237a-d62e-8146-1b9aeeae0562 name-label ( RW): TrueNAS-ISO name-description ( RW): ISOs on trunas host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 405be593-196a-e6c1-1154-737d870ca2c8 name-label ( RW): DVD drives name-description ( RW): Physical DVD drives host ( RO): localhost type ( RO): udev content-type ( RO): iso uuid ( RO) : d076f279-50f3-906a-f29b-a20822dba819 name-label ( RW): Local-ISO name-description ( RW): host ( RO): <not in database> type ( RO): iso content-type ( RO): iso uuid ( RO) : c360423b-dbc3-833c-a77c-9f7cae7102d5 name-label ( RW): USB-ISO name-description ( RW): host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 7acdd6e8-90ba-8657-2a0a-ffbcca86d405 name-label ( RW): casaHOS-Qbitorrent name-description ( RW): casaHOS-Qbitorrent host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : a8875f36-cfbe-f46e-c59f-88fff7d122c1 name-label ( RW): XCP-ng Tools name-description ( RW): XCP-ng Tools ISOs host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 9551e268-d298-8b69-fc1c-15f466ca2b09 name-label ( RW): casHOS-JellyFin name-description ( RW): casHOS-JellyFin host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : eae7b525-517f-6473-d052-0415c7991752 name-label ( RW): casaHOS-immich name-description ( RW): casaHOS-immich host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : 3ae63e9d-33cd-57ff-759a-f939968f1d69 name-label ( RW): Removable storage name-description ( RW): host ( RO): localhost type ( RO): udev content-type ( RO): disk uuid ( RO) : 27384ca2-a23c-d5c7-a3fc-e2ac755d356c name-label ( RW): Main-Pool-XCP name-description ( RW): host ( RO): localhost type ( RO): ext content-type ( RO): user [00:13 localhost ~]# xe sr-list uuid ( RO) : bda59d9a-5655-e903-c569-02c8e1c84465 name-label ( RW): VM-Pool name-description ( RW): host ( RO): <not in database> type ( RO): ext content-type ( RO): user uuid ( RO) : 5ee50bda-201e-633c-ea4c-4ba32b2a0428 name-label ( RW): casaHOS-NextCloud name-description ( RW): casaHOS-NextCloud host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : ae10e37f-237a-d62e-8146-1b9aeeae0562 name-label ( RW): TrueNAS-ISO name-description ( RW): ISOs on trunas host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 405be593-196a-e6c1-1154-737d870ca2c8 name-label ( RW): DVD drives name-description ( RW): Physical DVD drives host ( RO): localhost type ( RO): udev content-type ( RO): iso uuid ( RO) : d076f279-50f3-906a-f29b-a20822dba819 name-label ( RW): Local-ISO name-description ( RW): host ( RO): <not in database> type ( RO): iso content-type ( RO): iso uuid ( RO) : c360423b-dbc3-833c-a77c-9f7cae7102d5 name-label ( RW): USB-ISO name-description ( RW): host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 7acdd6e8-90ba-8657-2a0a-ffbcca86d405 name-label ( RW): casaHOS-Qbitorrent name-description ( RW): casaHOS-Qbitorrent host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : a8875f36-cfbe-f46e-c59f-88fff7d122c1 name-label ( RW): XCP-ng Tools name-description ( RW): XCP-ng Tools ISOs host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 9551e268-d298-8b69-fc1c-15f466ca2b09 name-label ( RW): casHOS-JellyFin name-description ( RW): casHOS-JellyFin host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : eae7b525-517f-6473-d052-0415c7991752 name-label ( RW): casaHOS-immich name-description ( RW): casaHOS-immich host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : 3ae63e9d-33cd-57ff-759a-f939968f1d69 name-label ( RW): Removable storage name-description ( RW): host ( RO): localhost type ( RO): udev content-type ( RO): disk uuid ( RO) : 27384ca2-a23c-d5c7-a3fc-e2ac755d356c name-label ( RW): Main-Pool-XCP name-description ( RW): host ( RO): localhost type ( RO): ext content-type ( RO): user [00:17 localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 465.7G 0 disk ├─sdb4 8:20 0 512M 0 part /boot/efi ├─sdb2 8:18 0 18G 0 part ├─sdb5 8:21 0 4G 0 part /var/log ├─sdb3 8:19 0 424.2G 0 part ├─sdb1 8:17 0 18G 0 part / └─sdb6 8:22 0 1G 0 part [SWAP] sdc 8:32 1 57.3G 0 disk ├─sdc2 8:34 1 32M 0 part └─sdc1 8:33 1 57.3G 0 part sda 8:0 0 7.5T 0 disk └─XSLocalEXT--27384ca2--a23c--d5c7--a3fc--e2ac755d356c-27384ca2--a23c--d5c7--a3fc--e2ac755d356c 253:0 0 7.5T 0 lvm /run/sr-mount/27384ca2-a23c-d5c7-a3fc-e2ac755d356c [00:20 localhost ~]# mount | grep sr-mount 10.10.10.1:/mnt/Deadpool/cos-appdata/cos-immich/eae7b525-517f-6473-d052-0415c7991752 on /run/sr-mount/eae7b525-517f-6473-d052-0415c7991752 type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acdirmin=0,acdirmax=0,soft,proto=tcp,timeo=200,retrans=4,sec=sys,clientaddr=10.10.10.2,local_lock=none,addr=10.10.10.1) /dev/mapper/XSLocalEXT--27384ca2--a23c--d5c7--a3fc--e2ac755d356c-27384ca2--a23c--d5c7--a3fc--e2ac755d356c on /run/sr-mount/27384ca2-a23c-d5c7-a3fc-e2ac755d356c type ext4 (rw,relatime) 10.10.10.1:/mnt/Deadpool/cos-downloads/7acdd6e8-90ba-8657-2a0a-ffbcca86d405 on /run/sr-mount/7acdd6e8-90ba-8657-2a0a-ffbcca86d405 type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acdirmin=0,acdirmax=0,soft,proto=tcp,timeo=200,retrans=4,sec=sys,clientaddr=10.10.10.2,local_lock=none,addr=10.10.10.1) 10.10.10.1:/mnt/Deadpool/cos-media/9551e268-d298-8b69-fc1c-15f466ca2b09 on /run/sr-mount/9551e268-d298-8b69-fc1c-15f466ca2b09 type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,acdirmin=0,acdirmax=0,soft,proto=tcp,timeo=200,retrans=4,sec=sys,mountaddr=10.10.10.1,mountvers=3,mountport=39057,mountproto=tcp,local_lock=none,addr=10.10.10.1) 10.10.10.1:/mnt/Deadpool/AppShare/ISO-Tank on /run/sr-mount/ae10e37f-237a-d62e-8146-1b9aeeae0562 type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acdirmin=0,acdirmax=0,soft,proto=tcp,timeo=200,retrans=4,sec=sys,clientaddr=10.10.10.2,local_lock=none,addr=10.10.10.1) [00:20 localhost ~]# mount | grep bda59d9a || echo "VM-Pool not mounted" VM-Pool not mounted [00:24 localhost ~]# xe sr-forget uuid=bda59d9a-5655-e903-c569-02c8e1c84465 --force [00:24 localhost ~]# xe sr-forget uuid=bda59d9a-5655-e903-c569-02c8e1c84465 The uuid you supplied was invalid. type: SR uuid: bda59d9a-5655-e903-c569-02c8e1c84465 [00:24 localhost ~]# lsblk -a NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT tdg 254:6 0 250G 0 disk sdb 8:16 0 465.7G 0 disk ├─sdb4 8:20 0 512M 0 part /boot/efi ├─sdb2 8:18 0 18G 0 part ├─sdb5 8:21 0 4G 0 part /var/log ├─sdb3 8:19 0 424.2G 0 part ├─sdb1 8:17 0 18G 0 part / └─sdb6 8:22 0 1G 0 part [SWAP] tde 254:4 0 1.2T 0 disk tdc 254:2 0 6.4G 1 disk tda 254:0 0 1.2T 0 disk tdh 254:7 0 3.1G 1 disk sdc 8:32 1 57.3G 0 disk ├─sdc2 8:34 1 32M 0 part └─sdc1 8:33 1 57.3G 0 part tdf 254:5 0 4.7G 1 disk sda 8:0 0 7.5T 0 disk └─XSLocalEXT--27384ca2--a23c--d5c7--a3fc--e2ac755d356c-27384ca2--a23c--d5c7--a3fc--e2ac755d356c 253:0 0 7.5T 0 lvm /run/sr-mount/27384ca2-a23c-d5c7-a3fc-e2ac755d356c tdd 254:3 0 900G 0 disk tdb 254:1 0 500G 0 disk [07:48 localhost ~]# xe sr-list uuid ( RO) : 5ee50bda-201e-633c-ea4c-4ba32b2a0428 name-label ( RW): casaHOS-NextCloud name-description ( RW): casaHOS-NextCloud host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : ae10e37f-237a-d62e-8146-1b9aeeae0562 name-label ( RW): TrueNAS-ISO name-description ( RW): ISOs on trunas host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 405be593-196a-e6c1-1154-737d870ca2c8 name-label ( RW): DVD drives name-description ( RW): Physical DVD drives host ( RO): localhost type ( RO): udev content-type ( RO): iso uuid ( RO) : d076f279-50f3-906a-f29b-a20822dba819 name-label ( RW): Local-ISO name-description ( RW): host ( RO): <not in database> type ( RO): iso content-type ( RO): iso uuid ( RO) : c360423b-dbc3-833c-a77c-9f7cae7102d5 name-label ( RW): USB-ISO name-description ( RW): host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 7acdd6e8-90ba-8657-2a0a-ffbcca86d405 name-label ( RW): casaHOS-Qbitorrent name-description ( RW): casaHOS-Qbitorrent host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : a8875f36-cfbe-f46e-c59f-88fff7d122c1 name-label ( RW): XCP-ng Tools name-description ( RW): XCP-ng Tools ISOs host ( RO): localhost type ( RO): iso content-type ( RO): iso uuid ( RO) : 9551e268-d298-8b69-fc1c-15f466ca2b09 name-label ( RW): casHOS-JellyFin name-description ( RW): casHOS-JellyFin host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : eae7b525-517f-6473-d052-0415c7991752 name-label ( RW): casaHOS-immich name-description ( RW): casaHOS-immich host ( RO): localhost type ( RO): nfs content-type ( RO): user uuid ( RO) : 3ae63e9d-33cd-57ff-759a-f939968f1d69 name-label ( RW): Removable storage name-description ( RW): host ( RO): localhost type ( RO): udev content-type ( RO): disk uuid ( RO) : 27384ca2-a23c-d5c7-a3fc-e2ac755d356c name-label ( RW): Main-Pool-XCP name-description ( RW): host ( RO): localhost type ( RO): ext content-type ( RO): user [07:48 localhost ~]#