要增加磁盘的磁盘组为:DATA
要增加的磁盘为: /dev/sde1
在第一个节点上:
[[email protected] ~]#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.
[[email protected] ~]# 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
[[email protected] ~]# /etc/init.d/oracleasm
createdisk DATA3 /dev/sde1
Marking
disk "DATA3" as an ASM
disk:
[ OK ]
[[email protected] ~]# ll
/dev/oracleasm/disks
total 0
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
在第二个节点:
[[email protected] ~]# /etc/init.d/oracleasm scandisks
Scanning
the system for Oracle ASMLib
disks:
[ OK ]
[[email protected] ~]# ll /dev/oracleasm/disks/
total 0
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
[[email protected] ~]#su - grid
[[email protected] ~]$ export
ORACLE_SID=+ASM1
[[email protected] ~]$
[[email protected] ~]$
[[email protected]
~]$ sqlplus /nolog
SQL>conn / as
sysasm
SQL> alter diskgroup DATA add disk ‘/dev/oracleasm/disks/DATA3‘
name DATA_0002;
Diskgroup altered.
原文:http://www.cnblogs.com/jimeper/p/3527267.html