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
Script to show Total, Free and Used Memory on AIX
Viewed 3300 times since Thu, Nov 29, 2018
A tcpdump Tutorial and Primer with Examples
Viewed 4866 times since Sun, Jun 17, 2018
AIX - How to get CPU infomation
Viewed 5359 times since Fri, Jun 8, 2018
Tuning AIX Network Performance
Viewed 3506 times since Tue, May 22, 2018
Trouble Shooting AIX Networking
Viewed 2474 times since Tue, May 22, 2018
How to deal with performance monitoring in AIX ?
Viewed 7688 times since Fri, May 25, 2018
Removing Failed or Missing Paths
Viewed 2652 times since Wed, May 30, 2018
SNAP in AIX
Viewed 11388 times since Mon, Sep 17, 2018
Backup and Restore With AIX
Viewed 4264 times since Sat, May 19, 2018
AIX Net How to check VLAN ID number on AIX?
Viewed 15301 times since Thu, Nov 29, 2018