1

I have dropped the disk from ASM diskgroup:

> ALTER DISKGROUP DATA01 DROP DISK DISK1;

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: 11.2.0.1 2-node RAC

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

------------------------------------Edit1--------------------------------------------

# fuser /dev/oracleasm/disks/DISK1

returns nothing on both nodes

2

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

$ . oraenv
ORACLE_SID = [+ASM1] ?

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.

2
  • 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. Jan 20 '14 at 17:13
0

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.

-2

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

1
  • 1
    This answer is very unclear as to what you did. May 11 '15 at 10:14

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .