LVM and VxVM

LVM: Making usre alternate links are present

 
SOLVED
Go to solution
Jason Rueda
Occasional Contributor

LVM: Making usre alternate links are present

Hi,

We have HPUX11i servers attached to EMC symmetrix. All external luns in EMC have altenate hardware paths. I found that some disks did not have alternate paths.

Is there a way to find all the disks in the LVM that do not have alternate paths setup in LVM.

After finding these disk I would like to do
vgextend /dev/vgxx /dev/dsk/cxtydz

thank you,
chak
8 REPLIES 8
Marco Santerre
Honored Contributor

Re: LVM: Making usre alternate links are present

Using the EMC software, you should be able to identify which disks has multiple disk filenames (check sympd command and check for redundant LUN ID)

After that, you should be able to do all your vgextends to have alternate links to all your disks.
Cooperation is doing with a smile what you have to do anyhow.
Tom Geudens
Honored Contributor

Re: LVM: Making usre alternate links are present

Hi,
vgdisplay -v | grep 'PV Name'
should show you which disks have been added to a volumegroup with an alternate link ... and which haven't ...

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Pete Randall
Outstanding Contributor
Solution

Re: LVM: Making usre alternate links are present

How about something like this:

vgdisplay -v |grep 'PV Name'
PV Name........../dev/dsk/c1t6d0
PV Name........../dev/dsk/c2t6d0
PV Name ........./dev/dsk/c12t5d0
PV Name ........./dev/dsk/c18t0d0
PV Name........../dev/dsk/c16t0d0 Alternate Link
PV Name........../dev/dsk/c18t0d1
PV Name ........./dev/dsk/c16t0d1 Alternate Link


You still have to go through it manually, but you can see that /dev/dsk/c18t0d0 has an alternate link through /dev/dsk/c16t0d0, and you can see that /dev/dsk/c12t5d0 has no alternate link.


Pete


Pete
Jason Rueda
Occasional Contributor

Re: LVM: Making usre alternate links are present

Thanks for the quick replies.

vgdisplay -v | grep "PV Name" gave me the disks that did not have alternate paths quickly as indicated.

So could I run on the fly

vgextend /dev/vg02 /dev/dsk/cxtydz commands. or do
i need to need to do prep work.

sorry that I mentioned EMC, it is actually clariion disk
system.

regards,
chak

Justo Exposito
Esteemed Contributor

Re: LVM: Making usre alternate links are present

Hi chak,

You can do it your vgextend on live in a production time without any problem.

If you want to change your principal path you can use pvchange comand with the -s option, and you can do it online.

Regards,
Justo.
Help is a Beatiful word
Angus Crome
Honored Contributor

Re: LVM: Making usre alternate links are present

If you don't have any unused disks, you can put the whole process in a while or for loop.

Try applying all devices to all volume groups. The alternates will get picked up properly by LVM, and the others that are already in a seperate volume group will be aborted by the LVM. If you do have unused ones, you can drop them from the list.

A quick and dirty (that generates lots of cannots);

for VG in `strings /etc/lvmtab | grep vg`
do
for DISK in `ls /dev/dsk/cX* | grep -v `
do
vgextend /dev/$VG /dev/dsk/$DISK
done
done

It outputs a lot of error messages, but as long as your system is well patched, LVM keeps you pretty safe.


However, this is a quick an dirty, and has the potential (albeit very slim) to dork up your volume groups. Double check everything before trying something like this. Run it with an echo in front of the vgextend command first, to verify that you get the command entries you really want.
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown
Network Servers
Advisor

Re: LVM: Making usre alternate links are present

Chak,

You should be using EMC Powerpath software which performs automatic load-balancing. If powerpath is installed, then setting up alternate paths is not necessary. Try the command powermt and see if you get back a usage message (powermt syntax)

If yes, then do the following:

powermt -display dev=all

This will give you a list of all disks by EMC serial number and show all the different paths for that disk.

Regards,

Arnold Rico
Don't fly off the handle when you are full of baloney...
Jerry Jordak
Advisor

Re: LVM: Making usre alternate links are present

To follow up on Angus' comment, I've attached a script that we use at my office to add alternate links to volume groups that use EMC disks. It makes use of the "inq" utility (that EMC provide with their software) which lists your disks, including EMC serial numbers. This script creates a temporary inq listing in a text file, and then matches up disks with the same serial number and runs a vgextend on each.

We have our inq binary installed in /usr/local/bin. If you have it installed elsewhere, change the path in the script so it can find the inq binary.

Jerry