Operating System - HP-UX
1825766 Members
2146 Online
109687 Solutions
New Discussion

Re: breaking a root mirror

 
Nora Chiu_1
Occasional Contributor

breaking a root mirror

Hi,

I am upgrading my disk subsystem.
I have 2 x internal disks and a Jamaica
array among other things. I am replacing the
Jamaica array. My vg00 is located on one of
the internal disks and mirrored to one of the
disks in the Jamaica.

How do I break my root mirror in order to finally
rid myself of the Jamaica array?

Thanks, Nora
14 REPLIES 14
Edward Alfert_2
Respected Contributor

Re: breaking a root mirror

you have to use lvreduce for every lvol that you no longer want to mirror

lvreduce -m 0 /dev/vg??/lvol?
"Do what you love and you will never work a day in your life." - Confucius
A. Clay Stephenson
Acclaimed Contributor

Re: breaking a root mirror

Hi Nora:

First do a vgdisplay -v /dev/vg00 and note ALL the logical volumes you wish to unmirror and the drives you wish to remove from the volume group.

For each logical drive:
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c0t5d0

this will remove the mirror lvol1 on /dev/dsk/c0t5d0. Substitute your correct values.

When all the logical volumes have been reduced, you then do a vgreduce /dev/vg00 /dev/dsk/c0t5d0 - again using the correct device.

That should fix you but I would man lvreduce and vgreduce to better understand these commands.

Clay
If it ain't broke, I can fix that.
Santosh Nair_1
Honored Contributor

Re: breaking a root mirror

Don't forget to vgreduce the disk(s) from the VG once you've broken all the mirrors. This will take the disk out of the volume group.

-Santosh
Life is what's happening while you're busy making other plans
G.Kumar
Frequent Advisor

Re: breaking a root mirror

hi,

use lvreduce -m 0 /dev/vg00/lvolx
for all logical volumes mirrored.

then use "vgreduce" to remove that disk from vg00.
check with lvlnboot -v that all your root boot and swap definitions are correct.

thanks
GK

James R. Ferguson
Acclaimed Contributor

Re: breaking a root mirror

Hi Nora:

Use 'lvreduce' to unmirror each logical volume. The use 'vgreduce' to remove the physical volume you want to free:

# for I in 1 2 3 #...for how many mirrored...
> do
> lvreduce -m 0 /dev/vgXX/lvol${I}
> done
# vgreduce /dev/vgXX /dev/dsk/cXtYdZ

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: breaking a root mirror

Hi (again) Nora:

Sorry, I can't type today:

# for I in 1 2 3 #...for how many mirrored...
> do
> lvreduce -m 0 /dev/vg00/lvol${I} /dev/dsk/cXtYdZ
> done
# vgreduce /dev/vg00 /dev/dsk/cXtYdZ

Regards!

...JRF...
Deshpande Prashant
Honored Contributor

Re: breaking a root mirror

HI
Use lvreduce command to break mirror.

lvreduce -m 0 /dev/vg00/lvol?? /dev/dsk/cXtYdZ

Once mirror is removed, remove the PV from VG.

vgreduce /dev/vg00 /dev/dsk/cXtYdZ

Thanks.
Prashant.
Take it as it comes.
Nora Chiu_1
Occasional Contributor

Re: breaking a root mirror

Hi,

Yes, I knew about the lvreduce part but do I have to
do anything else to make sure that the system won't
try to boot off of that root mirror in the future?

--Nora
Patrick Wallek
Honored Contributor

Re: breaking a root mirror

You should probably check your alternate boot path and make sure it is pointing to something other than that disk. Although if you do try to boot from a non-existant or non-bootable disk it won't blow up your system, it just won't boot.
Edward Alfert_2
Respected Contributor

Re: breaking a root mirror

after you lvreduce you can
lvlnboot -v
to verify that everything is correct and only the correct drive is set to boot.
"Do what you love and you will never work a day in your life." - Confucius
Nora Chiu_1
Occasional Contributor

Re: breaking a root mirror

Thanks everyone....I tried it, and it works with
no other steps required.

lvlnboot -v

confirmed it.
Edward Alfert_2
Respected Contributor

Re: breaking a root mirror

ok...since we all helped you solve the problem, i'm going to SHAMELESSLY beg for some points...

i just need 3... that will give me 500 and a prettier hat...

Thanks.... with a big grin...

I have no dignity... no self respect... i need the status!!!
"Do what you love and you will never work a day in your life." - Confucius
Nora Chiu_1
Occasional Contributor

Re: breaking a root mirror

anyone else need points?

I'm in a generous mood :)
Thierry Poels_1
Honored Contributor

Re: breaking a root mirror

hi,

how about first adding your new disks to VG00 and then 'pvmove' data from the yamaica disks to the new ones, and then removing the jamaica disks? Just to play safe ;)

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.