Pages

Thursday, July 29, 2010

ASM Administration



For ASM installation,startup and shutdown information go to  ASM Installation post.

Disk groups are created using the CREATE DISKGROUP statement.
eg:






CREATE DISKGROUP disk_group_1 NORMAL REDUNDANCY
     FAILGROUP failure_group_1 DISK
       '/devices/diska1' NAME diska1,
       '/devices/diska2' NAME diska2,
     FAILGROUP failure_group_2 DISK
       '/devices/diskb1' NAME diskb1,
       '/devices/diskb2' NAME diskb2;
The failgroup clause in the above example is for redundancey.
ie,
* NORMAL REDUNDANCY - Two-way mirroring, requiring two failure groups.
* HIGH REDUNDANCY - Three-way mirroring, requiring three failure groups.
* EXTERNAL REDUNDANCY - No mirroring for disks that are already protected using hardware mirroring or RAID.

The above  is therefore in normal redundancy.

Disk groups can be deleted using the DROP DISKGROUP statement.






DROP DISKGROUP disk_group_1 INCLUDING CONTENTS;

Disks can be added or removed from disk groups using the ALTER DISKGROUP statement.

-- Add disks.
   ALTER DISKGROUP disk_group_1 ADD DISK
     '/devices/disk*3',
     '/devices/disk*4';

-- Drop a disk.
   ALTER DISKGROUP disk_group_1 DROP DISK diska2;

Disks can be resized using the RESIZE clause of the ALTER DISKGROUP statement.
   -- Resize a specific disk.
   ALTER DISKGROUP disk_group_1
     RESIZE DISK diska1 SIZE 100G;

-- Resize all disks in a failure group.
   ALTER DISKGROUP disk_group_1
     RESIZE DISKS IN FAILGROUP failure_group_1 SIZE 100G;

-- Resize all disks in a disk group.
   ALTER DISKGROUP disk_group_1
     RESIZE ALL SIZE 100G;
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.
ALTER DISKGROUP disk_group_1 UNDROP DISKS;

Disk groups can be rebalanced manually using the REBALANCE clause of the ALTER DISKGROUP statement. If the POWER clause is omitted the ASM_POWER_LIMIT parameter value is used. Rebalancing is only needed when the speed of the automatic rebalancing is not appropriate.
ALTER DISKGROUP disk_group_1 REBALANCE POWER 5;

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;

No comments:

Post a Comment