We had a new Oracle installation on an AIX 6.1 Power7 server. Our organization doesn’t have an AIX admin. So to faciliate the lack of resources, I decided to be the makeshift Aix admin and create the mountpoints for the Oracle installation. It was easier than I thought. The Smitty tool is very easy and powerful in doing day-to-day tasks on Aix.
The local hard disks can be found at /dev/hdisk* location. First we will create a Volume group.
1. Create Logical Volume Group
mkvg -y oradata hdisk2
2. Create Logical Volume
prmdb[/dev] # mklv -t jfs2log oradata 1 loglv01
3. List the volume group (our new volume group is called oradata)
prmdb[/dev] # lsvg rootvg oravg oradata
4. Check the status of the volume group
prmdb[/dev] # lsvg -l oradata oradata: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv01 jfs2log 1 1 1 closed/syncd N/A
5. Goto smitty and create the journal filesystem for the logical volume we just created.
prmdb[/dev] # smitty jfs2 - Add an Enhanced Journaled File System - Select the Volume Group Name "oradata" we previously created - Put the unit size in your choice of megabytes or gigabytes(to find out size command is "lsvg oradata" - Select mount at restart as yes - Save and Exit prmdb[/dev] # lsvg rootvg oravg oradata prmdb[/dev] # lsvg oradata VOLUME GROUP: oradata VG IDENTIFIER: 00f7abf000004c000000013b046eb8c2 VG STATE: active PP SIZE: 128 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 799 (102272 megabytes) MAX LVs: 256 FREE PPs: 798 (102144 megabytes) LVs: 1 USED PPs: 1 (128 megabytes) OPEN LVs: 0 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: 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 prmdb[/dev] # smitty jfs2 Create the file system as "Add a new enchanced journal filesystem" New File System size is 207618048 COMMAND STATUS Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. File system created successfully. 103805652 kilobytes total disk space. New File System size is 207618048 List all mounted file systems from smitty Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/hd4 -- / jfs2 4194304 rw yes no /dev/hd1 -- /home jfs2 1048576 rw yes no /dev/hd2 -- /usr jfs2 6291456 rw yes no /dev/hd9var -- /var jfs2 6291456 rw yes no /dev/hd3 -- /tmp jfs2 6291456 rw yes no /dev/hd11admin -- /admin jfs2 262144 rw yes no /proc -- /proc procfs -- rw yes no /dev/hd10opt -- /opt jfs2 2097152 rw yes no /dev/livedump -- /var/adm/ras/livedump jfs2 524288 rw yes no /dev/cd0 -- /cdrom cdrfs -- ro no no /dev/locallv -- /usr/local jfs2 1048576 rw yes no /dev/fslv00 -- /oracle jfs2 102760448 rw yes no /dev/fslv01 -- /oradata jfs2 207618048 rw yes no
6. Create a mount point and mount the filesystem on it (Check the device name from the above entry in smitty)
prmdb[/dev] # mkdir /oradata prmdb[/dev] # mount /dev/fslv01 /oradata prmdb[/dev] # df -g Filesystem GB blocks Free %Used Iused %Iused Mounted on /dev/hd4 2.00 1.80 11% 10247 3% / /dev/hd2 3.00 0.43 86% 56419 36% /usr /dev/hd9var 3.00 2.63 13% 8462 2% /var /dev/hd3 3.00 0.74 76% 6017 4% /tmp /dev/hd1 0.50 0.39 23% 60 1% /home /dev/hd11admin 0.12 0.12 1% 5 1% /admin /proc - - - - - /proc /dev/hd10opt 1.00 0.69 32% 9968 6% /opt /dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump /dev/locallv 0.50 0.50 1% 128 1% /usr/local /dev/fslv00 49.00 38.92 21% 5661 1% /oracle /dev/fslv01 99.00 98.98 1% 4 1% /oradata
7. Test the mountpoint by creating a text file
prmdb[/dev] # cd /oradata prmdb[/oradata] # touch abc.txt prmdb[/oradata] # rm -rf abc.txt
8. Check the entries in the filesystems file. if it doesnt exists then create it
prmdb[/oradata] # vi /etc/filesystems prmdb[/oradata] # /oradata: dev = /dev/fslv01 vfs = jfs2 log = /dev/loglv02 mount = true options = rw account = false
And Voila your done configuring a persistent file system using the JFS2 filesystem on Aix for your oracle installation. From their on it is a standard Oracle installation with creating users, groups etc.
—————————————————————————————————-
2 comments
Nice post. If using zero-byte offset see my document at: http://linuxpassion2.wordpress.com/2012/07/09/aix-lv-creation-and-the-zero-byte-attribute/
Additionally, the command to check to see what VG type you have is:
“readvgda hdisk# | grep type | head -1”
The above command displays VG type.
svg = Scalable, bigvg = big, smallvg = Original
Thanks smurphy. I’m just going through your blog.