开发者社区> 北在南方> 正文

【RAC】在ESX 上安装asm 共享磁盘

简介:
+关注继续查看
1 修改虚拟机的所有节点的*.vmx配置文件
[root@anrac rac1]# ls
rac1_1-flat.vmdk  rac1_1.vmdk  rac1-ad5ae35a.vswp  rac1-flat.vmdk  rac1.nvram  rac1.vmdk  rac1.vmsd  rac1.vmx  rac1.vmxf 
添加
disk.locking = "false"
对节点rac2 重复同样的操作!
2 对磁盘进行分区(根据各个的实际情况)
[root@rac1 asmlib_rpm]# fdisk -l
Disk /dev/sda: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       13054   104751832+  8e  Linux LVM
Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdc: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdd: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sde: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
[root@rac1 asmlib_rpm]# 
[root@rac1 asmlib_rpm]# fdisk /dev/sdb
The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-5221, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): 2610
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (2611-5221, default 2611): 
Using default value 2611
Last cylinder or +size or +sizeM or +sizeK (2611-5221, default 5221): 
Using default value 5221
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 asmlib_rpm]# 
[root@rac1 asmlib_rpm]# 
[root@rac1 asmlib_rpm]# fdisk -l /dev/sdb

Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+  83  Linux
/dev/sdb2            2611        5221    20972857+  83  Linux
依次对 剩下的/dev/sdc /dev/sdd /dev/sde 进行类似操作
然后使用oracleasm 工具创建asm磁盘,由于oracle 11.2 将asm 归属由grid用户管理,如果你的是11R1 则继续使用oracle 
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm  configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting without typing an
answer will keep that current value.  Ctrl-C will abort.
Default user to own the driver interface []: grid --由于oracle 11.2 将asm 归属由grid用户管理,如果你的是11R1 则继续使用oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y  
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
以上步骤也要在rac2 节点上重复操作!

[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL101 /dev/sdb1
Marking disk "VOL101" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL102 /dev/sdb2
Marking disk "VOL102" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL103 /dev/sdc1 
Marking disk "VOL103" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL104 /dev/sdc2
Marking disk "VOL104" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL201 /dev/sdd1  
Marking disk "VOL201" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL202 /dev/sdd2
Marking disk "VOL202" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL203 /dev/sde1
Marking disk "VOL203" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm createdisk VOL204 /dev/sde2
Marking disk "VOL204" as an ASM disk:                      [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm  scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@rac1 asmlib_rpm]# /etc/init.d/oracleasm  listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
在节点二上进行验证:
[root@rac2 software]#  /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@rac2 software]#  /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
[root@rac2 software]#
至此 oracle rac 安装asm磁盘的工作完成!

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
【RAC】在ESX 上安装asm 共享磁盘
1 修改虚拟机的所有节点的*.vmx配置文件 [root@anrac rac1]# ls rac1_1-flat.vmdk  rac1_1.
753 0
Oracle rac重新执行root.sh脚本
Oracle rac重新执行root.sh脚本
274 0
Oracle rac 修改SCAN IP
Oracle rac 修改SCAN IP
266 0
Oracle rac不能监听public ip
Oracle rac不能监听public ip
121 0
Oracle RAC中REMOTE_LISTENER和local_listener的作用是什么?
Oracle RAC中REMOTE_LISTENER和local_listener的作用是什么?
170 0
Oracle rac集群中的IP类型简介
Oracle rac集群中的IP类型简介
238 0
Oracle RAC集群启动与关闭,涵盖所有版本
Oracle RAC集群启动与关闭,涵盖所有版本
435 0
Oracle RAC在RHEL7多路径配置,超实用
Oracle RAC在RHEL7多路径配置,超实用
258 0
+关注
北在南方
文章
问答
视频
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载