Jump to content
Welcome to our new Citrix community!
  • 1

XenServer Lost Virtual Disk


Richard Hughes1709160089

Question

Hello,

 

I'm in a bit of a panic at the moment, after losing a 2TB virtual disk on my XenServer. This virtual disk was held on a iSCSI mapping, and was attached to a VM. The VM was online at the time and I went to migrate a different disk which was attached to this VM, to different storage... but the process somewhat failed and two virtual disks associated with that VM vanished into thin air. There were three disks, one being the OS drive, another being a 50GB drive and the last being the 2TB drive. The OS Drive and the 2TB drive are no longer presented in XenCenter under storage. I have a backup of the OS drive, but not the 2TB drive as my backup mirror had a drive failure so I have no backup copy of that data.

 

Is there any way of getting the 2TB virtual disk to reappear in XenCenter? When looking at the storage in which this disk was held on, it's showing as completely empty with 100% of the disk free. I have tried resetting the tool stack, re-scanning the drive and even rebooting the XenServer host.

 

Any help would be greatly appreciated!

 

Cheers

Richard

Link to comment

10 answers to this question

Recommended Posts

  • 0

I would expect the only disk to be at risk would be the one that was being migrated which I assume is the 

OS drive.  Not sure why you would have multiple disks inaccessible. But the downside is multiple XenServer

versions can have issues with data loss when doing storage migrations. If you are up to date on hotfixes

and on a supported version your risk is reduced, but every VM involved with storage migrations should be

backed up first. Long story is your disks may be indeed lost.

 

--Alan--

 

Link to comment
  • 0
10 hours ago, Alan Lantz said:

I would expect the only disk to be at risk would be the one that was being migrated which I assume is the 

OS drive.  Not sure why you would have multiple disks inaccessible. But the downside is multiple XenServer

versions can have issues with data loss when doing storage migrations. If you are up to date on hotfixes

and on a supported version your risk is reduced, but every VM involved with storage migrations should be

backed up first. Long story is your disks may be indeed lost.

 

--Alan--

 

 

Hi Alan,

 

Thanks for responding. Sadly this XenServer is 7.0 as it's a home server and I've had to keep it at that version due to the change in restrictions for the "Free" version. That's maybe part of the problem. I'm not sure if the drives have been deleted, they just don't show up in XenCenter any more. The VM which I was moving storage for, was a virtual domain controller. This had three virtual drives attached, OS, a 50 GB drive and a 2 TB drive. I was performing a live migrate of the 50 GB drive... but the migration appeared to have failed at the very end, the VM crashed and wouldn't boot back up. When I looked at the storage, the only disks visible was two 50 GB disks... one being the original and the other being the migrated one. When I went to re-attach the missing disks, they were nowhere to be seen.

 

Would it be possible that this is some sort of glitch, and the data is still there? I have tried mounting the iSCSI LUN on a Windows box and tried data recovery but the vast majority of data is showing to be corrupt. I only care about the 2 TB volume as this was what held 1.5 TB of personal data. I'm also attempting to perform a recovery from the working drives from the backup, this is showing data to be in a better state but the directory structure is non existing.

 

What file system would XenServer format the iSCSI volume to? If I was to mount this LUN into a Linux box, do you think I'd have more luck on actually recovering the VHD file? The storage which holds the iSCSI volume, I recently swapped two of the drives from a four drive Synology HRAID, with one drive failure. Technically this would be two drive failures if I was to somewhat mount these two drives somewhere, do you think I'd manage to recover the iSCSI LUN from those two disks?

 

Apologies for the long response, I'm just really desperate to try everything possible to get as much data back as possible. I'm kicking myself for not replacing the failed drive on the backup!

 

EDIT -

 

I've just tried R-Studio for recovery and that sees the XenServer VHD disk image, so I'm going to try and perform a recovery from that.

 

image.thumb.png.309889f38ac1f77f35736a071969a908.png

 

There is a 4 MB partition on this iSCSI LUN which has an XML file which I think still shows the metadata for the lost virtual disk -

 

<?xml version="1.0" ?><uuid>b7af9c07-6f37-91f3-72cd-3e23ddd3bb78</uuid><allocation>thick</allocation><initial_allocation></initial_allocation><allocation_quantum></allocation_quantum> <name_label>SharedDrives</name_label> <name_description>iSCSI SR [10.0.1.200 (iqn.2000-01.com.synology:DiskStation.SharedDrives.8668d16453; LUN 1: 2e4ba2ec-5806-47fc-935a-dcde1deff6c1: 2024 GB (SYNOLOGY))]</name_description> <vdi><name_label>SharedDrives</name_label><name_description></name_description> <read_only>0</read_only><managed>1</managed><snapshot_time></snapshot_time><vdi_type>vhd</vdi_type><snapshot_of></snapshot_of><deleted>1</deleted><offset>2048</offset><type>user</type><metadata_of_pool></metadata_of_pool><is_a_snapshot>0</is_a_snapshot><uuid>baf05bc9-236e-4923-89e7-aec4f28f407d</uuid></vdi>

 

Would I be able to use this information to restore the virtual disk?

 

Cheers,

Richard

Edited by rshughes
Additional Info
Link to comment
  • 0

I don't know anything about r-studio, but at least you can see it, so maybe it is recoverable. 

But it could be that like you say you are seeing the metadata, but the actual data isn't 

there.  I don't know if a logical volume can be un-deleted or not. I don't know enough 

about LVM. 

 

--Alan--

 

 

Link to comment
  • 0
6 minutes ago, Tobias Kreidl said:

I assume it's an LVM drive; do you have a backup of your metadata in either the /eetc/lb/backup or archive subdirectories? This guide has been very useful in the past in recovering LVM-related issues:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/troubleshooting

 

-=Tobias

 

Thank you Tobias for responding. Unfortunately I'm not the best when it comes to the command line of Linux, does XenServer automatically create a backup / archive of the metadata? When I run the ls command, I only see lvm-backup and lvmdump-xenserver-dellr710-20200229160928.tgz. This entire situation has given me a really sore head as I've potentially lost a lot of data from performing a live migration of a completely different disk. The physical storage which held this virtual disk is mapped in from a Synology NAS as an iSCSI volume. I believe that the virtual disk was indeed an LVM drive.

 

In regards to the metadata, would an old XenServer which used to have this storage mapped be of any use? Do you think I could extract the metadata from the old box for this volume and import into the affected server?

 

Thanks again

Richard

Link to comment
  • 0

Thats really weird you have had corruption on the vdi. Usually with iSCSI you might get disconnected,

but upon reconnection your data will be there.  I would be in the same boat you are, I'm not good 

enough with LVM or XenServer commands to attempt a fix. And the wrong command will do more

harm than good.

 

--Alan

 

 

Link to comment
  • 0

It really has been a nightmare... but I'm hoping (fingers crossed) that the nightmare will soon be over. I've come across a product which so far appears to be very promising. ReclaiMe Pro appears to detect the deleted VHD from the LVM storage and is allowing me to export it as a VHD. If this actually exports and doesn't just leave me with a corrupt disk image (still hopeful)... then I guess I can just simply 1. Take a backup of that VHD and then 2. Import it back into XenServer!

 

image.thumb.png.b379462e6b450bc32dc3c48a7e7f70dc.png

 

If this works, then this product is amazing... especially when the free trial has no visible restrictions!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...