时间:2021-07-01 10:21:17 帮助过:2人阅读
Cause - Insufficient spaceavailable in the selected Disks. At least, 4,342 MB of free space isrequired. Action - Chooseadditional disks such that the total size should be at least 4,342 MB.
Cause - Insufficient spaceavailable in the selected Disks. At least, 8,711 MB of free space isrequired. Action - Chooseadditional disks such that the total size should be at least 8,711 MB.
具体创建过程,直接在VBOX上创建,或者参考我以前的blog,这里不在详述。
用如下脚本获取绑定脚本:
for i in b c d e f g h;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\",PROGRAM==\"/sbin/scsi_id -g -u /dev/\$name\", RESULT==\"`/sbin/scsi_id -g -u/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\",GROUP=\"asmadmin\", MODE=\"0660\""
done
--在所有节点创建并配置UDEV Rules 文件
[root@asm ~]# touch /etc/udev/rules.d/99-oracle-asmdevices.rules
--添加如下内容:
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VB0fe2de72-ff43e01f",NAME="asm-diskb", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBb84b3378-7205c629",NAME="asm-diskc", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB8c6d2199-64d26b1e",NAME="asm-diskd", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBc86e3f5c-ba9c8397",NAME="asm-diske", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VB4776a8c1-0b444519",NAME="asm-diskf", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBb7771090-d177eeaf",NAME="asm-diskg", OWNER="grid", GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBe7da4ea4-622fea96",NAME="asm-diskh", OWNER="grid", GROUP="asmadmin",MODE="0660"
--重启UDEV:
[root@asm rules.d]# start_udev
Starting udev: [ OK ]
--检查共享设备的所属关系和权限:
[root@rac1 ~]# ll /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 May 28 22:55 /dev/asm-diskb
brw-rw---- 1 grid asmadmin 8, 32 May 28 22:55 /dev/asm-diskc
brw-rw---- 1 grid asmadmin 8, 48 May 28 22:55 /dev/asm-diskd
brw-rw---- 1 grid asmadmin 8, 64 May 28 22:55 /dev/asm-diske
brw-rw---- 1 grid asmadmin 8, 80 May 28 22:55 /dev/asm-diskf
brw-rw---- 1 grid asmadmin 8, 96 May 28 22:55 /dev/asm-diskg
brw-rw---- 1 grid asmadmin 8, 112 May 2822:55 /dev/asm-diskh
[root@rac1 ~]#
groupadd -g 1000 oinstall
groupadd -g 1200 asmadmin
groupadd -g 1201 asmdba
groupadd -g 1202 asmoper
groupadd -g 1300 dba
groupadd -g 1301 oper
useradd -m -u 1100 -g oinstall -Gasmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash grid
useradd -m -u 1101 -g oinstall -Gdba,oper,asmdba -d /home/oracle -s /bin/bash oracle
--将用户grid添加到dba组:
[root@rac1 app]# gpasswd -a grid dba
Adding user grid to group dba
--确认用户信息:
[root@rac1 ~]# id oracle
uid=502(oracle) gid=507(oinstall)groups=507(oinstall),502(dba),503(oper),506(asmdba)
[root@rac1 ~]# id grid
uid=1100(grid) gid=507(oinstall) groups=507(oinstall),504(asmadmin),506(asmdba),505(asmoper)
--修改密码:
passwd oracle
passwd grid
关闭防火墙:
service iptables status
service iptables stop
chkconfig iptables off
chkconfig iptables --list
设置/etc/selinux/config 文件,将SELINUX设置为disabled。
[root@rac1 ~]# cat/etc/selinux/config
# This file controls the state of SELinuxon the system.
# SELINUX= can take one of these threevalues:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these twovalues:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
这里我们使用CTSS.所以要停用 NTP 服务,并从初始化序列中禁用该服务,并删除 ntp.conf 文件。以 root 用户身份在两个 OracleRAC 节点上运行以下命令:
[root@rac1 ~]# /sbin/service ntpd stop
Shutting down ntpd: [ OK ]
[root@rac1 ~]# chkconfig ntpd off
[root@rac1 ~]# mv /etc/ntp.conf/etc/ntp.conf.original
[root@rac1 ~]# chkconfig ntpd --list
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rac2 ~]# /sbin/service ntpd stop
Shutting down ntpd: [ OK ]
[root@rac2 ~]# chkconfig ntpd off
[root@rac2 ~]# mv /etc/ntp.conf/etc/ntp.conf.original
[root@rac2 ~]# chkconfig ntpd --list
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
还要删除以下文件:
rm /var/run/ntpd.pid
此文件保存了 NTP 后台程序的 pid。
mkdir -p /u01/gridsoft/12.1.0
mkdir -p /u01/gridbase
chown -R grid:oinstall /u01
chown -R grid:oinstall /u01
mkdir -p/u01/oracle/12.1.0/db_1
chown-R oracle:oinstall /u01/oracle
chmod -R 775 /u01
修改grid用户的.bash_profile.注意每个节点的不同内容:
export ORACLE_SID=+ASM1
#export ORACLE_SID=+ASM2
export ORACLE_BASE=/u01/gridbase
export ORACLE_HOME=/u01/gridsoft/12.1.0
exportPATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:.
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
umask 022
修改oracle 用户的.bash_profile,注意每个节点的不同内容:
ORACLE_SID=cndba1;export ORACLE_SID
#ORACLE_SID=cndba2;export ORACLE_SID
ORACLE_UNQNAME=cndba;export ORACLE_UNQNAME
JAVA_HOME=/usr/local/Java; export JAVA_HOME
ORACLE_BASE=/u01/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/12.1.0/db_1; exportORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK; exportNLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; exportTNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; exportORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
以 root 用户身份,在每个 Oracle RAC 节点上,在 /etc/security/limits.conf 文件中添加如下内容,或者执行执行如下命令:
[root@rac1 ~]# cat >> /etc/security/limits.conf <<EOF
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
在每个 OracleRAC 节点上,在 /etc/pam.d/login 文件中添加或编辑下面一行内容:
[root@rac1 ~]# cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF
对默认的 shell 启动文件进行以下更改,以便更改所有 Oracle 安装所有者的 ulimit 设置:
[root@rac1 ~]# cat >> /etc/profile <<EOF
if [ /$USER ="oracle" ] || [ /$USER = "grid" ]; then
if[ /$SHELL = "/bin/ksh" ]; then
ulimit-p 16384
ulimit-n 65536
else
ulimit-u 16384 -n 65536
fi
umask022
fi
EOF
注:红色部分一起执行
#vi /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576
使修改的参数生效:
[root@rac1 ~]# sysctl -p
[root@rac1 ~]# cat/etc/hosts
127.0.0.1 localhost
192.168.56.5 rac1
192.168.57.5 rac1-priv
192.168.56.7 rac1-vip
192.168.56.6 rac2
192.168.57.6 rac2-priv
192.168.56.8 rac2-vip
192.168.56.9 rac-scan
在节点1,用grid用户运行runInstaller。
\