Datasheet

22
Chapter 1
Using Oracle ASM
specific failure group. As a result, each disk will be assigned to its own failure group when
it’s created. For example, when we added the disk to the
cooked_dgroup1 disk group, a
new failure group called
cooked_dgroup1_0002 was created, as shown in this output:
SQL> select disk_number, group_number, failgroup from v$asm_disk;
DISK_NUMBER GROUP_NUMBER failgroup
----------- ------------ ------------------------------
1 0
0 1 DISKCONTROL1
1 1 DISKCONTROL2
2 1 COOKED_DGROUP1_0002
We can add a disk to an existing failure group by using the failgroup parameter, as
shown in this example:
alter diskgroup cooked_dgroup1
add failgroup DISKCONTROL1
disk ‘c:\oracle\asm_disk\_file_disk4’
name new_disk;
Removing Disks from an ASM Disk Group
The alter diskgroup command allows you to remove disks from an ASM disk group using
the
drop disk parameter. ASM will first rebalance the data on the disks to be dropped,
assuming enough space is available. If insufcient space is available to move the data from
the disk to be dropped to another disk, then an error will be raised. You can use the
force
parameter to force ASM to drop the disk, but this can result in data loss. Here is an example
of dropping a disk from a disk group:
alter diskgroup cooked_dgroup1
drop disk ‘c:\oracle\asm_disk\_file_disk4’;
The alter diskgroup command also gives you the option to drop from a failure group
all disks that are assigned to the disk group. Use the
in failgroup keyword and then indi-
cate the name of the failure group, as shown in this example:
alter diskgroup cooked_dgroup1
drop disks in failgroup diskcontrol1;
When you drop a disk from a disk group, the operation is asynchronous. Therefore,
when the SQL prompt returns, this does not indicate that the operation has completed. To
95134c01.indd 22 1/28/09 9:43:43 AM