Operating System - HP-UX
1834608 Members
3081 Online
110069 Solutions
New Discussion

Re: Usages of Physical Extend

 
karfai
Occasional Advisor

Usages of Physical Extend

HI

Any way to see how many physical extend are in use with a LV ?

kar fai
9 REPLIES 9
Joseph Loo
Honored Contributor

Re: Usages of Physical Extend

hi,

use lvdisplay command:

# lvdisplay -v /dev/vg##/lvol#
look at the "Allocated PE" and that is the physical extents for that logical volume.


regards
what you do not see does not mean you should not believe
karfai
Occasional Advisor

Re: Usages of Physical Extend

Thanks for the prompt reply.
I should re-phrase my question.

if I have 1000 pe in a lvol, any way to see which pe are in use ?

Joseph Loo
Honored Contributor

Re: Usages of Physical Extend

hi,

use "lvdisplay -v" and scroll to the logical extents, it will tell u which PE is use.

hope it helps.

regards.
what you do not see does not mean you should not believe
Nguyen Anh Tien
Honored Contributor

Re: Usages of Physical Extend

#vgdisplay -v vgname
--- Volume groups ---
VG Name /dev/vgname
VG Write Access read/write
VG Status available
Max LV 255
Current LE 250
Allocated PE 250
Used PV 1
.........
..........
LV Name /dev/vg01/lvbkp
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 500
Allocated PE 500
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t0d0
PV Name /dev/dsk/c4t0d0 Alternate Link
PV Status available
Total PE 20476
Free PE 0
Autoswitch On

PV Name /dev/dsk/c5t0d1
PV Name /dev/dsk/c4t0d1 Alternate Link
PV Status available
Total PE 17917
Free PE 0
Autoswitch On

PV Name /dev/dsk/c4t0d4
PV Name /dev/dsk/c5t0d4 Alternate Link
PV Status available



HP is simple
Abhijit P.
Valued Contributor

Re: Usages of Physical Extend

hi karfai,

You need to first find out the disk of which you need free PEs

# vgdisplay -v vgname

in the last outputs it will show you the disks for that VG

then just give

# pvdisplay -v /dev/dsk/cntndn

it shows you all the PEs associated with the disk.

Current PEs are used ones and Free PEs free
ones

Thanks and Regards,
Abhijit
Thayanidhi
Honored Contributor

Re: Usages of Physical Extend

Hi,
I think your question is the free PE of a LV.
Not free PE of a PV.

There is no way find out free PE in a LV.
If LV size is 1000 and if the file system on it may me very less. From LVM commands you cannot determine which is free/used.

If you have online-jfs installed and if your file system vxfs then you can use fsadm to organise the used data blocks and do a lvreduce!!

May be I am wrong,

Regds
TT
Attitude (not aptitude) determines altitude.
Sunil Sharma_1
Honored Contributor

Re: Usages of Physical Extend

Hi,

there isno way to find out which PE in a LV is used fro data and which is free. Data managment is done by file system layer so no LVM command can give you this information.



Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
karfai
Occasional Advisor

Re: Usages of Physical Extend

Thanks All
karfai
Occasional Advisor

Re: Usages of Physical Extend

answer found