star带你玩转Oracle-零基础openfiler共享存储安装Oracle 11G RAC-(5/8)-orasta

14、服务器1配置共享存储


14.1   显示OPENFILER上所有可用的LUN

[root@htdb1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.1.120

Starting iscsid:                                           [  OK  ]

192.168.1.120:3260,1 iqn.2006-01.com.openfiler:rac_ocrdisk1

 

14.2   手工登录iscsi目标

[root@htdb1 ~]# iscsiadm -m node -T iqn.2006-01.com.openfiler:rac_ocrdisk1 -p 192.168.1.120 -l

Logging in to [iface: default, target: iqn.2006-01.com.openfiler:rac_ocrdisk1, portal: 192.168.1.120,3260] (multiple)

Login to [iface: default, target: iqn.2006-01.com.openfiler:rac_ocrdisk1, portal: 192.168.1.120,3260] successful.

 

14.3   配置自动登录

 

[root@htdb1 ~]# iscsiadm -m node -T iqn.2006-01.com.openfiler:rac_ocrdisk1 -p 192.168.1.120 --op update -n node.startup -v automatic

 

 

 

14.4   检查磁盘信息

[root@htdb1 ~]# fdisk -l

 

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00034864

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1         262     2097152   82  Linux swap / Solaris

Partition 1 does not end on cylinder boundary.

/dev/sda2   *         262        2611    18873344   83  Linux

 

Disk /dev/sdb: 5368 MB, 5368709120 bytes

166 heads, 62 sectors/track, 1018 cylinders

Units = cylinders of 10292 * 512 = 5269504 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdc: 20.2 GB, 20199768064 bytes

64 heads, 32 sectors/track, 19264 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

14.5   Multipathd服务配置

#拷贝配置文件

[root@htdb1 ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/

 

 

 

#启动multipathd服务

[root@htdb1 ~]# service multipathd restart

ux_socket_connect: No such file or directory

Stopping multipathd daemon:                                [FAILED]

Starting multipathd daemon:                                [  OK  ]

 

#设置开机启动服务

[root@htdb1 ~]# chkconfig multipathd on

 

#查看磁盘挂载情况

[root@htdb1 ~]# multipath -ll

mpathb (14f504e46494c45525748753746722d43684e502d46466c6b) dm-1 OPNFILER,VIRTUAL-DISK

size=19G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 33:0:0:1 sdc 8:32 active ready running

mpatha (14f504e46494c4552494d686b39702d486656432d6e334747) dm-0 OPNFILER,VIRTUAL-DISK

size=5.0G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 33:0:0:0 sdb 8:16 active ready running


 

 

14.6   映射udev,配置ASM所需磁盘

#Udev配置脚本

for i in mpatha mpathb; do

echo KERNEL==\"dm-*\",ENV{DM_UUID}==\"`printf "$(udevadm info --query=all --name=/dev/mapper/$i | grep -i dm_uuid |awk -F'=' '{print $2}')"`\",SYMLINK+=\"oracleasm/disks/$i\",OWNER=\"grid\",GROUP=\"asmadmin\",MODE=\"0660\";

done >/etc/udev/rules.d/99-oracle-asmdevices.rules

 

#查看udev配置信息

[root@htdb1 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c4552494d686b39702d486656432d6e334747",SYMLINK+="oracleasm/disks/ocrvot",OWNER="grid",GROUP="asmadmin",MODE="0660"

KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c45525748753746722d43684e502d46466c6b",SYMLINK+="oracleasm/disks/data1",OWNER="grid",GROUP="asmadmin",MODE="0660"

说明:修改5G的存储名称为ocrvot,修改20G的存储名称为data1

 

 

#重载并启用udev

[root@htdb1 ~]# udevadm control --reload-rules && start_udev

Starting udev:                                             [  OK  ]

15、服务器2配置共享存储


请参考 :14、服务器1配置共享存储

 

16、重启服务器


建议安装GRID前重启服务器, 检查之前配置是否正确。

 

重启服务器1

reboot

重启服务器2

reboot

 

#检查存储

[root@htdb1 ~]# multipath -ll

mpathb (14f504e46494c45525748753746722d43684e502d46466c6b) dm-1 OPNFILER,VIRTUAL-DISK

size=19G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 33:0:0:1 sdc 8:32 active ready running

mpatha (14f504e46494c4552494d686b39702d486656432d6e334747) dm-0 OPNFILER,VIRTUAL-DISK

size=5.0G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 33:0:0:0 sdb 8:16 active ready running

[root@htdb1 ~]#

17、数据库软件上传


[root@htdb1 u01]# mkdir -p /u01/soft

说明:如图所示,使用xftp上传所需软件包

 

 #需上传以下4个文件

[root@htdb1 soft]# ls -ltr

total 3664420

-rw-r--r-- 1 root root 1151304589 May  9 17:28 p13390677_112040_Linux-x86-64_2of7.zip

-rw-r--r-- 1 root root 1395582860 May  9 17:28 p13390677_112040_Linux-x86-64_1of7.zip

-rw-r--r-- 1 root root     207399 May  9 17:29    pdksh-5.2.14-30.x86_64.rpm

-rw-r--r-- 1 root root 1205251894 May  9 17:29 p13390677_112040_Linux-x86-64_3of7.zip

 

[root@htdb2 u01]# ls -ltr

total 208

drwxrwxr-x. 5 grid oinstall   4096 May  9 14:39 app

-rw-r--r--  1 root root     207399 May  9 17:30 pdksh-5.2.14-30.x86_64.rpm


#解压安装程序
[root@htdb2 u01]#

 unzip p13390677_112040_Linux-x86-64_1of7.zip

unzip p13390677_112040_Linux-x86-64_2of7.zip

unzip p13390677_112040_Linux-x86-64_3of7.zip

 
#修改权限

[root@htdb1 soft]# chown -R grid:oinstall grid/

[root@htdb1 soft]# chown -R oracle:oinstall database/


#为了节省空间,删除安装程序zip包
[root@htdb1 soft]# rm -f *.zip

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31442014/viewspace-2138832/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31442014/viewspace-2138832/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值