Disk Enclosures
cancel
Showing results for 
Search instead for 
Did you mean: 

vgcreate command with PVG's and alternate paths

vgcreate command with PVG's and alternate paths

Hi All,
I'm trying to create a volume group of a stripe size of 2 mb with PVG's (extent based mirrored stripes). I have four drives that are going to be part of this volume group (all having alternate paths).
Question 1
DO I have to add the alternate paths to the vgcreate command?
Question 2
Do I have to edit /etc/lvmpvg do get this done or can I achieve the same with the two seperate vgcreate commands:
vgcreate -s 2 -g pvg01 /dev/vg03 /dev/dsk/c3t15d0 (primary) /dev/dsk/c5t13d0 (alternate) /dev/dsk/c3t14d0 (primary)
/dev/dsk/c5t14d0 (alternate)

I would then follow it up with a similar command using the other two disk addresses.

Is this correct?

Many Thanx,
Chris


8 REPLIES
Michael Tully
Honored Contributor

Re: vgcreate command with PVG's and alternate paths

Hi Chris,

Yes you have to add the alternate path devices.
No you shouldn't have to edit the /etc/lvmpvg file. It should be done automatically by the correct usage of the commands. Have a look at this similar discussion, it provides some valuable information.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7a6e42308663d611abdb0090277a778c,00.html

HTH
Michael
Anyone for a Mutiny ?

Re: vgcreate command with PVG's and alternate paths

Michael,
Thanks for the link. But my question is: Will the command I've laid out accomplish what I'm trying to do?

Chris
S.K. Chan
Honored Contributor

Re: vgcreate command with PVG's and alternate paths

Q1
Yes
Q2
No need to edit /etc/lvmpvg. I'm not sure if vgcreate can take the PV paths in one command because you got yourself alternate path to consider. I know this would work .. (split your "vgcreate" into 2 steps, vgcreate and vgextend)
# vgcreate -s 2 -g pvg01 /dev/vg03 /dev/dsk/c3t15d0 /dev/dsk/c5t13d0
==>c3t15d0(primary) and c5t13d0(alternate) will be placed in pvg01
# vgextend -g pvg01 /dev/vg03 /dev/dsk/c3t14d0 /dev/dsk/c5t14d0
==>c3t14d0(primary) and c5t14d0(alternate) will be placed in pvg01

Check /etc/lvmpvg afterwards to make sure the PVs are defined.

To extend vg03 with more PVs into a different PVG (say pvg02) you would simply run the same vgextend command replacing "pvg01" with "pvg02".
Sajid_1
Honored Contributor

Re: vgcreate command with PVG's and alternate paths

1) Yes, add alt. paths
2) No need to edit the lvmpvg file. Check the file content after you did the vgcreate -g
3) The best practise for giving an alt. path is:
# vgcreate - first
# vgextend - with alt. path.
4) Check the output of this after everything is done:
# vgdisplay -v
learn unix ..

Re: vgcreate command with PVG's and alternate paths

Thanks for all your help. But now I have another problem. The vgcreate command is coming back with a "file too large" error. Is this because of the 2mb extent (stripe) size. And if this is the case why can''t I use 2mb?

Thanx Again,

Chris
S.K. Chan
Honored Contributor

Re: vgcreate command with PVG's and alternate paths

The 2MB with the "-s" is the extent size, not stripe size. The error you got is because 2MB is too small for the LVM data structures to fit. The default is 4MB. Typically for a large disk and a smaller extent defined, you'll see this error. Is there any reason why you use a smaller extent (2MB) ? If no then just drop the "-s 2" in your command and that'll create a 4MB extent for you.

Re: vgcreate command with PVG's and alternate paths

Thanks for your reply. I just conceded the fact that I would create the extents at the 4mb size. But now I'm having another problem. When I'm trying to perform a vgcreate I'm getting the following error:
vgcreate -g pvg01 /dev/vg03 /dev/dsk/c3t15d0 /dev/dsk/c5t15d0
Increased the number of physical extents per physical volume to 4341.
vgcreate: The physical volume "/dev/dsk/c3t15d0" is already recorded in the "/et
c/lvmtab" file.
# vgextend -g pvg01 /dev/vg03 /dev/dsk/c3t14d0 /dev/dsk/c5t14d0
vgextend: Volume group "/dev/vg03" does not exist in the "/etc/lvmtab" file.

How can I get around this?

Re: vgcreate command with PVG's and alternate paths

Never mind I see the problem. I have the /dev/dsk addressing incorrect. I hope this doesn't cause another problem. I looked at the VG that had those addresses in it and everything looks OK. Anything else I should look at?

Thanks,


The Dyslexic Kid