How to Extend Filesystem on AIX using JFS

We are now going to discuss extending a filesystem under JFS on AIX machine. It is really pretty simple, actually in just 3 commands (including the checking) we could easily extend an AIX filesystem. But for the benifit of everybody, I would include extra checking and commands for us to fully appreciate this task.

Check your filesystems current size and % utilization:

[[email protected]] / > df -g /ora/fs1263/u06
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/or1263u06    150.00     53.07   65%      118     1% /ora/fs1263/u06

Check your Logical Volume and see what Volume Group it resides:

[[email protected]] / > lslv or1263u06
LOGICAL VOLUME:     or1263u06              VOLUME GROUP:   datavg
LV IDENTIFIER:      000000000108ffffffff.6 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            2048                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                600                    PPs:            600
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        /ora/fs1263/u06        LABEL:          /ora/fs1263/u06
Serialize IO ?:     NO

Check the information regarding the Volume Group, this includes the free PP’s and PP size:

[[email protected]] / > lsvg datavg
VOLUME GROUP:       datavg             VG IDENTIFIER:  000000000108ffffffff
VG STATE:           active             PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write         TOTAL PPs:      2626 (672256 megabytes)
MAX LVs:            256                FREE PPs:       576 (147456 megabytes)
LVs:                19                 USED PPs:       2589 (662784 megabytes)
OPEN LVs:           19                 QUORUM:         4 (Enabled)
TOTAL PVs:          7                  VG DESCRIPTORS: 7
STALE PVs:          0                  STALE PPs:      0
ACTIVE PVs:         7                  AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016               MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)    AUTO SYNC:      no
HOT SPARE:          no                 BB POLICY:      relocatable

If you have available PPs for your desired filesystem, let us extend it:

[[email protected]] / > chfs -a size=+134G /ora/fs1263/u06
Filesystem size changed to 595591168

How is our filesystem now:

[[email protected]] / > df -g /ora/fs1263/u06
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/or1263u06    284.00    187.05   35%      118     1% /ora/fs1263/u06

If in case you encounter an error message:

0516-787 extendlv: Maximum allocation for logical volume or1263u06
is 1024.

Check on the maximum LPs for the Logical Volume – this must be increased to accomodate the new size. Where LPs = LV in MB / LP in MB then change the maximum LP to the ouput:

[[email protected]] / > chlv -x 2048 or1263u06

There you have it from start to finish with some troubleshooting tips.

See you on my next note!!!