Jump to content
Updated Privacy Statement
  • 0

I need to rescue VM's from faulty HDD and put the LVM partition in a new XenServer install, how I can do it?


Francisco Aguilar

Question

Hello to everyone

 

3 days ago my Xenserver suddenly crashed and I/O error appears on screen.

 

I tried to repair installation but doesn't work, and I installed again in another HDD XenServer. 

 

I don't have any backup of the damaged installation. I see the LVM partiton with all VHD files

 

Is possible attach that LVM partition in the new XenServer installation?

 

I've tried to mount the LVM partition and said "mount wrong fs type......" 

 

Thank you in advance.

 

Francisco Aguilar

xenserver lvm.jpeg

Link to comment

22 answers to this question

Recommended Posts

Yes, detach the vdi from the VM then you can delete the VM without risking the data. I think if you try to delete a VM 

with an associated vdi it will ask you if you want to delete the vdi disks as well. And as @Tobias pointed out, a copy 

or preferably an export to have a restorable VM outside of whatever happens on your server is good practice before

you proceed just in case.

 

--Alan--

 

 

 

Link to comment
On 26/4/2019 at 7:57 PM, Alan Lantz said:

Funny you ran across that, I ran across that a couple of weeks ago and don't know what caused it.

If I remember I either did a fast copy of a full copy to make that size show up properly again.  My

vdi was working properly, just no size was being displayed in the storage just like you are seeing.

 

--Alan--

 

Ok, thank you. Seems to be a bug..... I will try doing  it like as said you and Tobias.

 

Greetings!!

Link to comment

Funny you ran across that, I ran across that a couple of weeks ago and don't know what caused it.

If I remember I either did a fast copy of a full copy to make that size show up properly again.  My

vdi was working properly, just no size was being displayed in the storage just like you are seeing.

 

--Alan--

 

Link to comment

Thanks a lot!

 

But I'm still having a little trouble... I think is not very hard to solve, but, do you have an idea of why a VDI doesn't show size and nothing? Iattached one VDI but it not have the full info before the disaster.... only show me december 2018 data....

 

Is a way top view or attach that VDI?

 

In the image attached you can see the VDI....

 

Thank you again.

 

-Francisco Aguilar-

 

 

VDI MARKED IN BLUE.jpg

Link to comment

Thank you very much for your help Tobias and Alan, but I'm still have a problem (little) I supposed to init my VM but I wasn't checked copy bios string.... tha is cauding a boot rpoblem with w server 2008 r2... Can I delete the VM (first detaching the VDI) and create again withou lose the virtual disk??

 

Probably is a dumb question, but I don't wanna risk the info contained in that VDI...

 

Thank you in advance.

 

-Francisco Aguilar-

Link to comment

You would attach the disk(s) to a VM (either one built from a template or one of the same OS type that you have detached its original disk from), boot it up and examine the contents.

It's always a good idea to save a recent copy of the VM metadata onto SRs so you can match them up. You can also create labels for VDIs to be able to identify which Vs they belong to.

It looks like these are already labeled, based on your image above -- does that help?

 

-=Tobias

Link to comment

Right, and how can I do that? Is like a put fake flags on VM's pointing at vrtual disks? I fear of lose data of old VM, are 2 VM and one of them is very important (accounting system and employees management)

 

In teh image attached below are shown the disk used for VM's on the damaged XenServer installation....

ASPELSERVER-FORO is very important

Thank you very much.

 

-Francisco Aguilar-

xenservervmdisks.jpg

Link to comment

I assume you did all the LVM scans, vgchange, etc. etc. to see if you can actually detect the LVM characteristics of this volume? Sounds like you have just your localized system to work with. Here are a few good articles I can recommend that might be helpful:

https://discussions.citrix.com/topic/402701-i-need-to-rescue-vms-from-faulty-hdd-and-put-the-lvm-partition-in-a-new-xenserver-install-how-i-can-do-it/

http://www.softpanorama.org/Commercial_linuxes/LVM/recovery_of_lvm_partitions.shtml

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Cluster_Logical_Volume_Manager/mdatarecover.html

 

-=Tobias

Link to comment

Is not attached to any server or pool on XenServer, is only connected via sata to the server and is visible for the new instalation as LVM partition.

 

I ran the command  pvscan and showed me the VG drives

 

later I used the command 'xe sr-introduce uuid=xxxxxxx-xxxx-xxxxxx type=lvm name-label=”Local storage” content-type=user

 

The damaged disk is readable on partition 1 and 2 where the xenserver system files are.... that could help??

 

Thank you!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...