因为删除Clusterware之后,ocr还在磁盘中,使用dd命令格式化磁盘,但是oracle提供了oracleasm工具,所以看看oracleasm deletedisk的操作具体做了什么
------------------------------------------------------------------
[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 ]
对应日志:deletedisk操作删除了磁盘的头部信息。
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
Clearing disk header: done
Dropping disk: done
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
对应日志:
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Cleaning any stale ASM disks...
对应/var/log/oracleasm 的日志记录:
-------------------------------------------------------------------
关于重启oracleasm 的日志记录:
[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 ]
Scanning the system for Oracle ASMLib disks: [ OK ]
对应日志:
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
下面是创建asm磁盘的日志记录:
[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 ]
下面是创建asm磁盘的日志记录:先检查磁盘组是否已经被创建或者初始化!
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
Writing disk header: done
Instantiating disk: done
Disk "VOL103" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL104" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL201" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL202" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL203" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
Disk "VOL204" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: done
-------------------------------------------------------------------
[root@rac1 dev]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
对应日志记录:
Reloading disk partitions: done
Cleaning any stale ASM disks...
Validating disk "VOL101"
Validating disk "VOL102"
Validating disk "VOL103"
Validating disk "VOL104"
Validating disk "VOL201"
Validating disk "VOL202"
Validating disk "VOL203"
Validating disk "VOL204"
Scanning system for ASM disks...
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