我们的环境中只能使用virtual box。 virtual box 的网络环境比较特殊。 NAT 方式无法让vm之间互相访问,所以不能使用NAT 模式。 bridge会占用ip资源,也不可以使用,所以我们使用 internal模式。 一共设置4台vm. 网络环境如下:
主机名 |
eth0 |
eth1 |
eth2 |
node1 |
internal mode private 192.168.0.8 |
internal mode public 10.0.0.8 |
internal mode storage 11.0.0.8 |
node2 |
internal mode private 192.168.0.9 |
internal mode public 10.0.0.9 |
internal mode storage 11.0.0.9 |
sotrage |
internal mode storage 11.0.0.10 |
||
gateway |
nat mode |
internal mode public 10.0.0.10 |
NODE1 的eth0为internal 模式,属于private这个网段。地址设置为192.168.0.8
NODE2 的eth0为internal 模式,属于private这个网段。地址设置为192.168.0.9
这个网络将被设置为RAC中的private network
NODE 1的eth1为internal 模式,属于public这个网段。地址设置为10.0.0.8
NODE 2的eth1为internal 模式,属于public这个网段。地址设置为10.0.0.9
GATEWAY的eth1为internal 模式,属于public这个网段。地址设置为10.0.0.10
这个网络是RAC的public网络。 NODE1和NODE2的两个网卡是RAC的public网卡。GATEWAY只是用来模拟PUBLIC网络中的其它机器。
NODE 1的eth2为internal 模式,属于storage这个网段。地址设置为11.0.0.8
NODE 2的eth2为internal 模式,属于storage这个网段。地址设置为11.0.0.9
SOTRAGE的eth2为internal 模式,属于storage这个网段。地址设置为11.0.0.10
这个个网络是RAC的存储网络,NODE1和NODE2共享STORAGE这台机器share的存储。
GATEWAY的eth0为NAT模式,是用来从实体机器访问用的。我需要通过这个NAT网络访问gateway,再通过gateway的 public这个网段去访问node1 node2。
上面的只是规划网络,关于具体的配置网络,请参考:
www.google.com
-------------------
mount storage:/storage_a /u02/app该命令卡主。 通过
[root@node1 log]# rpcinfo -p storage
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
查明是网络不通。但是ssh能够登陆storage,所以猜想是iptable
于是
chkconfig --level 3 iptables off 停掉开机的iptables
为了开机自动mount 做了如下操作
chkconfig --level 3 nfs on 添加nfs开机启动
编辑/etc/rc.local 加入mount命令
(1. rpcinfo linux 启动 http://www.cnblogs.com/diyunpeng/archive/2009/11/11/1600886.html)
------------------------
linux 添加硬盘 和 lvm
http://www.techotopia.com/index.php/Adding_a_New_Disk_Drive_to_a_CentOS_6_System
http://www.techotopia.com/index.php/Adding_a_New_Disk_to_a_CentOS_6_Volume_Group_and_Logical_Volume
---------------
useradd -r u1 -r选项指定用户为系统账号 这种账号似乎不可以配置 ssh key登陆
但奇怪的是oracle创建oracle账号的时候就是指定了 该选项
---------------------------------
NTP 配置
1. RAC中 两个node似乎需要做成服务器
2. ntpd 启动似乎需要 ntpd -x 而不是 /etc/init.d/ntpd start
------------------------------------------