Operating System - HP-UX
1837396 Members
2967 Online
110116 Solutions
New Discussion

Re: PE position in pvdisplay output?

 
Philip Kime
Regular Advisor

PE position in pvdisplay output?

In the output to pvdisplay -v, there are two extra sections, the lower one titled

--- Physical extents ---

which shows you the layour of the PEs and the upper section entitled

--- Distribution of physical volume ---

My question is, in this section, does the order that the LVOLs are listed have any relation to the layout on disk? It seems to me that on all my 10.20 boxes, the order is random and on 11.x, they are listed in lvol order (which makes more sense because lvol1 is usually the boot volume in vg00 and must be first on the disk).

For example, on 10.20, I see this:

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol3 256 256
/dev/vg00/lvol2 128 128
/dev/vg00/lvol4 896 896
/dev/vg00/lvol1 128 128


while on 11.x, I see this:

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol1 21 21
/dev/vg00/lvol2 256 256
/dev/vg00/lvol3 35 35
/dev/vg00/lvol4 384 384

Both, of course, have the boot volume lvol1 starting at PE 0000 which is all that counts yes?
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: PE position in pvdisplay output?

I have just compared a 10.20 machine to an 11.0 machine and I see the same behavior. On my 10.20 pvdisplay shows lvol3, lvol2, lvol1 and the 11.0 show lvol1, lvol2, lvol3, etc.

You are correct in that as long as lvol1 starts at extent 0000, followed by lvol2 and lvol3, you are OK. The order of the lvols after lvol3 does not really matter, but the first 3 are critical.
John Poff
Honored Contributor

Re: PE position in pvdisplay output?

Hi,

The order of your lvols in your vgdisplay isn't that important. The LVM machinery keeps up with what PEs are on which PVs and which lvols they belong to. I've seen the lvols in a vgdisplay get jumbled after running a defrag with fsadm, but everything keeps running happily.

JP
Uday_S_Ankolekar
Honored Contributor

Re: PE position in pvdisplay output?

pvdisplay -v output further down shows you for each PE deatils where it belongs..
for ex..
--- Physical extents ---
PE Status LV LE
0000 current /dev/vg00/lvol1 0000
0001 current /dev/vg00/lvol1 0001
0002 current /dev/vg00/lvol1 0002
0003 current /dev/vg00/lvol1 0003
0004 current /dev/vg00/lvol1 0004
.
.
.
0025 current /dev/vg00/lvol2 0000
0026 current /dev/vg00/lvol2 0001
0027 current /dev/vg00/lvol2 0002
0028 current /dev/vg00/lvol2 0003
0029 current /dev/vg00/lvol2 0004
.
.
In this case 0 to 24 is lvol1 and 25 onwards its lvol2 and so on..

-USA..
Good Luck..
S.K. Chan
Honored Contributor

Re: PE position in pvdisplay output?

What I noticed on my 10.20 machines is that for some servers that was manually built (ie loading of OS from cdrom) the order is reversed (ie starting with lvol3 first) whereas machines that were built via lan ignite were in the "expected" order (ie starting with lvol1). Both cases have lvol1 in the starting PE block. I do not know the accurate answer to your question but knowing that the physical extents are distributed in the right order in the disk layout is good enough for me. My guess is the order of lvols in the "distribution of pv" section does not necessarily represent the order they appear on the disk.
James R. Ferguson
Acclaimed Contributor

Re: PE position in pvdisplay output?

Hi Philip:

As far as having a functional boot disk, the order of the first three logical volumes must be 'lvol1', 'lvol2' and then 'lvol3' with their physical extents conforming in that ascending sequence.

I checked two of my 10.20 servers. On one, the distribution of the logical volumes was strictly ascending, but on the other the logical volumes appeared as 3,2,1,7,5,8,6,4. Therefore, the situation you see is not something specific to 10.20.

Of course, in both cases, the allocation of physical extents began for 'lvol1' and proceeded in strict contiguous order through (at least) 'lvol3'.

My guess is that the version of Ignite used to ignite these servers did something different in the initial allocation of vg00's logical volumes.

The order of appearance of the logical volumes as reflected later in a 'vgdisplay' or a 'pvdisplay' should follow the *original* order of the 'lvcreate'. Thus, I suspect that an 'lvcreate' of *zero* size was done for the logical volumes, followed by an 'lvextend' with a desired size. In this fashion, one could see physical extents beginning at zero used for 'lvol1' (as should be the case for a bootable disk), yet 'lvol1' not be the first logical volume in the distribution of physical volume's logical volume list.

Regards!

...JRF...
Helen French
Honored Contributor

Re: PE position in pvdisplay output?

I have 10.20 boxes with proper and imporper order of root LVs. All of my 11.x system shows the correct order in pvdisplay. I would not worry about this issue since the first PE will always start in lvol1 (/stand). The PE allocation table reflects how the LVs are spanned across the disk. The LV order does matter when you mirror the boot disk though.
Life is a promise, fulfill it!
Kevin Wright
Honored Contributor

Re: PE position in pvdisplay output?

As mentioned, look below at the Physical Extent section to see the order of the Lvols. The order, after lvol1 anyway, is basically meaningless. However, if you plan on extending swap anytime, since it has to be contiguous extents, you can look here to see if you have contiguous extents available after your swap LV.