Linux on VMWare DR Procedure

On a working VM that has netbackup client installed, create a LUN that is big enough for the required restore.

fdisk the new lun

fdisk /dev/sdX where X is the drive designation i.e. a,b,c,d,.......

Partition the new lun with partitions at least the same size and layout as the original partitions of the failed lun/s. consult fstab file for failed server from backup or documentation for verification:

in fdisk Virtual Disk (SCSI 0:0)type n then p then 1 to create first primary partition as /boot starting at block 1 and ending at +150M

then type n followed by p and so on to create additional primary partitions with sizes required.

Create the swap partition as a primary partition and change type in fdisk with the t option by entering 82 for the type

format partitions with mkfs.ext3 /dev/sdgX where X is the partition number for each partition - do not format the swap partition

Make directories to mount with mkdir /restore for the root i.e.

$ mkdir /restore

$ mount -t ext3 /dev/sdg2 /restore

$ mkdir /restore/boot

$ mount -t ext3 /dev/sdg1 /restore/boot

........ and continue until all required partitions are created and mounted

Perform an alternate path restore with netbackup to the location of your root mount. i.e. /restore on the server you mounted the drives on.

On the VM that you created the LUN to restore to, shutdown the VM and remove the LUN so that it may be mounted by the original VM that required the restore.

Once the LUN has been removed from the recovery server, add the LUN back to the original server through the ESX MUI and not the VMWare client. i.e. go to in web browser, select the servername, then click the hardware tab - if there is already a device called Virtual Disk (SCSI 0:0) remove it, then at bottom of page click Add Device and select the device that you restored i.e.

MSA1500_LUN1:servername.vmdk and verify it has a scsi id of 0:0 if it is the boot device.
In the VirtualCenter client add the RHEL3 Update 6 Disk1 iso file as the cdrom device and verify it has power on at boot enabled. Reboot the new VM and hit ESC key to get to the Boot Selection screen (if you miss it just hit CTRL-ALT-INS and try again). Select CD-ROM option 3. Hit TAB key and type linux rescue to boot into rescue mode. Select default options but do not turn on network interfaces for now. If you see error regarding the mount of /mnt/sysimage it is ok to ignore this for now. Click OK and you will get a command prompt. Make /dev/sda1 bootable in fdisk:
> fdisk /dev/sda > a > 1

Make and mount directories:

$ mkdir /restore

$ mount -t ext3 /dev/sda2 /restore

$ mount -t ext3 /dev/sda1 /restore/boot

Change root and label partitions:

$ chroot /restore

$ e2label /dev/sda1 /boot

$ e2label /dev/sda2 /

Exit until system reboots

Hit ESC key and boot to linux rescue from the CD-ROM again.

Linux installation should successfully mount to /mnt/sysimage this time.

Change root, create a /tmp directory, and update the grub configuration:

$ mkdir /tmp

$ chroot /mnt/sysimage

$ grub-install /dev/sda

Exit all the way until reboot and boot to the recovered linux installation

Remove the ISO from the CD-Rom and set to client device.

No comments: