Step to add ASM diskgroup in Oracle

Step to add ASM diskgroup in Oracle

ASM is introduced by Oracle with 10g release. It is used for data striping and mirroring purpose for increase the performance of the oracle database.

1. Check the available size in the diskgroup.

select name, type, total_mb, free_mb, required_mirror_free_mb, usable_file_mb from v$asm_diskgroup;

NAME       TYPE   TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
---------- ------ -------- ------- ----------------------- --------------
DISKGROUP1 NORMAL     6144    3768                    1024           1372


2. Check ASM attribute

SELECT group_number, name, value FROM v$asm_attribute ORDER BY group_number, name;

GROUP_NUMBER  NAME              VALUE
------------  ----------------  ----------
1             au_size           1048576
1             compatible.asm    11.1.0.0.0
1             compatible.rdbms  11.1.0
1             disk_repair_time  300M


3. Check the path of the disk:

SELECT group_number as GN, disk_number, mount_status,header_status, state, path FROM v$asm_disk;

GN DISK_NUMBER MOUNT_S HEADER_STATU STATE  PATH
-- ----------- ------- ------------ ------ ------------------------------
0  0           CLOSED  CANDIDATE    NORMAL C:\ORACLE\ASM_DISK\_FILE_DISK1
0  3           CLOSED  CANDIDATE    NORMAL C:\ORACLE\ASM_DISK\_FILE_DISK4
0  2           CLOSED  CANDIDATE    NORMAL C:\ORACLE\ASM_DISK\_FILE_DISK3
0  1           CLOSED  CANDIDATE    NORMAL C:\ORACLE\ASM_DISK\_FILE_DISK2


4. For add you need to configure disk first at Operating system level. You should have available disk at Operating system level. then you can allocate it to the ASM with createdisk command present in ASM binaries as follows:

5. Add disk with following command. you already have free disk /dev/sdd1

/etc/init.d/oracleasm createdisk ASMTEST /dev/sdd1

6. Check the group in ASM:

Select group_number, disk_number, name, state, mode_status, mount_status, total_mb, free_mb from v$asm_disk;

GROUP_NUMBER DISK_NUMBER NAME  STATE  MODE_ST MOUNT_S TOTAL_MB FREE_MB
------------ ----------- ----- ------ ------- ------  -------- --------
 1           0           ARCH1 NORMAL ONLINE  CACHED  10236    9862
 2           0           DATA1 NORMAL ONLINE  CACHED  20473    18874


7. Create new diskgroup at ASM level with created disk with external redundancy.

create diskgroup asmtest external redundancy disk 'ORCL:ASMTEST';

8. Check the diskgroup which you created in above command:

select group_number, disk_number, name, state, mode_status, mount_status, total_mb, free_mb from v$asm_disk;

GROUP_NUMBER DISK_NUMBER NAME    STATE  MODE_ST MOUNT_S TOTAL_MB FREE_MB
------------ ----------- ------- ------ ------- ------- -------- -------
1            0           ARCH1   NORMAL ONLINE  CACHED  10236    9862
2            0           DATA1   NORMAL ONLINE  CACHED  20473    18874
3            0           ASMTEST NORMAL ONLINE  CACHED  2046      1996

Advertisements

3 thoughts on “Step to add ASM diskgroup in Oracle

  1. Anonymous

    Hi, Sandeep

    Thanks for your post. Could you please explain the step 2. check the group in asm

    create diskgroup asmt1 external redundancy disk 'ORCL:ASMTEST';

    Do you need specify a size allocated when creating a diskgroup ?

    Thanks,
    Helen

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.