Tuesday, May 6, 2008

AIX grow and add new jfs largefile filesystem

Requirement
1. Expand file-system
/db/tst4/dbf2 – 11 GB (Existing size is 2 GB)
/db/tst4/temp – 7 GB (Existing size is 0.5 GB)
/db/tst4/undo – 7 GB (Existing size is 0.5 GB)

2. Create file-system
/db/tst4/dbf3 – 11 GB

The Filesystems should allow large files [ > 2Gb];

Pre-implementation checkout
# lsvg hds128vg
VOLUME GROUP: hds128vg VG IDENTIFIER: 00c54e7d00004c00000001175fb130df
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2310 (295680 megabytes)
MAX LVs: 256 FREE PPs: 507 (64896 megabytes)
LVs: 37 USED PPs: 1803 (230784 megabytes)
OPEN LVs: 37 QUORUM: 8 (Enabled)
TOTAL PVs: 14 VG DESCRIPTORS: 14
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 14 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

Implementation Steps
1. #chfs –a size=+9G /db/tst4/dbf4
2. #chfs –a size=+6500M /db/tst4/temp
3. #chfs –a size=+6500M /db/tst4/undo

4. Create new logical volume on cbitdb3:
• Please use smit menu
# smitty mklv <-- Jump straight to "Add a Logical Volume"
Specify hds128vg for the VOLUME GROUP name
Set Logical volume TYPE to jfs

New LV NAME VGName SIZE total LP PV Name
----------------------------------------------------
tst4_dbf3 hdsvg 11 GB - -

5. Create a new Journaled Filesystem with largefile option enabled on previously defined logical volumes. Create and mount it accordingly from smit menu.
# smitty crjfslvbf <-- jumps straight to "Add a Large File Enabled Journaled File System" on a previously defined logical volume

Change the following entry accordingly in the smitty screen:
Mount AUTOMATICALLY at system restart? Yes

LOGICAL VOLUME name MOUNT POINT
-----------------------------------------
tst4_dbf3 /db/tst4/dbf3
* For LV name, use F4 to list out & select the LV to be used.
Select tst4_dbf3

6. Mount new FS
# mkdir /db/tst4/dbf3
Change the permission to “oracle:dba”
# chown –R oracle:dba /db/tst4/dbf3
# mount /db/tst4/dbf3

Review Plan
After created new FS , capture new FS output and verify that new file systems are there:
# df -g /db/tst4/dbf2 , 11GB
# df -g /db/tst4/temp , 7GB
# df -g /db/tst4/undo , 7GB
# df -g /db/tst4/dbf3 , 11GB

# su – oracle
# cd /db/tst4/dbf3
# touch testfile
# ls –l , make sure can write
# exit