How to create a new Filesystem in IBM AIX server ?

Today we will see how to create a new filesystem in IBM AIX server.

The default filesystem that we create in AIX is JFS i.e Journalling Filesystem, and currently Version 2 of JFS is used.

Lets see how to create the Filesystem step by step.

==================================================================================

1. Create new directory where this filesystem gets mounted.

ngeaix001 --> mkdir /orap01c

 

2. Check out the VG where we want to create filesystem if there is enough space available.

ngeaix001 --> lsvg -L ngoraclevg
VOLUME GROUP: ngoraclevg VG IDENTIFIER: 00cd243700004c000000015a2252d20190
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 11582 (741248 megabytes)
MAX LVs: 256 FREE PPs: 25 (1600 megabytes)
LVs: 5 USED PPs: 11557 (739648 megabytes)
OPEN LVs: 5 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32768 MAX PVs: 1024
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
MIRROR POOL STRICT: off
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no
FS SYNC OPTION: no
ngeaix001 -->

pp count is double of that Lp count.

 

3. In case no space available, get the LUN id of disk and provide to Storage guy to increase the space.

3PAR LUN_WWN=60002ac000000000000018f90000c6090 VV_NAME=oramony_Prodvg_ngeaix001 ARRAY_NAME=NGELT011 950GB

 

4. Scan new increased storage on the VG.

ngeaix001 --> varyonvg ngoraclevg
0516-1434 varyonvg: Following physical volumes appear to be grown in size.
Run chvg command to activate the new space.
hdisk1

ngeaix001 --> chvg -g ngoraclevg

ngeaix001 --> lsvg ngoraclevg
VOLUME GROUP: ngoraclevg VG IDENTIFIER: 00cd243700004c000000015a2252d20190
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 15198 (972672 megabytes)
MAX LVs: 256 FREE PPs: 3641 (233024 megabytes)
LVs: 5 USED PPs: 11557 (739648 megabytes)
OPEN LVs: 5 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32768 MAX PVs: 1024
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
MIRROR POOL STRICT: off
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no
FS SYNC OPTION: no
ngeaix001 -->

 

5. Now create new logical volume of type jfs2 under this VG of size 2240 PP.

ngeaix001 --> mklv -y ora1clv -t jfs2 ngoraclevg 2240
ora1clv

ngeaix001 --> lsvg -l ngoraclevg
ngoraclevg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
oralv jfs2 957 957 1 open/syncd /products/oracle
loglv00 jfs2log 1 1 1 open/syncd N/A
ora1lv jfs2 3533 3533 1 open/syncd /orap01
ora2lv jfs2 3533 3533 1 open/syncd /orap02
ora3lv jfs2 3533 3533 1 open/syncd /orap03
ora1clv jfs2 2240 2240 1 closed/syncd N/A

 

6. Create new filesystem.

ngeaix001 --> crfs -v jfs2 -d ora1clv -m /orap01c -A yes
File system created successfully.
146795956 kilobytes total disk space.
New File System size is 293601280

ngeaix001 --> lsvg -l ngoraclevg
ngoraclevg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
oralv jfs2 957 957 1 open/syncd /products/oracle
loglv00 jfs2log 1 1 1 open/syncd N/A
ora1lv jfs2 3533 3533 1 open/syncd /orap01
ora2lv jfs2 3533 3533 1 open/syncd /orap02
ora3lv jfs2 3533 3533 1 open/syncd /orap03
ora1clv jfs2 2240 2240 1 closed/syncd /orap01c

 

7. Mount the filesystem

ngeaix001 --> mount /orap01c
ngeaix001 --> df -g /orap01c
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/ora1clv 140.00 139.98 1% 4 1% /orap01c
ngeaix001 -->

Leave a Reply

Your email address will not be published.