天天看点

oracle 11g rac asm磁盘组增加硬盘

要增加磁盘的磁盘组为:DATA

要增加的磁盘为: /dev/sde1

在第一个节点上:

[root@rac1 ~]# fdisk /dev/sde

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-391, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):

Using default value 391

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@rac1 ~]# ll /dev/oracleasm/disks

total 0

brw-rw---- 1 grid oinstall 8, 49 Jan 20 16:45 CRS

brw-rw---- 1 grid oinstall 8, 17 Jan 20 16:45 DATA1

brw-rw---- 1 grid oinstall 8, 33 Jan 20 16:45 DATA2

[root@rac1 ~]# /etc/init.d/oracleasm createdisk DATA3 /dev/sde1

Marking disk "DATA3" as an ASM disk:                       [  OK  ]

brw-rw---- 1 grid oinstall 8, 49 Jan 20 16:47 CRS

brw-rw---- 1 grid oinstall 8, 17 Jan 20 16:47 DATA1

brw-rw---- 1 grid oinstall 8, 33 Jan 20 16:47 DATA2

brw-rw---- 1 grid oinstall 8, 65 Jan 20 16:47 DATA3

在第二个节点:

[root@rac2 ~]#  /etc/init.d/oracleasm scandisks

Scanning the system for Oracle ASMLib disks:               [  OK  ]

[root@rac2 ~]#  ll /dev/oracleasm/disks/

brw-rw---- 1 grid oinstall 8, 49 Jan 20 16:54 CRS

brw-rw---- 1 grid oinstall 8, 17 Jan 20 16:54 DATA1

brw-rw---- 1 grid oinstall 8, 33 Jan 20 16:54 DATA2

brw-rw---- 1 grid oinstall 8, 65 Jan 20 16:53 DATA3

[root@rac1 ~]# su - grid

[grid@rac1 ~]$ export ORACLE_SID=+ASM1

[grid@rac1 ~]$

[grid@rac1 ~]$ sqlplus /nolog

SQL> conn / as sysasm

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/DATA3' name DATA_0002;

Diskgroup altered.