Saturday, June 27, 2009

Oracle AS Guard cloning - Add MT instance using Oracle ASGuard

Oracle AS Guard cloning

Please see my previous thread on how to setup the Oracle AS Guard setup.

In this thread i am posting how to install MT instance (Portal and Wireless option) and clone this newly installed MT instance to the standby instance.

Even if the primary node is unavailable (primary node is not reachable), you can still switch over to the seconday node (manual switchover). I have tested this and it perfectly works fine.OracleAS guard is more flexible.

The MT cloning took 10 min and switch over took 3 min.
In case of swithover situation,your cutover time would be approx 3-5 min.

With the help of DNS switch and/or LBR, the FO or SO option will be very transparent to the users/other applications.

Caution -
-------

Be little cautious using this option for your Oracle IAS environment as Active/Passive cluster.Without proper understanding of this process, you may corrupt the AS Guard setup.

This feature has to be completely tested before using it in a production environment.
Steps
-----
1.Keep the primary and standby instances up and running (Both instances running only Infrastructure) - ie Oracle AS Guard is setup and active for the infra instance.
2.Install MT (portal and Wireless option) on to the first instance(Primary)
3.Clone the newly added MT instance to the standby instance (DSA port should same as the primary DSA).start the asgctl from MT instance (not from infra home)
4.If this clone is successfull , veryify the topology and confirm everything is fine.
5.Now test the switchover is possible
6.Switch back to the primary node

on Primary node
===============
After the MT install, stop all the MT opmn process

connect to asgctl

connect to primary database

clone the MT instance to the standby instance.

ASGCTL> clone instance mt.ias1.ushasuji.com to rinfra
Generating default policy for this operation

IAS1:7891
Clone Instance

IAS1:7891 (home /u01/oracle/product/mt)
Running configure option in bkp_restore script.
Running node_backup prepare option in bkp_restore script. This may take a few minutes
Running node_backup image_backup option in bkp_restore script. This may take a few minutes
Please run /u01/oracle/product/mt/backup_restore/brHome12228823ba8.sh as root. Enter "Yes" after the script is completed successfully, "No" otherwise. Yes or No
yes

ias1 192.168.1.16:7891 (home /u01/oracle/product/mt)
Copying backup file "/u01/oracle/product/loha/mt/as_mt.ias1.ushasuji.com_2009-06-28_17-04-03.img" from "192.168.1.15" [192.168.1.15] to "192.168.1.16" at "/u01/oracle/product/loha/mt/as_mt.ias1.ushasuji.com_2009-06-28_17-04-03.img"
Unpacking image backup at target host. This may take a few minutes
Running node_restore sys_init option in bkp_restore script.
Please run /u01/oracle/product/mt/backup_restore/brHome122283ed9fe.sh as root. Enter "Yes" after the script is completed successfully, "No" otherwise. Yes or No
yes
Running node_restore inst_register option in bkp_restore script.
Please run /u01/oracle/product/mt/backup_restore/brHome122283ed9fe.sh as root. Enter "Yes" after the script is completed successfully, "No" otherwise. Yes or No
yes
ASGCTL>

Check everything is copied on to the standby MT home.It may prompt to run the copy script twice as root user.

This clone process will stop the MR database istance and all the Infra/MT opmn process on node1 and starts in node2.I mean the current primary node becomes standby and old standby becomes primary. So easy .... All is taken care automatically by Oracle AG Guard.

If no errors , then you are all to test the switchover.

From Primary Node
-------------------

Now switchover both infrastructure and Mid Tier applications to standby node - Rinfra

ASGCTL> switchover topology to rinfra

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Connecting to the primary database ias.ushasuji.com
Gathering information from the primary database ias.ushasuji.com

ias1:7891 (home /u01/oracle/product/mt)
Shutting down component HTTP_Server
Shutting down component WebCache
Shutting down component OC4J
Shutting down component dcm-daemon
Shutting down component LogLoader

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Running emctl command: "/u01/oracle/product/infra/bin/emctl status iasconsole".
Shutting down component OID
Shutting down component HTTP_Server
Shutting down component OC4J
Shutting down component dcm-daemon
Shutting down component LogLoader

IAS1:7891 (home /u01/oracle/product/mt)
Shutting down each instance in the topology
Shutting down component HTTP_Server
Shutting down component WebCache
Shutting down component OC4J
Shutting down component dcm-daemon
Shutting down component LogLoader

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Running emctl command: "/u01/oracle/product/infra/bin/emctl status iasconsole".
Shutting down component OID
Shutting down component HTTP_Server
Shutting down component OC4J
Shutting down component dcm-daemon
Shutting down component LogLoader

IAS1:7891 (home /u01/oracle/product/mt)
Synchronizing topology
Synchronizing each instance in the topology to standby topology
Starting backup of topology ""
Backing up and copying data to the standby topology
Backing up each instance in the topology
Starting backup of instance "mt.ias1.ushasuji.com"
Configuring the backup script

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Starting backup of instance "infra.ias1"
Configuring the backup script
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Performing configuration ...
Configuration completed successfully !!!
Backing up the instance configuration files. This may take a few minutes

IAS1:7891 (home /u01/oracle/product/mt)
Backing up the instance configuration files. This may take a few minutes
Deleted directory "/u01/oracle/product/mt/dsa/backup".

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Deleted directory "/u01/oracle/product/infra/dsa/backup".
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Backing up configuration files ...
Warning(s) during backup - please check /u01/oracle/product/infra/dsa/backup/log/2009-06-28_17-46-19_config_bkp.log
Configuration backup archive is /u01/oracle/product/infra/dsa/backup/config_bkp_2009-06-28_17-46-19.jar
Configuration backup completed with warning(s) logged in
file /u01/oracle/product/infra/dsa/backup/log/2009-06-28_17-46-19_config_bkp.log

IAS1:7891 (home /u01/oracle/product/mt)
Copying backup file "/u01/oracle/product/mt/dsa/backup/config_bkp_2009-06-28_17-46-19.jar" from "IAS1" [192.168.1.15] to "192.168.1.16" at "/u01/oracle/product/mt/dsa/backup/mt.ias1.ushasuji.com/config_bkp_2009-06-28_17-46-19.jar"

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Copying backup file "/u01/oracle/product/infra/dsa/backup/config_bkp_2009-06-28_17-46-19.jar" from "IAS1" [192.168.1.15] to "192.168.1.16" at "/u01/oracle/product/infra/dsa/backup/infra.ias1/config_bkp_2009-06-28_17-46-19.jar"
Copying backup catalog file /u01/oracle/product/infra/backup_restore/data/catalog.txt from IAS1 [192.168.1.15] to 192.168.1.16

IAS1:7891 (home /u01/oracle/product/mt)
Copying backup catalog file /u01/oracle/product/mt/backup_restore/data/catalog.txt from IAS1 [192.168.1.15] to 192.168.1.16

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Completed backup of instance "infra.ias1"

IAS1:7891 (home /u01/oracle/product/mt)
Completed backup of instance "mt.ias1.ushasuji.com"
Starting restore of topology ""
Restoring data to the standby topology
Restoring each instance in the topology

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Copying backup file "/u01/oracle/product/infra/dsa/backup/infra.ias1/config_bkp_2009-06-28_17-46-19.jar" from "192.168.1.16" to "ias1" [192.168.1.16] at "/u01/oracle/product/infra/dsa/backup/config_bkp_2009-06-28_17-46-19.jar"

ias1:7891 (home /u01/oracle/product/mt)
Copying backup file "/u01/oracle/product/mt/dsa/backup/mt.ias1.ushasuji.com/config_bkp_2009-06-28_17-46-19.jar" from "192.168.1.16" to "ias1" [192.168.1.16] at "/u01/oracle/product/mt/dsa/backup/config_bkp_2009-06-28_17-46-19.jar"

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Deleting backup file "/u01/oracle/product/infra/dsa/backup/infra.ias1/config_bkp_2009-06-28_17-46-19.jar"

ias1:7891 (home /u01/oracle/product/mt)
Deleting backup file "/u01/oracle/product/mt/dsa/backup/config_bkp_2009-06-28_17-46-19.jar"
Starting restore of instance "mt.ias1.ushasuji.com"

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Starting restore of instance "infra.ias1"

ias1:7891 (home /u01/oracle/product/mt)
Configuring the backup script

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Configuring the backup script

ias1:7891 (home /u01/oracle/product/mt)
Restoring the instance configuration files. This may take a few minutes

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Performing configuration ...
Configuration completed successfully !!!
Restoring the instance configuration files. This may take a few minutes
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Restoring configuration files from backup 2009-06-28_17-46-19 ...
Configuration file restore completed successfully !!!
Running opmnctl reload command: "/u01/oracle/product/infra/opmn/bin/opmnctl reload".

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
Starting backup/synchronization of database "ias.ushasuji.com"

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Starting restore/synchronization of database "ias.ushasuji.com"

IAS1:7891
Synchronizing topology completed successfully

IAS1 192.168.1.15:7890
Connecting to the primary database ias.ushasuji.com
Gathering information from the primary database ias.ushasuji.com
Switchover - init.

ias1 192.168.1.16:7890
Switchover - init.

IAS1 192.168.1.15:7890
Switchover - primary preparing.

ias1 192.168.1.16:7890
Switchover - standby preparing.
Stopping Job Queue Scheduler.
Stopping Advanced Queue Time Manager.
Starting managed recovery in the standby database.

IAS1 192.168.1.15:7890
Switchover - primary processing.
Active user sessions detected
The primary database is ready to switchover
Switching over the primary database to the standby role
Shutting down the old primary database
Issuing "shutdown immediate;" to shutdown the database
Starting up the old primary database as the new standby
Issuing "startup nomount;" to start the database
Old primary database now running as the new standby

ias1 192.168.1.16:7890
Switchover - standby processing.
Getting the switchover status from the database.
Switching over the standby database to the primary role.
Shutting down the new primary database.
Issuing "shutdown immediate;" to shutdown the database
Starting up the new primary database.
Issuing "startup open;" to start the database
Switchover - standby finishing.
Enabling the archive destination in the new primary database.
Starting log archiving in the new primary database.

IAS1 192.168.1.15:7890
Switchover - primary finishing.
Deferring the archive destination in the new standby database.
Enabling managed recovery in the new standby database.

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
Running opmnctl reload command: "/u01/oracle/product/infra/opmn/bin/opmnctl reload".
Starting component OID
Starting component dcm-daemon
Configuring the backup script
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Performing configuration ...
Configuration completed successfully !!!
Executing restore_config -F DCM-resyncforce option in bkp_restore.pl script
Oracle Application Server Backup/Recovery Tool 10g (10.1.2.0.2)
Copyright (c) 2004, 2005, Oracle. All rights reserved.

Resynchronizing instance with DCM repository ...
Running opmnctl reload command: "/u01/oracle/product/infra/opmn/bin/opmnctl reload".
Executing opmnctl startall command

ias1:7891 (home /u01/oracle/product/mt)
Starting component dcm-daemon
Configuring the backup script
Executing restore_config -F DCM-resyncforce option in bkp_restore.pl script
Executing opmnctl startall command

ias1:7891
HA directory exists for instance mt.ias1.ushasuji.com

ias1 192.168.1.16:7890 (home /u01/oracle/product/infra)
HA directory exists for instance infra.ias1

IAS1:7891
HA directory exists for instance mt.ias1.ushasuji.com

IAS1 192.168.1.15:7890 (home /u01/oracle/product/infra)
HA directory exists for instance infra.ias1

ias1 192.168.1.16:7890
Verifying that the topology is symmetrical in both primary and standby configuration
Switchover topology to standby host completed successfully


From node2 (new primary node)
---------------------------

try to switchover back to the original primary node

Monday, June 22, 2009

OPMN wont start up after successfull installation of Oracle Portal Mid Tier - Release 10.1.2.0.2

After successful installation of Oracle Portal , i stopped the all the IAS components using opmnctl - No errors.
But when i tried to start the opmn proces - during Portal Mid tier clonig, got into this error.

RCV: Transport endpoint is not connected Communication error with the OPMN server local port. Check the OPMN log files


I am even not able to start the OPMN process.

opmnctl start gave me the same error

While troubleshooting the issue, i found almost 35 process linked to MT opmn process.

like ,
/u01/oracle/product/mt/opmn/bin/opmn -d

After killing all these process i am able to start opmn process.


Could be another bug in Oracle iAS

Wednesday, June 17, 2009

Oracle Portal 10.1.2.0.2 Clonig

Will post soon

All about LVM's - Small Demo

All about LVM's
-----------------

Because of the wide technolgy today, i feel DBA should have some knowledge on hardware and OS knowledge.

I am a big fan of LVM's.I have been working on LVM's (including Veritas LVM/Volume manager and Solstice DiskSuite in Solaris ) for the past 10 years.Veritas used to be little complex those days,but any more today.

I had an opportunity to work on Veritas Volume Manager and LVM's (approx 8 years ago , for a client called Auripay at Cambridge).I used to hot swap the SCSI drives and test the VM's groups.It was so intresting to see the VM groups swaping to different nodes.Prasad putta (MD of Auripay , now he is VP at Oatsystems) used to encourage me and given me full freedom on this implementation/testing.Got a very good exposure on veritas there.

I have done all my home testing with LVM's only - not just with regular ext2 FS. Because it gives me the flexibility to add more space to the existing volumes as i needed and additionally i do see much better system performance.


Just i want to share my small Linux LVM experience (quite simple) with Other DBA's

Demo
----------

I created a small device of 8GB size

After login just find out the device name , here it is sdd.

you can use the dmesg command to find this.


SCSI device sdd: 16777216 512-byte hdwr sectors (8590 MB)
sdd: cache data unavailable
sdd: assuming drive cache: write through
SCSI device sdd: 16777216 512-byte hdwr sectors (8590 MB)
sdd: cache data unavailable
sdd: assuming drive cache: write through
sdd: unknown partition table
Attached scsi disk sdd at scsi0, channel 0, id 3, lun 0
Fusion MPT SAS Host driver 3.02.62.01rh
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: sda3: orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 115623
EXT3-fs: sda3: 1 orphan inode deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: Disabled at runtime.
SELinux: Unregistering netfilter hooks
inserting floppy driver for 2.6.9-34.EL
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
vmxnet: module license 'unspecified' taints kernel.
VMware vmxnet virtual NIC driver release 1.0.1 build-29996
ACPI: PCI interrupt 0000:00:11.0[A] -> GSI 10 (level, low) -> IRQ 10
Found vmxnet/PCI at 0x1424, irq 10.
vmxnet: numRxBuffers=(100*24) numTxBuffers=(100*64) driverDataSize=9000
divert: allocating divert_blk for eth0
eth0: vmxnet ether at 0x1424 assigned IRQ 10.
ACPI: PCI interrupt 0000:00:12.0[A] -> GSI 9 (level, low) -> IRQ 9
Found vmxnet/PCI at 0x14a4, irq 9.
vmxnet: numRxBuffers=(100*24) numTxBuffers=(100*64) driverDataSize=9000
divert: allocating divert_blk for eth1
eth1: vmxnet ether at 0x14a4 assigned IRQ 9.
ACPI: PCI interrupt 0000:00:13.0[A] -> GSI 5 (level, low) -> IRQ 5
Found vmxnet/PCI at 0x1824, irq 5.
vmxnet: numRxBuffers=(100*24) numTxBuffers=(100*64) driverDataSize=9000
divert: allocating divert_blk for eth2
eth2: vmxnet ether at 0x1824 assigned IRQ 5.
pcnet32.c:v1.31 29.04.2005 tsbogend@alpha.franken.de
ACPI: PCI interrupt 0000:00:14.0[A] -> GSI 11 (level, low) -> IRQ 11
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
USB Universal Host Controller Interface driver v2.2
ACPI: PCI interrupt 0000:00:07.2[D] -> GSI 9 (level, low) -> IRQ 9
uhci_hcd 0000:00:07.2: UHCI Host Controller
uhci_hcd 0000:00:07.2: irq 9, io base 00001060
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
NET: Registered protocol family 10
Disabled Privacy Extensions on device c0378f60(lo)
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
ip_tables: (C) 2000-2002 Netfilter core team
vmxnet_init_ring: offset=9000 length=9000
vmxnet_init_ring: offset=9000 length=9000
ip_tables: (C) 2000-2002 Netfilter core team
vmxnet_init_ring: offset=9000 length=9000
ACPI: AC Adapter [ACAD] (on-line)
ACPI: Power Button (FF) [PWRF]
eth0: no IPv6 routers present
eth1: no IPv6 routers present
eth2: no IPv6 routers present
EXT3 FS on sda3, internal journal
device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel@redhat.com
cdrom: open failed.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1534196k swap on /dev/sda2. Priority:-1 extents:1
IA-32 Microcode Update Driver: v1.14
microcode: No new microdata for cpu 0
IA-32 Microcode Update Driver v1.14 unregistered
parport0: PC-style at 0x378 [PCSPP,TRISTATE]
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-2
iscsi-sfnet: Control device major number 254
OCFS2 Node Manager 1.2.3 Wed Jul 26 12:04:10 PDT 2006 (build 56074a7e99f767e0530 6907521c8ea25)
OCFS2 DLM 1.2.3 Wed Jul 26 12:04:10 PDT 2006 (build 05157a797e82010a31dfd4c78548 4fe9)
OCFS2 DLMFS 1.2.3 Wed Jul 26 12:04:11 PDT 2006 (build 05157a797e82010a31dfd4c785 484fe9)
OCFS2 User DLM kernel interface loaded
i2c /dev entries driver
ASM: oracleasmfs mounted with options:
ASM: maxinstances=0
SCSI device sdb: 167772160 512-byte hdwr sectors (85899 MB)
sdb: cache data unavailable
sdb: assuming drive cache: write through
sdb: unknown partition table
SCSI device sdc: 96468992 512-byte hdwr sectors (49392 MB)
sdc: cache data unavailable
sdc: assuming drive cache: write through
sdc: unknown partition table
SCSI device sdd: 16777216 512-byte hdwr sectors (8590 MB)
sdd: cache data unavailable
sdd: assuming drive cache: write through
sdd: unknown partition table
parport0: PC-style at 0x378 [PCSPP,TRISTATE]
lp0: using parport0 (polling).
lp0: console ready
ip_tables: (C) 2000-2002 Netfilter core team
vmxnet_init_ring: offset=9000 length=9000
eth0: no IPv6 routers present
[root@Apps3 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Now create 2 partitions using fdisk utility
-------------------------------------------

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): +4000M

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (488-1044, default 488):
Using default value 488
Last cylinder or +size or +sizeM or +sizeK (488-1044, default 1044):
Using default value 1044

Command (m for help): p

Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 487 3911796 83 Linux
/dev/sdd2 488 1044 4474102+ 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

First Create a physical Volume on first partition
-------------------------------------------------

[root@Apps3 ~]# pvcreate /dev/sdd1 ---> First Partition
Physical volume "/dev/sdd1" successfully created

next create a Volume group on top of the physical volume just (/dev/sdd1) created
--------------------------------------------------------------------------------
[root@Apps3 ~]# vgcreate volgrp_1 /dev/sdd1
Volume group "volgrp_1" successfully created

See the Phyical volume structure
---------------------------------

[root@Apps3 ~]# pvdisplay /dev/sdd1
--- Physical volume ---
PV Name /dev/sdd1
VG Name volgrp_1
PV Size 3.73 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 954
Free PE 954
Allocated PE 0
PV UUID v3tkkp-Wsa2-yk3s-lhwG-wlkn-F8g5-2GcfGS

View the Volume group structure just created
-------------------------------------------

[root@Apps3 ~]# vgdisplay volgrp_1
--- Volume group ---
VG Name volgrp_1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.73 GB
PE Size 4.00 MB
Total PE 954
Alloc PE / Size 0 / 0
Free PE / Size 954 / 3.73 GB
VG UUID zUAAMY-9Z7L-4CsQ-HUKK-p37P-TlvR-XzfUKW

[root@Apps3 ~]# fdisk /dev/sdd -l

Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 487 3911796 83 Linux
/dev/sdd2 488 1044 4474102+ 83 Linux

To increase the VG size, just add the partition /dev/sdd2 to the existing volume group
-----------------------------------------------------------------------------------------
[root@Apps3 ~]# pvcreate /dev/sdd2 --> create this before adding
Physical volume "/dev/sdd2" successfully created
[root@Apps3 ~]# vgextend volgrp_1 /dev/sdd2
Volume group "volgrp_1" successfully extended

Now you see the Volume group size increased from 4GB to 8GB
------------------------------------------------------------
[root@Apps3 ~]# vgdisplay volgrp_1
--- Volume group ---
VG Name volgrp_1
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 7.99 GB
PE Size 4.00 MB
Total PE 2046
Alloc PE / Size 0 / 0
Free PE / Size 2046 / 7.99 GB
VG UUID zUAAMY-9Z7L-4CsQ-HUKK-p37P-TlvR-XzfUKW

Now remove the physical volume from the extended volume group
-------------------------------------------------------------
[root@Apps3 ~]# vgreduce volgrp_1 /dev/sdd2
Removed "/dev/sdd2" from volume group "volgrp_1"

See the size is reduced to 4GB now
----------------------------------

[root@Apps3 ~]# vgdisplay volgrp_1
--- Volume group ---
VG Name volgrp_1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.73 GB
PE Size 4.00 MB
Total PE 954
Alloc PE / Size 0 / 0
Free PE / Size 954 / 3.73 GB
VG UUID zUAAMY-9Z7L-4CsQ-HUKK-p37P-TlvR-XzfUKW

Create a logical volume now on top of the volume group - volgrp_1 size 200MB
------------------------------------------------------

[root@Apps3 ~]# lvcreate -n logvol_1 --size 200M volgrp_1
Logical volume "logvol_1" created

See the structure of LVM just created
------------------------------------

[root@Apps3 ~]# lvdisplay /dev/volgrp_1/logvol_1
--- Logical volume ---
LV Name /dev/volgrp_1/logvol_1
VG Name volgrp_1
LV UUID jwQVYp-0K5H-iJLW-JO3n-CPn4-nnyI-ibglYZ
LV Write Access read/write
LV Status available
# open 0
LV Size 200.00 MB
Current LE 50
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

[root@Apps3 ~]# vgdisplay volgrp_1|grep "Total PE"
Total PE 954

Now you are ready to create any FS on to this LVM - here we are creating ext2 FS
---------------------------------------------------------------------------------
[root@Apps3 ~]# mkfs /dev/volgrp_1/logvol_1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
51200 inodes, 204800 blocks
10240 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
25 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

mount the LVM -
--------------
[root@Apps3 ~]# mount /dev/volgrp_1/logvol_1 /u01
[root@Apps3 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 3241580 2404772 672144 79% /
/dev/sda1 396623 13530 362612 4% /boot
none 676380 0 676380 0% /dev/shm
/dev/mapper/volgrp_1-logvol_1
198337 1550 186547 1% /u01


All set to create any Oracle installations on top of this LVM now.

Hope this helps

Oracle R12 upgrade

Will briefly cover the upgrade of EBUS R11i to R12.

Oracle R12 and Oracle IAS integration

Will post soon....

Oracle R12 Forms Customization

Will post soon...