Fix Oracleasm Deletedisk Command Failed with Unable to Clear Disk “Disk Name”

_____________________________________________________________________________________________________________________

Error Description
Oracleasm deletedisk diskname failed with following error
# oracleasm deletedisk OCR_VOTE
Clearing disk header: failed
Unable to clear disk "OCR_VOTE"


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 OS dd command.

Step 1: find out the device information using blkid command.
[dev]#  blkid |grep oracleasm
/dev/mapper/mpathf1: LABEL="OCR_VOTE" TYPE="oracleasm"

Step 2: overwrite the header with null value using dd command. Or we can say clear the device header manually
[dev]# dd if=/dev/zero of=/dev/mapper/mpathf1 bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.0161951 s, 6.3 MB/s

Step 3: Sync the disk and delete the disk using oracleasm command
[dev]# /sbin/partprobe /dev/mapper/mpathf1
[dev]# oracleasm deletedisk OCR_VOTE                           Disk "OCR_VOTE" defines an unmarked device

Dropping disk: done

_____________________________________________________________________________________________________________________

0 comments:

Post a Comment

 

acehints.com Copyright 2011-17 All Rights Reserved | Site Map | Contact | Disclaimer | Google