Disk ASM
Disk ASM
SELECT
a.name disk_group_name, b.path disk_path, b.reads reads, b.writes writes,
b.read_errs read_errs, b.write_errs write_errs, b.read_time read_time, b.write_time
write_time,
b.bytes_read bytes_read, b.bytes_written bytes_written
FROM v$asm_diskgroup a JOIN v$asm_disk b USING (group_number)
ORDER BY a.name
/
===================================================================================
================================================================
Mastering ASMCMD
ASMCMD> asmcmd -p
cd : Changes the current directory to the specified directory.
du : Displays the total disk space occupied by ASM files in the specified ASM
directory and all its subdirectories, recursively.
find Lists the paths of all occurrences of the specified name (with wildcards)
under the specified directory :
ASMCMD> find +dgroup1 undo* +dgroup1/SAMPLE/DATAFILE/UNDOTBS1.258.555341963
+dgroup1/SAMPLE/DATAFILE/UNDOTBS1.272.557429239
The following example returns the absolute path of all the control files in
the +dgroup1/sample directory :
ASMCMD> find -t CONTROLFILE +dgroup1/sample *
+dgroup1/sample/CONTROLFILE/Current.260.555342185
+dgroup1/sample/CONTROLFILE/Current.261.555342183
ls : Lists the contents of an ASM directory, the attributes of the specified file,
or the names and attributes of all disk groups.
rmalias : Deletes the specified alias, retaining the file that the alias points
to.
===================================================================================
==============================================================================
ASM Dynamic Views: ASM Instance Information
Posted By Sagar Patil
V$ASM_ALIAS Shows every alias for every disk group mounted by the ASM instance
V$ASM_CLIENT Shows which database instance(s) are using any ASM disk groups that
are being mounted by this ASM instance
V$ASM_DISK Lists each disk discovered by the ASM instance, including disks that
are not part of any ASM disk group
V$ASM_DISKGROUP Describes information about ASM disk groups mounted by the ASM
instance
V$ASM_FILE Lists each ASM file in every ASM disk group mounted by the ASM instance
V$ASM_OPERATION Like its counterpart, V$SESSION_LONGOPS, it shows each long-
running ASM operation in the ASM instance
V$ASM_TEMPLATE Lists each template present in every ASM disk group mounted by the
ASM instance
V$ASM_DISKGROUP Shows one row per each ASM disk group that’s mounted by the local
ASM instance
V$ASM_DISK Displays one row per each disk in each ASM disk group that are in use by
the database instance
V$ASM_CLIENT Lists one row per each ASM instance for which the database instance
has any open ASM files
Example ASM1DG1.ORCL.DATAFILE.TBSASM.257.1
A fully-qualified file name comprises the following five components, and always
ends with a special number pair:<group> :
The name of the ASM disk group.
<dbname>. The database that owns this ASM file.
<file type>. The Oracle file type (e.g. DATAFILE, ARCHIVELOG, CONTROLFILE).
<tag>. Type-specific information about the file. In this case, it is the
corresponding tablespace name for the datafile.
<file>.<incarnation>. A special number pair that ASM generates to insure
uniqueness.
===================================================================================
==============================================================================
===================================================================================
===================================================================
1-connexion à ASM : shell>asmcmd
ASMCMD> cd DATA
ASMCMD> ls =l
8- Disk operations(add and drop asm disks) status : SQL> select * from
v$asm_operation;
9- Add Disks From ASM Disk Group : alter diskgroup DATA add disk
'/dev/oracleasm/disks/ASMDATA08';
10- Add Disks to ASM Disk Group : ALTER DISKGROUP DATA ADD DISK
'/dev/mapper/asmtsk1' NAME DATA_0002 SIZE 102399M REBALANCE POWER 10;
11- List the All ASM Disks and their state : select DISK_NUMBER,name ,PATH,
MOUNT_DATE from v$asm_disk;
12- List the All ASM Disks statistics : select group_number, name, TOTAL_MB,
FREE_MB from V$asm_disk_stat;