Backing up and restoring logical volumes in RHEL 5

User discussion and information resource forum for Image products.

Backing up and restoring logical volumes in RHEL 5

Postby mrowland01 » Wed Feb 22, 2012 3:17 pm

I've been unsuccessfully attempting to backup and restore a RHEL 5.4 server that is using logical volumes with IFL. I may be using the wrong procedure or missing a step(s) after the restore because I cannot get the restored server to boot. The primary disk is not recognized as a boot disk. Both servers are identical hardware configured exactly the same way. Here is the procedure I am using to do the backup and restore:

Backup:
1.) Boot the server to be backed up with the IFL boot disk.
2.) Configure the networking with a static IP.
3.) Mount the network NFS share to store the backup.
4.) Run start-lvm.
5.) Backup the boot partition to a single file.
6.) Backup the primary logical volume to a single file.
7.) Backups are verified and no errors occur.

Restore:
1.) Boot the server to be restored with the IFL boot disk.
2.) No partitions are initially defined on the server to be restored.
3.) Configure the networking with a static IP.
4.) Mount the network NFS share to restore the backup.
5.) Run start-lvm.
6.) Restore the boot partition to the primary disk setting it to be active.
7.) Use fdisk to create the second partition on the primary disk and a single partition on the secondary disk.
8.) Set the partition types to Linux LVM (8e), the primary disk is mirrored and the secondary disk is RAID 5.
9.) Create the physical volumes with pvcreate.
10.) Create the volume group with vgcreate using the primary disk physical volume.
11.) Create the logical volumes in the volume group (primary and swap volumes).
12.) Extend the volume group with vgextend using the secondary disk physical volume.
13.) Extend the primary disk logical volume to be restored to make it the same size as the backed up primary disk logical volume.
14.) Restore the backed up primary disk logical volume to the restore server primary disk physical volume.
15.) No errors occur during the restores.
16.) Reboot the server.

At this point the server attempts to boot from the CD which is not in the drive, then fails after not finding a system disk from which to boot. Any suggestions would be much appreciated as I have not been able to find any information addressing this issue after googling my fingers off.

Thanks,

Mark R.
mrowland01
 
Posts: 2
Joined: Wed Feb 22, 2012 2:39 pm

Re: Backing up and restoring logical volumes in RHEL 5

Postby TeraByte Support(TP) » Thu Feb 23, 2012 6:18 am

What is the error message that you get when you try to boot after restoring?

Also, please create an IFL report for BOTH the source and target servers, and email it to support at tomp@terabyteunlimited.com

To create the reports (one for each system):
1. Boot the server from the IFL boot disk
2. Exit to command prompt (or open a terminal if using the GUI version)
3. Run 'start-lvm' to activate LVM
4. Run 'viewreport' to create the report. That will create the file report.txt in current directory (/tbu/report.txt)
5. Email the file report.txt to me at tomp@terabyteunlimited.com
6. If needed, run 'savereport' to display instructions for mounting a drive or partition to save report.txt to for emailing

Those report.txt files will contain system information that will answer questions that I'd otherwise have to ask.

Edit: For the target system, the report should be created after you have done the restore, and can't get it to boot.
Tom Pfeifer
TeraByte Support
TeraByte Support(TP)
 
Posts: 305
Joined: Wed Aug 31, 2011 9:22 am

Re: Backing up and restoring logical volumes in RHEL 5

Postby TeraByte Support » Thu Feb 23, 2012 9:59 am

if not doing entire drive operations, ensure you set one active on restore. also use the "restore first track" for the actual physical drive since you need something there to boot from.
TeraByte Support
 
Posts: 2281
Joined: Thu May 05, 2011 3:37 pm

Re: Backing up and restoring logical volumes in RHEL 5

Postby mrowland01 » Tue Feb 28, 2012 5:26 pm

Many thanks to TeraByte Support for your help on this issue, I was able to get it resolved and successfully restore the backed up LVM volume. I had two problems, the first problem was that the server did not see a boot drive. This problem was resolved by using the "Restore First Track" option when restoring the boot partition to the target server (I had already set the boot partition active to no avail). At this point the server attempted to boot but then gave me the message that I had no Linux partitions. I then flattened the target server again and rebuilt it as I described in my first post with one difference. I ran mke2fs and resize2fs on the target server LVM to create the file system prior to performing the restore. I had mistakenly assumed that the IFL restore would also create the file system.
mrowland01
 
Posts: 2
Joined: Wed Feb 22, 2012 2:39 pm


Return to Image for DOS/Linux/Windows