Dropping Disk Groups
The DROP DISKGROUP statement
enables you to delete an ASM disk group and optionally, all of its files. You
can specify the INCLUDING CONTENTS clause if you also want to
delete any files that might be contained in the disk group. The default
is EXCLUDING CONTENTS, which provides syntactic consistency and
prevents you from dropping the disk group if it has any contents
The
ASM instance must be started and the disk group must be mounted with none of
the disk group files open, in order for the DROP DISKGROUP statement
to succeed. The statement does not return until the disk group has been
dropped.
When
you drop a disk group, ASM dismounts the disk group and removes the disk group
name from the ASM_DISKGROUPS initialization parameter if a server
parameter file is being used. If a text initialization parameter file is being
used, and the disk group is mentioned in
the ASM_DISKGROUPS initialization parameter, then you must remove the
disk group name from the ASM_DISKGROUPS initialization parameter
before the next time that you shut down and restart the ASM instance.
The
following statement deletes dgroup1:
DROP DISKGROUP dgroup1;
After
ensuring that none of the files contained in dgroup1 are open, ASM
rewrites the header of each disk in the disk group to remove ASM formatting
information. The statement does not specify INCLUDING CONTENTS, so the
drop operation will fail if the disk group contains any files.
If
you cannot mount a disk group but need to drop it, you can use
the FORCE option of the DROP DISKGROUP statement. This
command enables you to remove the headers on disks that belong to a disk group
that cannot be mounted by any ASM instances as in the following example
where disk_group_name is the name of the disk group:
DROP DISKGROUP disk_group_name
FORCE
The
disk group on which you perform this operation should not be mounted anywhere
in the cluster. When you use the FORCE option, the ASM instance does
not attempt to verify that a disk group is being used by another ASM instance
in the same storage subsystem.
No comments:
Post a Comment