Showing posts with label Linux Admin. Show all posts
Showing posts with label Linux Admin. Show all posts

Oracle LIO and Oracle PIO


  • An Oracle LIO (or logical read call) occurs any time the Oracle kernel requests access to an Oracle block in the database buffer cache. If the kernel cannot find a specified Oracle block in the database buffer cache, then the LIO motivates an Oracle PIO call. In accounting for LIO elapsed times, we do not include the time spent executing the PIO portion of the LIO call. The number of LIO calls for a session is the sum of the values in v$sesstat for the statistics named “db block gets” and “consistent gets.”


  • An Oracle PIO (or physical read call) occurs when the Oracle kernel executes an operating system (OS) read call for an Oracle database block. In accounting for PIO elapsed times, we include only the time that the Oracle kernel spends waiting for the execution of the OS read call. A PIO may or may not engage the service of an actual disk drive; if the OS can fulfill the read call from memory (e.g., disk controller cache or OS buffer cache), then the PIO will be satisfied without actually incurring the latency of a read from disk. For a single OS call that reads multiple blocks, each block counts as one PIO. In accounting for PIO elapsed times, we do not include the time spent executing the LIO that motivated the PIO. The most common type of PIO is counted in the v$sesstat value for the statistic named “physical reads.”

RedHat Linux OS upgradation on Oracle 11gR2 RAC environment


Hi Guys, Two months before I was performed Linux OS upgradation on live production and test environment for one of my big client. Both environments are 2 node RAC configured.


I followed below mentioned steps for OS upgradation,

OS Upgrade Pre-requisites Steps:-

 > Kindly cross check with Oracle and RedHat for license certification matrix
 > Take fullbackup of OS and Database.

OS Upgrade Steps:-

(1) Shutdown DB, DBconsole (if any), Cluster, ASMlib (if any in Linux)

As RDBMS owner id “oracle”:
$ srvctl stop database -d -o immediate #– run once in any node
$ emctl stop dbconsole #– run on all nodes
As UNIX/Linux “root”:
# /bin/crsctl stop crs #– run on all nodes
# /bin/crsctl disable crs #– run on all nodes
# /etc/init.d/oracleasm stop #– run on all nodes
# /etc/init.d/oracleasm disable #– run on all nodes


(2) Backup filesystem for GRID ORACLE_HOME & RDBMS ORACLE_HOME


(3) Upgrade RedHat OS
    > configure RHN (Give Rhn_register command thru root user).
    > You have to give Redhat login user/password and your proxy address & port.
    > RHN will collect your system information then will send that to redhat network.
    > Once RHN configured then give command like #yum update --no plugin (or yum update)
    > It will download latest packages from redhat repository and install automatically, final stage the OS will ask you for reboot the machine.
    > After reboot you can get the latest kernal (using this command check the kernal and redhat os version #uname-a, cat /etc/redhat-release)

(4) Upgrade ASMlib (Download ASM packages based on latest kernal version)

# rpm -Uvh oracleasm-support-xxx
# rpm -Uvh oracleasm-2.6.xxx
# rpm -Uvh oracleasmlib-xxx
# /etc/init.d/oracleasm enable
# /etc/init.d/oracleasm lisdisks

(5) Relink RDBMS ORACLE_HOME Binary

Note: complete full steps in one node, then proceed to next

As RDBMS owner id “oracle”:
$ /bin/relink all

(6) Relink GRID ORACLE_HOME Binary

Note: complete full steps in one node, then proceed to next

As UNIX/Linux “root”:
# cd /crs/install
# ./rootcrs.pl -unlock
As RDBMS owner id “oracle”:
$ cd /bin
$ ./relink all
As UNIX/Linux “root”:
# cd /rdbms/install
# ./rootadd_rdbms.sh
# cd /crs/install
# ./rootcrs.pl –patch

(7) Enable CRS auto-startup and start CRS on all nodes

Note: complete full steps in one node, then proceed to next

As UNIX/Linux “root”:
# /bin/crsctl start crs
# /bin/crsctl enable crs

(8) Double check if DB, instances and all resrouces are ONLINE.

As RDBMS owner id “oracle”:
$ crsctl stat res -t

Reference :: How to Check Whether Oracle Binary/Instance is RAC Enabled and Relink Oracle Binary in RAC [ID 284785.1]


Kindly share your valuable comments... :-)


IP Bonding with Ethernet device Load balancing


Two days before I implemented IP-bonding and Ethernet device load balance for my new server.
I followed the below mentioned steps,

Step-1:

Create bond0 file,

# cd /etc/sysconfig/network-scripts

# vi ifcfg-bond0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
IPADDR=<ip-address>
NETMASK=<subnet-mask>
GATEWAY=<gateway-address>
#PEERDNS=no
BONDING_OPTS="mode=0 miimon=100"
TYPE=BOND

Save the file.

Note:-
BONDING_OPTS="mode=<value> miimon=<value>" --> by using this syntax we can implement load-balance, active-backup, Balance XOR, Broadcast, 802.3ad, Balance TLB, Balance ALB.
mode=0 (Balance Round Robin)
mode=1 (Active backup)
mode=2 (Balance XOR)
mode=3 (Broadcast)
mode=4 (802.3ad)
mode=5 (Balance TLB)
mode=6 (Balance ALB)

Step-2:

Edit ethernet devices file which going to be configure for IP-bonding.

#vi ifcfg-eth1

TYPE=Ethernet
DEVICE=eth1
HWADDR=xx:xx:xx:xx:xx:xx
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
MASTER=bond0
SLAVE=yes
PEERDNS=no

Save the file

Do same thing for same for eth2 device.

Step-3:

Add the entry in below mentioned file,

# vi /etc/modprobe.conf

alias bond0 bonding
options bond0 mode=0 miimon=100

Save the file.

Note:-

Here in options line you have to mention the mode value which is already given in ifcfg-bond0 file.

# modprobe –v bonding

# service network restart

Step-4 :

Verify the ethernet devices status in below mentioned location,

# cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.4.0-2 (October 7, 2008)

Bonding Mode: load balancing (round-robin) ß It’s configured for load balance.
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx

# exit

Thanks for sharing your valuable time J .



Finding shared library dependencies


Using “ldd” command we can able to view the shared library dependencies of particular file.

Example:

[oracle@prodvm bin]$ ldd frmbld
        linux-gate.so.1 =>  (0xffffe000)
        librws.so.0 => /oracle/product/apps/DEV_HOME/lib/librws.so.0 (0xf7b2b000)
        libnn.so.0 => /oracle/product/apps/DEV_HOME/lib/libnn.so.0 (0xf7b1a000)
        libobx.so.0 => /oracle/product/apps/DEV_HOME/lib/libobx.so.0 (0xf78c9000)
        libzrc.so => /oracle/product/apps/DEV_HOME/lib/libzrc.so (0xf78ad000)
        libvgs.so.0 => /oracle/product/apps/DEV_HOME/lib/libvgs.so.0 (0xf77e3000)
        libde.so.0 => /oracle/product/apps/DEV_HOME/lib/libde.so.0 (0xf75f8000)
        libucol.so.0 => /oracle/product/apps/DEV_HOME/lib/libucol.so.0 (0xf75d2000)
        libca.so.0 => /oracle/product/apps/DEV_HOME/lib/libca.so.0 (0xf758e000)
        libuicc.so.0 => /oracle/product/apps/DEV_HOME/lib/libuicc.so.0 (0xf757a000)
        libmma.so.0 => /oracle/product/apps/DEV_HOME/lib/libmma.so.0 (0xf756f000)
        libmmiw.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmiw.so.0 (0xf754a000)
        libmmov.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmov.so.0 (0xf7547000)
        libmmos.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmos.so.0 (0xf752f000)
        libmmoi.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmoi.so.0 (0xf7503000)
        libmmia.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmia.so.0 (0xf7500000)
        libmmft.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmft.so.0 (0xf74fb000)
        libmmcm.so.0 => /oracle/product/apps/DEV_HOME/lib/libmmcm.so.0 (0xf74db000)
        libuihx.so.0 => /oracle/product/apps/DEV_HOME/lib/libuihx.so.0 (0xf74d8000)
        libuc.so.0 => /oracle/product/apps/DEV_HOME/lib/libuc.so.0 (0xf747f000)
        libuipr.so.0 => /oracle/product/apps/DEV_HOME/lib/libuipr.so.0 (0xf7428000)
        libuimotif.so.0 => /oracle/product/apps/DEV_HOME/lib/libuimotif.so.0 (0xf728d000)
        libot.so.0 => /oracle/product/apps/DEV_HOME/lib/libot.so.0 (0xf726b000)
        librem.so.0 => /oracle/product/apps/DEV_HOME/lib/librem.so.0 (0xf7230000)
        libree.so.0 => /oracle/product/apps/DEV_HOME/lib/libree.so.0 (0xf71d9000)
        librec.so.0 => /oracle/product/apps/DEV_HOME/lib/librec.so.0 (0xf71cb000)
        libuiimg.so.0 => /oracle/product/apps/DEV_HOME/lib/libuiimg.so.0 (0xf71ba000)
        libuia.so.0 => /oracle/product/apps/DEV_HOME/lib/libuia.so.0 (0xf718f000)
        libtknqap.so.0 => /oracle/product/apps/DEV_HOME/lib/libtknqap.so.0 (0xf718d000)
[oracle@prodvm bin]$ 

Steps for adding a new tape in tape driver for save backup

Step -1 First open the tape box carefully and don’t keep the tape drive in dusty place.













Step-2 Paste the bar code sticker in tape for tape identification.






















Step-3 Then enter into the data center room and place the tape’s in tape driver.
















The above figure shows before opening the tape rac from tape drive you have to give password for authentication.
Once the password successfully given then we can take the tape rac and place our new tapes in rac.
Step -4 Once the tapes are successfully scanned then we need to allocate the tapes with policy in backup tool. Here we are using Symantech Netbackup tool.


Go to mediaàselect the media option (It will show all tapes which is there in tape drive).

Then select policy in policy option and assign the tape then schedule or run the job immediately.

Here the selected tape are newly added tapes and it’s assigned to filesystem backup policy.

32 bit emulation mode in linux

How to set 32 bit emulation mode in linux 64bit.


During oracle application server IAs 10g (32 bit) installation got below error because we tried in 64 bit OS.

Now we need to change the current terminal session environment to 32 bit OS by using " linux32 bash" command.

Error:



[oracle@rac1 Disk1]$ ./runInstaller

On a 64-bit Linux operating system, Oracle Applicaton Server 10g needs 32-bit emulation mode in this release. Please set 32-bit emulation mode by running following command and restart the installation.
# linux32 bash


Solution:


[oracle@rac1 Disk1]$ linux32 bash

[oracle@rac1 Disk1]$ ./runInstaller

Starting Oracle Universal Installer...