AIX - How to extend JFS filesystem
Article Number: 231 | Rating: 5/5 from 4 votes | Last Updated: Fri, Jun 8, 2018 9:22 PM
AIX - How to extend JFS filesystem
JFS on AIX machines can be extend online if needed.
To do so follow the steps below.
1. Identify the filesystem you want to extend.
Main thing we want to find out is on which logical volume it is using.
======================================================================
root@server # df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2162688 1202732 45% 24199 3% /
/dev/hd2 4521984 1029652 78% 62093 6% /usr
/dev/hd9var 655360 216404 67% 23739 15% /var
/dev/hd3 851968 810960 5% 275 1% /tmp
/dev/hd1 65536 47976 27% 362 3% /home
/proc - - - - - /proc
/dev/hd10opt 1376256 660400 53% 5555 2% /opt
/dev/locallv 32178176 4725020 86% 102939 2% /local
======================================================================
2. Take example to extend /local. It is under logical volume locallv.
Find out which volume group locallv reside on.
======================================================================
root@pat2011 # lslv locallv
LOGICAL VOLUME: locallv VOLUME GROUP: rootvg
LV IDENTIFIER: 00c4b81e00004c000000014134478035.9 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 584 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 491 PPs: 491
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: center UPPER BOUND: 4
MOUNT POINT: /local LABEL: /local
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no
======================================================================
3. Find out if the volume group it resides on has enough free space to extend [free PP].
======================================================================
root@server # lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 00c4b81e00004c000000014134478035
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 714 (45696 megabytes)
MAX LVs: 256 FREE PPs: 13 (832 megabytes)
LVs: 14 USED PPs: 701 (44864 megabytes)
OPEN LVs: 12 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
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
PV RESTRICTION: none INFINITE RETRY: no
======================================================================
4. If it has enough space, proceed to extend using below command.
In this example we want to extend 10MB to /local.
======================================================================
root@server # chfs -a size=+10M /local
======================================================================
To do so follow the steps below.
1. Identify the filesystem you want to extend.
Main thing we want to find out is on which logical volume it is using.
======================================================================
root@server # df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2162688 1202732 45% 24199 3% /
/dev/hd2 4521984 1029652 78% 62093 6% /usr
/dev/hd9var 655360 216404 67% 23739 15% /var
/dev/hd3 851968 810960 5% 275 1% /tmp
/dev/hd1 65536 47976 27% 362 3% /home
/proc - - - - - /proc
/dev/hd10opt 1376256 660400 53% 5555 2% /opt
/dev/locallv 32178176 4725020 86% 102939 2% /local
======================================================================
2. Take example to extend /local. It is under logical volume locallv.
Find out which volume group locallv reside on.
======================================================================
root@pat2011 # lslv locallv
LOGICAL VOLUME: locallv VOLUME GROUP: rootvg
LV IDENTIFIER: 00c4b81e00004c000000014134478035.9 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 584 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 491 PPs: 491
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: center UPPER BOUND: 4
MOUNT POINT: /local LABEL: /local
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no
======================================================================
3. Find out if the volume group it resides on has enough free space to extend [free PP].
======================================================================
root@server # lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 00c4b81e00004c000000014134478035
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 714 (45696 megabytes)
MAX LVs: 256 FREE PPs: 13 (832 megabytes)
LVs: 14 USED PPs: 701 (44864 megabytes)
OPEN LVs: 12 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
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
PV RESTRICTION: none INFINITE RETRY: no
======================================================================
4. If it has enough space, proceed to extend using below command.
In this example we want to extend 10MB to /local.
======================================================================
root@server # chfs -a size=+10M /local
======================================================================