<b>因為删除Clusterware之後,ocr還在磁盤中,使用dd指令格式化磁盤,但是oracle提供了oracleasm工具,是以看看oracleasm deletedisk的操作具體做了什麼</b>
------------------------------------------------------------------
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL101
Removing ASM disk "VOL101": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL102
Removing ASM disk "VOL102": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL103
Removing ASM disk "VOL103": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL104
Removing ASM disk "VOL104": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL201
Removing ASM disk "VOL201": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL202
Removing ASM disk "VOL202": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL203
Removing ASM disk "VOL203": [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm deletedisk VOL204
Removing ASM disk "VOL204": [ OK ]
<b>對應日志:deletedisk操作删除了磁盤的頭部資訊。</b>
Clearing disk header: done
Dropping disk: done
--------------------------------------------------------------------
[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
<b>對應日志:</b>
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
<b>對應/var/log/oracleasm 的日志記錄:</b>
-------------------------------------------------------------------
<b>關于重新開機oracleasm 的日志記錄:</b>
[root@rac1 dev]# service oracleasm stop
Dropping Oracle ASMLib disks: [ OK ]
Shutting down the Oracle ASMLib driver: [ OK ]
對應日志:
Unmounting ASMlib driver filesystem: /dev/oracleasm
Unloading module "oracleasm": oracleasm
[root@rac1 dev]# service oracleasm start
Initializing the Oracle ASMLib driver: [ OK ]
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
<b>下面是建立asm磁盤的日志記錄:</b>
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL101 /dev/sdc1
Marking disk "VOL101" as an ASM disk: [ OK ]
[root@rac1 dev]#/etc/init.d/oracleasm createdisk VOL102 /dev/sdc2
Marking disk "VOL102" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL103 /dev/sdd1
Marking disk "VOL103" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL104 /dev/sdd2
Marking disk "VOL104" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL201 /dev/sde1
Marking disk "VOL201" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL202 /dev/sde2
Marking disk "VOL202" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL203 /dev/sdf1
Marking disk "VOL203" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL204 /dev/sdf2
Marking disk "VOL204" as an ASM disk: [ OK ]
<b>下面是建立asm磁盤的日志記錄:先檢查磁盤組是否已經被建立或者初始化!</b>
Disk "VOL101" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL102" does not exist or is not instantiated
Disk "VOL103" does not exist or is not instantiated
Disk "VOL104" does not exist or is not instantiated
Disk "VOL201" does not exist or is not instantiated
Disk "VOL202" does not exist or is not instantiated
Disk "VOL203" does not exist or is not instantiated
Disk "VOL204" does not exist or is not instantiated
[root@rac1 dev]# /etc/init.d/oracleasm scandisks
[root@rac1 dev]# /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
對應日志記錄:
Validating disk "VOL101"
Validating disk "VOL102"
Validating disk "VOL103"
Validating disk "VOL104"
Validating disk "VOL201"
Validating disk "VOL202"
Validating disk "VOL203"
Validating disk "VOL204"
Disk "VOL101" is a valid ASM disk
Disk "VOL102" is a valid ASM disk
Disk "VOL103" is a valid ASM disk
Disk "VOL104" is a valid ASM disk
Disk "VOL201" is a valid ASM disk
Disk "VOL202" is a valid ASM disk
Disk "VOL203" is a valid ASM disk
Disk "VOL204" is a valid ASM disk