To Check free space diskgroup wise.
set lines 255
col path for a35
col Diskgroup for a15
col DiskName for a20
col disk# for 999
col total_mb for 999,999,999
col free_mb for 999,999,999
compute sum of total_mb on DiskGroup
compute sum of free_mb on DiskGroup
break on DiskGroup skip 1 on report -
set pages 255
select a.name DiskGroup, b.disk_number Disk#, b.name DiskName, b.total_mb, b.free_mb, b.path, b.header_status from v$asm_disk b, v$asm_diskgroup a where a.group_number (+) =b.group_number order by b.group_number, b.disk_number, b.name
/
To Check disk group status.
SELECT STATE, NAME FROM V$ASM_DISKGROUP;
To mount/dismount diskgroup
ALTER DISKGROUP TEST123 MOUNT;
ALTER DISKGROUP TEST123 DISMOUNT;
Where TEST is diskgroup name
to Drop disk group
DROP DISKGROUP TEST123; --(from the ASM instance, on which diskgroup is still mounted make sure its unmounted on all other nodes).
To add disk to already exixting disk group.
Once disk is presented to nodes check access privileges to oracle or the user who is owner of ASM installation on all nodes this is very important.
If ASM lib is installed(Typically on Linux OS)
$ /etc/init.d/oracleasm scandisks
$ /etc/init.d/oracleasm listdisks
$ /etc/init.d/oracleasm querydisk <each disk from previous output>
Check diskgroup to which you want to add disk
SELECT STATE, NAME FROM V$ASM_DISKGROUP;
Add disk to existing diskgroup as follows
ALTER DISKGROUP <my diskgroup> ADD DISK '<your candidate disk>';
Check if rebalance is complete.
select * from v$asm_operation;
if no rows returned then rebalance complete.
set lines 255
col path for a35
col Diskgroup for a15
col DiskName for a20
col disk# for 999
col total_mb for 999,999,999
col free_mb for 999,999,999
compute sum of total_mb on DiskGroup
compute sum of free_mb on DiskGroup
break on DiskGroup skip 1 on report -
set pages 255
select a.name DiskGroup, b.disk_number Disk#, b.name DiskName, b.total_mb, b.free_mb, b.path, b.header_status from v$asm_disk b, v$asm_diskgroup a where a.group_number (+) =b.group_number order by b.group_number, b.disk_number, b.name
/
To Check disk group status.
SELECT STATE, NAME FROM V$ASM_DISKGROUP;
To mount/dismount diskgroup
ALTER DISKGROUP TEST123 MOUNT;
ALTER DISKGROUP TEST123 DISMOUNT;
Where TEST is diskgroup name
to Drop disk group
DROP DISKGROUP TEST123; --(from the ASM instance, on which diskgroup is still mounted make sure its unmounted on all other nodes).
To add disk to already exixting disk group.
Once disk is presented to nodes check access privileges to oracle or the user who is owner of ASM installation on all nodes this is very important.
If ASM lib is installed(Typically on Linux OS)
$ /etc/init.d/oracleasm scandisks
$ /etc/init.d/oracleasm listdisks
$ /etc/init.d/oracleasm querydisk <each disk from previous output>
Check diskgroup to which you want to add disk
SELECT STATE, NAME FROM V$ASM_DISKGROUP;
Add disk to existing diskgroup as follows
ALTER DISKGROUP <my diskgroup> ADD DISK '<your candidate disk>';
Check if rebalance is complete.
select * from v$asm_operation;
if no rows returned then rebalance complete.
No comments:
Post a Comment