Operating System - HP-UX
1833053 Members
2655 Online
110049 Solutions
New Discussion

Re: Changing primary/alternate pv links

 
SOLVED
Go to solution
Dave Forber
Occasional Advisor

Changing primary/alternate pv links

Further to my earlier question, where it transpired my 'spare' fc card wasn't an fc card, who can advise on the primary/alternate links?

We have an RP8400 which has two chassis, 0 and 1.

Slot 1 on each chassis = TL/TS fc
Slot 8 on each chassis = XL2 fc

What I'd like to do is remove one of the quieter HBA cards for use on our new storage area (eg slot 8, chassis 1). When these existing volume groups were set up, they were done in a proper manner in that the some pv's have primary links to one chassis HBA and some luns are primary to the other chassis HBA.

I'd like to change the vg information so that all the primary links are on one card (eg slot 8, chassis 0), with the second essentially just being a failover. Once this is done I can remove the alternate links and re-assign the card.

Can this be done on the fly as it is a 24x7x365 system?

Thanks.

3 REPLIES 3
melvyn burnard
Honored Contributor

Re: Changing primary/alternate pv links

Use the vgreduce comand. This will remove the device you specify from the VG.
If it is an alternate link, this is removed, if it is a primary link, this is removed and the alternate link is made the primary.

man vgreduce
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Senthil Kumar .A_1
Honored Contributor
Solution

Re: Changing primary/alternate pv links

Its very simple to achive this.

Lets assume,

first segragate all the data, for the
card that you assume u want to remove and use
it for different purpose.

1) This data can be got from
vgdisplay -v
2) Lets assume that the card instance
number of the card you want to retain is "3"
and the one you want to remove all the
primary/alternate link is "4".

so disk device files from card with Instance
"3"..
/dev/dsk/c3t#d#
The disks on the card you want to remove
would be..
/dev/dsk/c4t#d#

3) List out all the vg's where c4t#d#
is represented as primary link, this means
that there is no indicator after the disk in
the "Physical volume" section of vgdisplay
output.

Then perform the following...

vgreduce /dev/vgXX /dev/dsk/c4t#d#
The above command would inform that
the alternate link on c3t#d# has become
primary now.

Now listout all the vg's where c4t#d#
where it is configured as alternate
link...with the command
vgdisplay -v

Then perform the following...
vgreduce /dev/vgXX /dev/dsk/c4t#d#

The above actions can be done in any sequence
and in any permutation..it really doesn't
matter as long as you are removing c4t#d#
from VG's, provided there is a alternate link
or primary link for the removed PV.

Once reduced ..you are free to use the card.
Well here you might need downtime..and the
downtime can only be obviated if you machine
supports "OLAR" (online Adding and Removing).
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Sandman!
Honored Contributor

Re: Changing primary/alternate pv links

The /etc/lvmtab file needs to be altered thru LVM commands so that the device file of the alternate link is removed under the VG in question...

remove alternate link from /etc/lvmtab...

# vgreduce

verify that alt link no longer appears under the VG in question...

# strings /etc/lvmtab

if all looks ok, your alt link should have disappeared and the HBA can now be reassigned

cheers!