1832350 Members
2623 Online
110041 Solutions
New Discussion

pvcreate

 
SOLVED
Go to solution
Allison Fisher
Advisor

pvcreate

I have created a new LUN, now I want to pvcreate. There is primary (c3t0d5) and alternate (c11t0d5) path to the lun. Which rdsk do I use? I assume the primary path. Probably a very silly question, but I'll greatly appreciate the answer.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: pvcreate

Hi Allison:

It matters not. The concept of "primary" and "secondary" derives *only* from the order of appearance of the physical links to the same device as recorded in the '/etc/lvmtab' file after a 'vgcreate' or 'vgextend' has occured using the physical links.

That is, the first device file becomes the primary link; the second (third, etc, up to the seventh) is a seondary link.

You can "promote" a secondary link to primary status (and "demote" the primary to secondary status merely by doing a 'vgreduce' of the primary (first) link followed by a 'vgextend' of what was the primary link. See the man pages for 'vgextend' and 'vgreduce'.

Remember, to view the contents of '/etc/lvmtab' use 'strings /etc/lvmtab'. It's a binary file.

Regards!

...JRF...
Devender Khatana
Honored Contributor

Re: pvcreate

Hi,

You can do that for any one and it really it same through both as physically it is the same LUN only. The real effect will be in the other commands. The path you want to use as primary shall be used in vgcreate after pvcreate.

#vgcreate /dev/vgname /dev/dsk/c3t0d5

And it should be extended to alternate path.

#vgextend /dev/vgname /dev/dsk/c11t0d5

In the output of "vgdisplay -v" it shall show the alternate link in the end.
If you want to make the alternate link active then reduce the VG using vgreduce from the primary path and reextend using vgextend to same path agin.

#vgreduce /dev/vgname /dev/dsk/c11t0d5

#vgextend /dev/vgname /dev/dsk/c11t0d5

HTH,
Devender
Impossible itself mentions "I m possible"
Victor_101
Regular Advisor

Re: pvcreate

the easiest command i have used is

vgcreate /dev/vgnew /dev/dsk/cAtBdC /dev/dsk/cXtYdZ

where cAtBdC is the primary and
cXtYdZ is the secondary

if u want the complete procedure , kindly assign points to all the people who have replied so far.
Allison Fisher
Advisor

Re: pvcreate

Thanks to all for your replies, and thanks to HP for online JFS!