rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install binutils.x86_64 compat-libstdc++-33.x86_64 compat-libstdc++-33.i686 elfutils-libelf.x86_64 elfutils-libelf-devel.x86_64 \ gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-common.x86_64 glibc-devel.i686 glibc-devel.x86_64 glibc-headers.x86_64 \ ksh.x86_64 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 \ libstdc++.x86_64 libstdc++-devel.x86_64 make.x86_64 sysstat.x86_64 unixODBC.x86_64 unixODBC.i686 unixODBC-devel.i686 \ unixODBC-devel.x86_64 libcap.x86_64 libcap.i686 compat-libcap1.i686 compat-libcap1.x86_64 libcap-devel.x86_64 libcap-devel.i686 \ libcap-ng.i686 libcap-ng.x86_64 libcap-ng-devel.i686 libcap-ng-devel.x86_64 smartmontools perl \ telnet man tigervnc-server.x86_64 xhost unzip twm xterm kernel-devel cifs-utils rpm-build pam.i686 \ rdma ntp sg3_utils wget git pam-devel.i686
groupadd -g 1000 oinstall groupadd -g 1200 dba useradd -u 1100 -g oinstall -G dba grid11g useradd -u 1101 -g oinstall -G dba ora11g passwd grid11g passwd ora11g
yum -y update reboot
Users & FS
# create Oracle SW volumegroup pvcreate /dev/sdb vgcreate orasw_vg /dev/sdb lvcreate -L 9G -n dbhome_11204_lv orasw_vg lvcreate -L 9G -n gridhome_11204_lv orasw_vg lvcreate -L 1.5G -n orabase_11204_lv orasw_vg mkfs.ext4 /dev/mapper/orasw_vg-dbhome_11204_lv mkfs.ext4 /dev/mapper/orasw_vg-gridhome_11204_lv mkfs.ext4 /dev/mapper/orasw_vg-orabase_11204_lv # create groups and user groupadd dba groupadd asmdba groupadd asmoper useradd -g dba -G dba,asmdba,asmoper -m ora11g echo "ora11g:broodi" | chpasswd mkdir -p /appl/oracle/grid mkdir /appl/oracle/db mkdir /appl/orabase chown -R ora11g:dba /appl chmod -R 775 /appl # mount FS cat >> /etc/fstab << EOF /dev/mapper/orasw_vg-dbhome_11204_lv /appl/oracle/db ext4 defaults 0 0 /dev/mapper/orasw_vg-gridhome_11204_lv /appl/oracle/grid ext4 defaults 0 0 /dev/mapper/orasw_vg-orabase_11204_lv /appl/orabase ext4 defaults 0 0 EOF mount -a chown ora11g:dba /appl/oracle/* chown ora11g:dba /appl/orabase chmod 775 /appl/oracle/* chmod 775 /appl/orabase
the rest :
# configure ASM disks cat >> /etc/udev/rules.d/90-asmdisks.rules << EOF KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/\$parent", RESULT=="217c7937a15321520", NAME="asm-disk00", OWNER="ora11g", GROUP="asmdba", MODE="0660" KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/\$parent", RESULT=="23c54da337a53e2ac", NAME="asm-disk01", OWNER="ora11g", GROUP="asmdba", MODE="0660" KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/\$parent", RESULT=="2300143730012855d", NAME="asm-disk02", OWNER="ora11g", GROUP="asmdba", MODE="0660" EOF # reconfigure system services sed -i 's/enforcing/disabled/g' /etc/selinux/config service iptables stop service ip6tables stop service postfix stop chkconfig iptables off chkconfig ip6tables off chkconfig postfix off # setup networking cat >> /etc/hosts <<EOF 192.168.88.21 racdb01 192.168.88.22 racdb02 1.1.1.21 racdb01-priv 1.1.1.22 racdb02-priv 192.168.88.31 racdb01-vip 192.168.88.32 racdb02-vip 192.168.88.37 racdb-scan 192.168.88.38 racdb-scan EOF KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="217c7937a15321520", NAME="asm-disk00", OWNER="ora11g", GROUP="asmdba", MODE="0660" KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="23c54da337a53e2ac", NAME="asm-disk01", OWNER="ora11g", GROUP="asmdba", MODE="0660" KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="2300143730012855d8", NAME="asm-disk02", OWNER="ora11g", GROUP="asmdba", MODE="0660"
Alternatively we can run the following command:
#!/bin/bash #file ~/createOracleAsmUdevRules.sh i=1 # ol6 / rhel6 / centos 6 cmd="/sbin/scsi_id -g -u -d" for disk in sdb sdc sdd sde ; do cat <<EOF >> /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="sd?1", BUS=="scsi", PROGRAM=="$cmd /dev/\$parent", \ RESULT=="`$cmd /dev/$disk`", NAME="asm-disk$i", OWNER="oracle", GROUP="dba", MODE="0660" EOF i=$(($i+1)) done
SCSI_ID doesn't return anything
If the SCSI_ID doesn't return anything there are 2 possibilities
Please correct the above problems and restart the program.