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: Configuring a network interface
Viewed 2910 times since Sat, Jun 2, 2018
AIX NTP Client configuration
Viewed 11478 times since Tue, Jul 17, 2018
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 3498 times since Fri, Jun 8, 2018
Create memory resident filesystems (RAM disk) on AIX
Viewed 2451 times since Thu, Feb 21, 2019
Problems with NFS on an AIX Reboot? Then Go Single
Viewed 6460 times since Wed, May 30, 2018
Topics: AIX, System Admin↑ Export and import PuTTY sessions
Viewed 2679 times since Fri, Apr 19, 2019
IBM AIX multipath I/O (MPIO) resiliency and problem determination
Viewed 12894 times since Wed, May 30, 2018
The new VIOS performance advisor tool part util
Viewed 2968 times since Tue, Jun 4, 2019
Topics: AIX, Networking, System Admin
Viewed 11268 times since Fri, Apr 19, 2019
AIX, System Admin↑ The chrctcp command
Viewed 2842 times since Fri, Apr 19, 2019