1830385 Members
2425 Online
110001 Solutions
New Discussion

Breaking a Mirror

 
SOLVED
Go to solution
Mr.Right
Advisor

Breaking a Mirror

Hi HP-UX Gurus,

I have HP-UX 11.23 with me and I am going to install new patches on to the same.

My root disk is mirrored and before going ahead with the process of patch installation , I want to break the mirror and keep it safe.

So tell a steps to breaking the mirror and keep it save so that if there is any issue I can boot from the other copy of mirror .

I do not want to take out the mirror disk and then boot the system with one disk.

I want to keep the mirror disk as it is and want to break the mirror form the cmd line.

Please suggest me what to do ???

Thanks in Advance.
9 REPLIES 9
Torsten.
Acclaimed Contributor
Solution

Re: Breaking a Mirror

This is IMHO the best solution:

http://docs.hp.com/en/oshpux11iv2.html#Dynamic%20Root%20Disk

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: Breaking a Mirror

Hi:

You should also (always) take an Ignite backup before patching, in my opinion.

Download a current verion of Ignite from:

http://docs.hp.com/en/IUX/

Then create a recovery tape from which you can boot and restore your server:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

Regards!

...JRF...

Mr.Right
Advisor

Re: Breaking a Mirror

Hi Gurus,

I have already taken ignite backup, but please suggest me some steps through which I can break the Mirror disk form command line and I also wann to infom that I have OLAR patch is also installed.

Can I use lvsplit for breaking the mirror ?

How about using pvchange -a N , this will deattached the disk form Volume Group?

Please advice .

Thanks in Advance.
Torsten.
Acclaimed Contributor

Re: Breaking a Mirror

If you use pvchange -a N the disks will sync after a reboot - this is not what you want.

I would reduce the mirror and use drd to clone the remaining disk and patch the clone.

After this activate the clone and boot from.

If everything is ok, then you can mirror the disk again. If it isn't, boot from the original disk again.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mr.Right
Advisor

Re: Breaking a Mirror

Hi Torsten,

Thanks a lot for the information , please let me know How I am going to use DRD for cloning the Disk and how I can break the clone?

Thanks in advance.
Torsten.
Acclaimed Contributor

Re: Breaking a Mirror

See my first post or the manual directly

http://docs.hp.com/en/5992-4098/index.html


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mr.Right
Advisor

Re: Breaking a Mirror

Thanks...
johnsonpk
Honored Contributor

Re: Breaking a Mirror

Mr.Right,

For creating a drd clone you should have an extra disk (with same size of root disk).

The step is as follows
1) create a system clone
drd clone -v -t /dev/dsk/cxtydz (this would be your new disk for creating the clone)
2)verify the clone status
#drd status -v
3)install the patch on the cloned disk
#drd runcmd swinstall -s
4)verify the insallation by running
#drd runcmd swlist
5)activate the clone and reboot the system from the clone disk
#drd activate -x reboot=true
(this command will set the newdisk as primary path and the old primary path as alternate path)
Note :if you are installing any F/w patch keep it in mind that booting from the original disk will not fall back the system to the older firmware level)

Thanks !!
Johnson
Harmanjit_1
Frequent Advisor

Re: Breaking a Mirror

Hi There,

1. You can break the mirror using lvsplit. Below is the script which I use for my servers.

**** NOTE - break root mirror at the last
=========================================
echo "Spliting mirrors on vg00 .. "
echo
# [ CHECK FOR STALE EXTENTS. ]

echo "Displaying state extents .. "
echo

# lvdisplay -v /dev/vg00/lvpvc1 | grep -i stale
lvdisplay -v /dev/vg00/lvol8 | grep -i stale
lvdisplay -v /dev/vg00/lvol7 | grep -i stale
lvdisplay -v /dev/vg00/lvol6 | grep -i stale
lvdisplay -v /dev/vg00/lvol5 | grep -i stale
lvdisplay -v /dev/vg00/lvol4 | grep -i stale
lvdisplay -v /dev/vg00/lvol3 | grep -i stale
lvdisplay -v /dev/vg00/lvol2 | grep -i stale # swap
lvdisplay -v /dev/vg00/lvol1 | grep -i stale

echo
echo "WARNING: If any state extents are displayed above, break now an resolve the
echo "issue first!!

echo
echo "[ Press Enter to continue .. ] "
read abc
echo

# Backing up lvm info.
echo "Backuping LVM info to ./lvmbackup ..."
echo
mkdir lvmbackup 2> /dev/null
vgdisplay -v /dev/vg00 > ./lvmbackup/info_vg00.txt
cp -Rp /etc/lvmconf ./lvmbackup
strings /etc/lvmtab > ./lvmbackup/lvmtab.txt
vgexport -m ./lvmbackup/vgexportmap_vg00.txt -p /dev/vg00 2>/dev/null


# Split logical volumes in descending order:

#
# WARNING: "/" lvol must be split last!
#

echo
echo "Spliting all mirrored lvols .."
# sync; lvsplit /dev/vg00/lvpvc1
sync; lvsplit /dev/vg00/lvol8
sync; lvsplit /dev/vg00/lvol7
sync; lvsplit /dev/vg00/lvol6
sync; lvsplit /dev/vg00/lvol5
sync; lvsplit /dev/vg00/lvol4
sync; lvsplit /dev/vg00/lvol2
sync; lvsplit /dev/vg00/lvol1
sync; lvsplit /dev/vg00/lvol3 # "/" must be split LAST!


# fsck each ####b lvol to confirm no data corruption:
#
# Use 'fsck -y -F hfs ' for HFS.
# 'fsck -y -F vxfs -o full ' for VxfS.

echo
echo "Checking filesystems on split lvols .."
echo
# fsck -y -F vxfs -o full /dev/vg00/lvpvcb
fsck -y -F vxfs -o full /dev/vg00/lvol8b
fsck -y -F vxfs -o full /dev/vg00/lvol7b
fsck -y -F vxfs -o full /dev/vg00/lvol6b
fsck -y -F vxfs -o full /dev/vg00/lvol5b
fsck -y -F vxfs -o full /dev/vg00/lvol4b
fsck -y -F vxfs -o full /dev/vg00/lvol3b
# fsck -y -F vxfs -o full /dev/vg00/lvol2b
fsck -y -F hfs /dev/vg00/lvol1b

echo
lvlnboot -v /dev/vg00
echo
echo "Mirrors have been split and checked."
echo
echo "Modifying backup /etc/fstab file in split mirror ..."
echo
mkdir /mnt 2> /dev/null
mount /dev/vg00/lvol3b /mnt
cp -p /mnt/etc/fstab /mnt/etc/fstab.beforesplit
cp -p /mnt/etc/fstab /mnt/etc/fstab.aftersplit

# Replaces the fstab file on the split mirror to reflect the b lvol.
/usr/bin/sed "s/\/dev\/vg00\/[0-9a-zA-Z]*/&b/" /etc/fstab > /mnt/etc/fstab.aftersplit
cp -p /mnt/etc/fstab.aftersplit /mnt/etc/fstab

umount /mnt

echo "Split mirror process completed."
echo
echo

==========================================