[root@rac01 init.d]# oracleasm deletedisk ASMD1
Clearing disk header: failed
Unable to clear disk "ASMD1"
[root@rac01 init.d]# oracleasm deletedisk ASMD2
Clearing disk header: failed
Unable to clear disk "ASMD2"
[root@rac01 init.d]# oracleasm deletedisk ASMD2
Clearing disk header: failed
Unable to clear disk "ASMD2"
[root@rac01 init.d]#
[root@rac01 init.d]# blkid | grep oracleasm
/dev/sdb1: LABEL="ASMD1" TYPE="oracleasm"
/dev/sdc1: LABEL="ASMD2" TYPE="oracleasm"
/dev/sdd1: LABEL="ASMD3" TYPE="oracleasm"
[root@rac01 init.d]#
Marking disk "VOL1" as an ASM disk: [FAILED]
Clearing disk header: failed
Unable to clear disk "ASMD1"
[root@rac01 init.d]# oracleasm deletedisk ASMD2
Clearing disk header: failed
Unable to clear disk "ASMD2"
[root@rac01 init.d]# oracleasm deletedisk ASMD2
Clearing disk header: failed
Unable to clear disk "ASMD2"
Solution Description
The issue is the disk header cannot be overwritten by the oracleasm command which is written by the previous commands. For this, you have to manually overwrite the header information by the OSdd command.
Step 1: find out the device information using blkid command.
[
[root@rac01 init.d]#
[root@rac01 init.d]# blkid | grep oracleasm
/dev/sdb1: LABEL="ASMD1" TYPE="oracleasm"
/dev/sdc1: LABEL="ASMD2" TYPE="oracleasm"
/dev/sdd1: LABEL="ASMD3" TYPE="oracleasm"
[root@rac01 init.d]#
Step 2: overwrite the header with null value using dd command. Or we can say clear the device header manually
[root@rac01 init.d]# dd if=dev/zero of=/dev/sdc1 bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.0161951 s, 6.3 MB/s
[root@rac01 init.d]# dd if=dev/zero of=/dev/sdd1 bs=1024 count=100
[root@rac01 init.d]# dd if=dev/zero of=/dev/sdb1 bs=1024 count=100
Step 3: Sync the disk and delete the disk using oracleasm command
[dev]# /sbin/partprobe /dev/sdb1
[dev]# oracleasm deletedisk OCR_VOTE Disk "OCR_VOTE" defines an unmarked device
[root@rac01 init.d]#
[root@rac01 init.d]# /etc/init.d/oracleasm deletedisk ASMD1
[root@rac01 init.d]# /etc/init.d/oracleasm deletedisk ASMD2
[root@rac01 init.d]# /etc/init.d/oracleasm deletedisk ASMD3
I checked the asm log
# cat /var/log/oracleasm
Unable to open device "/dev/sdb1": Device ot resource busy....
But when I create new ASM disk getting an error....so I restarted the virtual machine then ASM creation issue was resolved.
[root@localhost Desktop]# /etc/init.d/oracleasm createdisk Disk1 /dev/sda6
No comments:
Post a Comment