Operating System - HP-UX
1833325 Members
3172 Online
110051 Solutions
New Discussion

Re: changing pvlinks around

 
SOLVED
Go to solution
Josee Bourget-Thuma
Frequent Advisor

changing pvlinks around

Hi!

I know that you can manipulate the paths to a disk by using vgreduce and vgextend.

Could someone refresh my memory on this subject.
Can you perform these operations while the system is in multi-user mode? IE, someone might be accessing the disk.

On another topic, can someone also explain why I'm not getting the email notification from the forum anymore?
I also no longer get notification of questions in my area of expertize. Yet, while editing my profile, everything looks just fine.

Thanks a lot in advance!

Josee...
Failure is not an option.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: changing pvlinks around

Hi Josee:

You can easily switch the primary and alternate links. Simply 'vgreduce' the primary link and the alternate will become the primary. Then 'vgextend' in the old primary. It will become the alternate link.

For example, given (from 'vgdisplay):

/dev/dsk/c2t0d0
/dev/dsk/c5t1d0 Alternate Link

Then:

# vgreduce /dev/vgXX /dev/dsk/c2t0d0
# vgextend /dev/vgXX /dev/dsk/c2t0d0

will yield"

/dev/dsk/c5t1d0
/dev/dsk/c2t0d0 Alternate Link

And, yes, this can safely be done while the system is running normally.

Regards!

...JRF...

Christopher McCray_1
Honored Contributor

Re: changing pvlinks around

You need only run the following:

#strings /etc/lvmtab ( to get the list of pvlinks you want to change the order of)

# vgreduce /dev/vg## /dev/dsk/c?t?d?
# vgextend /dev/vg## /dev/dsk/c?t?d? (the same as above vgreduce command)

at the risk of stating the obvious, make sure the pvlink you are reducing is the the true alternate path of the other pvlink. you can do this by running ioscan -fknC disk . you can also accomplish this through sam:

disks and file systems --> disk devices

you can highlight the lun in question and under actions and there is an option to change the primary LVM path.

As for you not getting notifications, I can't help you as I don't get them either. If you do find out let me know.

Good luck.

Chris
It wasn't me!!!!
James R. Ferguson
Acclaimed Contributor

Re: changing pvlinks around

Hi (again) Josee:

As for the lack of email notification from the Forum, submit a trouble report/query via the "contact hp" link at the left of this screen.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: changing pvlinks around

Josee,

Yes. You can do changing the alternate paths while the system is in multi-user mode. For ex., you have the following configuration

vg01
/dev/dsk/c0t0d0
/dev/dsk/c0t0d1
/dev/dsk/c1t0d0 -- Alternate
/dev/dsk/c1t0d1 -- Alternate

If you want to make c1t0d0 as the primary path, you can do a pvchange -s /dev/dsk/c1t0d0 to get this as the primary link. However, this will not be permanent and will be reset when you reboot the system next time. To make it permanent, you need to do vgreduce /dev/dsk/c0t0d1 and then vgextend /dev/dsk/c0t0d1. This will make c1t0d1 as the first disk in the lvmtab and hence will make it as the primary link even after the reboot.

Hope this helps.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try