Operating System - HP-UX
1838604 Members
2946 Online
110128 Solutions
New Discussion

Re: lvm question with pvgs involved

 
SOLVED
Go to solution
likid0
Honored Contributor

lvm question with pvgs involved

What i am doing is changing the path to the san disks, to use empty ports in the XP1024, i am actually using ports CL1F CL2E, and now i want to
use CL1K and CL2K, what i usually do in vgextend the new paths and then vgreduce the old paths, but now i have come across a miche that has a pvg created, and i dont know how these vgs with pvg behave:


--- Physical volumes ---
PV Name /dev/dsk/c21t0d0
PV Name /dev/dsk/c22t0d0 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c21t0d1
PV Name /dev/dsk/c22t0d1 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c21t0d2
PV Name /dev/dsk/c22t0d2 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c21t0d3
PV Name /dev/dsk/c22t0d3 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t0d1
PV Name /dev/dsk/c26t0d1 Alternate Link
PV Status available
Total PE 3471
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t0d2
PV Name /dev/dsk/c26t0d2 Alternate Link
PV Status available
Total PE 3471
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t0d6
PV Name /dev/dsk/c26t0d6 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t0d7
PV Name /dev/dsk/c26t0d7 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t1d1
PV Name /dev/dsk/c26t1d1 Alternate Link
PV Status available
Total PE 20836
Free PE 0
Autoswitch On

PV Name /dev/dsk/c25t1d2
PV Name /dev/dsk/c26t1d2 Alternate Link
PV Status available
Total PE 27781
Free PE 0
Autoswitch On

PV Name /dev/dsk/c39t0d1
PV Name /dev/dsk/c41t0d1 Alternate Link
PV Status available
Total PE 27786
Free PE 0
Autoswitch On

PV Name /dev/dsk/c41t0d2
PV Name /dev/dsk/c39t0d2 Alternate Link
PV Status available
Total PE 24996
Free PE 0
Autoswitch On


--- Physical volume groups ---
PVG Name dis2
PV Name /dev/dsk/c21t0d2
PV Name /dev/dsk/c21t0d3
PV Name /dev/dsk/c25t0d7
PV Name /dev/dsk/c25t1d1
PV Name /dev/dsk/c25t1d2
PV Name /dev/dsk/c22t0d0
PV Name /dev/dsk/c22t0d1
PV Name /dev/dsk/c26t0d6



can i just vgextend the new paths, and vgreduce the ones in the pvg?

or do i have to make a new lvmpvg file?

not much idea, why we are using a pvg in this vg and what benefits it has if its not a mirror

any sugestions?
Windows?, no thanks
6 REPLIES 6
IT_2007
Honored Contributor

Re: lvm question with pvgs involved

The above vgs shows one LUN per device and two paths which will help filesystem /raw device available all time even if one path is dead. These two paths coming from two fibre cards from your host.

You said

>> i am actually using ports CL1F CL2E, and now i want to
use CL1K and CL2K.
<<

Means you want to switch ports. correct?
Do this way.

1. Run two fibre cables from switch to new ports CL1K and CL2K and assign same LUN to this host.
2. Run ioscan, insf -e and vgextend
You will see one primary and 3 alternate links.
3. vgreduce old paths carefully.
4. remove fibre cables from switch to old ports.




James R. Ferguson
Acclaimed Contributor

Re: lvm question with pvgs involved

Hi Daniel:

One way to accomodate the changes in device files is to 'vgexport' and then 'vgimport' the volume group. Follow this with a manual recreation of the '/etc/lvmpvg' file and edit it as needed.

You can use the the '-f outfile' switch and argument for the 'vgexport' and edit the device paths before using the 'outfile' with the 'vgimport', if you know the new device names. Otherwise, you can export and import using the '-s' option and arrange your alternate links (pv_paths) in a second export/import using the same technique. This is sometimes faster than promoting and demoting secondary and primary links for volume groups with large numbers of paths.

Regards!

...JRF...
Marvin Strong
Honored Contributor

Re: lvm question with pvgs involved

/etc/lvmpvg is a text file you can edit.

knowing your mapping you could remove the current pvg for this vg in the lvmpvg file.

Do it your normal way, extend reduce. Then just edit lvmpvg file add the pvg back with the new disk names.
Marvin Strong
Honored Contributor
Solution

Re: lvm question with pvgs involved

one other way with vgextend you can specify the pvg you want the disk to belong too.

vgextend -g pvg vgname pvpath
likid0
Honored Contributor

Re: lvm question with pvgs involved

Ok its all done, i finally did it with the vgextend -g pvgroup option, but what i dont really understand then, is what is the use of pvgroups ??

i just cant see the point of it, if someone could please explain. thnx!
Windows?, no thanks
Tim D Fulford
Honored Contributor

Re: lvm question with pvgs involved

The basic reason for creating PVGs is to split your VG into a num,ber of disk groups. SO you can add space from a specific group of disks eg. pv_data, pv_data_mirror, pv_idx, pv_fs etc. This simplifies what the administrator has to type e.g

lvcreate -n < name> -L vgXX pv_data

Another advantage is the data can be stripped (extent) over all the disks in the disk group.

lvcreate -n -L -D y -s g vgXX pv_data

Lastly you could mirror LVs beteen two disk groups

lvcreate -n -L -D y -s g vgXX pv_data
lvextend -m 1 /dev/vgXX/ pv_data_mirror

Usually I only have two disk groups, (primary, mirror) and use the following

lvcreate -m1 -D y -s g -n -L vgXX

Regards

Tim
-