Improvements in ASM

ASM enhances the performance provided by raw disks, making it difficult to administer these disks. In addition, ASM provides storage mapping policy, which can be configured at the file level instead of the drive level according to the retrieval method.

Introduce

ASM enhances the performance provided by raw disks, making it difficult to administer these disks. In addition, ASM provides storage mapping policy, which can be configured at the file level instead of the traditional disk manager level. Mapped or non-mapped files in an ASM disk group can coexist.

Improvements in ASM Picture 1Improvements in ASM Picture 1 ASM "spreads" Oracle data files across all logical drives in the same group, thereby eliminating all Hotspots (storage areas with the most frequently used tables). But the best thing is that it allows adding or removing drives online. All new functions are added while the user does not have to pay any extra costs. Whenever a group file system is needed, ASM is always an important component, like its own resources (disk, file). ASM can share and match a shared hosting architecture, whether it is RAC or non-RAC clusterware.

ASM is deployed on a large scale in companies with large data and constantly increasing such as mobile and telecommunications companies, in large retail markets such as Amazon and in some banking applications. I personally think that the future ASM can replace all the data storage management products of manufacturers now.

In this article, we will see some new components of ASM version 10G R2 and discuss in more detail some of the elements we recently discovered.

New ingredients

1, Release 2 extends the functionality for ASM, enabling support for multiple database versions. But be cautious, because ASM only uses the features of the lowest version. That is, if you are running 10.2 database on an ASM v10.1 session, ASM will not use the feature of 10.2, and vice versa.

When querying the virtual v $ ASM_CLIENT table, you can see two additional columns: compatible_Version and software_version. They have the function of incorporating this component.

 SQL> select * from v $ asm_client; GROUP_NUMBER INSTANCE_NAME DB_NAME STATUS ------------ ---------------------------------- ------- -------- ------------ SOFTWARE_VERSION ---------------------- -------------------------------------- COMPATIBLE_VERSION ----------- ------------------------------------------------- first + ASM1 QPRV CONNECTED 10.1.0.2.0 10.2.0.0.0 

2, Release 2 also supports the consolidation of databases on a single node. That is, with previous 10G versions, you cannot manage a database on a single session and database RAC sessions on a single node using ASM. But in 10G R2, an ASM session on a node can manage storage combining various database operations that are taking place on the node. This new feature makes it much simpler for DBA storage management (database administrators). If you have used two ASM programs for multi-database administration to work on one node, you need to convert one to the ASM single program with new 10G R2 binary numbers. Without this upgrade, you will not have the opportunity to simplify administration on a single ASM session.

3, Oracle Database 10G Release 2 provides the ASM command line interface utility (ASMCMD) to be able to access and manage files from the Command Prompt command window. Previous versions must use SQL / PL * Plus or OEM.

Some examples of this command line interface :

 $ asmcmd asmcmd: command disallowed by current instance type # ORACLE_SID is wrong $ echo $ ORACLE_SID ORCL $ export ORACLE_SID = + ASM1 $ asmcmd ASMCMD> 

Identify disc groups, use ASMCMD :

 ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN NN 512 4096 1048576 122876 46775 0 46775 0 DATABASE_DG / ASMCMD> lsct DB_Name Status Software_Version Compatible_version Instance_Name ORCL CONNECTED 10.2.0.1.0 10.2.0.1.0 ORCL1 

Identify data files, use ASMCMD :

 ASMCMD> cd + DATABASE_DG / qprv ASMCMD> ls CONTROLFILE / DATAFILE / ONLINELOG / PARAMETERFILE / TEMPFILE / devices_01.dbf operations_01.dbf users01.dbf 

Find the location of the control file placed on ASM :

ASMCMD> cd CONTROLFILE /
ASMCMD> ls
Current.260.563388683
Current.261.563388685
Current.262.563388685

Recover disk space, use ASMCMD :

Assume that you have three RAC session nodes, the database stores logs and backup sets placed on ASM storage. After a while you see that they are no longer needed and want to delete them to reclaim disk space in ASM. Do as follows:

ASMCMD> CD + BACKUPDEST # change disc groups
ASMCMD> PWD # current directory
ASMCMD> find.-t BACKUPSET. * # to find backup file sets in disk groups

After the files are listed, you can use the rm command of the operating system to delete them and use RMAN to cross-check the deleted backups.

Note that the -t flag can have values ​​such as DATAFILE, ARCHIVELOG, CONTROLFILE, ONLINELOG.

ASMCMD> help
asmcmd [-p] [command]

The ORACLE_HOME and ORACLE_SID environment variables determine the session the program is connecting to. ASMCMD establishes a retransmission connection to it, similar to SQLPLUS / AS SYSDBA. The user must be a member of the system administrator group (SYSDBA).

The -p option allows the current directory to be displayed in the Command Prompt command window, similar to:

ASMCMD [+ DATAFILE / ORCL / CONTROLFILE]>

[command] describes one of the following commands, accompanied by its parameters.

(Type 'help [command]' to see more help with ASMCMD if needed).

Commands:

CD
du
tìm
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias

4, 10G R2 provides a more flexible way of transferring files between databases and an internal database: There is a more interesting way of transferring files between ASM disk groups (ASM Disk Group ) is to use RMAN. RMAN is an important component of Automatic Storage Management automatic storage management. It is responsible for monitoring ASM file names and deleting obsolete ASM files. Since the ASM file cannot be accessed via the normal operating system interface, RMAN becomes a useful means of copying ASM files.

However, in some cases you may want to transfer the file on the remote database server, not using RMAN or installing datagaurd. Then we have the DBMS package called DBMS_FILE_TRANSFER. 10G R2 version supports 'ASM to OS' file and 'OS File to ASM'. Previous versions of 10G also supported the transfer of 'ASM to ASM' file (between two ASM files) and 'OS to OS' (between two operating system files).

Using this function, DBA can transfer data files from within Oracle without physically "logging" the operating system itself. In addition, this function provides additional options for general database administration, such as simple storage management (need to free up disk space). Let's take a look at the following example to understand how to transfer an ASM file to the operating system directory:

 SQL> select tablespace_name, file_name from dba_Data_files; TABLESPACE_NAME ------------------------------ FILE_NAME ------------------ -------------------------------------------------- -------------------------------------------------- - USERS + DATABASE_DG / qprv / users01.dbf SYSAUX + DATABASE_DG / qprv / sysaux01.dbf UNDOTBS1 + DATABASE_DG / qprv / undotbs01.dbf SYSTEM + DATABASE_DG / qprv / system01.dbf UNDOTBS2 + DATABASE_DG / qprv / undotbs02.dbf DEVICES + DATABASE_DG /qprv/devices_01.dbf SERVICES + DATABASE_DG / qprv / services_01.dbf OPERATIONS + DATABASE_DG / qprv / operations_01.dbf BBIDS_TBS + DATABASE_DG / qprv / bbids_tbs_01.dbf USERS + DATABASE_DG / qprv / users02.dbf TEST + DATABASE_DG / qprv / test. dbf 11 rows selected. SQL> create or replace directory oracle_10g as '+ DATABASE_DG / qprv /'; Thư mục tạo. SQL> grant read, write on directory oracle_10g to ram; Grant succeeded. SQL> create or replace oracle_dest directory as '+ db04 / oradata / qprv /'; Thư mục tạo. SQL> grant read, write on directory oracle_dest to ram; The offline succeeded SQL> ALTER DATABASE DATAFILE '+ DATABASE_DG / qprv / test.dbf'; Database altered. 

Now, copy the file from the ASM target disk group to the normal OS file system directory.

 BEGIN DBMS_FILE_TRANSFER.COPY_FILE (source_directory_object => 'ORACLE_10G', source_file_name => test.dbf, destination_directory_object => 'ORACLE_DEST', destination_file_name => 'TEST.DBF); END; Database altered 

5, ASM / XDB FTP support is another new feature, allowing the use of XDB and ASM with the user interface to retrieve files and putting files into ASM managed storage areas. When selecting the XML Database component during the installation process, you can create a virtual ASM directory. This directory is empty and placed on / sys / asm, inside the XML Database hierarchical tree. Any activity on the ASM virtual directory is controlled by ASM. Administrators can exploit this function to configure different folders with different disk groups. A disk group folder can have internal subdirectories with several files, folders. The FTP component is quite useful in transferring files in / out of these directories.

6, Virtual tables and new ASM columns:

  1. V $ asm_disk_stat and v $ asm_diskgroup_stast

    These two virtual tables are identical, called v $ asm_disk and v $ asm_diskgroup, respectively, but retrieve data from memory instead of transforming from disk groups. According to some practical experience, you should query v $ asm_disk and v $ asm_diskgroup, they are quite interesting, but not at peak hours.
  2. New columns added v $ asm_diskgroup:

    USABLE_FREE_SPACE: Total free space used. In some previous versions, the free space calculated from this virtual table is not mapped to the account.

    REQUIRED_MB_FREE: This column is the estimated space parameter required during the drive recovery process when one or more disks are damaged.

    REDUNANCE_LOWERED: When a data file area is not mapped, the reserve area will decrease according to the level set by the DBA. This column is added to the v $ asm_file virtual table to identify this reduction process in the reserved area. The value for this column is YES or NO.

Conclude

New components in ASM make DBA's administration easier, especially multi-session management on the same node. You do not need to use any third party software in ASM disk management and database file system. The additional auto function helps ASM become a more stable, efficient and economical solution.

3.5 ★ | 2 Vote