Monday, August 30, 2010

RedHat Linux BMR Boot Server in vSphere

Symantec's Bare Metal Restore (BMR) feature in NetBackup 6.5 supports recovery of RedHat Enterprise Linux 5.x, but it takes a little effort. The nice thing is that the BMR boot server can be a VM so long as it is located on the same subnet as your BMR clients (strictly speaking this is not required but simplifies the installation, especially in existing networks where modifying DHCP settings is frowned upon or just plain not likely to happen).

NOTE: These instructions require an EEB for Symantec Bug ID 1999920.
  1. Ensure your BMR boot server and clients have forward and reverse DNS records. BMR in NBU 6.5 comes with the standard client, but you may have to get a free license key from Symantec support.
  2. After installing RedHat add the compat-libstdc++, tftp-server, and dhcp packages.
  3. Enable TFTP by setting disable=no in /etc/xinetd.d/tftp and then /etc/init.d/xinetd restart
  4. In /etc/dhcpd.conf:
    1. Add ddns-update-style ad-hoc;
    2. Add subnet w.x.y.z netmask a.b.c.d { default-leasetime 600; max-lease-time 7200; option domain-name "domain.com"; option broadcast-address p.q.r.s; option domain-name-servers ip1, ip2; option routers ip; }
    3. Restart DHCP /etc/init.d/dhcpd restart
  5. Install the NetBackup client software. You could install a media server instead, but for simplicity I recommend sticking with the NBU client software.
  6. If not already installed, install NetBackup BMR onto the master server and run bmrsetupmaster.
  7. Install the NetBackup BMR Boot Server for Linux (CD4) onto your client and run bmrsetupboot.
  8. Install the EEB mentioned above (this requires a call to Symantec support).
Now, it's time to create a shared resource tree (SRT), which requires a little trickery. Here, I'm using the 64-bit DVD image. There are several issues we have to resolve a priori:
  1. V-125-380 /rhel54dvd/.discinfo(2): expected "Red Hat Enterprise Linux Server 5", got "Red Hat Enterprise Linux Server 5.4"
    The loaded media is not correct ... please try again.
  2. V-125-380 /rhel54/.discinfo(4): expected "1", got "1,2,3,4,5,6"
    The loaded media is not correct ... please try again.
Now, for the procedure:
  1. Loopback mount the RHEL 5.4 DVD to a directory, say /rhel54dvd.
  2. Loopback mount the NetBackup BMR Third-Party Products CD (3PPCD) to say, /3ppcd
  3. Loopback mount the NetBackup client CD to say, /dvd1
  4. Create another directory, say /rhel54 and cp /rhel54dvd/.discinfo /rhel54
  5. Edit the .discinfo file and change the 2nd line ("Red Hat Enterprise Linux Server 5.4") to read "...Server 5", and change the 4th line ("1,2,3,4,5,6") to read just "1"
  6. Now, create a soft link to the files in the actual DVD image, as in: cd /rhel54; for f in ../rhel54dvd/*; do ln -s $f; done
  7. Create the SRT using bmrsrtadm. Create a new SRT with option 1. Provide a name and description; enter the version number (5) and architecture; provide a directory for the SRT.
  8. When prompted for the media, point to the directory created in Step 4 (ie, /rhel54).
  9. When prompted for the Third Party Products CD, point to the mounted image from Step 2.
  10. When prompted for the NBU client media, point to the mounted image in Step 3. Run through the client install script as if you were installing the client (it is actually being installed into the SRT).
  11. Install any required NetBackup client maintenance packs to bring the SRT NBU client to the same version as your BMR boot server and master server.
  12. Stop and start the NetBackup daemons on the boot server.
Next, perform a full backup of your RedHat client, ensuring that the "Collect disaster recovery information for Bare Metal Restore" checkbox is enabled in the policy before you start the backup.

After the backup completes, navigate to the Bare Metal Restore"Bare Metal Restore Management" node in the NetBackup Admin Console, right-click on the client and select "Prepare to Restore..." Ensure the patched SRT is selected and click OK.

In my case my BMR client was also a vSphere VM. I found I had to modify the BMR parameters slightly in order to successfully restore to a VM. Specifically, I had to remove the vmxnet module entry from the scsiLoadOrder in the BMR .info file (located in /tftpboot/bmr on the boot server).
Share/Save/Bookmark

1 comment:

  1. Hello,
    I had a problem while restoring OracleEL 5.4 64 bits from a redhat 5.5 64 bit SRT with netbackup 6.5.5 :
    impossible to create lvm physical volume, volume group or logical volume, the error was :
    ERROR : Unable to create /dev/sdxx as a LVM physical volume

    I don't know if this issue is resolved with the EEB for Symantec Bug ID 1999920, but I managed to identify and workaround the problem :

    the ramfs does not mount the sysfs (/sys) filesystem, but lvm needs it to work properly.
    so to be able to restore LVM mountpoint, we need to mount it before formatting.

    we can either use the other console to manually do so or use an external script

    here is a script to load as external procedure while restoring a redhat5 with LVM.

    [root@master ~]# cat preformat.linux
    #!/bin/bash
    # mount sysfs (/sys) for restore of redhat 5
    # sysfs is needed by lvm to recreate pv, vg and lv

    echo "executing preformat script"
    if [ "X`mount | grep sysfs`" != "X" ]
    then
    echo creating /sys
    mkdir -p /sys
    echo mounting sysfs
    mount -t sysfs sysfs /sys
    fi

    exit 0
    [root@master~]# bmrepadm -add preformat.linux
    [Info] V-142-17 External Procedure preformat.linux added.
    [root@master~]# bmrepadm -list
    External Procedure Architecture
    ------------------ ------------
    preformat.linux 5

    Thomas

    ReplyDelete