Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, October 10, 2012

Preparing Raw Devices for RAC on OEL 5u8

This demo is done with an OEL 5u8 x86_64 running as a guest in VirtualBox 4.2 on a Windows 7 host.

Add 3 new fixed-size VDI files to this VM:

ASM1 - 16 GB
ASM2 - 16 GB
OracleInstall - 12 GB

ASM1 and ASM2 will be used for raw devices for RAC.

Create partition tables on /dev/sdb (ASM1) and /dev/sdc (ASM2):


Create raw devices using these partitions.

Add udev raw device binding rules to /etc/udev/rules.d/60-raw.rules:

ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"

Add udev raw device permission rules to /etc/udev/rules.d/65-raw-permissions.rules:

KERNEL=="raw1", OWNER="ttadmin", GROUP="oinstall", MODE="660"
KERNEL=="raw2", OWNER="ttadmin", GROUP="oinstall", MODE="660"

Now restart udev:


Repeat above steps on all other nodes belong to the same RAC.

References:


Saturday, September 22, 2012

Disabling SELinux and iptables in RHEL 6

There is no way to disable SELinux and iptables (firewall) during the Setup Agent in RHEL 6. So you need to do it manually as root.

Disabling SELinux
Modify the /etc/selinux/config file to disable SELinux:
SELINUX=disabled

Disabling iptables
Invoke the GUI tool "system-config-firewall" to disable firewall.

Monday, November 28, 2011

A Patch to Keep the Resizing of tmps Surviving Through Reboot

After a fresh installation of RHEL 6.1, I needed to adjust the size of tmpfs. However, I found it is a little more complicated than just add "size" option in /etc/fstab for tmpfs. The setting of "size" in /etc/fstab doesn't keep through system reboot. Then I found following patch against /etc/rc.d/rc.sysinit which can make it persistent:

[root@bbrh6u1src ~]# diff -u /etc/rc.d/rc.sysinit.orig /etc/rc.d/rc.sysinit
--- /etc/rc.d/rc.sysinit.orig   2011-04-19 10:04:51.000000000 -0400
+++ /etc/rc.d/rc.sysinit        2011-11-28 08:33:53.166819280 -0500
@@ -487,7 +487,7 @@
        mount -f /proc >/dev/null 2>&1
        mount -f /sys >/dev/null 2>&1
        mount -f /dev/pts >/dev/null 2>&1
-       mount -f /dev/shm >/dev/null 2>&1
+       #mount -f /dev/shm >/dev/null 2>&1
        mount -f /proc/bus/usb >/dev/null 2>&1
 fi

@@ -495,7 +495,7 @@
 # mounted). Contrary to standard usage,
 # filesystems are NOT unmounted in single user mode.
 if [ "$READONLY" != "yes" ] ; then
-       action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
+       action $"Mounting local filesystems: " mount -a -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 else
        action $"Mounting local filesystems: " mount -a -n -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 fi

References:
https://www.redhat.com/archives/rhelv6-list/2011-February/msg00081.html