Operating System - HP-UX
1838614 Members
4288 Online
110128 Solutions
New Discussion

removing volume group and mirroring disk

 
Cathy Arora
Frequent Advisor

removing volume group and mirroring disk

Hi all;
I have to completely remove the whole volume group and mirror my 2nd disk instead.
i would like to know all the logical steps that I need to take.

I appreciate your help;

Thanks,

raj
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: removing volume group and mirroring disk

First of all, mirrors are not done at the disk level but rather at the logical volume (LVOL) level.

By far the easist method for removing a VG, is the vgexport command.
e.g.
vgexport /dev/vg02

Now let's say that you are going to mirror lvol1 and lvol2 on vg01. Your new disk is /dev/dsk/c1t5d0.

1) pvcreate -f /dev/rdsk/c1t5d0.
2) vgextend /dev/vg01 /dev/dsk/c1t5d0
3) lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c1t5d0
lvextend -m 1 /dev/vg01/lvol2 /dev/dsk/c1t5d0

man vgexport,pvcreate,vgextend,lvextend for details.
If it ain't broke, I can fix that.
Michael Tully
Honored Contributor

Re: removing volume group and mirroring disk

I'm assuming here, that you wish to mirror the logical volumes for your LV's on the disk that has vg00
Clay is quite correct, mirrors are done at the LV level.

# vgexport /dev/vg02
# pvcreate -Bf /dev/rdsk/xyz
# vgextend /dev/vg00 /dev/dsk/xyz
# mkboot /dev/rdsk/xyz
# mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/xyz
# lvextend -m 1 (with every lv on the vg )
# lvlnboot -R
# vgvcfgbackup /dev/vg00

or for an easy script method you can use this for the lvextend for LV's if they are all named lv....

# for i in /dev/vg00/lv*
> do
> echo $i
> lvextend -m 1 $i
> done
Anyone for a Mutiny ?
Cathy Arora
Frequent Advisor

Re: removing volume group and mirroring disk

Thanks.
I will have unmount remove the entries from fstab before vgexport.
is there anything else I need to do before vgexport?
I understand all the steps were mentioned in mirroring process except mkboot -l and mkboot -a.
could you please explain?
I was implying to mirror all the logical volume of vg00 to my 2nd disk.sorry about the confusion.
so system can be booted from 2nd disk if needed.




raj
Lorenzo Facello
Valued Contributor

Re: removing volume group and mirroring disk

Hi,
you use commands
mkboot /dev/dsk/cxtxdx
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/dsk/cxtxdx

to make bootable the disk you have to mirror
these comm make a cp of the LIF area, BDRA, VGRA

remember to use also at first
pvcreate -Bf /dev/dsk/cxtxdx
f=force
B=to be bootable

Hope this helps
L.
Elmar P. Kolkman
Honored Contributor

Re: removing volume group and mirroring disk

Before starting to try to mirror (and destroy the old VG), make sure MIRROR UX is installed on your system ('swlist | grep -i mirror' should show it). If not, your whole action will be useless, because mirroring won't be possible...
Every problem has at least one solution. Only some solutions are harder to find.
Cathy Arora
Frequent Advisor

Re: removing volume group and mirroring disk

Thanks all
I am having problem with ISL screen on console.
it is not very intuitive. how do i change the path for alternate disk.
PRI alt "whole path"


raj