4 Replies Latest reply: May 28, 2014 3:52 PM by Levi Pereira RSS

    ASM Drop diskgroup (Including Contents)

    885820

      HI,

       

      I was hoping someone could help clarify the 11.2 documentation for me here.

       

      If I had the following scenario:

       

      -I want to drop all ASM disks from a cluster (where databases are being decommissioned)

      -After dropping all disks I want the header of each disk to show as Former.

       

      I was under the impression that simply dropping a diskgroup (NOT specifying 'including contents) would drop the disk group and mark all disks that were contained within it with a header status of 'FORMER'

       

      However the oracle docs state that of running the command 'DROP DISKGROUP data1' for example:

       

      "After ensuring that none of the files contained in data1 are open, Oracle ASM rewrites the header of each disk in the disk group to remove Oracle ASM formatting information. The statement does not specify INCLUDING CONTENTS, so the drop operation fails if the disk group contains any files"

       

      This doesn't really make sense to me, lets say if +data1 had 5 member disks,

       

      - Does running 'drop diskgroup data1' drop the diskgroup and mark those 5 member disks as former?

      - Does running 'drop diskgroup data1' fail to drop the diskgroup due to there being 5 disks assigned as member and INCLUDING CONTENTS was not specified.

      - In order to drop the diskgroup and mark all disks within it with a header status of 'FORMER' must the command 'drop diskgroup data1 INCLUDING CONTENTS' be run?

       

      Any help clarifying this would be appreciated.

       

      Thanks

       

       

       

       

        • 1. Re: ASM Drop diskgroup (Including Contents)
          J.A.

          are you using asmlib or Udev ?

          do you have physical objects inside this diskgroup ?

           

          1. You only Drop the disks from the disk Group.
          2. Wait the rebalance process to finish
          3. Drop the Diskgroup with the last disk
          4. Then you can use again those disk on another diskGroup

           

          Or Drop the DiskGroup

           

          The DROP DISKGROUP statement lets you drop an Automatic Storage Management disk group along with all the files in the disk group. Automatic Storage Management first ensures that no files in the disk group are open. It then drops the disk group and all its member disks and clears the disk header.

           

          Oracle Link:

          DROP DISKGROUP

           

          I hope this help you

           

          Regards

          • 2. Re: ASM Drop diskgroup (Including Contents)
            885820

            lets say this is a 10TB diskgroup

             

            dropping all the disks, waiting for rebalance and then dropping diskgrop would take a lot longer to complete wouldn't it? - more to the point in this scenario how does the rebalance actually work if there are no other disks to rebalance onto?

             

            Regarding drop diskgroup, the link you have provided relates to 11.1 docs. this is an 11.2 system..... this is the point im making about the 11.2 docs and how I am unclear from them that 'DROP Diskgroup data1' or example would clear the header status on all disks within the diskgroup unless INCLUDING CONTENTS is specified.

            • 3. Re: ASM Drop diskgroup (Including Contents)
              J.A.

              I send you the information for 11.2:

               

              PURPOSE

              The DROP DISKGROUP statement lets you drop an Oracle ASM disk group along with all the files in the disk group. Oracle ASM first ensures that no files in the disk group are open. It then drops the disk group and all its member disks and clears the disk header.

               

              INCLUDING CONTENTS

              Specify INCLUDING CONTENTS to confirm that Oracle ASM should drop all the files in the disk group. You must specify this clause if the disk group contains any files.

              EXCLUDING CONTENTS

              Specify EXCLUDING CONTENTS to ensure that Oracle ASM drops the disk group only when the disk group is empty. This is the default. If the disk group is not empty, then an error will be returned.

               

              LINK 11.2:

              DROP DISKGROUP

               

              1. If you want to drop this DiskGroup then use Including content and all the disks again will be available for the ASM.
              2. Or, Drop all the physical files by yourself with asmcmd and then Drop the DiskGroup without "INCLUDING CONTENTS" (default)

               

              If you choose method 1 or 2, the result will be the same for the disks and the disks will be available for ASM.

               

               

              Regards

              • 4. Re: ASM Drop diskgroup (Including Contents)
                Levi Pereira

                There is a point here:

                Both ASM command DROP DISKGROUP (no matter if INCLUDING/EXCLUDING CONTENTS) and ALTER DISKGROUP <DG_NAME> DROP DISK, Oracle DOESN'T format(erasing data) ASMDISK dropped it only destroy metadata on Header marking as FORMER.

                 

                Using ALTER DISKGROUP <DG_NAME> DROP DISK it first move data from ASMDISK being dropped to MEMBER ASMDISK and after rebalance only destroy metadata on Header of that ASMDISK marking as FORMER.


                All Operation System do that, only destroy header of Disk Device when drop a Disk Device from a Volume Group or anything else.


                INCLUDING CONTENTS option is only a security to make sure which User is aware that executing this command he is "excluding data" not only a empty diskgroup.