指定该磁盘组中的成员(对应的LUN),在指定成员时一般ASM能够自动检测出磁盘的容量,不过如果DBA基于某些方面的考虑,希望限制ASM使用的空间的话,也可以在指定成员过程中,顺便指定大小(只要指定的大小不超出磁盘实际容量),在添加成员时,ASM也会自动检查磁盘头以确定该磁盘是否被加入到其它的磁盘组中,当发现该盘已加入其它磁盘组的话,你可以通过FORCE选项来强制修改该盘所属磁盘组。
2.添加磁盘:
[root@test ~]# fdisk -l
Disk /dev/sda: 193.2 GB, 193273528320 bytes
255 heads, 63 sectors/track, 23497 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 17233 138319650 83 Linux
/dev/sda3 17234 18277 8385930 82 Linux swap / Solaris
/dev/sda4 18278 23497 41929650 5 Extended
/dev/sda5 18278 19321 8385898+ 83 Linux
/dev/sda6 19322 20365 8385898+ 83 Linux
/dev/sda7 20366 21409 8385898+ 83 Linux
/dev/sda8 21410 22453 8385898+ 83 Linux
/dev/sda9 22454 23497 8385898+ 83 Linux
Disk /dev/sdb: 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/sdb1 1 6527 52428096 83 Linux
/dev/sdb2 6528 13054 52428127+ 83 Linux
Disk /dev/sdc: 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/sdc1 1 6527 52428096 83 Linux
/dev/sdc2 6528 13054 52428127+ 83 Linux
初始化SDC磁盘:
[root@test ~]# /etc/init.d/oracleasm createdisk VOL_C /dev/sdc1
Marking disk "VOL_C" as an ASM disk: [ OK ]
[root@test ~]# /etc/init.d/oracleasm createdisk VOL_D /dev/sdc2
Marking disk "VOL_D" as an ASM disk: [ OK ]
[root@test ~]# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@test ~]# /etc/init.d/oracleasm listdisks
VOL_A
VOL_B
VOL_C
VOL_D
[root@test ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
使用OEM添加磁盘:
选择自动存储管理: +ASM_test
-》磁盘组 -》DATA磁盘组 -》添加
-》
就可以了。
下面演示使用命令添加: