Operating System - HP-UX
1823181 Members
3793 Online
109647 Solutions
New Discussion юеВ

Extending a Mirror Volume group

 
Mohd M.
Occasional Contributor

Extending a Mirror Volume group

Dears

I have a cluster with 2 nodes and 2 external storage, one mirror from the other.
I have a package that run on a physical volume group pvvg01. this vg01 is consist of two disks (c4t1d0 and c4t2d0). this physical volume is mirrored on the 2nd storage pvvg01mirror (c5t1d0 and c5t2d0).

I have other two disks that placed one on each storage (c4t3d0 and c5t3d0). I want these last two disks to be added on the physical volumes pvvg01 and pvvg01mirror.
So should i extend the volume group or the physical volume only.

regards\

M.Abdelfattah
7 REPLIES 7
Chauhan Amit
Respected Contributor

Re: Extending a Mirror Volume group

Hello,

Following steps needs to be performed:
a) Extend VG with both the Physical volumes
b) Modify /etc/lvmpvg file with appropriate disk device file

After modifying the /etc/lvmpvg file each copy of your mirror could be force on different PVG.

To achieve this if the logical volume is already created but not mirrored yet, use the following command:

lvchange -s g /dev/vg01/lvol
lvextend -m 1 /dev/vg01/lvol

If the logical volume is not created yet:
lvcreate -s g -m 1 -n lvol -L 200 /dev/vg01

Hope this helps.

Amit
If you are not a part of solution , then you are a part of problem
Mohd M.
Occasional Contributor

Re: Extending a Mirror Volume group

Dear Amit

The volume group is already created and already mirrored. The new extension for already existing and mirrored vg.
does that make difference?

regards
Frank de Vries
Respected Contributor

Re: Extending a Mirror Volume group

When you are using PVG then
Don' forget your PVG-strict distribution
policy !!

Yes you need to add the disk with vgextend,
my predecessor forgot to mention that:
see man vgextend for details:

-g pvg_name Extend an existing physical volume while the volume group is being extended by
adding all the physical volumes in the pv_path parameter to the physical volume
group specified by pvg_name.

Then
Check with lvdisplay /dev/vgxx/lvxx what is the Allocation type:
Allocation PVG-strict/distributed
(from version Hpux v11.x only)

Ensure the /etc/lvmpvg file is manually updated with distributed disk information for vgtst:
VG /dev/vgxx
PVG PVGxx
/dev/dsk/c4t1d0
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0

:check man 4 lvmpvg for more details

Run the vgdisplay ├в v /dev/vgxx | more command and verify total PVG is set to 1
Total PVG 1

lvextend -s g ├в L xxxx /dev/vgxx/lvxx PVGxx

vgexport ├в p ├в s ├в v ├в m /tmp/xxmap.file vgxx (for backup purpose)
No need to import on the other node as it concerns a shared volume group

Look before you leap
Mohd M.
Occasional Contributor

Re: Extending a Mirror Volume group

Dear Amit

Also, do I need to stop the package that running on that VG?.

regards

M.Abdelfattah
Chauhan Amit
Respected Contributor

Re: Extending a Mirror Volume group

Hello,

You need to stop the cluster/package since you are changing the LVM structure by adding the physical volume.

A) Adding or removing a physical volume to/from a cluster volume group -
Perform the Re-Import VG Procedure below from all other cluster nodes. Make sure
that the physical volume is visible in ioscan and accessible through its device special files. The command insf ├в Cdisk may be needed to create that files.

Hope this helps.

-Amit
PS:do remember to assign points.
If you are not a part of solution , then you are a part of problem
Mohd M.
Occasional Contributor

Re: Extending a Mirror Volume group

Dears

What about the file system of the logical volume. Do I need to extend it as well.

regards

M.Abdelfattah
Chauhan Amit
Respected Contributor

Re: Extending a Mirror Volume group

You will have to create the file system by "extendfs" command if you are using "lvextend". If you have onlineJFS that will automatically perform both the steps of extending logical volume and creating file system using "fsadm" command.

-Amit
If you are not a part of solution , then you are a part of problem