Rebalance Disk
Group
·
ASM rebalance a
disk group automatically, whenever we add or remove disks form disk group.
·
Disk groups can
be rebalanced manually using the REBALANCE clause of the ALTER
DISKGROUP statement.
·
If the POWERclause
is omitted the ASM_POWER_LIMIT parameter value is used.
Example :
SQL> ALTER
DISKGROUP DATA_DG REBALANCE POWER 5;
Mount and
Dismount The ASM DISKGROUP
Disk groups are
mounted at ASM instance startup and unmounted at ASM instance shutdown. Manual
mounting and dismounting can be accomplished using the ALTER
DISKGROUP statement as seen below.
ALTER DISKGROUP
ALL DISMOUNT;
ALTER DISKGROUP
ALL MOUNT;
ALTER DISKGROUP
disk_group_1 DISMOUNT;
ALTER DISKGROUP
disk_group_1 MOUNT
How to Create
DISK GROUP
SQL> create
diskgroup DATA_DG normal redundancy
Failgroup groupA
disk ‘/devices/Disk1’, ‘/devices/Disk2’, ‘/devices/Disk3’,
Failgroup groupB
disk ‘/devices/DiskD1’, ‘/devices/DiskD2’, ‘/devices/DiskD3’,
When oracle
writes data to the disks in the first failure group Group 1, it also
wites those extents to disk in the other failure group Group ‘D1’.
Important:
·
When you don’t
specify a FAILGROUP clause, the disk is in its own failure group.
Adding Disks to
a Disk Group
ALTER DISKGROUP
DATA_DG ADD DISK '/devices/DiskA1’,’/device/DiskB1';
Note:
· When a disk is
added, it is formatted and then rebalanced.
·
When you don’t
specify a FAILGROUP clause, the disk is in its own failure group.
·
When you don’t
specify a REDUNDANCY clause, the disk is in its own failure group.
· If you don't
specify the NAME clause, Oracle assigns its own system-generated names.
· If the disk
already belongs to a disk group, the statement will fail.
Resize a Disk
· Resize a
specific disk.
ALTER DISKGROUP
DATA_DG RESIZE DISK DISK1 SIZE 100G;
· Resize all
disks in a disk group.
ALTER DISKGROUP DATA_DG
RESIZE ALL SIZE 100G;
· Undrop Disk
The UNDROP
DISKS clause of the ALTER DISKGROUP statement allows pending
disk drops to be undone. It will not revert drops that have completed, or disk
drops associated with the dropping of a disk group.
Example : SQL> ALTER DISKGROUP disk_group_1 UNDROP
DISKS;
Dropping Disks
and Disk Groups
ALTER DISKGROUP
DATA_DG DROP DISK DiskA1;
DROP DISKGROUP DATA_DG
INCLUDING CONTENTS;
Note:
· DROP DISKGROUP
statements requires the instance to be in MOUNT state.
· When a disk is
dropped, the disk group is rebalanced by moving all of the file extents from
the dropped disk to other disks in the disk group. The header on the dropped
disk is then cleared.
· If you specify
the FORCE clause for the drop operation, the disk is dropped even if Automatic
Storage Management cannot read or write to the disk.
· You can also
drop all of the disks in specified failure groups using the DROP DISKS IN
FAILGROUP clause.
DISK STATUS in ASM
·
UNPROTECTED - No mirroring or striping regardless of the
redundancy setting.
·
MIRROR -
Two-way mirroring for normal redundancy and three-way mirroring for high
redundancy. This attribute cannot be set for external redundancy.
·
COARSE - Specifies lower granuality for striping.
This attribute cannot be set for external redundancy.
·
FINE - Specifies higher granularity for striping.
This attribute cannot be set for external redundancy.
See Also See Also
No comments:
Post a Comment