Operating System - HP-UX
1848892 Members
5754 Online
104038 Solutions
New Discussion

Re: Creating new disk group

 
SOLVED
Go to solution
Ninad_1
Honored Contributor

Creating new disk group

Hi,

I have a HP 11.00 box attached to XP256 with alternate links. How do I create a new disk group with the unused disks in the array. I have read about how to create a new disk group
1. mkdir /dev/vgxx
2. mknod /dev/vgxx/group ....
3. pvcreate /dev/
.
.

Now my question is when doing a pvcreate how should I proceed because I guess I will be having 2 devices listed in /dev for the same disk because of the multiple paths/alternate links.

Presently if I see the already configured disk groups I can see alternate links displayed in the vgdisplay output. I am not too sure how to configure a disk group in alternte links scenario.
Can someone help.

Regs,
Nad
5 REPLIES 5
Tim D Fulford
Honored Contributor

Re: Creating new disk group

Hi

Assume the two LUNS with alternate paths
say
/dev/dsk/c1t0d0 & /dev/dsk/c2t0d0
/dev/dsk/c1t0d1 & /dev/dsk/c2t0d1

you ONLY need to do pvcreate on one of these, so

mkdir /dev/vgdb
mknod /dev/vgdb/group c 64 0x??0000
pvcreate /dev/dsk/c1t0d0
pvcreate /dev/dsk/c1t0d1
vgcreate -g primary /dev/vgdb /dev/dsk/c1t0d0 /dev/dsk/c2t0d1
vgextend -g alternate /dev/vgdb /dev/dsk/c2t0d0 /dev/dsk/c1t0d1

now when you do a vgdisplay -v /dev/vgdb you will see something like two PVs in the volume group but each will be listed with an alternate path.

To make the best use of load balancing I would also stripe over the two disk either
Extent stripe (my preference)
lvcreate -D y -s g -L -n vgdb
or kilobyte stripe (more control)
lvcreate -I -i 2 -L -n vgdb

Summary..
It does not matter which alternate path you pvcreate as LVM will write its stuff into the headder/footer of the LUN.

The order in which you put the disks into vgcreate will matter as LVM will use the first path in preference (In the above example I've dome a vgcreate & vgextend, but you could just do a vgcreate with all 4 paths/LUNs). To load balancing the host bus adaptors, you might want to alternate these (or even better use AutoPath/ SecurePath).

To further load balance the controllers/LUNs & physical disks, you should stripe your LVs (lvcreate) over all the available LUNs/PVs in the VG.

Regards

Tim

-
Ninad_1
Honored Contributor

Re: Creating new disk group

Hi,
I have a doubt in the example you have given. Why have you given "alternate" in the vgextend while using "primary" in vgcreate ? why does the physical volume group name for the two paths need to be different ?

Regs,
Nad
Thayanidhi
Honored Contributor

Re: Creating new disk group

The Primay & alternate are lvmpvg names. If you don't use them leave those options. Basically vgcreate to one pv path, then vgextend the alternate paths.
You may use sam, which can do this for you.

Regds
TT
Attitude (not aptitude) determines altitude.
Tim D Fulford
Honored Contributor
Solution

Re: Creating new disk group

hi

you could simply do

vgcreate vgdb /dev/dsk/c1t0d0 /dev/dsk/c2t0d1 /dev/dsk/c2t0d0 /dev/dsk/c1t0d1

LVM will still register them as "alternate links" but you wil NOT be able to do extent based striping (until you create the lvmpvg), which will mean you will not be able to balance the load on the storage controllers etc. This is why I reccomend it.

Regards

Tim
-
Ninad_1
Honored Contributor

Re: Creating new disk group

Sorrry for giving points so late.
I understand why the lvmpvg is assigned primary and alternate during the vgcreate and vgextend. Thanks for the help.