Oracle ASM - yet another LVM (management)

6. Next step is to start ASM instance. Do not forget to set SID to be +ASM when you try to login with sqlplus in to the instance
$ export ORACLE_SID=+ASM
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 5 09:28:21 2010
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area  284565504 bytes
Fixed Size                  1336036 bytes
Variable Size             258063644 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>


7. Lets check the status of our diskgroups
SQL> SELECT name, type, total_mb, free_mb FROM V$ASM_DISKGROUP;
DATA                           NORMAL      32756      32575


8. Check the list of available disks
SQL> select name,  path  from V$ASM_DISK;
NAME
------------------------------
PATH
--------------------------------------------------------------------
ORCL:DFDISK4

ORCL:DFDISK5
DFDISK0
ORCL:DFDISK0
DFDISK1
ORCL:DFDISK1
DFDISK2
ORCL:DFDISK2
DFDISK3
ORCL:DFDISK3
FBDISK0
ORCL:FBDISK0
FBDISK1
ORCL:FBDISK1

8 rows selected.


9. And create new diskgroup for flashback
SQL>  CREATE DISKGROUP FBA NORMAL REDUNDANCY  FAILGROUP fba_fb1 disk 'ORCL:FBDISK0'  FAILGROUP fba_fb2  disk 'ORCL:FBDISK1';         
Diskgroup created.


10. and see the new list of diskgroups
SQL>  select name,total_mb from V$ASM_DISKGROUP;
NAME                             TOTAL_MB
------------------------------ ----------
DATA                                32756
FBA                                 16378


11. Add two new disks to diskgroup DATA
SQL>  ALTER DISKGROUP data ADD DISK 'ORCL:DFDISK4', 'ORCL:DFDISK5';
Diskgroup altered.
SQL> select name,total_mb from V$ASM_DISKGROUP where name='DATA';
NAME                             TOTAL_MB
------------------------------ ----------
DATA                                49134


12. Remove one of the disks from diskgroup
SQL>  ALTER DISKGROUP data DROP  DISK DFDISK5;
Diskgroup altered.
SQL>  select name,total_mb from V$ASM_DISKGROUP where name='DATA';
NAME                             TOTAL_MB
------------------------------ ----------
DATA                                40945
and size is already 40GB


For further information about migration of database to ASM, filepaths, etc, please consult official Oracle documentation about ASM: Oracle® Database Storage Administrator's Guide

No comments:

Post a Comment

Should I trust AI

 Should I trust AI? So far no, sorry.  I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...