oracle asmilb方式做ASM 新加 扩容 ASM DISK

oracleasm建的disk 搜索路径是/dev/oracleasm/disks/*

1.        安装rpm

rpm -ivh kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm oracleasmlib-2.0.4-1.el6.x86_64.rpm oracleasm-support-2.1.8-1.el6.x86_64.rpm 

安装cvuqdisk-1.0.9-1.rpm,位于安装文件解压后rpm目录下cvuqdisk-1.0.9-1.rpm

2.        配置asm

[root@rac1 ~]# /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 <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin

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  ]

3.        标记磁盘,只在一个节点执行

[root@rac1 ~]# /usr/sbin/oracleasm createdisk VOL1 /dev/mapper/mpathap1(/dev/sdb1)

[root@rac1 ~]# /usr/sbin/oracleasm listdisks

VOL1

4.        其他节点扫描磁盘

[root@rac2 oracle]# /usr/sbin/oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Instantiating disk "VOL1"

[root@rac2 oracle]# /usr/sbin/oracleasm listdisks

VOL1

5.        MPIO特殊配置

如果使用了linux自带的mpio,所有节点需要如下修改:

编辑/etc/sysconfig/oracleasm

修改ORACLEASM_SCANORDER=""为ORACLEASM_SCANORDER="dm"

重启asm服务

[root@rac1 etc]# /etc/init.d/oracleasm restart

#####/etc/init.d/oracleasm  deletedisk VOL1(学习用,安装过程不使用)

重新激活磁盘modprobe –r lpfc   

             Modprobe lpfc

---------------新加ASM DISK

1. 确保无快照,否则不能创建独立盘

2.确保空间先分配好,否则不能在别的机器上发现

--------------------- /usr/sbin/oracleasm createdisk OCR1 /dev/sdc
Device "/dev/sdc" is not a partition,必须先分区

[root@rac1 ~]# fdisk -l


[root@rac1 ~]# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=grid
ORACLEASM_GID=asmadmin
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_SCAN_DIRECTORIES=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"
[root@rac1 ~]#  /usr/sbin/oracleasm createdisk OCR1 /dev/sdc
Device "/dev/sdc" is not a partition
 

[root@rac1 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x2a827378.

Command (m for help): 
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-2097151, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151): 
Using default value 2097151
Partition 1 of type Linux and of size 1023 MiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@rac1 ~]# oracleasm createdisk OCR1 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk OCR2 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac1 ~]# oracleasm listdisks
OCR1
OCR2
VOL1
 

----------------2机还没有看到

[root@rac2 ~]#  /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac2 ~]#  /usr/sbin/oracleasm listdisks
VOL1

reboot 有没有 ,重启按1机重做一遍, 但是sdc 是不是那边的sdc不确认 !!
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值