Operating System - HP-UX
1832552 Members
6188 Online
110043 Solutions
New Discussion

Re: Third Mirror for Root VG

 
SOLVED
Go to solution
Manju Kampli
Trusted Contributor

Third Mirror for Root VG

Dear Friends,

I am using HP-UX 11.00 with Online JFS and Mirror Disk/UX. The root VG is mirrored and working fine.

As we know the current mirroring does support if there is any harddisk/controller failure.. but does not come to any help if the data corruption/accidental deletion happens. TO overcome this situation I would like to build a third mirror for Root VG and use it as a safe copy. This copy will get synchronised Once a week and will be split. SO that any corruption/deletion happens on original root VG, this disk will not be effected and we can use this disk for restoring any configuration file changes and other stuff.

I am wondering did any of you did this kind of thing OR do you suggest any thing better. If you have done some thing similar, will it be possible for you to supply the commands you have used and other steps which I should take care.

Thanks for your time
Cheers,
Manju

Never stop "LEARNING"
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: Third Mirror for Root VG


Theres nothing wrong with using a 3rd mirror as an extra backup of VG00. Lots of people use it. However, it is no substitue for an offline safe backup. Even if you have your 3rd mirror online if you suffer a disaster, or say there is a bug in the mirroring software your 3rd mirror could be corrupted also or destroyed.

We use make_recovery tape backups of VG00 instead. Much safer as they can be restored to a variety of systems and root disk sizes and can be stored offline in a safe or out of the building.

It sounds like in your case you want some extra security so play safe and use ignite and store your tapes away in a safe place.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Paula J Frazer-Campbell
Honored Contributor

Re: Third Mirror for Root VG

Hi
As Stefen says ignite is the option you require, it is free and available from here:-

http://www.software.hp.com/products/IUX/download.html

It installs without a reboot, I run it normally once a week and also if I have made system changes.

/opt/ignite/bin/make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

Will cover your system VG - See man make_tape_recovery.

HTH

Paula
If you can spell SysAdmin then you is one - anon
Manju Kampli
Trusted Contributor

Re: Third Mirror for Root VG

Thanks guys,

I am already using the Ignite-UX to take the backup of ROOT VG. My worry was, if I have to restore it from the tape.. It will take 1-2 hours. where as If I have third mirror, I can just boot from this disk.

This one I would like to implement this on production system to minimise any kind of outages possible. As you might see.. it is quite safe with way our setup is .. but require some outage on system if I have to restore from the TAPE.

Any further suggestions are welcome.

Cheers,
Manju
Never stop "LEARNING"
Steven Sim Kok Leong
Honored Contributor

Re: Third Mirror for Root VG

Hi,

In my environment, I have a 3rd set of mirror for the root LVs. However, synchronization is performed on a number of conditions such as:
1) there are no PANIC messages in the last entries of last output.
2) the product definitions of the OS files are fine. I use pdfdiff and pdfck commands to detect changes in the checksums OS files.

In this way, I make sure that synchronization of the mirrors only occurs when the server is in a healthy state.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Peggy Fong
Respected Contributor
Solution

Re: Third Mirror for Root VG

Hi
I've done something in my own environment (with my co-workers) that has worked very well and may be what you are looking for. I have posted it several times, but instead of looking for it I'll post it again. We mirrored vg00 (primary and 1 mirror). Then we used another disk for a backup copy of root which we copied weekly. Once set up properly you can boot from it anytime - recoveries are then the time it take to boot from the disk.

Here are the Long Instructions to create a "vgbroot"

"Copy of POST"
I've made a backup root device hundreds of times.

Here is the manual way to create a secondary bootable device as a copy of the primary root disk (not a mirror).

Example:
primary disk= /dev/dsk/c0t6d0
seconday disk= /dev/dsk/c4t6d0

mkdir /dev/vgbroot
mknod /dev/vgbroot group c 64 0x020000
Note: make sure minor node is unique - your choice.

pvcreate -fB /dev/rdsk/c4t6d0
mkboot /dev/rdsk/c4t6d0
mkboot -a "hpux -lq" /dev/rdsk/c4t6d0
lifcp /dev/rdsk/c4t6d0:AUTO -
Note: this is to confirm your AUTO file is ok.

vgcreate /dev/vgbroot /dev/dsk/c4t6d0

lvcreate -L {sizeofstand} -s y -C y -r n -n bstand /dev/vgbroot

lvcreate -L {sizeofswap} -s y -C y -c n -r n -M n -n bswap /dev/vgbroot

lvcreate -L {sizeofroot} -s y -C y -r n -n broot /dev/vgbroot

lvcreate -L {sizeofusr} -s y -n busr /dev/vgbroot

lvcreate -L {sizeoftmp} -s y -n btmp /dev/vgbroot

Continue in this manner for every lvol on your primary root disk matching the order on the disk, the size and using any naming convention you want (e.g. blvol1, blvol2, etc) I like broot, bswap, etc. Likewise the volume group can be any name (vgbroot, vg02, vgaltboot, etc)

***Next steps are important or you won't boot from the new disk.
lvlnboot -b /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/broot
lvlnboot -s /dev/vgbroot/bswap
lvlnboot -d /dev/vgbroot/bswap

lvlnboot -v
check the output should have vg00 and vgbroot as bootable volume groups.

dd all the lvols on the primary disk to the lvols on the second disk. You can also mount and use cpio if you wish.
Example:

dd if=/dev/vg00/rlvol1 of=/dev/vgbroot/rbstand bs=64k (or whatever bs you want to use)

After your dd's or cpio's are complete, then fsck your filesystems.

Need to edit the fstab on the 2d disk so that it will properly mount file systems.

mkdir /mnt
mount /dev/vgbroot/broot /mnt
cd /mnt/etc
cp fstab fstab.vg00
edit /mnt/etc/fstab
change the "vg00" to "vgbroot" for all the file systems you put on the second bootable device.
Save the file. Also copy the file to /mnt/etc/fstab.vgbroot

umount /dev/vgbroot/broot

You should now be able to boot to the second bootable device (either use setboot -p to change you boot path or interrupt the boot and select the second disk boot path). After that the system should come up and run and include all your other mount points, applications, etc.

This process can be automated and changed, etc.
It has saved us many times and shortened what could have been major outages to a simple reboot.
Hope this helps.
Peggy Fong
Respected Contributor

Re: Third Mirror for Root VG

Hi
I've done something in my own environment (with my co-workers) that has worked very well and may be what you are looking for. I have posted it several times, but instead of looking for it I'll post it again. We mirrored vg00 (primary and 1 mirror). Then we used another disk for a backup copy of root which we copied weekly. Once set up properly you can boot from it anytime - recoveries are then the time it take to boot from the disk.

Here are the Long Instructions to create a "vgbroot"

I've made a backup root device hundreds of times.

Here is the manual way to create a secondary bootable device as a copy of the primary root disk (not a mirror).

Example:
primary disk= /dev/dsk/c0t6d0
seconday disk= /dev/dsk/c4t6d0

mkdir /dev/vgbroot
mknod /dev/vgbroot group c 64 0x020000
Note: make sure minor node is unique - your choice.

pvcreate -fB /dev/rdsk/c4t6d0
mkboot /dev/rdsk/c4t6d0
mkboot -a "hpux -lq" /dev/rdsk/c4t6d0
lifcp /dev/rdsk/c4t6d0:AUTO -
Note: this is to confirm your AUTO file is ok.

vgcreate /dev/vgbroot /dev/dsk/c4t6d0

lvcreate -L {sizeofstand} -s y -C y -r n -n bstand /dev/vgbroot

lvcreate -L {sizeofswap} -s y -C y -c n -r n -M n -n bswap /dev/vgbroot

lvcreate -L {sizeofroot} -s y -C y -r n -n broot /dev/vgbroot

lvcreate -L {sizeofusr} -s y -n busr /dev/vgbroot

lvcreate -L {sizeoftmp} -s y -n btmp /dev/vgbroot

Continue in this manner for every lvol on your primary root disk matching the order on the disk, the size and using any naming convention you want (e.g. blvol1, blvol2, etc) I like broot, bswap, etc. Likewise the volume group can be any name (vgbroot, vg02, vgaltboot, etc)

***Next steps are important or you won't boot from the new disk.
lvlnboot -b /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/broot
lvlnboot -s /dev/vgbroot/bswap
lvlnboot -d /dev/vgbroot/bswap

lvlnboot -v
check the output should have vg00 and vgbroot as bootable volume groups.

dd all the lvols on the primary disk to the lvols on the second disk. You can also mount and use cpio if you wish.
Example:

dd if=/dev/vg00/rlvol1 of=/dev/vgbroot/rbstand bs=64k (or whatever bs you want to use)

After your dd's or cpio's are complete, then fsck your filesystems.

Need to edit the fstab on the 2d disk so that it will properly mount file systems.

mkdir /mnt
mount /dev/vgbroot/broot /mnt
cd /mnt/etc
cp fstab fstab.vg00
edit /mnt/etc/fstab
change the "vg00" to "vgbroot" for all the file systems you put on the second bootable device.
Save the file. Also copy the file to /mnt/etc/fstab.vgbroot

umount /dev/vgbroot/broot

You should now be able to boot to the second bootable device (either use setboot -p to change you boot path or interrupt the boot and select the second disk boot path). After that the system should come up and run and include all your other mount points, applications, etc.

This process can be automated and changed, etc.
It has saved us many times and shortened what could have been major outages to a simple reboot.
Hope this helps.
Joel Shank
Valued Contributor

Re: Third Mirror for Root VG

If all you want to do is recover one or more system files
that may become corrupted, I would probably opt for
using fbackup, specifying only the system filesystems (/var, /opt, /usr, /var, etc)

If you want to protect yourself from a catastrophic system
failure, I'd opt for using Ignite's make_tape_recovery.

Both options are free and work great. And, they are
easy to use.

Good Luck
JLS
boley janowski
Trusted Contributor

Re: Third Mirror for Root VG