1824721 Members
3632 Online
109674 Solutions
New Discussion юеВ

Disaster Recovery Script

 
Phil_
Occasional Advisor

Disaster Recovery Script

Hi,

In the past I have been involved in DR exercises where HP BRS have provided hardware and expertise.

BRS gave us a script which gathered system information from our production machines - BCS_config - the output of which was then used to quickly build the DR systems' non-root VGs at the test site after the Ignites.

Does anyone know whether the BCS_config script is freely available, and if so whether the further script HP used to build the systems from the BCS_config output is also available?

Alternatively, can anyone recommend anything similar which can speed up our DR process?
5 REPLIES 5
Court Campbell
Honored Contributor

Re: Disaster Recovery Script

If you make ignite recovery images then the brs scripts are pretty useless. If you are going to restore a golden image, then the brs scripts really come into play. I do not believe the scripts are freely available. As you know the scripts provide some output about your system. They also, if I remember correctly, create a pascal program.

My real suggestion would be to take a recovery image and get lvm info via vgdisplay, lvdisplay, etc. You may also want bdf output. In the end you will have to carve out luns on some storage device and create the volume groups, etc. Then restore your data. I think you'll find that the process is really not that time consuming.

I usually worry more about the tapes not being damaged. :@
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Phil_
Occasional Advisor

Re: Disaster Recovery Script

It's really just the LVM and FS stuff I'd like to automate. I have to recover between 6 - 10 systems per test, with each system having probably 50+ LVs spread amongst up to 20 VGs.

It's time consuming and obviously prone to human error - getting the permissions wrong on a single raw LV device file can seriously eat into beer-drinking time :-)

Worst-case scenario, I guess I'll have to start scripting something - I just didn't want to have to re-invent the wheel.
Doug O'Leary
Honored Contributor

Re: Disaster Recovery Script

Hey;

The important thing is to have the information before the DR. I have a perl script (attached) which runs on all my hps. It writes the vg/lv information to stdout which you can then redirect wherever you want. The format is:

VG LVs PVs Size Total Alloc Free
===========================================================================
vg00 14 2 32 273.38 163.06 110.31
vgsapE1P 11 7 8 235.92 220.98 14.94
vgsapdata1E1P 164 30 8 1011.09 924.31 86.78
vgsapdata2E1P 39 4 8 134.81 97.25 37.56
vgsapdataE1P 230 42 8 1415.53 1314.53 101.00

###########################################################################

LV Size MC Stripe Ssize Status
===========================================================================
/dev/vg00/crash 4096 1 0 0 available/syncd
/dev/vg00/dazel 2048 1 0 0 available/syncd
/dev/vg00/lvol1 512 1 0 0 available/syncd
/dev/vg00/lvol2 4096 1 0 0 available/syncd
/dev/vg00/lvol3 4096 1 0 0 available/syncd
/dev/vg00/lvol4 512 1 0 0 available/syncd
/dev/vg00/lvol5 4096 1 0 0 available/syncd
/dev/vg00/lvol6 1568 1 0 0 available/syncd
/dev/vg00/lvol7 4096 1 0 0 available/syncd
/dev/vg00/lvol8 4096 1 0 0 available/syncd
/dev/vg00/oracle 4096 1 0 0 available/syncd
/dev/vg00/swap 32768 1 0 0 available/syncd
/dev/vg00/swap1 24576 0 0 0 available/syncd
/dev/vg00/usrsap 5120 1 0 0 available/syncd
---------------------------------------------------------------------------
/dev/vgsapE1P/arch 38912 0 4 128 available/syncd

[[snip]]

I use the vg information at the top to recreate the vgs after the ignite restore's done, then a simple loop through the remainder of the file to get the information to create the lvs:

grep ^/ lvs | while read lv size mc stripes swidth stat
do
if [ ${stripes} == 0 ]
then
lvcreate -L ${size} -n ${lv##*/} ${lv%/*}
else
lvcreate -i ${stripes} -I ${swidth} -n ${lv##*/} ${lv%/*}
lvextend -L ${size} ${lv}
fi
done

An inline script similar to that should get the lvs created for you. Then, you can get the mount point information from the /etc/fstab or cluster config files, also inline scriptable. Fortunately, for me, all the raw volumes are in separate vgs, so it's a simple matter of:

for lv in $(vgdsiplay -v ${vg} | grep -i 'lv name' | awk '{print $NF}')
do
chown ${owner} ${lv%/*}/r${lv##*/}
done


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Court Campbell
Honored Contributor

Re: Disaster Recovery Script

to speed up the process a little you could create scripts that create the logical volumes. for each server. You would create the vg(s) and then run the script.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Smucker
Regular Advisor

Re: Disaster Recovery Script

Phil,

I have written scripts that interrogate the current active LVM's and builds reconstructions scripts. I use these at DR to rebuild the volume group.

I created scripts asks for ctd #'s then build the volume group, mount point, and filesystem exactly as they were defined on the original system

I will be glad to share...just let me know..