RAC 祼设备与用户等效互访配置

配置祼设备 (2个节点操做配置相同)
节点1 祼设备配置,添加或者修改如下参数文件:
[root@node1 /]# vi /etc/udev/rules.d/50-udev.rules
KERNEL=="*", OWNER="oracle" GROUP="oinstall", MODE="0660"
[root@node1 /]# vi /etc/sysconfig/rawdevices
# Voting Disks 100M
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
/dev/raw/raw3 /dev/sdb3node

# OCR 200M
/dev/raw/raw4 /dev/sdb5
/dev/raw/raw5 /dev/sdb6oracle

# ASM Disks
/dev/raw/raw6 /dev/sdb7
/dev/raw/raw7 /dev/sdb8
/dev/raw/raw8 /dev/sdb9
/dev/raw/raw9 /dev/sdb10
/dev/raw/raw10 /dev/sdb11
-------------------------------------------------------------------------
配置裸设备服务自启动,2个节点都要执行
[root@node1 /]# chkconfig --list rawdevices
rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off
启动raw devices 服务,确认裸设备建立成功,权限正确:
[root@node1 /]# service rawdevices restart
检查祼设备绑定状况:
[root@node1 /]# ls -la /dev/raw
total 0
drwxr-xr-x  2 root   root         240 Sep 20 12:23 .
drwxr-xr-x 13 root   root        4240 Sep 20 12:23 ..
crw-rw----  1 oracle oinstall 162,  1 Sep 20 12:23 raw1
crw-rw----  1 oracle oinstall 162, 10 Sep 20 12:23 raw10
crw-rw----  1 oracle oinstall 162,  2 Sep 20 12:23 raw2
crw-rw----  1 oracle oinstall 162,  3 Sep 20 12:23 raw3
crw-rw----  1 oracle oinstall 162,  4 Sep 20 12:23 raw4
crw-rw----  1 oracle oinstall 162,  5 Sep 20 12:23 raw5
crw-rw----  1 oracle oinstall 162,  6 Sep 20 12:23 raw6
crw-rw----  1 oracle oinstall 162,  7 Sep 20 12:23 raw7
crw-rw----  1 oracle oinstall 162,  8 Sep 20 12:23 raw8
crw-rw----  1 oracle oinstall 162,  9 Sep 20 12:23 raw9
-----------------------------------------------------------------------
节点2 祼设备配置:
[root@node2 /]# vi /etc/udev/rules.d/50-udev.rules
KERNEL=="*", OWNER="oracle" GROUP="oinstall", MODE="0660"ssh

[root@node2 /]# vi /etc/sysconfig/rawdevices
# Voting Disks 100M
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
/dev/raw/raw3 /dev/sdb3ide

# OCR 200M
/dev/raw/raw4 /dev/sdb5
/dev/raw/raw5 /dev/sdb6rest

# ASM Disks
/dev/raw/raw6 /dev/sdb7
/dev/raw/raw7 /dev/sdb8
/dev/raw/raw8 /dev/sdb9
/dev/raw/raw9 /dev/sdb10
/dev/raw/raw10 /dev/sdb11
---------------------------------------------------------------------
配置裸设备服务自启动:
[root@node2 /]# chkconfig --list rawdevices
rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off
启动raw devices 服务,确认裸设备建立成功,权限正确:
[root@node2 /]# service rawdevices restart
检查祼设备绑定状况:
[root@node2 /]# ls -la /dev/raw
total 0
drwxr-xr-x  2 root   root         240 Sep 20 12:23 .
drwxr-xr-x 13 root   root        4240 Sep 20 12:23 ..
crw-rw----  1 oracle oinstall 162,  1 Sep 20 12:23 raw1
crw-rw----  1 oracle oinstall 162, 10 Sep 20 12:23 raw10
crw-rw----  1 oracle oinstall 162,  2 Sep 20 12:23 raw2
crw-rw----  1 oracle oinstall 162,  3 Sep 20 12:23 raw3
crw-rw----  1 oracle oinstall 162,  4 Sep 20 12:23 raw4
crw-rw----  1 oracle oinstall 162,  5 Sep 20 12:23 raw5
crw-rw----  1 oracle oinstall 162,  6 Sep 20 12:23 raw6
crw-rw----  1 oracle oinstall 162,  7 Sep 20 12:23 raw7
crw-rw----  1 oracle oinstall 162,  8 Sep 20 12:23 raw8
crw-rw----  1 oracle oinstall 162,  9 Sep 20 12:23 raw9
--------------------------------------------------------------------
配置ORACLE 用户等效访问:
节点1配置:
[oracle@node1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
b6:0d:54:f1:39:6b:50:50:60:6e:ee:93:67:59:47:a3 oracle@node1
[oracle@node1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
ed:4d:fb:d3:7e:07:81:f6:38:b8:d1:d6:96:13:b6:e8 oracle@node1
[oracle@node1 ~]$ ssh node1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'node1 (192.168.62.240)' can't be established.
RSA key fingerprint is 01:c9:57:3e:59:73:73:e4:41:ca:a2:5e:0f:81:36:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1,192.168.62.240' (RSA) to the list of known hosts.
oracle@node1's password:
[oracle@node1 ~]$ ssh node1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@node1 ~]$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'node2 (192.168.62.235)' can't be established.
RSA key fingerprint is 6d:d0:08:d5:41:04:ca:3f:9b:07:52:02:01:b1:8b:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2,192.168.62.235' (RSA) to the list of known hosts.
oracle@node2's password:
[oracle@node1 ~]$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@node2's password:
[oracle@node1 ~]$ ssh node1 date;ssh node2 date
Tue Sep 20 04:59:21 CST 2011
Wed Sep 21 03:04:23 CST 2011
--------------------------------------------------------------------
节点2配置:
[oracle@node2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
08:33:27:0e:ee:fa:e2:95:c0:47:19:41:3e:6b:3f:0d oracle@node2
[oracle@node2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
7a:c6:ed:43:26:2d:89:c9:b6:de:65:5f:17:47:18:59 oracle@node2
[oracle@node2 ~]$
[oracle@node2 ~]$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'node2 (192.168.62.235)' can't be established.
RSA key fingerprint is 6d:d0:08:d5:41:04:ca:3f:9b:07:52:02:01:b1:8b:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2,192.168.62.235' (RSA) to the list of known hosts.
oracle@node2's password:              //oracledb
[oracle@node2 ~]$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@node2 ~]$ ssh node1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'node1 (192.168.62.240)' can't be established.
RSA key fingerprint is 01:c9:57:3e:59:73:73:e4:41:ca:a2:5e:0f:81:36:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1,192.168.62.240' (RSA) to the list of known hosts.
[oracle@node2 ~]$ ssh node1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@node2 ~]$ ssh node1 date;ssh node2 date
Tue Sep 20 04:58:45 CST 2011
Wed Sep 21 03:03:47 CST 2011ci