10 Replies Latest reply: Sep 17, 2012 2:03 PM by 962621 RSS

    Why can't I delete this ASM disk ?


      I have a 4 node RAC cluster using ASM ( on RHEL

      I added a new LUN, presented it to the 4 nodes, created a partition on it, marked it as an ASM disk
      and then added the disk to the existing FRA diskgroup - all good.

      After the rebalance, I dropped the old disk out of the disk group, it all rebalanced fine. - again all good.

      So now, I have this LUN that I no longer want to use for ASM, so I wanted to remove it from ASM by doing
      oracleasm deletedisk DISK_FRA but when I do this I get the error

      *# service oracleasm deletedisk DISK_FRA*
      *Removing ASM disk "DISK_FRA":                              [FAILED]*

      Looking at /var/log/oracleasm I can see
      Clearing disk header: oracleasm-write-label: Unable to open device "/dev/oracleasm/disks/DISK_FRA": Device or resource busy
      Unable to clear disk "DISK_FRA"

      What am I doing wrong ? Why is the device still busy ?

        • 1. Re: Why can't I delete this ASM disk ?

          i have seen this several times. I guess you dropped this disk from a disk group successfully and now want to delete the disk header. This happens from time to time
          and can be resolved by dismounting the diskgroup the disk originates from. Itmight sound strange but ASM seems to keep the device open even after dropping the disk.
          Dismounting the disk group seems to close the device handle and you can delete the asm header successfully.

          Ronny Egner
          My blog: http://ronnyegner.wordpress.com

          Edited by: Ronny Egner on Oct 9, 2009 7:32 AM
          • 2. Re: Why can't I delete this ASM disk ?
            Thanks Ronny

            actually, some investigation around metalink brought up bug 7225720 which is exactly the problem i have.

            Just going through testing it out. However, it looks as though a workaround would be to stop all DB instances
            and ASM instamces and then remove the disk - not so good on a 24x7 prod system though is it :)

            • 3. Re: Why can't I delete this ASM disk ?

              for your information: At least in my environment the 11g Release 2 ASM shows this behavior as well. Not so good......
              • 4. Re: Why can't I delete this ASM disk ?
                joe h
                We are hitting this problem in 11.2 ASM; the patch was supposed to be in the base release. We were able to successfully drop the disk (here AMS_102) and cannot delete the disk unless we stop the ASM instance.

                Anyone else hitting this problem in 11.2?

                root(/etc)# oracleasm deletedisk AMS_102

                Clearing disk header: failed

                Unable to clear disk "AMS_102"

                Linux 2.6.18-164.el5 #1 SMP Thu Sep 3 04:15:13 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
                • 5. Re: Why can't I delete this ASM disk ?
                  I have the same RAC.

                  /etc/init.d/oracleasm deletedisk SYS1
                  Removing ASM disk "SYS1": [FAILED]

                  All nodes see this DISK after scan
                  So I disable asm, stop it on all nodes, run deletedisk doesn't help.

                  and I can delete it only from node I created it on.
                  • 6. Re: Why can't I delete this ASM disk ?
                    Same problem with on x86-64 RH Linux 5.4.
                    Had to :
                    1. shutdown CRS on all nodes of the cluster (# ./crsctl stop crs)
                    2. disable CRS from starting on reboot (# ./crsctl disable crs)
                    3. Reboot all the servers (# shutdown -r now)
                    4. After reboot, stop ASMLIB (# service oracleasm stop)
                    5. Remove the disk using physical name rather than logical name (service oracleasm deletedisk /dev/mapper/mpath01p1)
                    6. Restart ASMLIB (# service oracleasm start)
                    7. Enable CRS on re-boot (# ./crsctl disable crs)
                    8. Reboot the servers

                    Regards, SteveC
                    • 7. Re: Why can't I delete this ASM disk ?
                      I ran into this issue with
                      oracleasm version 2.1.3
                      ASM Oracle Database 11g Enterprise Edition Release

                      This is what I did :-

                      $ fuser /dev/sdes1
                      $ dd if=/dev/zero of=/dev/sdes1 bs=1024 count=100
                      100+0 records in
                      100+0 records out
                      102400 bytes (102 kB) copied, 0.000324 seconds, 316 MB/s

                      $ /etc/init.d/oracleasm deletedisk RECO84
                      Removing ASM disk "RECO84": [  OK  ]

                      And then on all nodes.
                      $ oracleasm scandisks
                      • 8. Re: Why can't I delete this ASM disk ?
                        This works for me.
                        • 9. Re: Why can't I delete this ASM disk ?
                          I take the dd approach as well as it seems to be the best option most of the time. Then, if I need to pull the disk back into ASM, I just run oracleasm createdisk <name> <path>.
                          • 10. Re: Why can't I delete this ASM disk ?
                            ncalappu = awesome

                            That fixed it for me.