I have dropped the disk from ASM diskgroup:


Oracle did a rebalance operation and then dropped the disk.

Now, I want to delete the disk from ASM library and return the disk to the system:

# oracleasm deletedisk -v DISK1
  Clearing disk header: oracleasm-write-label: Unable to open device "/dev/oracleasm/disks/DISK1": 
  Device or resource busy failed
  Unable to clear disk "DISK1"

The system details: 2-node RAC

Why does ASM not clearing the disk header? Where to see the detailed log?


# fuser /dev/oracleasm/disks/DISK1

returns nothing on both nodes


First of all, I checked that there were no extents on DISK1.

$ . oraenv

SQL> select PXN_KFFXP,  -- physical extent number
           XNUM_KFFXP, -- virtual extent number
           DISK_KFFXP, -- disk number
           AU_KFFXP    -- allocation unit number
    from X$KFFXP
    where DISK_KFFXP=1;

no rows selected

I cleared the disk header by dd:

# dd if=/dev/zero of=/dev/oracleasm/disks/DISK1 bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.000156 seconds, 656 MB/s

Note: My allocation unit is 1MB that is why I am using bs=1024.

Then deleted disk by oracleasm:

# oracleasm deletedisk DISK1
# oracleasm scandisks    <--Do this step on all nodes

To tell the truth it is not a good way to solve the problem, because when I run the following command on the second node:

/sbin/blkid | grep oracleasm

/dev/sdg1: LABEL="DISK6" TYPE="oracleasm"
/dev/sdb1: LABEL="DISK1" TYPE="oracleasm"
/dev/sdh2: LABEL="DISK8" TYPE="oracleasm"
/dev/sdh3: LABEL="DISK9" TYPE="oracleasm"
/dev/sdh4: LABEL="DISK10" TYPE="oracleasm"
/dev/sdh1: LABEL="DISK7" TYPE="oracleasm"
/dev/sdi1: LABEL="DISK11" TYPE="oracleasm"
/dev/sdi2: LABEL="DISK12" TYPE="oracleasm"

It shows me the label DISK1.

So clearing the ASM disk header using dd left some junks.

| improve this answer | |
  • I'd be tempted to ask Oracle support about this - could cause trouble down the line – Philᵀᴹ Jan 20 '14 at 12:53
  • I think I had similar issue. Oracle support suggested to reboot the server. That helped. – Mindaugas Riauba Jan 20 '14 at 17:13

Erasing the header is not a clean way.

The good way is to run as root:

oracleasm deletedisk -v <label>

Disk <label> defines an unmarked device.
Dropping disk: done

And repeat on each cluster node, if so.

| improve this answer | |

I solved it by logging off from ASM and changing directory away from /dev/oracleasm/disks. Afterwards it worked ok.

| improve this answer | |
  • 1
    This answer is very unclear as to what you did. – Colin 't Hart May 11 '15 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.