Operating System - HP-UX
1753331 Members
4963 Online
108792 Solutions
New Discussion юеВ

Re: Mirror Without Mirrorisk UX?

 
SOLVED
Go to solution
John_44
Advisor

Mirror Without Mirrorisk UX?

My boss is too cheap to buy the Mirrordisk software so I am trying to come up with a way to have exact copy of the drive in the system that I can boot off of in case the root drive fails? Does anyone have any idea if this is possible?

John
8 REPLIES 8
harry d brown jr
Honored Contributor

Re: Mirror Without Mirrorisk UX?

IgniteUX! It's free. Create a make_tape_recovery and restore it to your "backup" disk.

live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: Mirror Without Mirrorisk UX?

John,

btw, here's the download page:

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

live free or die
harry
Live Free or Die
Christopher McCray_1
Honored Contributor

Re: Mirror Without Mirrorisk UX?

Hello,

I would like for you to look at this post from May, especially the esteemed A.Clay's reply. I hope this helps you.

Chris
It wasn't me!!!!
S.K. Chan
Honored Contributor
Solution

Re: Mirror Without Mirrorisk UX?

Yes it's possible to manually mirror the root disk. Keep in mind without MirrorUX you'll have to manually synchronized your root disks. Here are 2 ways you can manually mirror your root disk ..
Duplicating an LVM Boot Disk (cpio method)
==========================================
* Assuming current LVM boot disk is on c1t2d0 and you want to duplicate to c2t2d0.
# pvcreate -B /dev/rdsk/c2t2d0
# mkdir /dev/vgroot
# mknod /dev/vgroot/group c 64 0x010000
# vgcreate /dev/vgroot /dev/dsk/c2t2d0
# mkboot /dev/rdsk/c2t2d0
# mkboot -a "hpux" /dev/rdsk/c2t2d0
# lvcreate -C y -r n -n lvol1 /dev/vgroot
# lvextend -L 84 /dev/vgroot/lvol1 /dev/dsk/c2t2d0
==> creating and extending boot lv (/stand)
# lvcreate -C y -r n -L 2048 -n lvol2 /dev/vgroot
==> creating swap LV
# lvcreate -C y -r n -n lvol3 /dev/vgroot
# lvextend -L 6544 /dev/vgroot/lvol3 /dev/dsk/c2t2d0
==> creating and extending root lv (/)
** Repeat "lvextend" for the rest of your LVs with "lvcreate -L -n /dev/vgroot" first.
# lvlnboot -b lvol1 /dev/vgroot
# lvlnboot -r lvol3 /dev/vgroot
# lvlnboot -s lvol2 /dev/vgroot
# lvlnboot -d lvol2 /dev/vgroot
==> update BDRA for boot, root, swap and dump LVs.
# newfs -F hfs /dev/vgroot/rlvol1 ==> /stand must be hfs
# newfs -F vxfs /dev/vgroot/rlvol3
# mkdir /newstand
# mount /dev/vgroot/lvol1 /newstand
# cd /stand
# find . -xdev -depth -print|cpio -pxdm /newstand
# umount /newstand
# mkdir /newroot
# mount /dev/vgroot/lvol3 /newroot
# cd /
# find . -xdev -depth -print|cpio -pxdm /newroot
# cd /newroot/etc
# vi fstab
==> edit appropriately
# lvlnboot -R
==> resync vg headers
# setboot -p 0/0/2/0.2.0
==> change prim boot path to new disk (c2t2d0)

Duplicating root disk using dd method
=====================================
Using c1t6d0 and creating vg01 for example.
# pvcreate -B /dev/rdsk/c1t6d0
# mkboot /dev/rdsk/c1t6d0
# mkboot -a "hpux" /dev/rdsk/c1t6d0
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c1t6d0
# vgdisplay -v /dev/vg00 | more
==> For example ..lvol1=84MB (/stand)
lvol2=256MB (swap)
lvol3=140MB (/)
lvol4=500MB
lvol5=64MB
# lvcreate -L 84 -C y -r n -n lvol1 /dev/vg01
==> repeat for lvol2(256MB) & 3(140MB) (need to be contigous)
# lvcreate -L 500 -n lvol4 /dev/vg01
==> repeat for lvol5 (64MB)

Copy with dd (except swap - lvol2)
# dd if=/dev/vg00/rlvol1 of=/dev/vg01/rlvol1 bs=1024k
==> repeat for lvol3->5

Verify integrity (except swap)
# fsck -F hfs /dev/vg01/rlvol1
# fsck -F vxfs /dev/vg01/rlvol3
==> repeat for lvol4->5

Configure the BDRA
# lvlnboot -b lvol1 /dev/vg01
# lvlnboot -r lvol3 /dev/vg01
# lvlnboot -s lvol2 /dev/vg01
# lvlnboot -d lvol2 /dev/vg01

# mount /dev/vg01/lvol3 /tmp_mnt
# cd /tmp_mnt/etc
# vi fstab
==> change "vg00" to "vg01"
# cd /
# umount /tmp_mnt

Mark Greene_1
Honored Contributor

Re: Mirror Without Mirrorisk UX?

Without the Mirrordisk/UX package, the "lvextend -m 1" to added a mirrored disk to the logical volume won't work.

You can try to setup another disk to be a bootable device like this:

# usr/sbin/mkboot /dev/rdsk/cxtxdx (where the x's are the appropriate numbers for your disk scheme)

# /usr/sbin/mkboot -a \"hpux -lq\" /dev/rdsk/cxtxdx

# setboot -a 0/0/x/0.x.0 (scsi address of the disk from above)

see the man pages for mkboot and setboot for more details. This will make a disk a secondary boot device. You'll have to copy the root files to it, and keep it updated manually; without Mirrordisk, they will not automatically stay in-sync. Also, this only protects you if you lose the root drive, and will still require a reboot.

When you do the copy, will have filesystem name conflicts as well as logical volume name conflicts. This also means if you boot from this disk, you may have problems running your applications because of pathname issues. All of this plus the amount of time to setup and maintain should enable you to easily justify the cost of the Mirrordisk software.

HTH
mark
the future will be a lot like now, only later
Christopher McCray_1
Honored Contributor

Re: Mirror Without Mirrorisk UX?

Sorry,

Here's the post (duhhhh!!)

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x206d42308663d611abdb0090277a778c,00.html

enjoy

Chris
It wasn't me!!!!
Bill Hassell
Honored Contributor

Re: Mirror Without Mirrorisk UX?

Just a data point: S.K. Chan's details are excellent--and lengthy. Since you'll be doing all of that slightly more often than you can afford to lose your data, I would have to assume that you're working as a volunteer so your time doesn't count.

It may be worthwhile to compare MirrorDisk costs to an insurance policy for the building. Certainly you can get along without it, but when the building burns down, there is no substitute. Insurance is usually expressed as a function of the value of the building and contents. Try creating an inventory of what's on your system and assign a replacement cost for the DATA (hardware is cheap compared to data costs).

And note that the manual mirror method will require regular updates (copying everything to the backup disk) or a recovery in the future will be a very lengthy process of trying to figure out what changed since the last backup.


Bill Hassell, sysadmin
Sean OB_1
Honored Contributor

Re: Mirror Without Mirrorisk UX?

There is another method that will give you a mirror to boot from, however it won't be real time mirrored.

You can simply setup a cron job to kick of a script every day to DD the drive in question to another drive.

dd if=drive1 of=drive2

This is a poor man's mirror solution that simply gives you a backup of the drive periodically, but should allow you to swap the drive and boot from it.