Saturday, 24 October 2015

How to hack VLAN support into Symantec/Veritas Netbackup BMR

These are rough notes. I might update them in the future to make them more useful.

The original issue was that when using Symantec (or Veritas, whatever they are these days) and Bare Metal Restore (BMR) on a network connection that is 802.1q (i.e. trunked VLANs on a single physical connection), it would fail because BMR requires a non-trunked connection.

This hack adds the ability to support BMR using a VLAN that is 802.1q-trunked. In a nutshell, I added a call to vconfig in the BMR initiation script that is part of the BMR boot image, allowing the network connection to be properly configured with the required VLAN.

 ------------------------------------------------

Updated to rc.stage1 file required

This was modified to enable VLAN support. We added an extra question to collect the required VLAN number, and then added this VLAN to each interface that BMR tries to use.


Solution: We needed to add the vconfig binary to the SRT to enable setting of the VLAN by the script. This needs to reside in /sbin in the initrd.img file contained in the SRT.


------------------------------------------------

Missing/incorrect hpahcisr module

This module (the single hpahcisr.ko file) needs to be added to the BMR ISO boot image. Make sure it's exactly the right version for the Linux kernel you're using for the BMR ISO. It will fail to load and abort the BMR process if it's the wrong version.



You will need to add the hpahcisr.ko from either the base OS image that the BMR ISO is based on, or get it from somewhere like 

http://downloads.linux.hp.com/SDR/downloads/ProLiantSupportPack/redhat/5.5Server/packages/i386/



Potential problems are a mis-match between the kernel version of the Linux OS you are using and the kernel version that the module wants. Make sure you get the 32-bit/64-bit version as required.

You can check the kernel version the module wants with:

modinfo hpahcisr.ko

Look for the "vermagic" line, and note any specifics, such as "PAE". This can make all the difference!

You can run the modinfo command from a command line within the BMR session to find out what the module is expecting, and then compare it against the output of "uname -a" to make sure they match.

(For our config, the kernel version in use for the BMR ISO was 2.6.18-194.el5, but the original hpahcisr.ko module reported itself as needing 2.6.18-194.el5PAE)

Downloading the module

Get the hpahcisr module from the link above - you will need the generic "rhel.x86" version for RHEL 5.5 and below,

or the version specific to the RHEL version you are using for later versions of RHEL . You need to unpack it and

extract the hpahcisr.ko file, and then add this file to the BMR ISO image.


(For our config we used

http://downloads.linux.hp.com/SDR/downloads/ProLiantSupportPack/redhat/5.5Server/packages/i386/hpahcisr-

1.2.4-14.rhel5.i686.rpm since 1.2.4-14 was the version of the original PAE-based module)

Extract the downloaded RPM file into the current directory (Using any Linux or Cygwin system) with:

rpm2cpio hpahcisr-1.2.4-14.rhel5.i686.rpm | cpio --make-directories --extract

Find the tar archive within the extracted files, unpack it and find the appropriate hpahcisr.ko file for the target kernel on the BMR ISO image.



(For our config, this was ./hpahcisr-1.2.4_2010_04_08/lib/modules/2.6.18-194.el5/kernel/drivers/scsi/hpahcisr/hpahcisr.ko)


Solution: Add this module into the BMR ISO SRT.

---------------------------------------------------------------------------

Missing bmrc binary

This caused file retrieval from the BMR server to fail:

<graphic goes here>

Solution: Seemed to be caused by an error on our part. Copied over the bin directory from a previous attempt and all was well.


-------------------------------------------------------------------------

Disk partitioning problem


<graphic goes here>


Solution: /usr/openv/bin/vnet not present! Added the bin directory to the SRT.



This didn't fix the LVM problem. This was resolved by applying a Symantec fix.

How to do high-quality CD rips using Linux

  1. Install cdparanoia
  2. Install ripit
  3. Put the following into a script call rip.sh:

  4. drive=$1
    echo Using sr${drive}
    ripit --outputdir ~/Music/iTunes\ Music/Music --device /dev/sr${drive} --quality 0 --vbrmode new --preset insane --coverart 1 --dirtemplate '"$artist/$album"' --loop 1 --threads 4
  5. Do as many concurrent rips as you have CD drives using:

  6. sh rip.sh n

    Where n is the CD drive number.