Operating System - HP-UX
1834499 Members
2598 Online
110068 Solutions
New Discussion

Creating vg's and lvol's on a multipath SC10

 
Craig A. Sharp
Super Advisor

Creating vg's and lvol's on a multipath SC10

I have two SC10 enclosures with two paths to each enclosure. When I look at the ioscan I see two sets of paths for each disk. How do I generate a vg with the two sets of paths?

I am assuming that I would do the following:

vgcreate /dev/vgXX /dev/dsk/c5t0d0 /dev/dsk/c6t0d0

The device files are for the same disk but two controllers (seperate SC10 paths). I think this will give me automatic failover to the other channel if one fails.

Is this correct?

Thanks,

Craig
7 REPLIES 7
Jennifer Buchner
Occasional Advisor

Re: Creating vg's and lvol's on a multipath SC10

Yes this should work fine. When you have created the volume group, do a vgdisplay -v {volume group} and you should see that the disk you added has an alternate path associated with it.
Hartmut Lang
Trusted Contributor

Re: Creating vg's and lvol's on a multipath SC10

Only a quick answer (since i'm in hurry). I think you first have to setup one path, and then add an alternate path. The alternate path is only used if the first one fails.

Sam lets you add the alternate Path, or select which one should be primary.

Hartmut
MANOJ SRIVASTAVA
Honored Contributor

Re: Creating vg's and lvol's on a multipath SC10

Hi Craig

You are correct , vgcreate /dev/vgxx < primary > will create the volume group wiht both the paths . This can be verified by doing a vgdisplay -v /dev/vxx where in at the end it will shoe the paths. In case you have a set combinations of disk which use the same controller for the primary path and the different one for secondary path then it will use the alternate when the primary fails . But in order to use the controllers better we do a primary alternate for both ie controller 1 becomes alternate path for the second disk and so on . In this case the throughput is better as we have both the controllers working but whenever on fails we ahve to vgcfrestoer the other path and we are good to go.

Manoj Srivastava
Martin Johnson
Honored Contributor

Re: Creating vg's and lvol's on a multipath SC10

For load balancing, you may want to define the primary-alternate path on the first disk, then define alternate-primary path on the second disk. Keep alternating on subsequent disks. That way half the primary paths are on one bus and half are on the other bus.

Of course, if throughput exceeds 50% on each bus, failover will cause a slowdown as the single bus becomes a bottleneck. However, using both buses can delay a bus upgrade.
S.K. Chan
Honored Contributor

Re: Creating vg's and lvol's on a multipath SC10

Yes indeed !! You can even do cool stuff like switching between pri and alt paths.

# vgreduce vg01 /dev/dsk/c5t0d0
==> reducing yr pri path so that c6t0d0 now becomes pri
# vgextend vg01 /dev/dsk/c5t0d0
===> now c5t0d0 becomes alt
Emanuel Sardenberg
Occasional Advisor

Re: Creating vg's and lvol's on a multipath SC10

Hi

To use an alternate link, you can create a volume group with vgcreate specifying both the primary link and the alternate link device file names. Both must represent paths to the same physical volume. (Do not run pvcreate on the alternate link; it must already be the same physical volume as the primary link.) When you indicate two device file names both referring to the same disk using vgcreate, LVM configures the first one as the primary link and the second one as the alternate link.
For example, if a disk has two cables and you want to make one the primary link and the other an alternate link, enter:
vgcreate /dev/vg01 /dev/dsk/c3t0d0 /dev/dsk/c5t0d0
To add an alternate link to a physical volume that is already part of a volume group, use vgextend to indicate the new link to the physical volume. For example, if /dev/dsk/c2t0d0 is already part of your volume group but you wish to add another connection to the physical volume, enter:
vgextend /dev/vg02 /dev/dsk/c4t0d0
If the primary link fails, LVM will automatically switch from the primary controller to the alternate controller. However, you can also tell LVM to switch to a different controller at any time by entering, for example
pvchange -s /dev/dsk/c2t1d0
After the primary link has recovered, LVM will automatically switch back from the alternate controller to the original controller unless you previously instructed it not to by using pvchange as illustrated below:
pvchange -S n /dev/dsk/c2t2d0
The current links to a physical volume can be viewed using vgdisplay with the -v option.

HP-UX documentation disc English docs.hp.com
March 2001 Hp-ux instant Information
Emanuel Sardenberg
Michael Tully
Honored Contributor

Re: Creating vg's and lvol's on a multipath SC10

Hi,

One thing to alwasy remember when creating a new volume group is to make sure that you increase the number of physical volumes from the default setting. I've found many times where SA's have been caught out by not allowing enough physical volumes at the creation time.

e.g.

# vgcreate -p 128 /dev/myvg /dev/dsk/c6t0d0

Have a look at the man page for vgcreate the other default options that you may wish to change.

Cheers
~Michael~
Anyone for a Mutiny ?