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 esx2.pvalentino.org 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.
> 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:
Post a Comment