-
Understanding XenServer disaster recovery
-
Problem description
-
How to recover the XenServer pool and hosts?
-
Professional XenServer disaster recovery solution
-
Conclusion
Data loss in business can have severe consequences. Even with XenServer, an excellent way to consolidate company data, there would be all kinds of issues with your data, like virtual disk file loss, XenServer VM metadata loss and accidental deletion of virtual machines, etc. So it is essential to have a backup and disaster recovery solution.
Understanding XenServer disaster recovery
The XenServer disaster recovery (DR) feature allows you to recover VMs and vApps from a catastrophic failure of hardware which disables or destroys a whole pool or site.
Disaster recovery stores all the information needed to recover your business-critical VMs and vApps on storage repositories (SRs). These storage repositories are then replicated from your primary (production) environment to a backup environment. When a protected pool at your primary site fails, the VMs and vApps in that pool can be recovered from the replicated storage and recreated on a secondary (DR) site. The result is minimal application or user downtime.
Here is a disaster recovery case of XenServer from damaged Pool and Host.
Problem description
A user’s production system has crashed. The xapi on three machines in the pool cannot be started, and all xe commands cannot be executed. The only way to access the machines is through SSH. The problem is that there are many virtual machines running on one of the machines. Various methods have been tried, but none have been successful. The pool’s database is corrupted and cannot be recovered. The only solution is to rebuild the environment without affecting the production.
Approach: Considering that the user is using HBA storage, where the LUN is bound to the WWN of the HBA card on the host. After reinstalling the host, it should be able to recognize the original storage. Then, the storage can be mounted on the newly installed machine. Finally, new virtual machines can be created and the corresponding VDIs can be attached.
Note: Previously, the server state report of the pool was exported, so the VDIs corresponding to each virtual machine can be found.
How to recover the XenServer pool and hosts?
1. Reinstall a new XenServer and set it as the master of the new pool, applying all hotfixes.
Log in to the XenServer command line:
#pvscan PV /dev/sdc VG VG_XenStorage-e47a1cfd-893c-4666-08c8-f37fedd43da3 lvm2 [1.69 TB / 18.01 GB free] PV /dev/sda3 VG VG_XenStorage-b67d732d-be5c-2255-b07b-4c97c90cf460 lvm2 [270.45 GB / 270.45 GB free] Total: 2 [1.95 TB] / in use: 2 [1.95 TB] / in no VG: 0 [0 ]
From the above, the UUID of the original HBA storage is e47a1cfd-893c-4666-08c8-f37fedd43da3.
2. Mount this SR using the following command (do not use XenCenter, as it may format the storage):
#xe sr-introduce sr-uuid=e47a1cfd-893c-4666-08c8-f37fedd43da3 type=lvmohba shared=true name-label=EMC content- type=user
3. Find the SCSI ID information for the storage block device:
#ls -l /dev/disk/by-id/ rwxrwxrwx 1 root root 9 Apr 9 15:26 scsi-360060160abb01c009a425b909972de11 -> ../../sdc lrwxrwxrwx 1 root root 9 Apr 9 15:26 scsi-3600605b0036c7670160dd0d806c5ffc1 -> ../../sda lrwxrwxrwx 1 root root 10 Apr 9 15:26 scsi-3600605b0036c7670160dd0d806c5ffc1-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Apr 9 15:26 scsi-3600605b0036c7670160dd0d806c5ffc1-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Apr 9 15:26 scsi-3600605b0036c7670160dd0d806c5ffc1-part3 -> ../../sda3
From the above, we can find the SCSI ID information corresponding to the storage device SDC.
4. Retrieve the host information for the master in the pool using the command line or XenCenter:
#xe host-list uuid ( RO) : 83f2c775-57fc-457b-9f98-2b9b0a7dbcb5 name-label ( RW): xenserver1 name-description ( RO): Default install of XenServer
5.Create a PBD between the host and storage:
#xe pbd-create sr-uuid=e47a1cfd-893c-4666-08c8-f37fedd43da3 device-config:device=/dev/disk/by-id/scsi- 360060160abb01c009a425b909972de11 host-uuid=83f2c775-57fc-457b-9f98-2b9b0a7dbcb5 aec2c6fc-e1fb-0a27-2437-9862cffe213e
The PBD is created successfully, which serves as the logical connection unit between XenServer and the storage.
6. Insert the newly created PBD:
#xe pbd-plug uuid=aec2c6fc-e1fb-0a27-2437-9862cffe213e
Upon logging into XenCenter, you will see that the storage is successfully mounted, and the VDI status is normal.
7. Start recovering the VMs:
Find the previous VM information, create VMs, and attach the VDIs.
8. Recover all the machines and rebuild the other two XenServers, then join them to the pool.
9. Configure HA (High Availability) and WLB (Workload Balancing), and restore the environment without impacting the production environment.
Professional XenServer disaster recovery solution
Vinchin Backup & Recovery is a professional solution which supports data backup of VM like VMware vSphere, Hyper-V, XenServer, XCP-ng, oVirt, RHV, OpenStack, etc. and other data like database, NAS, file server, etc.
Vinchin Backup & Recovery offers flexible backup scheduling options for users to set full backup, incremental backup, and differential backup jobs to automatically run at daily, weekly and monthly basis, realizing smart XenServer backup process to minimize manual backup configuration workloads for users.
It can eliminate at least 50% of data size in the wake of deduplication and compression, while developing the exclusive deep data extraction technology BitDetector for large-scale IT environments.
It also offers V2V migration across 10+ virtualizations, 15s instant recovery, offsite backup copy, and anti-ransomware data protection with AES-256 standard.
A users-friendly web console will help easily create the backup job.
1. Select the XenServer VM
2. Select the backup storage
3. Select needed backup strategies
4. Submit the job
For XenServer VM Recovery:
1. Choose the source backups.
2. Select the host from the same or different platforms.
3. Specify recovery strategies.
4. View and submit.
Vinchin Backup & Recovery has been selected by thousands of companies and you can also start a 60-day full-featured free trial here. Also, you can contact us, leave your requirements, or select a local partner.
Conclusion
Citrix XenServer is known for its efficient performance and cost-saving benefits. However, like any technology, it is not immune to data loss or corruption. In such cases, Vinchin Backup & Recovery can be contacted for assistance, which is a professional disaster recovery solution chosen by thousands of enterprises and organizations.
Share on: