日期:2014-05-16 浏览次数:20481 次
今天是2014-03-13,学习一下acfs基本知识。
oracle acfs 简介:
Oracle Automatic Storage Management Cluster File System (Oracle ACFS) is a multi-platform, scalable file system, and storage management technology that extends Oracle Automatic Storage Management (Oracle ASM) functionality to support customer files maintained
outside of Oracle Database. Oracle ACFS supports many database and application files, including executables, database trace files, database alert logs, application reports, BFILEs, and configuration files. Other supported files are video, audio, text, images,
engineering drawings, and other general-purpose application file data.
一、创建acfs文件系统:
1)创建acfs文件系统的前提要求是:
数据库版本为11G R2,已经安装了gi和asm实例且存在磁盘组,磁盘组的属性compatible.asm 是11.2之上,另外compatible.advm为11.2之上
2)创建逻辑卷
在创建acfs文件系统之前需要先创建动态卷(advm),注意在创建动态卷之前必须要加载acfs 文件系统驱动,否则会报错。如果启动acfs volume driver需要使用root权限进行启动。启动之后即可创建卷组。
eg:
SQL> alter diskgroup datagroup2 add volume acfsvol0 size 512M; alter diskgroup datagroup2 add volume acfsvol0 size 512M * ERROR at line 1: ORA-15032: not all alterations performed ORA-15477: cannot communicate with the volume driver SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option -bash-4.1$ cd $ORACLE_HOME -bash-4.1$ cd bin/ -bash-4.1$ ./acfsload start ACFS-9130: Root access required [root@oracle-one ~]# /ginf/grid/product/11.2.0/grid_1/bin/acfsload start ACFS-9391: Checking for existing ADVM/ACFS installation. ACFS-9392: Validating ADVM/ACFS installation files for operating system. ACFS-9393: Verifying ASM Administrator setup. ACFS-9308: Loading installed ADVM/ACFS drivers. ACFS-9154: Loading 'oracleoks.ko' driver. ACFS-9154: Loading 'oracleadvm.ko' driver. ACFS-9154: Loading 'oracleacfs.ko' driver. ACFS-9327: Verifying ADVM/ACFS devices. ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'. ACFS-9156: Detecting control device '/dev/ofsctl'. ACFS-9322: completed [root@oracle-one ~]# -bash-4.1$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 13 15:05:24 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option SQL> alter diskgroup datagroup2 add volume acfsvol0 size 512M; Diskgroup altered. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option -bash-4.1$ asmcmd -p ASMCMD [+] > volcreate -G datagroup2 -s 512M acfsvol1 ASMCMD [+] > volinfo -G datagroup2 -a Diskgroup Name: DATAGROUP2 Volume Name: ACFSVOL0 Volume Device: /dev/asm/acfsvol0-142 State: ENABLED Size (MB): 512 Resize Unit (MB): 32 Redundancy: MIRROR Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: Volume Name: ACFSVOL1 Volume Device: /dev/asm/acfsvol1-142 State: ENABLED Size (MB): 512 Resize Unit (MB): 32 Redundancy: MIRROR Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: ASMCMD [+] >
查看卷组信息:
SQL> set linesize 200 SQL> col volume_device for a50 SQL> col volume_name for a40 SQL> select volume_name,size_mb,state,volume_device from v$asm_volume; VOLUME_NAME SIZE_MB STATE VOLUME_DEVICE ---------------------------------------- ---------- -------- -------------------------------------------------- ACFSVOL1 512 ENABLED /dev/asm/acfsvol1-142 ACFSVOL0