Operating System - HP-UX
1846626 Members
2000 Online
110256 Solutions
New Discussion

lvextend failing on HP EVA SAN

 
SOLVED
Go to solution
Babu Yalamanchi
Advisor

lvextend failing on HP EVA SAN

Hi all,

I am getting this error message:

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg04eva/lvol3" could not be extended.
lvextend: Couldn't retrieve the list of the physical volumes
belonging to volume group "/dev/vg04eva".
Failure possibly caused by strict allocation policy

Here is my volume information:
output of pvdisplay -v /dev/dsk/c4t0d2
--- Physical volumes ---
PV Name /dev/dsk/c4t0d2
PV Name /dev/dsk/c13t0d2 Alternate Link
VG Name /dev/vg04eva
PV Status available
Allocatable yes
VGDA 2
Cur LV 7
PE Size (Mbytes) 4
Total PE 2047
Free PE 0
Allocated PE 2047
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg04eva/lvol1 1334 1334
/dev/vg04eva/lvol3 75 75
/dev/vg04eva/lvol4 64 64
/dev/vg04eva/lvol7 127 127
/dev/vg04eva/lvol8 5 5
/dev/vg04eva/lvol9 97 97
/dev/vg04eva/lvol10 345 345

--- Physical extents ---
PE Status LV LE
00000 current /dev/vg04eva/lvol1 00000
00001 current /dev/vg04eva/lvol1 00006
00002 current /dev/vg04eva/lvol1 00012
00003 current /dev/vg04eva/lvol1 00018
00004 current /dev/vg04eva/lvol1 00024
00005 current /dev/vg04eva/lvol1 00030
01332 current /dev/vg04eva/lvol1 07992
01333 current /dev/vg04eva/lvol1 07998
...
01334 current /dev/vg04eva/lvol3 00000
01335 current /dev/vg04eva/lvol3 00006
01336 current /dev/vg04eva/lvol3 00012
01337 current /dev/vg04eva/lvol3 00018
...
01388 current /dev/vg04eva/lvol4 00024
01446 current /dev/vg04eva/lvol4 00372
01447 current /dev/vg04eva/lvol4 00378
...
01448 current /dev/vg04eva/lvol7 00000
01573 current /dev/vg04eva/lvol7 00750
01574 current /dev/vg04eva/lvol7 00756
...
01575 current /dev/vg04eva/lvol8 00000
01579 current /dev/vg04eva/lvol8 00024
...
01580 current /dev/vg04eva/lvol9 00000
...
01700 current /dev/vg04eva/lvol3 00438
01701 current /dev/vg04eva/lvol3 00444
01702 current /dev/vg04eva/lvol10 00000
01703 current /dev/vg04eva/lvol10 00001
...
02044 current /dev/vg04eva/lvol10 00342
02045 current /dev/vg04eva/lvol10 00343
02046 current /dev/vg04eva/lvol10 00344

output of vgdisplay -v /dev/vg04eva

--- Volume groups ---
VG Name /dev/vg04eva
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 7
Open LV 7
Max PV 16
Cur PV 6
Act PV 6
Max PE per PV 2047
VGDA 12
PE Size (Mbytes) 4
Total PE 12282
Alloc PE 10712
Free PE 1570
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg04eva/lvol1
LV Status available/syncd
LV Size (Mbytes) 32016
Current LE 8004
Allocated PE 8004
Used PV 6

LV Name /dev/vg04eva/lvol3
LV Status available/syncd
LV Size (Mbytes) 1800
Current LE 450
Allocated PE 450
Used PV 6

LV Name /dev/vg04eva/lvol4
LV Status available/syncd
LV Size (Mbytes) 1536
Current LE 384
Allocated PE 384
Used PV 6

LV Name /dev/vg04eva/lvol7
LV Status available/syncd
LV Size (Mbytes) 3048
Current LE 762
Allocated PE 762
Used PV 6

LV Name /dev/vg04eva/lvol8
LV Status available/syncd
LV Size (Mbytes) 120
Current LE 30
Allocated PE 30
Used PV 6

LV Name /dev/vg04eva/lvol9
LV Status available/syncd
LV Size (Mbytes) 2328
Current LE 582
Allocated PE 582
Used PV 6

LV Name /dev/vg04eva/lvol10
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 500
Allocated PE 500
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c4t0d2
PV Name /dev/dsk/c17t0d2 Alternate Link
PV Status available
Total PE 2047
Free PE 0
Autoswitch On

PV Name /dev/dsk/c4t0d3
PV Name /dev/dsk/c13t0d3 Alternate Link
PV Status available
Total PE 2047
Free PE 190
Autoswitch On

PV Name /dev/dsk/c4t0d4
PV Name /dev/dsk/c17t0d4 Alternate Link
PV Status available
Total PE 2047
Free PE 345
Autoswitch On

PV Name /dev/dsk/c4t0d5
PV Name /dev/dsk/c17t0d5 Alternate Link
PV Status available
Total PE 2047
Free PE 345
Autoswitch On

PV Name /dev/dsk/c4t0d6
PV Name /dev/dsk/c13t0d6 Alternate Link
PV Status available
Total PE 2047
Free PE 345
Autoswitch On

PV Name /dev/dsk/c4t0d7
PV Name /dev/dsk/c17t0d7 Alternate Link
PV Status available
Total PE 2047
Free PE 345
Autoswitch On

output of lvdisplay -v /dev/vg04eva/lvol3

--- Logical volumes ---
LV Name /dev/vg04eva/lvol3
VG Name /dev/vg04eva
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule striped
LV Size (Mbytes) 1800
Current LE 450
Allocated PE 450
Stripes 6
Stripe Size (Kbytes) 256
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t0d2 75 75
/dev/dsk/c4t0d3 75 75
/dev/dsk/c4t0d4 75 75
/dev/dsk/c4t0d5 75 75
/dev/dsk/c4t0d6 75 75
/dev/dsk/c4t0d7 75 75

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c4t0d2 01334 current
00001 /dev/dsk/c4t0d3 01334 current
00002 /dev/dsk/c4t0d4 01334 current
00003 /dev/dsk/c4t0d5 01334 current
00004 /dev/dsk/c4t0d6 01334 current
00005 /dev/dsk/c4t0d7 01334 current
00006 /dev/dsk/c4t0d2 01335 current
.....
.....
00443 /dev/dsk/c4t0d7 01700 current
00444 /dev/dsk/c4t0d2 01701 current
00445 /dev/dsk/c4t0d3 01701 current
00446 /dev/dsk/c4t0d4 01701 current
00447 /dev/dsk/c4t0d5 01701 current
00448 /dev/dsk/c4t0d6 01701 current
Volume groups from SAM
Mbytes Physical Logical
Name Available Volumes Volumes
vg00 388 of 8676 1 11
vg02eva 4188 of 8188 1 3
vg04eva 6280 of 49128 6 7
vg05eva 3764 of 24564 3 4
vg06eva 5376 of 16376 2 1
vg07eva 8376 of 16376 2 2


I could see from PV info - /dev/dsk/c4t0d2 has 0 FREE PEs

Is this my problem? If so how do I remedy it?
If not what is the problem? ( I edited out some repetitive info to save bandwidth)

Thanks in advance

Babu Yalamanchi















13 REPLIES 13
Steven E. Protter
Exalted Contributor

Re: lvextend failing on HP EVA SAN

Shalom Babu,

Total PE 2047
Free PE 0

No free extents on the disk.

You need to lvextend to a specific disk that has free Physical Extents.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: lvextend failing on HP EVA SAN

Yes, the lack of free PEs is exactly your problem. You are going to need to vgextend the volume group using a spare LUN from your SAN in order to lvextend.


Pete

Pete
Babu Yalamanchi
Advisor

Re: lvextend failing on HP EVA SAN

Shalom Steven,

I don't have spare LUNs nor can I create new LUNs at this point. So I will have to lvextend using PV. On researching my PVs with free PEs I found one:
--- Physical volumes ---
PV Name /dev/dsk/c4t0d1
PV Name /dev/dsk/c13t0d1 Alternate Link
PV Name /dev/dsk/c15t0d1 Alternate Link
PV Name /dev/dsk/c17t0d1 Alternate Link
VG Name /dev/vg02eva
PV Status available
Allocatable yes
VGDA 2
Cur LV 3
PE Size (Mbytes) 4
Total PE 2047
Free PE 1047
Allocated PE 1000
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

How do I use this PV?Do I use the PV Name /dev/dsk/c4t0d1 of Alternate Link? My VG was striped across 6 PVs. Can I use the lvextend command format 'lvextend -L 2800 /dev/vg04eva/lvol3 /dev/dsk/c4t0d1' ?

Thanks
Patrick Wallek
Honored Contributor

Re: lvextend failing on HP EVA SAN

Is c4t0d1 part of your vg04eva VG? If not, then it will not work.

Also, it appears that the LV /dev/vg04eva/lvol3 was created as STRIPED across 6 PV's. That will also cause your LVEXTEND to NOT work. With a striped LV you absolutely MUST have enough free extents across ALL disks in the VG.

Your only optoin at this point is to possibly free some extents on c4t0d2. That is the ONLY way you are going to get this lvextend to work. You will need 42 extents on each disk. That would allow you extend lvol3 by 250 extents (1000 MB).
Enrico P.
Honored Contributor

Re: lvextend failing on HP EVA SAN

Hi,
c4t0d1 belong to /dev/vg02eva VG. You cannot extend lvol of vg04eva with disk that are part of another vg. You need to extend your vg04eva with a new disk and then extend your lvol.

Enrico
NMory
Respected Contributor
Solution

Re: lvextend failing on HP EVA SAN

Babu:

In order to extend your logical volume or LUN in question, you will need to add another Physical Volume to your Volume Group. That new volume that you found seems to have some space occupied by something (allocated PE: 1000). In order to use the free space from this disk, the disk will have to be part of the Volume Group vg04eva, otherwise that will not be possible.
If it is part of the volume group, then you can do:

#lvextend -L [new size in Megs] /dev/vg04eva/lvol3 /dev/dsk/[disk with free space]

The only bad thing about this is that you will have discontigious extents of lvol3 (that means that you will have the data from your lvol3 spread over 2 disks instead of one, and that could end in possible fragmentation in 2 disks, later one), and that might impact your performance. Well it depends on what type of information you are storing on that logical volume.


Regards,

LN
NMory
Respected Contributor

Re: lvextend failing on HP EVA SAN

Babu:

Remember to extend the File system also...either online, using OnlineJFS and fsadm command or umounting the file system and then extending it with extendfs command.

LN
Babu Yalamanchi
Advisor

Re: lvextend failing on HP EVA SAN

Patrick

Since the free PEs I have are on another striped and mirrored VG, my only option seems to be your method. How do I release PEs on vg04eva? Is 'lvreduce' the command to be used? I can reduce enough PEs on 1 or 2 LVs in vg04eva to help me out. Is that the way?

Thx
NMory
Respected Contributor

Re: lvextend failing on HP EVA SAN

Babu:

lvreduce will be the correct thing...

But before that yopu will have to reduce the file system. You can backup the info first, just in case something happends. You can use Online JFS to do the process online without unmounting the filesystem.

Eg with OnlineJFs:
fsadm -F vxfs -b [new reduced size]M /[file system]

Check it with bdf...

For the logical volume...

#lvreduce -L [new reeduced size in Megs] /dev/vg#/lvol#

Check it with a lvdisplay -v after that.

LN
Patrick Wallek
Honored Contributor

Re: lvextend failing on HP EVA SAN

It really depends on what LV's are using that particular PV. You can do a 'pvdisplsay -v /dev/dsk/c4t0d2' to see what LVs are on the PV.

You could do an lvreduce on another LV, but will only be effective IF you can safely do that. That will depend entirely upon that LVs usage.

Another possibility would be to move some extents from one of the LVs on c4t0d2 to another PV. This could be done via the pvmove command, but again, this will depend entirely on how the other LVs on c4t0d2 are set up.
NMory
Respected Contributor

Re: lvextend failing on HP EVA SAN

Just for reference...Check this page:

http://docs.hp.com/en/B2355-60103/lvm.7.html

And also the "See Also" links...

LN
Babu Yalamanchi
Advisor

Re: lvextend failing on HP EVA SAN

All

When I tried to implement LNasser's suggestion, I hit two roadblocks: one of the volumes I wanted to 'lvreduce' has my database and another has 0 free PEs. When
I tried to practice 'fsadm -F vxfs -b 5120 /comp' on a test machine I got this error:fsadm: the -b option requires "HP OnLineJFS (Advanced Vxfs)".
Bothe my test and production machines have similar software releases except my production machine has SAN. In view of these difficulties, I will abandon this path and create new disk and 'lvextend'.

Thank you for all your comments. They were very educative for me.

Regards
Babu Yalamanchi
Advisor

Re: lvextend failing on HP EVA SAN


I was able to solve my problem creating new physical disks.