0516-787 extendlv: Maximum allocation for logical volume error

Sometimes you will see this error when you want to extend filesystem / logical volume.

Error Message:  0516-787 extendlv: Maximum allocation for logical volume <LV_Name> is 512.
Maximum number of LPs for the logical volume has been exceeded – must increase the allocation

It indicates that your LP allocation is insufficient, hence it needs to be increased. Maximum LP value can be increased on-the-fly without unmounting the LV first.

Case study.

I’m trying to increase additional 300GB to my SAP backup directory but failed with 0516-787 error.

sappr08(DMP)# chfs -a size=+300G /sapdb/DMP/backup
0516-787 extendlv: Maximum allocation for logical volume lvDMPbackup
is 5120.

Use “lslv lvDMPbackup” to verify max LPs value for your logical volume.

sappr08(DMP)# lslv lvDMPbackup
LOGICAL VOLUME:     lvDMPbackup            VOLUME GROUP:   sdbdmpvg
LV IDENTIFIER:      00f60f5200004c000000012abb2ed482.9 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            5120                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                4594                   PPs:            4594
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        /sapdb/DMP/backup      LABEL:          /sapdb/DMP/backup
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: no
Serialize IO ?:     NO

Now what we need is to increase LP allocation for your logical volume. You can calculate how many LP needed before we can expand the filesystem successfully.

Formula: LV Size in MB / LP size in MB

How to calculate LP value.

1. Get your LV size in MB. Use df -m <filesystem>

sappr08(DMP)# df -m /sapdb/DMP/backup
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/lvDMPbackup 1483264.00 511005.14   66%     4690     1% /sapdb/DMP/backup
sappr08(DMP)#

So, LV size = 1483264 MB

2. Get  PP size from your LV

sappr08(DMP)# lslv lvDMPbackup
LOGICAL VOLUME:     lvDMPbackup            VOLUME GROUP:   sdbdmpvg
LV IDENTIFIER:      00f60f5200004c000000012abb2ed482.9 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            6000                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                4594                   PPs:            4594
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        /sapdb/DMP/backup      LABEL:          /sapdb/DMP/backup

PP size: 256

Now, pop out your trusty calculator and find new LP value.

sappr08(DMP)# echo "1483264/256" | bc
5794
sappr08(DMP)#

So you need to increase at least 5794 PP to make 300GB filesystem extension successful. In this case, I’ll just raise my max PP to 6000.

sappr08(DMP)# chlv -x 6000 lvDMPbackup

Verify new PP value again with “lslv” command.

sappr08(DMP)# lslv lvDMPbackup
LOGICAL VOLUME:     lvDMPbackup            VOLUME GROUP:   sdbdmpvg
LV IDENTIFIER:      00f60f5200004c000000012abb2ed482.9 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            6000                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                4594                   PPs:            4594
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        /sapdb/DMP/backup      LABEL:          /sapdb/DMP/backup
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: no
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None

Now you may proceed with filesystem extension.

sappr08(DMP)# chfs -a size=+300G /sapdb/DMP/backup
Filesystem size changed to 3037724672
sappr08(DMP)# df -g /sapdb/DMP/backup
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/lvDMPbackup   1448.50    499.03   66%     4690     1% /sapdb/DMP/backup



df -m [MB] / PPSize [MB] = Max LPs


5 (1)
Article Rating (1 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
AIX perf how to
Viewed 18737 times since Tue, Aug 14, 2018
List AIX File Systems the Easy Way With the lsvgfs Command
Viewed 1998 times since Thu, Sep 20, 2018
How to deal with performance monitoring in AIX ?
Viewed 7777 times since Fri, May 25, 2018
What is OS Watcher Utility and How to use it for Database Troubleshooting ?
Viewed 29937 times since Thu, Jun 21, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 15977 times since Thu, Jan 23, 2020
Setup private yum repository for AIX clients
Viewed 11117 times since Thu, Feb 21, 2019
AIX - How to get CPU infomation
Viewed 5525 times since Fri, Jun 8, 2018
Install and configure yum on AIX
Viewed 4558 times since Thu, Feb 21, 2019
AIX, Monitoring, Networking, Red Hat, Security, System Admin↑ Determining type of system remotely
Viewed 2255 times since Fri, Apr 19, 2019
Restoring mksysb
Viewed 3471 times since Wed, May 30, 2018