Tuesday, December 28, 2010

/dev/shm

749851.1

MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory filesystem (/dev/shm).

The AMM and HugePages are not compatible. One needs to disable AMM on 11g to be able to use HugePages. See Note 749851.1 for further information.

/dev/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux.

For example, if you have 8GB RAM then remount /dev/shm as follows:
# mount -o remount,size=8G /dev/shm

cluvfy samples

./olsnodes -n

./cluvfy stage -pre crsinst -n node1,node2,node3 -r 11gr1 -verbose >cluvfy_pre.txt

./cluvfy stage -post crsinst -n node1,node2,node3 -verbose > cluvfy_post.txt


./cluvfy stage -post hwos -n node1,node2,node3 -verbose >cluvfy_hwos.txt
--Above display NIC cards subnet info, very useful.
--Storage check may fail for non scci disk e.g EMC etc, that can be ignored as per metalink note#!

"-n all "can be specified for all nodes instead of listing every node.

ifconfig help

ifconfig eth0
View the network settings on the first Ethernet adapter installed in the computer.
ifconfig -a
Display info on all network interfaces on server, active or inactive.
ifconfig eth0 down
If eth0 exists would take it down causing it cannot send or receive any information.
ifconfig eth0 up
If eth0 exists and in the down state would return it back to the up state allowing to to send and receive information.
ifconfig eth0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255
Assign eth0 with the above values for IP, netmask and broadcast address.

Thursday, September 30, 2010

Changing IP or Hostname on Linux

--Linux/OS Installation

IP=10.224.8.151
Subnet Mask=255.255.255.0
Gateway=10.224.8.1

Domain=abc.com
DNS=10.224.8.126
         10.224.8.120

Make sure IP is unused.

Below show IP address associated with eth0(which is primary NIC card)

# ifconfig eth0

Below shows default gateway

# route -n

To Change IP
================

Bringing down a network interface with ifconfig

# ifconfig eth0 down

Bringing up an Ethernet interface with ifconfig

# ifconfig eth0 192.168.99.14 netmask 255.255.255.0 up

Setting the Default Route

# route add default gw 192.168.99.254


To Change Hostnme
===================

Backup and edit the the file /etc/sysconfig/network

HOSTNAME=.

this will be available after a reboot.

a quicker way, in memory change is- edit

Backup and Edit the file /proc/sys/kernel/hostname.

but that won't be saved when you reboot.

Fixing bad fstab entries

How modify fstab when its 'ro' in "repair filesystem" mode ?

When Logged in as "Repair Filesystem" mode at console, by default "/" filessystem is READ only mode.

Remount "/" filesystem with RW option.

# mount -o remount,rw /


Then backup and edit /etc/fstab file for any wrong entries and reboot system again

#init 6

Linux init commands(To bounce server)

Init RUnlevels
====================

0        -        halt
1        -        Single user mode
2        -        Multiuser, without NFS (The same as 3, if you don't have networking)
3        -        Full multiuser mode
4        -        unused
5        -        X11
6        -        Reboot

to Reboot

#init 6

to Shutdown

# init 0

Mount CDROM in Linux

To mount CDROM on Linux

Use following command

Make sure /cdrom folder is available.

# mount -t iso9660 -o ro /dev/cdrom /cdrom

NFS monut notes

fuser -u /gbg

umount /gbg

Manual Mount
==================
mount -F nfs sgtnas:/life_backups /gbg

mount -o rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768 sgtnas:/life_backups /gbg

mount -o hard,vers=3,intr,suid,proto=udp,rsize=32768,wsize=32768 sgtnas:/life_backups /gbg


Auto Mount
=============
In /etc/vfstab, make sure that there is an entry for the backup mount point:

sgtnas:/life_backups -/gbg nfs -yes hard,vers=3,intr,suid,proto=udp,rsize=32768,wsize=32768


Check NFS Mount
======================
showmount -e sgtnas

showmount -e


rpcinfo -u sgtnas nfs

rpcinfo -u sgtnas mountd



rpcinfo -u nfs

rpcinfo -u mountd




mount -o rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768 nfsserver.domain.com:/path/to/remote/mountpoint /local-mountpoint


mount -o hard,vers=3,intr,suid,proto=udp,rsize=32768,wsize=32768 nfsserver.domain.com:/path/to/remote/mountpoint /local-mountpoint

In /etc/vfstab, make sure that there is an entry for the backup mount point:

ausmelb-corp-netappsfiler-tier3:/vol/vol1/dbbackup - /U99 nfs -  yes
             hard,vers=3,intr,suid,proto=udp,rsize=32768,wsize=32768


If you would like your machine to have normal root permissions to a
filesystem, the filesystem must be exported with the option
"root=clientmachine".



The exact checks used for an NFS mounted disk vary between platforms but in general the basic checks will include the following checks


a) The mount table (eg; /etc/mnttab) can be read to check the mount options
b) The NFS mount is mounted with the "hard" option
c) The mount options include rsize>=32768 and wsize>=32768
d) For RAC environments, where NFS disks are supported, the "noac" mount option is used.

JRE    1.6.0_13    C:\Program Files\Java\jre6        true

Running process in background

nohup rman target / cmdfile arch_purge.rcv log arch_purge.log &

nohup rman target / cmdfile arch_bkp.rcv log arch_bkp.log &

Linux RPM notes

Install RPM
==============
# rpm -ivh package.rpm

De-Install RPM
=============
# rpm -e package.rpm

Upgrade RPM
=============

# rpm -Uvh package.rpm

Query RPM
============
# rpm -qa| grep package

List all RPM installed
=======================

# rpm -qa

Unix USe Maint

To add Unix User account
===========================
useradd -g dba -d /export/home/pvaze -m -s /bin/sh -c "unix accnt" pvaze

To change Unix User Default Shell
=================================
usermod -u 100 -s /bin/bash oracle

Tuesday, September 14, 2010

Setting Unix Prompt

The command below, when adding to your .bash_profile or .proifle will make your 
prompt look something like this:
PS1='${LOGNAME}@${HOSTNAME}:${PWD}>'; export PS1
 
You may need to set the HOSTNAME environment variable for the hostname 
part to work, like this:

HOSTNAME=`hostname`; export HOSTNAME