Operating System - HP-UX
1754016 Members
7173 Online
108811 Solutions
New Discussion юеВ

Re: how to break mirroring ?

 
SOLVED
Go to solution
Shah Gaurang B.
Frequent Advisor

how to break mirroring ?

Hi,

how to break mirroing in rp series server ? Presently both disk are fine but i want to release one disk for other purpose.
7 REPLIES 7
Warren_9
Honored Contributor
Solution

Re: how to break mirroring ?

hi,

1. reduce the mirror copy of the LV
# lvreduce -m 0 $LV $PV

2. remove the PV from the VG
# vgreduce $VG $PV

3. re-initialize the PV
# pvcreate -f $PV

GOOD LUCK!!
Senthil Kumar .A_1
Honored Contributor

Re: how to break mirroring ?

Hi,

Refer to section 5 in the below link,

http://www.governmentsecurity.org/articles/articles2/When_Good_Disks_Go_Bad.pdf_fl/When_Good_Disks_Go_Bad.html

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Ninad_1
Honored Contributor

Re: how to break mirroring ?

Gaurang,

If this is your root mirror disk, I would strictly advise not to remove the mirror.
But if it is some other mirror disk, then check which lvols are mirrored -
for i in `vgdisplay -v /dev/vgxyz | grep 'LV Name' | awk '{print $NF}'`
do
if [[ $(lvdisplay -v $i | grep 'Mirror' | awk '{print $NF}') != "0" ]]
then
echo $i is mirrored
fi
done

Then use the method Warren has shown to reduce mirror copies of all mirrored volumes and proceed , reduce VG - to remove disk from VG and then the disk is free to be used for you.

Regards,
Ninad
JASH_2
Trusted Contributor

Re: how to break mirroring ?

Shah,

The best way I find to break mirrors is to get my mother in law to look at them!

Just a bit of fun.

JASH
If I can, I will!
Raj D.
Honored Contributor

Re: how to break mirroring ?

Shah ,

# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c?t?d?
- do for all the lvs .

# vgreduce /dev/vg00 /dev/dsk/c?t?d?


Now the disk is free. Mirror broken.

Cheers,
Raj,

" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: how to break mirroring ?

Shah,

To find out which disk is the primary boot disk, and the system is booted from :

Use:

# echo "boot_string/S" | adb /stand/vmunix /dev/kmem


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Ajitkumar Rane
Trusted Contributor

Re: how to break mirroring ?

Gaurang,

I assume your VG which u want to unmirror is not a rootvg

lvdisplay -v /dev/vgname/lvolname
note the device files of the disks used for the LVs
decide which disk to remove,

note the number of mirror copies, if 1 then use m 0 if 2 then m 1....

lvreduce -m 0 /dev/vgname/lvoln /dev/dsk/cxtydz

When all the lvols are reduced from the disk

vgreduce /dev/vgxx /dev/dsk/cxtydz.

Check vgdisplay/pvdisplay to confirm the disk is out of the Vg.

Good Luck

Ajit
Amidsts difficulties lie opportunities