Creating and Altering ASM diskgroups

To create the partition

# fdisk –l
# fdisk  /dev/sdb

‘n’ for new partition
 enter default values
‘w’ for write the partition

Changing the ownership of the partition

# chown –R oracle:dba
/dev/sdb*
# chmod -R 775 /dev/sdb*
 Starting the instance and creating the diskgroup 

$export ORACLE_SID=+ASM
$sqlplus / as sysasm
Sql> startup nomount
Sql>
select name,path from v$asm_disk;
Creating of the diskgroup       
                                                                 
Sql> create diskgroup DG01 external redundancy disk ‘/dev/sdb1’,’/dev/sdb2’;
Sql> create diskgroup DG01 disk ‘/dev/sdb1’,’/dev/sdb2’;
Sql> create diskgroup DG01 high redundancy disk ‘/dev/sdb1’, ’/dev/sdb2’, ’/dev/sdb3’;
Sql> select name,state
from v$asm_diskgroup;
Sql> create diskgroup DG01 normal redundancy
failgroup
fg1 disk ‘/dev/sdb1’,’/dev/sdb2’
failgroup
fg2 disk ‘/dev/sdb3’,’/dev/sdb4’;

Altering the diskgroup

sql> alter diskgroup DG01
mount;
sql>alter diskgroup DG01
dismount;
Sql> alter diskgroup DG01
add disk ‘/dev/sdb3’;
Sql> select name,path from
v$asm_disk;
Sql> alter diskgroup DG01
drop disk DG01_0003;
Utility to manage the diskgroup

$asmcmd
$asmca
  • March 1, 2018 | 13 views