Using the Oracle ASM Cluster File System (Oracle ACFS) on Linux - (11gR2)

March 20, 2018 | Author: Mohammad Zaheer | Category: Oracle Database, File System, Computer File, Computer Cluster, Computer Data Storage


Comments



Description

Contents• • • • • • • • • Introduction ACFS Components ACFS Prerequisites ASM Configuration Assistant (ASMCA) Oracle Enterprise Manager (OEM) Command Line / SQL ACFS Snapshots Managing ACFS About the Author Introduction Introduced with Oracle ASM 11g Release 2, Oracle ASM Cluster File System (Oracle ACFS) is a general purpose POSIX compliant cluster file system implemented as part of Oracle Automatic Storage Management (Oracle ASM). Being POSIX compliant, all operating system utilities we use with ext3 and other file systems can also be used with Oracle ACFS given it belongs to the same family of related standards. Oracle ACFS extends the Oracle ASM architecture and is used to support many types of files which are typically maintained outside of the Oracle database. For example Oracle ACFS can be used to store BFILEs, database trace files, executables, report files and even general purpose files like image, text, video, and audio files. In addition, Oracle ACFS can be used as a shared file system for Oracle home binaries. The features included with Oracle ACFS allow users to create, mount, and manage ACFS using familiar Linux commands. Oracle ACFS provides support for snapshots and the ability to dynamically resize existing file systems online using Oracle ASM Dynamic Volume Manager (ADVM). Oracle ACFS leverages Oracle ASM functionality that enables: • • • • Oracle ACFS dynamic file system resizing Maximized performance through direct access to Oracle ASM disk group storage Balanced distribution of Oracle ACFS across Oracle ASM disk group storage for increased I/O parallelism Data reliability through Oracle ASM mirroring protection mechanisms While Oracle ACFS is useful for storing general purpose files, there are certain files that it is not meant for. For example, Oracle ASM (traditional disk groups) is still the preferred storage manager for all database files because Oracle ACFS does not support directIO for file read and write operations in 11g Release 2 (11.2). Oracle ASM was specifically designed and optimized to provide the best performance for database file types. In addition to Oracle database files, Oracle ACFS does not support files for the Oracle Grid Infrastructure home. Finally, Oracle ACFS does not support any Oracle files that can be directly stored in Oracle ASM. For example, SPFILE, flashback log files, control files, archived redo log files, the Grid Infrastructure OCR and voting disk, etc should be stored in Oracle ASM disk groups. The key point to remember is that Oracle ACFS is the preferred file manager for non-database files and is optimized for general purpose / customer files which are maintained outside of the Oracle database. This article describes three ways to create an Oracle ASM Cluster File System in an Oracle 11g Release 2 RAC database on the Linux operating environment: • ASM Configuration Assistant (ASMCA) • • Oracle Enterprise Manager (OEM) Command Line / SQL There is actually a fourth method that can be employed to create an Oracle ASM Cluster File System which is to use the ASMCMD command line interface. Throughout this guide, I'll demonstrate how to use the ASMCMD command line interface in place of SQL where appropriate. The Linux distribution used in this guide is CentOS 5.5. CentOS is a free Enterprise-class Linux Distribution derived from the Red Hat Enterprise Linux (RHEL) source and aims to be 100% binary compatible. Although Centos 5 is equivalent to RHEL 5, the CentOS operating system is not supported by Oracle ASM Cluster File System. Refer to the workaround documented in the prerequisites section of this article if you are using CentOS or a similar Red Hat clone. It is assumed that an Oracle RAC database is already installed, configured, and running. Refer to this guide for instructions on how to build an inexpensive two-node Oracle RAC 11g Release 2 database on Linux. ACFS Components Before diving into the details on how to create and manage Oracle ASM Cluster File System, it may be helpful to first discuss the major components. Figure 1 shows the various components that make up Oracle ACFS and provides an illustration of the example configuration that will be created using this guide. Figure 1: Oracle ASM Cluster File System Components Everything starts with an Oracle ASM disk group. An Oracle ASM disk group is made up of one or more disks shown in figure 1 as DOCSDG1. The next component is an Oracle ASM volume which is created within an Oracle ASM disk group. The example configuration illustrated above shows that we will be creating three volumes named docsvol1, docsvol2, and docsvol3 on the new disk group namedDOCSDG1. Finally, we will be creating a cluster file system for each volume whose mount points will be /documents1, /documents2, and /documents3 respectively. With Oracle ACFS, as long as there exists free space within the ASM disk group, any of the volumes can be dynamically expanded which means the file system gets expanded as a result. As I will demonstratelater in this article, expanding a volume / file system is an effortless process and can be performed online without the need to take any type of outage! Oracle ASM Dynamic Volume Manager (ADVM) Besides an Oracle ASM disk group, another key component to Oracle ACFS is the new Oracle ASM Dynamic Volume Manager (ADVM). ADVM provides volume management services and a standard driver interface to its client (ACFS, ext3, ext4, reiserfs, OCFS2, etc.). The ADVM services include functionality to create, resize, delete, enable, and disable dynamic volumes. An ASM dynamic volume is constructed out of an ASM file with an 'ASMVOL' type attribute to distinguish it from other ASM file types (i.e. DATAFILE, TEMPFILE, ONLINELOG, etc.): ASM File Name / Volume Name / Device Name Bytes File Type --------------------------------------------------------------- ----------------------------------+CRS/racnode-cluster/ASMPARAMETERFILE/REGISTRY.253.734544679 1,536 ASMPARAMETERFILE +CRS/racnode-cluster/OCRFILE/REGISTRY.255.734544681 272,756,736 OCRFILE -----------------272,758,272 +DOCSDG1 [DOCSVOL1] /dev/asm/docsvol1-300 ASMVOL +DOCSDG1 [DOCSVOL2] /dev/asm/docsvol2-300 ASMVOL +DOCSDG1 [DOCSVOL3] /dev/asm/docsvol3-300 ASMVOL 34,359,738,368 34,359,738,368 26,843,545,600 -----------------95,563,022,336 +FRA/RACDB/ARCHIVELOG/2010_11_08/thread_1_seq_69.264.734565029 ARCHIVELOG +FRA/RACDB/ARCHIVELOG/2010_11_08/thread_2_seq_2.266.734565685 ARCHIVELOG < SNIP > +FRA/RACDB/ONLINELOG/group_3.259.734554873 ONLINELOG +FRA/RACDB/ONLINELOG/group_4.260.734554877 ONLINELOG 52,429,312 52,429,312 -----------------12,227,537,408 +RACDB_DATA/RACDB/CONTROLFILE/Current.256.734552525 CONTROLFILE +RACDB_DATA/RACDB/DATAFILE/EXAMPLE.263.734552611 DATAFILE +RACDB_DATA/RACDB/DATAFILE/SYSAUX.260.734552569 DATAFILE +RACDB_DATA/RACDB/DATAFILE/SYSTEM.259.734552539 DATAFILE +RACDB_DATA/RACDB/DATAFILE/UNDOTBS1.261.734552595 DATAFILE +RACDB_DATA/RACDB/DATAFILE/UNDOTBS2.264.734552619 DATAFILE +RACDB_DATA/RACDB/DATAFILE/USERS.265.734552627 DATAFILE +RACDB_DATA/RACDB/ONLINELOG/group_1.257.734552529 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_2.258.734552533 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_3.266.734554871 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_4.267.734554875 18,890,752 157,294,592 1,121,984,512 744,497,152 791,683,072 209,723,392 5,251,072 52,429,312 52,429,312 52,429,312 52,429,312 42,991,616 41,260,544 262.456 4.ora PARAMETERFILE 4. ADVM writes data in 128KB stripes in a Round Robin fashion to each column before starting on the next four column extents. 153602 Nov 28 13:49 docsvol2-300 brwxrwx--. all volume devices are externalized to the OS and appear dynamically as special files in the /dev/asm directory. the ADVM device driver automatically creates a volume device on the OS that is used by clients to access the volume. In this guide. Oracle ADVM volume devices are created as block devices regardless of the configuration of the underlying storage in the Oracle ASM disk group.382. Oracle Enterprise Manager (OEM). For example: asmcmd volcreate -G docsdg1 -s 20G docsvol3 Once a new volume is created in Linux. ADVM uses Dirty Region Logging (DRL) for mirror recovery after a node or instance failure. 153603 Nov 28 13:56 docsvol3-300 $ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 -n "DOCSVOL3" Oracle ADVM implements its own extent and striping algorithm to ensure the highest performance for general purpose files.1 root asmadmin 252.608 -----------------3. reiserfs.734552605 TEMPFILE +RACDB_DATA/RACDB/spfileracdb.352.ONLINELOG +RACDB_DATA/RACDB/PARAMETERFILE/spfile. $ ls -l /dev/asm/ total 0 brwxrwx--.331. Creating a new volume in an Oracle ASM disk group can be performed using the ASM Configuration Assistant (ASMCA). Do not use raw (8) to map Oracle ADVM volume block devices into raw volume devices.734554879 PARAMETERFILE +RACDB_DATA/RACDB/TEMPFILE/TEMP. or ASMCMD. An ADVM volume is four columns of 64MB extents and 128KB stripe width by default. OCFS2 or Oracle ACFS may used (as described in this guide) in which case the oracleacfs driver is also used for I/O to the file system.1 root asmadmin 252. These volumes may be used as block devices.268. SQL. may contain a file system such as ext3.608 93. A volume may be created in its own Oracle ASM disk group or can share space in an already existing disk group. This DRL scheme requires a DRL file in the ASM disk group to be associated with each ASM dynamic volume. 153601 Nov 28 13:49 docsvol1-300 brwxrwx--.464 Oracle ACFS and other supported 3rd party file systems can use Oracle ADVM as a volume management platform to create and manage file systems while leveraging the full power and functionality of Oracle ASM features. we will use this OS volume device to create an Oracle ACFS. Any number of volumes can be created in an ASM disk group. Under Linux. ext4. On the Linux platform. .1 root asmadmin 252. which are installed into the Grid Infrastructure Home using the Oracle Universal Installation (OUI) tool. Oracle ACFS.2.999. Oracle ASM. then log in as the oracle account.99 heading heading heading heading heading "Instance ID" "Disk Group" "Total (MB)" "Free (MB)" "% Free" justify justify justify justify justify left left right right right ====================================================================== SQL> select inst_id. name. Log In as the Grid Infrastructure User To perform the examples demonstrated in this guide.2.999 999. Oracle Grid Infrastructure includes Oracle Clusterware. round((free_mb/total_mb)*100.2) or higher is required for Oracle ACFS. it is assumed that the Oracle Grid Infrastructure owner is 'grid'.1200(asmadmin). The following SQL demonstrates how to search the available ASM disk groups: break on inst_id skip 1 column column column column column inst_id name total_mb free_mb pct_free format format format format format 9999999 a15 999. Oracle ADVM.2) .ACFS Prerequisites Install Oracle Grid Infrastructure Oracle Grid Infrastructure 11g Release 2 (11. Refer to this guide for instructions on how to configure Oracle Grid Infrastructure as part of an Oracle RAC 11g Release 2 database install on Linux. If the Oracle Grid Infrastructure owner is 'oracle'.999 999.1201(asmdba).0/grid is /u01/app/grid [grid@racnode1 ~]$ dbhome /u01/app/11. the next step is to decide which Oracle ASM disk group should be used to create the Oracle ASM dynamic volume(s). Log in as the Oracle Grid Infrastructure owner and switch to the Oracle ASM environment on node 1 of the RAC when performing non-root ACFS tasks: [grid@racnode1 ~]$ id uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall). free_mb.999.1202(asmoper) [grid@racnode1 ~]$ . and driver resources software components. oraenv ORACLE_SID = [+ASM1] ? +ASM1 The Oracle base for ORACLE_HOME=/u01/app/11. total_mb.0/grid [grid@racnode1 ~]$ echo $ORACLE_SID +ASM1 Verify / Create ASM Disk Group After validating the Oracle Grid Infrastructure installation and logging in as the Oracle Grid Infrastructure owner (grid). the Oracle ASM dynamic volume(s) can be created on that free space or a new ASM disk group can be created.802 30. [grid@racnode1 ~]$ sqlplus / as sysasm SQL> select path.04 73.pct_free 2 from gv$asm_diskgroup 3 where total_mb != 0 4 order by inst_id.------1 CRS 2.802 73.205 DATAVOL1 MEMBER 33.303 CRSVOL1 MEMBER 2.19 90.04 FRA 33.-----------.887 After identifying the ASMLib volume and verifying it is accessible from all Oracle RAC nodes. .-----------. log in to the Oracle ASM instance and create the new disk group from one of the Oracle RAC nodes.623 90.809 82.37 The same task can be accomplished using the ASMCMD command-line utility: [grid@racnode1 ~]$ asmcmd lsdg If you find an existing Oracle ASM disk group that has adequate space.37 2 CRS FRA RACDB_DATA 2.887 1.--------------. I already setup a shared iSCSI volume and provisioned it using ASMLib.887 33. name.205 1.887 30. PATH -----------------ORCL:ASMDOCSVOL1 ORCL:CRSVOL1 ORCL:DATAVOL1 ORCL:FRAVOL1 NAME HEADER_STATUS OS_MB --------------. The ASMLib shared volume that will be used to create the new disk group is named ORCL:ASMDOCSVOL1. Diskgroup created.------------. log in to the Oracle ASM instance on all other RAC nodes and mount the new disk group: [grid@racnode1 ~]$ sqlplus / as sysasm SQL> CREATE DISKGROUP docsdg1 EXTERNAL REDUNDANCY DISK 'ORCL:ASMDOCSVOL1' SIZE 98303 M.19 RACDB_DATA 33.809 24. Instance ID Disk Group Total (MB) Free (MB) % Free ----------. After verifying the disk group was created.887 FRAVOL1 MEMBER 33.887 24. name.623 82.205 33. header_status.---------PROVISIONED 98. For the purpose of this guide. os_mb from v$asm_disk. I will be creating a dedicated Oracle ASM disk group named DOCSDG1 which will be used for all three Oracle ASM dynamic volumes. -------CRS 512 4.576 MOUNTED Grand Total: Verify Oracle ASM Volume Driver The operating environment used in this guide is CentOS 5.048. U -----.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux On supported operating systems.-----. SQL> @asm_diskgroups Disk Group Sector Block Allocation Name Size Size Unit Size State ---------.-----EXTERN 2.048.-------------168.-------------.-------------168.576 MOUNTED DOCSDG1 512 4.096 1.887 3.-----.085 26 EXTERN 33.--------------. a workaround is required to enable Oracle ACFS.096 1.5 x86_64: Type Total Size (MB) Used Size (MB) Pct.048.264 9 --------------.264 9 --------------.795 [root@racnode1 ~]# uname -a Linux racnode1 2. U -----.085 26 EXTERN 33.576 MOUNTED Grand Total: Type Total Size (MB) Used Size (MB) Pct.-----EXTERN 2.6.887 3.096 1.576 MOUNTED RACDB_DATA 512 4.576 MOUNTED FRA 512 4. With CentOS and other unsupported operating systems.--------------.205 396 17 EXTERN 98.0/grid/bin/acfsload start -s . the Oracle ACFS modules will be configured and the Oracle ASM volume driver started by default after installing Oracle Grid Infrastructure.----------.096 1.096 1.282 12.-------CRS 512 4.303 50 EXTERN 33.048.887 9.096 1.048.795 =========================================================================================== [grid@racnode2 ~]$ sqlplus / as sysasm SQL> ALTER DISKGROUP docsdg1 MOUNT.576 MOUNTED FRA 512 4.576 MOUNTED DOCSDG1 512 4.------.SQL> @asm_diskgroups Disk Group Sector Block Allocation Name Size Size Unit Size State ---------.096 1.----------.048.048.576 MOUNTED RACDB_DATA 512 4.-------------.2.205 396 17 EXTERN 98.096 1.048.303 50 EXTERN 33.887 9.------.282 12. Diskgroup altered. One of the first tasks is to manually start the Oracle ASM volume driver: [root@racnode1 ~]# /u01/app/11.18-194. ADVM/ACFS is not supported on centos-release-5-5. Do not attempt these steps on a critical production environment.0/grid/bin/acfsload start -s .orig [root@racnode2 ~]# cd /u01/app/11. edit the osds_acfslib. if you attempt to load the Oracle ASM volume driver from either Oracle RAC node. Replace if (($release =~ /enterprise-release-5/) || ($release =~ /redhat-release-5/)) with if (($release =~ /enterprise-release-5/) || ($release =~ /redhat-release-5/) || ($release =~ /centos-release-5/)) This will get you past the supported version check.el5. the Oracle ACFS modules do not get installed on CentOS because it is not a supported operating environment.pm osds_acfslib.2.centos The failed output from the above command should come as no surprise given Oracle ACFS is not supported on CentOS. workaround to get Oracle ACFS working on CentOS. This workaround includes some of the manual steps that are required to launch the Oracle ASM volume driver when installing Oracle ACFS on a non-clustered system. This section provides a simple.2.pm.2.pm Perl module.0/grid/lib [root@racnode1 lib]# cp -p osds_acfslib. you get the following error: [root@racnode1 ~]# /u01/app/11. make a copy of the following Perl module: [root@racnode1 ~]# cd /u01/app/11. First.0/grid/lib [root@racnode2 lib]# cp -p osds_acfslib. however. The following steps will need to be run from all nodes in an Oracle RAC database cluster as root. but unsupported. By default. The steps documented in this section serve as a workaround in order to setup Oracle ACFS on CentOS and is by no means supported by Oracle Corporation.pm osds_acfslib. You have been warned.pm.orig Next. Search for the string 'support this release' (which was line 278 in my case). acfs* /sbin.0/grid/bin [root@racnode2 bin]# .18-8/2.2.el5-x86_64/bin [root@racnode1 bin]# cp *ko /lib/modules/2.6.18-194. chmod 755 /sbin/acfs* bin]# cp advmutil* /sbin.0/grid version ACFS-9205: OS/ADVM./acfsdriverstate -orahome /u01/app/11. copy the following kernel modules from the Oracle Grid Infrastructure home to the expected location: [root@racnode1 ~]# mkdir /lib/modules/2.2.18-8/2.2.ACFS installed version = 2.acfs* bin]# cp mkfs.6.6.acfs* bin]# cp mount.el5-x86 bin]# cp acfs* /sbin. chmod 755 /sbin/advmutil* bin]# cp fsck.el5/extra/usm [root@racnode2 ~]# cd /u01/app/11.el5/extra/usm/ Once the kernel modules have been copied.0/grid/install/usm/EL5/x86_64/2.2./acfsdriverstate -orahome /u01/app/11.6.2.acfs* /sbin.ACFS installed version = 2.6.6.el5(x86_64)/090715.ko extension: [root@racnode1 [root@racnode1 [root@racnode1 [root@racnode1 [root@racnode1 [root@racnode1 ~]# cd /u01/app/11.acfs* [root@racnode1 ~]# cd /u01/app/11.2.0/grid/install/usm/cmds/bin directory (12 files) and include any file without the *.18-8.el5(x86_64)/090715.acfsload: ACFS-9129: ADVM/ACFS not installed To install ADVM/ACFS.18-8.2.18-194. chmod 755 /sbin/fsck.6. copy the Oracle ACFS executables to /sbin and set the appropriate permissions.el5-x86_64/bin [root@racnode2 bin]# cp *ko /lib/modules/2.el5/extra/usm/ [root@racnode2 ~]# mkdir /lib/modules/2.188.2.6. The Oracle ACFS executables are located in theGRID_HOME/install/usm/EL5/<ARCHITECTURE>/<KERNEL_VERSION>/<FULL_KERNEL_VERS ION>/bin directory or in the /u01/app/11.18-194.2.6.0/grid/install/usm/EL5/x86_64/2.188. chmod 755 /sbin/mkfs.1 [root@racnode2 ~]# cd /u01/app/11.18-8.0/grid/bin [root@racnode1 bin]# .6. we can verify the ADVM/ACFS installation by running the following from all Oracle RAC nodes: [root@racnode1 ~]# cd /u01/app/11.0/grid version ACFS-9205: OS/ADVM. chmod 755 /sbin/mount.6.el5/extra/usm [root@racnode1 ~]# cd /u01/app/11.0/grid/install/usm/EL5/x86_64/2.18-194.1 The next step is to record dependencies for the new kernel modules: [root@racnode1 ~]# depmod [root@racnode2 ~]# depmod Next.0/grid/install/usm/cmds/bin .acfs* /sbin.18-8/2.6. chmod 755 /sbin/mount. rc3.oracleadvm oracleasm 84136 1 [root@racnode2 ~]# lsmod | grep oracle oracleacfs 877320 4 oracleadvm 221760 8 oracleoks 276880 2 oracleacfs.acfs* /sbin.acfs* /sbin.acfs* mount.acfs* /sbin. You will need to create an initialization script ( /etc/init.6. chmod 755 /sbin/acfs* advmutil* /sbin. chmod 755 /sbin/acfs* bin]# cp advmutil* /sbin. and rc5.acfs* bin]# cp mkfs.acfs* Now.0/grid/bin/acfsload start -s Check that the modules were successfully loaded on all Oracle RAC nodes: [root@racnode1 ~]# lsmod | grep oracle oracleacfs 877320 4 oracleadvm 221760 8 oracleoks 276880 2 oracleacfs.d. chmod 755 /sbin/mkfs.acfs* /sbin. chmod 755 /sbin/acfs* bin]# cp advmutil* /sbin.acfs* /sbin.18-8/2.acfs* /sbin.oracleadvm oracleasm 84136 1 Configure the Oracle ASM volume driver to load automatically on system startup on all Oracle RAC nodes. Change the permissions on the /etc/init. chmod 755 /sbin/mkfs. chmod 755 /sbin/fsck.2.2. running acfsload start -s will complete without any further messages: [root@racnode1 ~]# /u01/app/11. chmod 755 /sbin/advmutil* bin]# cp fsck.el5-x86 bin]# cp acfs* /sbin.2.d.acfs* /sbin.acfs* mkfs.acfs* bin]# cp mount.6.acfs* ~]# cd /u01/app/11.acfs* bin]# cp mkfs. chmod 755 /sbin/mkfs. chmod 755 /sbin/advmutil* bin]# cp fsck.d.acfs* /sbin.d runlevel directories using 'chkconfig --add': .d/acfsload) that contains the runlevel configuration and the acfsload command.0/grid/install/usm/cmds/bin bin]# cp acfs* /sbin. chmod 755 /sbin/fsck.18-8.acfs* bin]# cp mount.0/grid/bin/acfsload start -s [root@racnode2 ~]# /u01/app/11. chmod 755 /sbin/fsck.acfs* /sbin. chmod 755 /sbin/mount. chmod 755 /sbin/advmutil* fsck.acfs* ------------------------------------------------------------------------------------------[root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 [root@racnode2 ~]# cd /u01/app/11.2. chmod 755 /sbin/mount.0/grid/install/usm/EL5/x86_64/2.[root@racnode1 [root@racnode1 [root@racnode1 [root@racnode1 [root@racnode1 bin]# bin]# bin]# bin]# bin]# cp cp cp cp cp acfs* /sbin.d/acfsload script to allow it to be executed by root and then create links in the rc2. rc4. registry. create it.2.d/acfsload <<EOF #!/bin/sh # chkconfig: 2345 30 21 # description: Load Oracle ASM volume driver on system startup ORACLE_HOME=/u01/app/11. This only needs to be performed from one of the Oracle RAC nodes: .[root@racnode1 ~]# chkconfig --list | grep acfsload [root@racnode2 ~]# chkconfig --list | grep acfsload ======================================================= [root@racnode1 ~]# cat > /etc/init.2.0/grid export ORACLE_HOME \$ORACLE_HOME/bin/acfsload start -s EOF [root@racnode2 ~]# cat > /etc/init.d/acfsload <<EOF #!/bin/sh # chkconfig: 2345 30 21 # description: Load Oracle ASM volume driver on system startup ORACLE_HOME=/u01/app/11.0/grid export ORACLE_HOME \$ORACLE_HOME/bin/acfsload start -s EOF ======================================================= [root@racnode1 ~]# chmod 755 /etc/init.acfs' resource does not exist.d/acfsload [root@racnode2 ~]# chmod 755 /etc/init.d/acfsload ======================================================= [root@racnode1 ~]# chkconfig --add acfsload [root@racnode2 ~]# chkconfig --add acfsload ======================================================= [root@racnode1 ~]# chkconfig --list | grep acfsload acfsload 0:off 1:off 2:on 3:on 4:on [root@racnode2 ~]# chkconfig --list | grep acfsload acfsload 0:off 1:off 2:on 3:on 4:on 5:on 5:on 6:off 6:off If the Oracle Grid Infrastructure 'ora. 2009.acfs.acfs.acfs.type As a final step.registry.registry.grid -c crs_stat | grep acfs NAME=ora.type \ -file /u01/app/11.0/grid/bin/crsctl add type ora.grid -c crs_stat | grep acfs [root@racnode2 ~]# su .type \ -basetype ora.pgrp:oinstall:r-x.acfs TYPE=ora.2.acfs.registry.acfs TYPE=ora.other::r--\' \ -type ora. the ORACLE_HOME environment variable will typically not be set in the shell and will result in the executable to fail.grid -c crs_stat | grep acfs NAME=ora. Since many of the Oracle ACFS shell scripts will be executed as the root user account.2.2. # ORACLE_HOME=/u01/app/11.type -f ======================================================= [root@racnode1 ~]# su . Oracle and/or its affiliates.[root@racnode1 ~]# su .acfs.registry. The successful execution of these scripts requires access to certain Oracle shared libraries that are found in the Grid Infrastructure Oracle home.0/grid/bin/crsctl add resource ora.2.registry.local_resource.so: cannot open shared object file: No such file or directory An easy workaround to get past this error is to set the ORACLE_HOME environment variable for the Oracle Grid Infrastructure home in the Oracle ACFS shell scripts on all Oracle RAC nodes.acfs \ -attr ACL=\'owner:root:rwx.0/grid/crs/template/registry. The ORACLE_HOME should be set at the beginning of the file after the header comments as shown in the following example: #!/bin/sh # # Copyright (c) 2001.grid -c crs_stat | grep acfs ======================================================= [root@racnode1 ~]# /u01/app/11.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ].type [root@racnode2 ~]# su . For example: [root@racnode1 ~]# /sbin/acfsutil registry /sbin/acfsutil.registry.registry. then ORA_CRS_HOME=$ORACLE_HOME . All rights reserved. modify any of the Oracle ACFS shell scripts copied to the /sbin directory (above) to include the ORACLE_HOME for Grid Infrastructure.type [root@racnode1 ~]# /u01/app/11.bin: error while loading shared libraries: libhasgen11. SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible. perform the following checks: SQL> SELECT compatibility.0 If the results show something other than 11. Add the ORACLE_HOME environment variable for the Oracle Grid Infrastructure home as noted above to the following Oracle ACFS shell scripts on all Oracle RAC nodes: • • • • • • /sbin/acfsdbg /sbin/acfsutil /sbin/advmutil /sbin/fsck. COMPATIBILITY DATABASE_COMPATIBILITY ---------------. database_compatibility 2 FROM v$asm_diskgroup 3 WHERE name = 'DOCSDG1'.acfs /sbin/mkfs. we need to set the compatibility to at least 11. verify that theOracle .rdbms' = '11.acfs Verify ASM Disk Group Compatibility Level The compatibility level for the Oracle ASM disk group must be at least 11.0.advm' attribute.2 by issuing the following series of SQL statements from the Oracle ASM instance: [grid@racnode1 ~]$ sqlplus / as sysasm SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible. If you receive an error while attempting to set the 'compatible.fi .asm' = '11.0.2'.1.2 or higher (as the above example shows).2'. SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.0 10.2 in order to create an Oracle ASM volume.1.. From the Oracle ASM instance.advm' = '11..----------------------10.acfs /sbin/mount.2'.0. Diskgroup altered.0. Diskgroup altered. Diskgroup altered. 2.ASM volume driver is running: SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible. ASMCA only supports the creation of volumes and file systems. Create Mount Point From each Oracle RAC node. create a directory that will be used to mount the new Oracle ACFS: [root@racnode1 ~]# mkdir /documents1 [root@racnode2 ~]# mkdir /documents1 Create ASM Cluster File System As the Oracle Grid Infrastructure owner.0.advm ORA-15477: cannot communicate with the volume driver Verify the changes to the compatibility level: SQL> SELECT compatibility.advm ORA-15238: 11. Note that at the time of this writing. COMPATIBILITY DATABASE_COMPATIBILITY ---------------.0 11. database_compatibility 2 FROM v$asm_diskgroup 3 WHERE name = 'DOCSDG1'. Deleting an Oracle ASM volume or file system requires the command-line.0.0. run the ASM Configuration Assistant (asmca) from only one node in the cluster (racnode1 for example): [grid@racnode1 ~]$ asmca .advm' = '11.----------------------11.0.advm' = '11.2' * ERROR at line 1: ORA-15032: not all alterations performed ORA-15242: could not set attribute compatible.2'. ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.0 ASM Configuration Assistant (ASMCA) This section includes step-by-step instructions on how to create an Oracle ASM cluster file system using the Oracle ASM Configuration Assistant (ASMCA).2.2 is not a valid value for attribute compatible. When returned to the "Volumes" tab. Screen Shot Volumes Click on the 'Volumes' tab then click the [Create] button.Screen Name Disk Groups Response When the Oracle ASM configuration assistant starts you are presented with the ' Disk Groups' tab. Oracle and/or its affiliates. Exit the ASM Configuration Assistant by clicking the [Exit] button. click the [OK] button. The ORACLE_HOME should be set at the beginning of the file after the header comments as follows: #!/bin/sh # # Copyright (c) 2001. Note that the new clustered file system is not mounted. All rights reserved. After the volume is created. Click on the 'ASM Cluster File Systems' tab then click the [Create] button. Mount the New Cluster File System Now that the new Oracle ASM cluster file system has been created and registered in the Oracle ACFS mount registry. Verify that the newly created volume (DOCSVOL1) is selected in the 'Volume' list. 2009. Create ASM Volume Volume Created ASM Cluster File Systems Create ASM Cluster File System ASM Cluster File System After the ASM Cluster File System is created. then .so: cannot open shared object file: No such file or directory If you don't have the ORACLE_HOME environment variable set to the Oracle Grid Infrastructure home as explained in the prerequisites section to this guide. and "Size". click the [OK] button. Select the 'General Purpose File System' option. After verifying all values in this dialog are correct. For the purpose of this example. Select the 'Yes' option for 'Register MountPoint'. acknowledge the ' ASM Cluster File System: Creation' dialog. After verifying all values in this dialog are correct.acfs. In order to mount the new cluster file system. acknowledge the 'Volume: Creation' dialog. the mount command will fail as shown above. 'ENABLED(2 of 2)'). "Disk Group Name". # ORACLE_HOME=/u01/app/11.e. the Oracle ASM ACFS binaries need access to certain shared libraries in the ORACLE_HOME for Grid Infrastructure.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ]. Enter the previously created mount point directory (/documents1) or leave the suggested mount point. Create a new ASM volume by supplying a "Volume Name".bin: error while loading shared libraries: libhasgen11.so: cannot open shared object file: No such file or directory [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 /sbin/mount. An easy workaround to get past this error is to set the ORACLE_HOME environment variable for Grid Infrastructure in the file /sbin/mount. log in to all Oracle RAC nodes as root and run the following mount command: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 /sbin/mount.acfs on all Oracle RAC nodes.2.acfs. I will be creating a 32GB volume named "docsvol1" on the "DOCSDG1" ASM disk group. Created The newly created Oracle ASM cluster file system is now listed under the ' ASM Cluster File Systems' tab.bin: error while loading shared libraries: libhasgen11. That will need to be performed manually on all Oracle RAC nodes as a privileged user ( ASM Cluster File Systems root) after exiting from the ASMCA. the "State" for the new ASM volume should be ENABLED for all Oracle RAC nodes (i. 1.1.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:Public on /domo type nfs (rw. change the permissions to allow user access.ORA_CRS_HOME=$ORACLE_HOME fi .addr=192..121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) [root@racnode2 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw.168.168.gid=5.addr=192.gid=5. For the purpose of this example.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) Set Permissions With the new cluster file system now mounted on all Oracle RAC nodes. run the following mount command from all Oracle RAC nodes: [root@racnode1 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw. Run the following as root from only one node in the Oracle RAC: .mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:PUBLIC on /domo type nfs (rw. You should now be able to successfully mount the volume: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 Verify Mounted Cluster File System To verify that the new cluster file system mounted properly. I want to grant the oracle user account and dba group read/write permissions.. Node 1 Log in to the first Oracle RAC node as the oracle user account and create a test file on the new cluster file system: [oracle@racnode1 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall).txt Node 2 Log in to the second Oracle RAC node as the oracle user account and verify the presence and content of the test file: [oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall). and Alex Oracle Enterprise Manager (OEM) This section presents a second method that can be used to create an Oracle ASM cluster file system.txt The Hunter Family: Jeff.2 root root 65536 Nov 23 21:17 lost+found/ -rw-r--r-. . namely.1 oracle oinstall 42 Nov 23 21:25 test.1300(dba).1300(dba).ACFS/ drwx-----.2 root root 65536 Nov 23 21:17 lost+found/ -rw-r--r-. Oracle Enterprise Manager (OEM).txt [oracle@racnode1 ~]$ ls -l /documents1 total 72 drwxr-xr-x 5 root root 4096 Nov 23 21:17 .1 oracle oinstall 42 Nov 23 21:25 test. OEM provides a convenient graphical user interface for creating and maintaining ASM cluster file systems. and Alex" > /documents1/test. Melody.1201(asmdba).ACFS/ drwx-----.dba /documents1 [root@racnode1 ~]# chmod 775 /documents1 Test Now let's perform a test to see if all of our hard work paid off.txt [oracle@racnode2 ~]$ cat /documents1/test. Similar to the ASM Configuration Assistant (ASMCA). Melody.1201(asmdba).1301(oper) [oracle@racnode1 ~]$ echo "The Hunter Family: Jeff.1301(oper) [oracle@racnode2 ~]$ ls -l /documents1 total 72 drwxr-xr-x 5 root root 4096 Nov 23 21:17 .[root@racnode1 ~]# chown oracle. After verifying all values in this dialog are correct. [oracle@racnode1 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11. https://racnode1.1. For the purpose of this example. Enter the 'Mount Point' and click the [Generate Command] button. All rights reserved. click the [OK] button. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11. /dev/asm/docsvol2-300) will now be entered in the 'Volume Device' Automatic Storage Management OEM will create the new cluster file system. Enter the previously created mount point directory ( /documents2).idevelopment. click on the 'ASM Cluster File System' tab. https://racnode1.idevelopment. DOCSVOL2. I will be creating a 32GB volume named "docsvol2" on the "DOCSDG1" ASM disk group. register it in the Oracle Grid Infrastructure registry. click the 'Cluster' tab. Next. Enter a 'Volume Label'. "Disk Group Name".0/dbhome_1/racnode2_racdb/sysman/log Screen Name OEM Home Response From the OEM home screen.info:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. and "Size".0/dbhome_1/racnode1_racdb/sysman/log [oracle@racnode2 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11. create a directory that will be used to mount the new Oracle ACFS: [root@racnode1 ~]# mkdir /documents2 [root@racnode2 ~]# mkdir /documents2 Create ASM Cluster File System Log in to Oracle Enterprise Manager (OEM) as a privileged database user. 2009 Oracle Corporation. All rights reserved. click the [OK] button.0 Copyright (c) 1996.2. then click on one of the ASM instances listed. On the resulting ASM home screen. The newly created ASM volume ( Create ASM Volume Create ASM Cluster File System field. For example. click the [Create] button. After verifying all values in this dialog are correct.2.0. Create a new ASM volume by supplying a "Volume Name". Select the option for 'Register ASM Cluster File System Mount Point'.info:1158/em/console/aboutApplication EM Daemon is running. Run the suggested command as the root user on all Oracle RAC nodes: .2. Select the new ASM volume and click the [Mount] button.2.0.0 Copyright (c) 1996. and leave it in the ' Dismounted' state.1. Screen Shot Automatic Storage Management Create ASM Cluster File System Click the [Create ASM Volume] button. Scroll to the bottom of the OEM home page. 2009 Oracle Corporation. Cluster Select Hosts Mount ASM Cluster File System Show Command Accept the default node selection (all Oracle RAC nodes) and click the [Continue] button. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.Create Mount Point From each Oracle RAC node. Screen Name Response Screen Shot [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol2-300 /documents2 [root@racnode2 /]# /bin/mount -t acfs /dev/asm/docsvol2-300 /documents2 Automatic Storage Management The new Oracle ASM Cluster File System is ready for use! Note: If you receive an error loading Oracle shared libraries.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:Public on /domo type nfs (rw.gid=5.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) /dev/asm/docsvol2-300 on /documents2 type acfs (rw) Set Permissions With the new cluster file system now mounted on all Oracle RAC nodes. I want to grant the oracle user account and dba group read/write permissions.1.168.168.addr=192. Run the following as root from only one node in the Oracle RAC: . change the permissions to allow user access.addr=192. refer to the following workaround. After mounting the ASM volume.1.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:PUBLIC on /domo type nfs (rw. click the [Return] button on this and the previous screen. run the following mount command from all Oracle RAC nodes: [root@racnode1 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw. Verify Mounted Cluster File System To verify that the new cluster file system mounted properly.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) /dev/asm/docsvol2-300 on /documents2 type acfs (rw) [root@racnode2 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw. For the purpose of this example.gid=5. namely.[root@racnode1 ~]# chown oracle.txt Node 2 Log in to the second Oracle RAC node as the oracle user account and verify the presence and content of the test file: [oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall).txt [oracle@racnode2 ~]$ cat /documents2/test.1300(dba). Melody.2 root root 65536 Nov 24 13:32 lost+found/ -rw-r--r-.dba /documents2 [root@racnode1 ~]# chmod 775 /documents2 Test Now let's perform a test to see if all of our hard work paid off.ACFS/ drwx-----.1301(oper) [oracle@racnode2 ~]$ ls -l /documents2 total 72 drwxr-xr-x 5 root root 4096 Nov 24 13:32 . the command line interface and SQL.1201(asmdba).txt The Hunter Family: Jeff.2 root root 65536 Nov 24 13:32 lost+found/ -rw-r--r-. Node 1 Log in to the first Oracle RAC node as the oracle user account and create a test file on the new cluster file system: [oracle@racnode1 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall).1300(dba). and Alex" > /documents2/test. Unlike using the ASM Configuration Assistant (ASMCA) or Oracle Enterprise Manager (OEM). using the command line tools .1 oracle oinstall 42 Nov 24 14:10 test.txt [oracle@racnode1 ~]$ ls -l /documents2 total 72 drwxr-xr-x 5 root root 4096 Nov 24 13:32 .1201(asmdba). Melody.ACFS/ drwx-----.1301(oper) [oracle@racnode1 ~]$ echo "The Hunter Family: Jeff.1 oracle oinstall 42 Nov 24 14:10 test. and Alex Command Line / SQL This section presents the third and final method described in this guide that can be used to create an Oracle ASM cluster file system. Create Oracle ASM Dynamic Volume Log in as the Oracle Grid Infrastructure owner and switch to the Oracle ASM environment on node 1 of the RAC: [grid@racnode1 ~]$ id uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall). Make certain that the STATE column for each Oracle RAC instance is ENABLED: break on inst_id skip 1 column column column column column inst_id volume_name volume_device size_mb usage format format format format format 9999999 a13 a23 999.1202(asmoper) [grid@racnode1 ~]$ . query the view V$ASM_VOLUME (or since we are using Oracle RAC.999 a5 heading heading heading heading heading "Instance ID" "Volume Name" "Volume Device" "Size (MB)" "Usage" justify justify justify justify justify left left left right right .1200(asmadmin).does not require a graphic user interface and is the preferred method when working remotely over a slow network. GV$ASM_VOLUME).0/grid [grid@racnode1 ~]$ echo $ORACLE_SID +ASM1 As the Oracle Grid Infrastructure owner.0/grid is /u01/app/grid [grid@racnode1 ~]$ dbhome /u01/app/11.1201(asmdba). log in to the Oracle ASM instance using SQL*Plus and issue the following SQL: [grid@racnode1 ~]$ sqlplus / as sysasm SQL> ALTER DISKGROUP docsdg1 ADD VOLUME docsvol3 SIZE 20G. Diskgroup altered.2.2. The same task can be accomplished using the ASMCMD command-line utility: [grid@racnode1 ~]$ asmcmd volcreate -G docsdg1 -s 20G --redundancy unprotected docsvol3 To verify that the new Oracle ASM dynamic volume was successfully created.999. oraenv ORACLE_SID = [+ASM1] ? +ASM1 The Oracle base for ORACLE_HOME=/u01/app/11. 480 /dev/asm/docsvol1-300 /dev/asm/docsvol2-300 /dev/asm/docsvol3-300 32.768 ACFS 20.column state format a7 heading "State" justify right ============================================================================ SQL> select inst_id. usage. volume_device. volume_name. Instance ID Volume Name ----------.------------1 DOCSVOL1 DOCSVOL2 DOCSVOL3 2 DOCSVOL1 DOCSVOL2 DOCSVOL3 Volume Device Size (MB) Usage ----------------------.-----------.768 ACFS /dev/asm/docsvol2-300 32. size_mb. volume_name. state 2 from gv$asm_volume 3 order by inst_id.768 ACFS 32.----/dev/asm/docsvol1-300 32.480 State ------ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED The same task can be accomplished using the ASMCMD command-line utility: [grid@racnode1 ~]$ asmcmd volinfo -G docsdg1 -a Diskgroup Name: DOCSDG1 Volume Name: DOCSVOL1 Volume Device: /dev/asm/docsvol1-300 State: ENABLED Size (MB): 32768 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /documents1 Volume Name: DOCSVOL2 Volume Device: /dev/asm/docsvol2-300 State: ENABLED Size (MB): 32768 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /documents2 Volume Name: DOCSVOL3 Volume Device: /dev/asm/docsvol3-300 State: ENABLED Size (MB): 20480 Resize Unit (MB): 256 .768 ACFS /dev/asm/docsvol3-300 20. acfs: version = 11. 153602 Nov 26 16:55 /dev/asm/docsvol2-300 brwxrwx--.acfs: volume size = 21474836480 mkfs. 153601 Nov 26 16:55 /dev/asm/docsvol1-300 brwxrwx--.2. the -t flag indicates that the new file system should be of type ACFS.acfs: Format complete.acfs: volume = /dev/asm/docsvol3-300 mkfs. In the above mkfs command. first create a directory on each Oracle RAC node as the root user account that will be used to mount the new Oracle ACFS: .1 root asmadmin 252.1.0. list the newly created device file on the file system: [root@racnode1 ~]# ls -l /dev/asm/* brwxrwx--.Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: Additional checks can be performed on the new ASM volume using the /sbin/advmutil command: [root@racnode1 ~]# /sbin/advmutil volinfo /dev/asm/docsvol3-300 Interface Version: 1 Size (MB): 20480 Resize Increment (MB): 256 Redundancy: unprotected Stripe Columns: 4 Stripe Width (KB): 128 Disk Group: DOCSDG1 Volume: DOCSVOL3 As a final check. The block size is set to 4K (-b).0.0 mkfs.acfs: on-disk version = 39.0 mkfs. This is performed using the mkfs OS command from only one of the Oracle RAC nodes: [grid@racnode1 ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 -n "DOCSVOL3" mkfs.1 root asmadmin 252.1 root asmadmin 252. Finally. To mount the new cluster file system. but does not actually mount it. 153603 Nov 26 17:20 /dev/asm/docsvol3-300 Create Oracle ASM Cluster File System The next step is to create the Oracle ASM cluster file system on the new Oracle ASM volume created in the previous section. Mount the New Cluster File System The mkfs command in the previous section only prepared the volume to be mounted as a file system. specify the Linux dynamic volume device ( /dev/asm/docsvol3300) and the volume label (DOCSVOL3). acfs on all Oracle RAC nodes. run the following mount command from all Oracle RAC nodes: .. then ORA_CRS_HOME=$ORACLE_HOME fi . In order to mount the new cluster file system. Oracle and/or its affiliates. All rights reserved. The ORACLE_HOME should be set at the beginning of the file after the header comments as follows: #!/bin/sh # # Copyright (c) 2001. the Oracle ASM ACFS binaries need access to certain shared libraries in the ORACLE_HOME for Grid Infrastructure.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ].bin: error while loading shared libraries: libhasgen11. 2009.[root@racnode1 ~]# mkdir /documents3 [root@racnode2 ~]# mkdir /documents3 Mount the cluster file system on each Oracle RAC node using the regular Linux mount command as follows: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 /sbin/mount.so: cannot open shared object file: No such file or directory If you don't have the ORACLE_HOME environment variable set to the Oracle Grid Infrastructure home as explained in the prerequisites section to this guide. the mount command will fail as shown above.acfs.so: cannot open shared object file: No such file or directory [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 /sbin/mount. An easy workaround to get past this error is to set the ORACLE_HOME environment variable for Grid Infrastructure in the file /sbin/mount.acfs. You should now be able to successfully mount the volume: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 Verify Mounted Cluster File System To verify that the new cluster file system mounted properly.2. # ORACLE_HOME=/u01/app/11.bin: error while loading shared libraries: libhasgen11.. addr=192. much like the/etc/fstab file does in a UNIX/Linux environment. The Oracle ACFS mount registry acts as a global file system reference.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:PUBLIC on /domo type nfs (rw.[root@racnode1 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw. change the permissions to allow user access.gid=5. Run the following as root from only one node in the Oracle RAC: [root@racnode1 ~]# chown oracle.168. When a node configured with Oracle ACFS reboots. I glossed over this notion of registering the new volume in the Oracle ACFS mount registry.1.168.dba /documents3 [root@racnode1 ~]# chmod 775 /documents3 Register New Volume When creating the Oracle ACFS using the ASM Configuration Assistant (ASMCA) and Oracle Enterprise Manager (OEM). When mount points are registered in the Oracle ACFS mount registry. I want to grant the oracle user account and dba group read/write permissions.gid=5.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) /dev/asm/docsvol2-300 on /documents2 type acfs (rw) /dev/asm/docsvol3-300 on /documents3 type acfs (rw) Set Permissions With the new cluster file system now mounted on all Oracle RAC nodes. the newly created file systems do not remount by default. Oracle Grid Infrastructure will mount and unmount volumes on startup and shutdown respectively.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) /dev/asm/docsvol2-300 on /documents2 type acfs (rw) /dev/asm/docsvol3-300 on /documents3 type acfs (rw) [root@racnode2 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) domo:Public on /domo type nfs (rw.1. .addr=192. For the purpose of this example. Node 1 Log in to the first Oracle RAC node as the oracle user account and create a test file on the new cluster file system: [oracle@racnode1 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall). and Alex" > /documents3/test.txt [oracle@racnode1 ~]$ ls -l /documents3 .1201(asmdba). Melody.1301(oper) [oracle@racnode1 ~]$ echo "The Hunter Family: Jeff.1300(dba).Use the /sbin/acfsutil utility on only one of Oracle RAC nodes to register the new mount point in the Oracle ACFS mount registry: [root@racnode1 ~]# /sbin/acfsutil registry -f -a /dev/asm/docsvol3-300 /documents3 acfsutil registry: mount point /documents3 successfully added to Oracle Registry Query the Oracle ACFS mount registry from all Oracle RAC nodes to verify the volume and mount point was successfully registered: [root@racnode1 ~]# /sbin/acfsutil registry Mount Object: Device: /dev/asm/docsvol1-300 Mount Point: /documents1 Disk Group: DOCSDG1 Volume: DOCSVOL1 Options: none Nodes: all Mount Object: Device: /dev/asm/docsvol2-300 Mount Point: /documents2 Disk Group: DOCSDG1 Volume: DOCSVOL2 Options: none Nodes: all Mount Object: Device: /dev/asm/docsvol3-300 Mount Point: /documents3 Disk Group: DOCSDG1 Volume: DOCSVOL3 Options: none Nodes: all Test Now let's perform a test to see if all of our hard work paid off. online view of an active file system. and Alex ACFS Snapshots Oracle ASM Cluster File System includes a feature called snapshots. Melody.txt [oracle@racnode2 ~]$ cat /documents3/test.txt The Hunter Family: Jeff.2 root root 65536 Nov 24 18:44 lost+found/ -rw-r--r-. Once an Oracle ACFS snapshot is created.1 oracle oinstall 42 Nov 24 18:56 test.total 72 drwxr-xr-x 5 root root 4096 Nov 24 18:44 . This provides for a flexible online file recovery solution which can span multiple views. its current value is copied to the snapshot to maintain the point-in-time view of the file system. You can have up to 63 snapshot views supported for each file system.1 oracle oinstall 42 Nov 24 18:56 test. You can also use an Oracle ACFS snapshot as the source of a file system backup. only the changed blocks are copied to the snapshot location which helps conserve disk space. Oracle ACFS snapshots can be created and deleted on demand without the need to take the file system offline. An Oracle ACFS snapshot is an online. consistent.ACFS/ drwx-----. When a file is modified. Snapshots are always available as long as the file system is mounted. .1301(oper) [oracle@racnode2 ~]$ ls -l /documents3 total 72 drwxr-xr-x 5 root root 4096 Nov 24 18:44 .ACFS/ drwx-----. point in time copy of an Oracle ACFS file system.txt Node 2 Log in to the second Oracle RAC node as the oracle user account and verify the presence and content of the test file: [oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall). Before an Oracle ACFS file extent is modified or deleted. read-only.1300(dba). The snapshot process uses CopyOn-Write functionality which makes efficient use of disk space. simply backup the snapshot to another disk or tape location to create a consistent backup set of the files. This provides support for online recovery of files inadvertently modified or deleted from a file system.1201(asmdba). Once the Oracle ACFS snapshot is created. as it can be created on demand to deliver a current. Note that snapshots work at the block level instead of the file level.2 root root 65536 Nov 24 18:44 lost+found/ -rw-r--r-. all snapshot files are immediately available for use. ACFS snapshots provide a point-in-time consistent view of the entire file system which can be used to restore deleted or modified files and to perform backups. zip -rw-r--r-.ACFS/snaps total 0 Create Oracle ACFS Snapshot Let's start by creating an Oracle ACFS snapshot named snap1 for the Oracle ACFS mounted on /documents3. [oracle@racnode1 ~]$ ls -lFA /documents3/. (Note that hidden files and directories in Linux start with leading period. This section will provide an overview on how to create and retrieve Oracle ACFS snapshots.ACFS are two directories named repl and snaps.zip 26 17:57 lost+found/ Found in the . [oracle@racnode1 ~]$ ls -lFA /documents3/. This operation should be performed as root or the Oracle Grid Infrastructure owner: [root@racnode1 ~]# /sbin/acfsutil snap create snap1 /documents3 acfsutil snap create: Snapshot operation is complete.x64_11gR2_database_2of2.1 oracle oinstall 1239269270 Nov linux.x64_11gR2_examples. All Oracle ACFS snapshots are stored in the snaps directory.x64_11gR2_database_1of2.6 root root 4096 Nov 26 17:57 repl/ drwxr-xr-x 2 root root 4096 Nov 27 15:53 snaps/ Since no Oracle ACFS snapshots exist.2 root root 65536 Nov 26 17:57 .1 oracle oinstall 555366950 Nov drwx-----. Oracle ACFS snapshots are administered with the acfsutil snap command. Oracle ACFS Snapshot Location Whenever you create an Oracle ACFS file system.1 oracle oinstall 1111416131 Nov linux.fileid/ drwx-----.ACFS. . As shown in the next section.ACFS/ 27 16:02 27 16:03 27 16:03 linux. a hidden directory is created as a sub-directory to the Oracle ACFS file system named .All storage for Oracle ACFS snapshots are maintained within the file system which eliminates the need for separate storage pools for file systems and snapshots. Oracle ACFS file systems can be dynamically re-sized to accommodate addition file and snapshot storage requirements.) [oracle@racnode1 ~]$ ls -lFA /documents3 total 2851148 drwxr-xr-x 5 root root 4096 Nov -rw-r--r-. the snaps directory is empty.zip -rw-r--r-.ACFS total 12 drwx-----.2 root root 4096 Nov 26 17:57 . ACFS/snaps/snap1 total 2851084 drwxr-xr-x 5 root root 4096 Nov 26 17:57 .zip If you were looking for functionality in Oracle ACFS to perform a rollback of the current file system to a snapshot.x64_11gR2_examples. when I created the snap1 snapshot.ACFS/snaps/snap1: [oracle@racnode1 ~]$ ls -lFA /documents3/. it can be restored by copying it from the snapshot.ACFS/snaps/snap1. For example. back to the the current file system: [oracle@racnode1 ~]$ cp /documents3/. the three Oracle ZIP files were made available from the snapshot /documents3/.? ? ? ? ? lost+found It is important to note that when the snapshot gets created.ACFS/snaps/snap1/linux. the previous images of the file blocks are copied to the snap1 snapshot where it can be restored from at a later time if necessary: [oracle@racnode1 ~]$ rm /documents3/linux. one doesn't exist.zip /documents3 Display Oracle ACFS Snapshot Information The '/sbin/acfsutil info fs' command can provide file system information as well as limited information on any Oracle ACFS snapshots: [oracle@racnode1 ~]$ /sbin/acfsutil info fs /documents3 /documents3 ACFS Version: 11. Restore Files From an Oracle ACFS Snapshot When a file is deleted (or modified).zip -rw-r--r-. if I delete the file /documents3/linux. this triggers an automatic backup of all modified file blocks to the snapshot.x64_11gR2_database_2of2.0 .2.x64_11gR2_examples.x64_11gR2_examples.1 oracle oinstall 555366950 Nov 27 16:03 linux.The data for the new snap1 snapshot will be stored in /documents3/.1 oracle oinstall 1111416131 Nov 27 16:03 linux. Once the snapshot is created.zip. nothing is actually stored in the snapshot directory.1.ACFS/ -rw-r--r-.x64_11gR2_database_1of2.zip -rw-r--r-.0. so there is no additional space consumption. then I have bad news. For example.x64_11gR2_examples. any existing files and/or directories in the file system are automatically accessible from the snapshot directory.0. The snapshot directory will only contain modified file blocks when a file is updated or deleted.zip ?--------. Hopefully this will be a feature introduced in future versions! In the case where you accidentally deleted a file from the current file system.1 oracle oinstall 1239269270 Nov 27 16:02 linux. you can see that I have only one active snapshot that is consuming approximately 560MB of disk space. 153603 size: 26843545600 free: 23191826432 number of snapshots: 1 snapshot space usage: 560463872 From the example above. 'DD-MON-YYYY HH24:MI:SS') as create_time from v$asm_acfssnapshots order by snap_name. To query all snapshots. fs_name.--------------. This coincides with the size of the file I removed earlier (/documents3/linux.------------------------.Available on-disk version: 39. Snapshot Name File System Volume Device Create Time --------------.ACFS/snaps'. Another useful technique used to obtain information about Oracle ACFS snapshots is to query the view V$ASM_ACFSSNAPSHOTS from the Oracle ASM instance: column column column column snap_name fs_name vol_device create_time format format format format a15 a15 a25 a20 heading heading heading heading "Snapshot Name" "File System" "Volume Device" "Create Time" ====================================================================== SQL> 2 3 4 select snap_name.Available mount time: Sat Nov 27 03:07:50 2010 volumes: 1 total size: 26843545600 total free: 23191826432 primary volume: /dev/asm/docsvol3-300 label: DOCSVOL3 flags: Primary. minor: 252. .0 allocation unit: 4096 major. to_char(create_time.-------------------snap1 /documents3 /dev/asm/docsvol3-300 27-NOV-2010 16:11:29 Delete Oracle ACFS Snapshot Use the 'acfsutil snap delete' command to delete an existing Oracle ACFS snapshot: [root@racnode1 ~]# /sbin/acfsutil snap delete snap1 /documents3 acfsutil snap delete: Snapshot operation is complete. vol_device. simply list the directories under '<ACFS_MOUNT_POINT>/.x64_11gR2_examples. Each directory under the snaps directory is an Oracle ACFS snapshot.zip) which triggered a back up of all modified file image blocks.flags: MountPoint. DO NOT attempt the following on a production environment. I forced an Oracle ASM instance shutdown on node 1 to simulate a failure: This should go without saying. know and understand the importance of dismounting any active file system configured with an Oracle ASM Dynamic Volume Manager (ADVM) volume device. BEFORE shutting down an Oracle ASM instance or dismounting a disk group! Failure to do so will result in I/O failures and very angry users! After the file system(s) have been dismounted. If the Oracle ASM instance or disk group is forcibly shut down or fails while an associated Oracle ACFS is active. the file system is placed into an offline error state.Managing ACFS Oracle ACFS and Dismount or Shutdown Operations If you take anything away from this article. issue two sync command to flush any cached file system data and metadata to persistent storage: [root@racnode1 ~]# sync [root@racnode1 ~]# sync Using a two-node Oracle RAC. applications will start to encounter I/O failures and any Oracle ACFS user data and metadata being written at the time of the termination may not be flushed to ASM storage before it is fenced. but I'll say it anyway. When the file system is placed in an offline error state. If a SHUTDOWN ABORT operation on the Oracle ASM instance is required and you are not able to dismount the file system. SQL> shutdown abort ASM instance shutdown Any subsequent attempt to access an offline file system on that node will result in an I/O error: [oracle@racnode1 ~]$ ls -l /documents3 ls: /documents3: Input/output error [oracle@racnode1 ~]$ df -k Filesystem 1K-blocks /dev/mapper/VolGroup00-LogVol00 145344992 /dev/sdb1 151351424 /dev/sda1 101086 tmpfs 2019256 df: `/documents1': Input/output df: `/documents2': Input/output df: `/documents3': Input/output domo:PUBLIC 4799457152 Used Available Use% Mounted on 22459396 115383364 17% / 192072 143346948 1% /local 12632 83235 14% /boot 0 2019256 0% /dev/shm error error error 1901758592 2897698560 40% /domo . all open references to Oracle ASM files are removed and associated disk groups can then be dismounted or the Oracle ASM instance shut down. 1.mode=620) /dev/sdb1 on /local type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) domo:PUBLIC on /domo type nfs (rw. I had a shell session that previously changed directory (cd) into the /documents3 file system before the forced shutdown: [root@racnode1 ~]# umount /documents1 [root@racnode1 ~]# umount /documents2 [root@racnode1 ~]# umount /documents3 umount: /documents3: device is busy umount: /documents3: device is busy Use the Linux fuser or lsof command to identify processes and kill if necessary: [root@racnode1 ~]# fuser /documents3 /documents3: 16263c [root@racnode1 ~]# kill -9 16263 [root@racnode1 ~]# umount /documents3 Restart the Oracle ASM instance (or in my case.0/grid/bin/crsctl start cluster All of my Oracle ACFS volumes were added to the Oracle ACFS mount registry and will therefore automatically mount when Oracle Grid Infrastructure starts.0/grid/bin/crsctl stop cluster [root@racnode1 ~]# /u01/app/11. Dismounting an active file system. even one that is offline. verify the volume is enabled before attempting to mount: [root@racnode1 ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw.168.addr=192.2. For example.121) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) /dev/asm/docsvol2-300 on /documents2 type acfs (rw) /dev/asm/docsvol3-300 on /documents3 type acfs (rw) . all Oracle Grid Infrastructure services were stopped as a result of me terminating the Oracle ASM instance): [root@racnode1 ~]# /u01/app/11. including any shell references. requires stopping all applications using the file system.Recovering a file system from an offline error state requires dismounting and remounting the Oracle ACFS file system. If you need to manually mount the file system.2.gid=5. 40 FRA 33. as long as there exists free space within the ASM disk group. any of the ASM volumes can be dynamically expanded which means the file system gets expanded as a result. free_mb.Resize File System With Oracle ACFS.25 The same task can be accomplished using the ASMCMD command-line utility: [grid@racnode1 ~]$ asmcmd lsdg From the 12GB of free space in the DOCSDG1 ASM disk group.-----------.------CRS 2. The one exception to 3rd party file systems is online shrinking. as long as that file system can support online resizing.303 12. let's extend the file system (volume) by another 5GB.887 22. total_mb.2) pct_free from v$asm_diskgroup where total_mb != 0 order by name.887 30.809 82. Note that this can be performed while the file system is online and accessible by clients — no outage is required: [root@racnode1 ~]# /sbin/acfsutil size +5G /documents3 acfsutil size: new file system size: 26843545600 (25600MB) Verify the new size of the file system from all Oracle RAC nodes: [root@racnode1 ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 145344992 21952712 115890048 16% / /dev/sdb1 151351424 192072 143346948 1% /local /dev/sda1 101086 12632 83235 14% /boot tmpfs 2019256 1135852 883404 57% /dev/shm domo:PUBLIC 4799457152 1901103872 2898353280 40% /domo /dev/asm/docsvol1-300 33554432 197668 33356764 1% /documents1 .205 1. they too can be dynamically re-sized.584 90. verify there is enough space in the current Oracle ASM disk group to extend the volume: SQL> 2 3 4 select name. for example. Use the following syntax to add space to an Oracle ACFS on the fly without the need to take any type of outage. Ext3. round((free_mb/total_mb)*100.795 67.27 RACDB_DATA 33. supports online resizing but does not support online shrinking. Disk Group Total (MB) Free (MB) % Free --------------. Note that if you are using another file system other than Oracle ACFS. First.-----------.187 12.04 DOCSDG1 98. oracleadvm oracleasm 84136 1 ASM Volume Management Create new Oracle ASM volume using ASMCMD: . ASM Volume Driver Load the Oracle ASM volume driver: [root@racnode1 ~]# /u01/app/11. Note that many of the commands described in this section have already been discussed throughout this guide.2./dev/asm/docsvol2-300 /dev/asm/docsvol3-300 33554432 26214400 197668 183108 33356764 26031292 1% /documents2 1% /documents3 [root@racnode2 ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 145344992 13803084 124039676 11% / /dev/sdb1 151351424 192072 143346948 1% /local /dev/sda1 101086 12632 83235 14% /boot tmpfs 2019256 1135852 883404 57% /dev/shm domo:Public 4799457152 1901103872 2898353280 40% /domo /dev/asm/docsvol1-300 33554432 197668 33356764 1% /documents1 /dev/asm/docsvol2-300 33554432 197668 33356764 1% /documents2 /dev/asm/docsvol3-300 26214400 183108 26031292 1% /documents3 Useful ACFS Commands This section contains several useful commands that can be used to administer Oracle ACFS.0/grid/bin/acfsload stop Check if Oracle ASM volume driver is loaded: [root@racnode1 ~]# lsmod | grep oracle oracleacfs 877320 4 oracleadvm 221760 8 oracleoks 276880 2 oracleacfs.0/grid/bin/acfsload start -s Unload the Oracle ASM volume driver: [root@racnode1 ~]# /u01/app/11.2. acfs: version = 11.0.2.0 mkfs.0 flags: MountPoint.0 allocation unit: 4096 major.acfs: volume = /dev/asm/docsvol3-300 mkfs.0 mkfs.1.1. minor: 252.ADVM on-disk version: 39.0. 153601 .0.2.acfs: Format complete.acfs: on-disk version = 39. Get detailed file system information: [root@racnode1 ~]# /sbin/acfsutil info fs /documents1 ACFS Version: 11.0.Available.acfs: volume size = 21474836480 mkfs.Available mount time: Fri Nov 26 18:38:48 2010 volumes: 1 total size: 34359738368 total free: 34157326336 primary volume: /dev/asm/docsvol1-300 label: flags: Primary.[grid@racnode1 ~]$ asmcmd volcreate -G docsdg1 -s 20G --redundancy unprotected docsvol3 Resize Oracle ACFS file system (add 5GB): [root@racnode1 ~]# /sbin/acfsutil size +5G /documents3 acfsutil size: new file system size: 26843545600 (25600MB) Delete Oracle ASM volume using ASMCMD: [grid@racnode1 ~]$ asmcmd voldelete -G docsdg1 docsvol3 Disk Group / File System / Volume Information Get detailed Oracle ASM disk group information: [grid@racnode1 ~]$ asmcmd lsdg Format an Oracle ASM cluster file system: [grid@racnode1 ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 -n "DOCSVOL3" mkfs. Available.Available mount time: Fri Nov 26 18:38:48 2010 volumes: 1 total size: 26843545600 total free: 26656043008 primary volume: /dev/asm/docsvol3-300 label: DOCSVOL3 flags: Primary.0 flags: MountPoint. 153603 size: 26843545600 free: 26656043008 ADVM diskgroup DOCSDG1 ADVM resize increment: 268435456 ADVM redundancy: unprotected ADVM stripe columns: 4 ADVM stripe width: 131072 number of snapshots: 0 snapshot space usage: 0 . minor: 252.0.Available mount time: Fri Nov 26 18:38:48 2010 volumes: 1 total size: 34359738368 total free: 34157326336 primary volume: /dev/asm/docsvol2-300 label: flags: Primary. 153602 size: 34359738368 free: 34157326336 ADVM diskgroup DOCSDG1 ADVM resize increment: 268435456 ADVM redundancy: unprotected ADVM stripe columns: 4 ADVM stripe width: 131072 number of snapshots: 0 snapshot space usage: 0 /documents3 ACFS Version: 11. minor: 252.0 allocation unit: 4096 major.0.1.0 allocation unit: 4096 major.2.Available.1.0 flags: MountPoint.2.size: free: ADVM diskgroup ADVM resize increment: ADVM redundancy: ADVM stripe columns: ADVM stripe width: number of snapshots: 0 snapshot space usage: 0 34359738368 34157326336 DOCSDG1 268435456 unprotected 4 131072 /documents2 ACFS Version: 11.ADVM on-disk version: 39.0.0.ADVM on-disk version: 39. Get ASM volume information: [grid@racnode1 ~]$ asmcmd volinfo -a Diskgroup Name: DOCSDG1 Volume Name: DOCSVOL1 Volume Device: /dev/asm/docsvol1-300 State: ENABLED Size (MB): 32768 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /documents1 Volume Name: DOCSVOL2 Volume Device: /dev/asm/docsvol2-300 State: ENABLED Size (MB): 32768 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /documents2 Volume Name: DOCSVOL3 Volume Device: /dev/asm/docsvol3-300 State: ENABLED Size (MB): 25600 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /documents3 Get volume status using ASMCMD command: [grid@racnode1 ~]$ asmcmd volstat DISKGROUP NUMBER / NAME: 2 / DOCSDG1 --------------------------------------VOLUME_NAME READS BYTES_READ READ_TIME READ_ERRS WRITES BYTES_WRITTEN WRITE_TIME WRITE_ERRS ------------------------------------------------------------DOCSVOL1 517 408576 1618 0 17007 69280768 63456 0 DOCSVOL2 . acfs -o all Unmount all Oracle ACFS volumes on the local node using the metadata found in the Oracle ACFS mount registry: [root@racnode1 ~]# /bin/umount -t acfs -a Oracle ACFS Mount Registry Register new mount point in the Oracle ACFS mount registry: .512 17007 DOCSVOL3 13961 10956 406016 69280768 54525952 54410240 2547 66147 172007 41749 0 0 0 0 Enable a volume using the ASMCMD command: [grid@racnode1 ~]$ asmcmd volenable -G docsdg1 docsvol3 Disable a volume using the ASMCMD command: [root@racnode1 ~]# umount /documents3 [root@racnode2 ~]# umount /documents3 [grid@racnode1 ~]$ asmcmd voldisable -G docsdg1 docsvol3 Mount Commands Mount single Oracle ACFS volume on the local node: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 Unmount single Oracle ACFS volume on the local node: [root@racnode1 ~]# umount /documents3 Mount all Oracle ACFS volumes on the local node using the metadata found in the Oracle ACFS mount registry: [root@racnode1 ~]# /sbin/mount. [root@racnode1 ~]# /sbin/acfsutil registry -f -a /dev/asm/docsvol3-300 /documents3 acfsutil registry: mount point /documents3 successfully added to Oracle Registry Query the Oracle ACFS mount registry: [root@racnode1 ~]# /sbin/acfsutil registry Mount Object: Device: /dev/asm/docsvol1-300 Mount Point: /documents1 Disk Group: DOCSDG1 Volume: DOCSVOL1 Options: none Nodes: all Mount Object: Device: /dev/asm/docsvol2-300 Mount Point: /documents2 Disk Group: DOCSDG1 Volume: DOCSVOL2 Options: none Nodes: all Mount Object: Device: /dev/asm/docsvol3-300 Mount Point: /documents3 Disk Group: DOCSDG1 Volume: DOCSVOL3 Options: none Nodes: all Unregister volume and mount point from the Oracle ACFS mount registry: [root@racnode1 ~]# acfsutil registry -d /documents3 acfsutil registry: successfully removed ACFS mount point /documents3 from Oracle Registry Oracle ACFS Snapshots Use the 'acfsutil snap create' command to create an Oracle ACFS snapshot named snap1 for an Oracle ACFS mounted on /documents3: [root@racnode1 ~]# /sbin/acfsutil snap create snap1 /documents3 acfsutil snap create: Snapshot operation is complete. Use the 'acfsutil snap delete' command to delete an existing Oracle ACFS snapshot: [root@racnode1 ~]# /sbin/acfsutil snap delete snap1 /documents3 . In a DB instance. size related info. Oracle Automatic Storage Management Cluster File System (Oracle ACFS). Oracle Automatic Storage Management (Oracle ASM) View Name V$ASM_ALIAS Description Contains one row for every alias present in every disk group mounted by the Oracle ASM instance. use V$ASM_DISKGROUP. V$ASM_DISKGROUP Describes a disk group (number. does not perform a V$ASM_DISKGROUP instead. identifies databases using disk groups managed by the Oracle ASM instance. contains one row for every active Oracle ASM long running operation executing in the Oracle ASM instance. Use fsck to Check and Repair the Cluster File System Use the regular Linux fsck command to check and repair the Oracle ACFS. To see all disks. Contains columns that display information for every mounted Oracle ACFS file system. Contains the same columns as V$ASM_DISKGROUP_STAT discovery when it is queried. This only needs to be performed from one of the Oracle RAC nodes: . contains information about the Oracle ASM instance if the database has any open Oracle ASM files. Displays information about disk I/O statistics for each Oracle ASM client. It does not return information about any disks that are part of mounted disk groups in the storage system. Contains the creator for each Oracle ASM File Access Control group. and Oracle ASM Dynamic Volume Manager (Oracle ADVM) information. V$ASM_OPERATION V$ASM_TEMPLATE V$ASM_USER V$ASM_USERGROUP V$ASM_USERGROUP_MEMBER Contains the members for each Oracle ASM File Access Control group. Contains one row for every template present in every disk group mounted by the Oracle ASM instance. In an Oracle ASM instance. In a DB instance. Contains the same columns as V$ASM_DISK V$ASM_DISK_IOSTAT V$ASM_DISK_STAT when it is queried. Attributes are only displayed for disk groups where COMPATIBLE.1 or higher. V$ASM_CLIENT In an Oracle ASM instance. Contains the effective operating system user names of connected database instances and names of file owners. only the rows for that instance are shown. Contains information about statistics for each Oracle ADVM volume. V$ASM_ATTRIBUTE CREATE DISKGROUP and ALTER DISKGROUPstatements. use V$ASM_DISK. the view may show other attributes Displays one row for each attribute defined. V$ASM_FILE Contains one row for every Oracle ASM file in every disk group mounted by the Oracle ASM instance. Oracle Automatic Storage Management Cluster File System (Oracle ACFS) View Name V$ASM_ACFSSNAPSHOTS V$ASM_ACFSVOLUMES V$ASM_FILESYSTEM V$ASM_VOLUME V$ASM_VOLUME_STAT Description Contains snapshot information for every mounted Oracle ACFS file system. state. Contains information about each Oracle ADVM volume that is a member of an Oracle ASM instance. In a DB instance.ASM is set to 11. These views are accessible from the Oracle ASM instance. It only returns information about any disks that are part of mounted disk groups in the storage system. and redundancy type). name. but to reduce overhead. Oracle ASM / ACFS Dynamic Views This section contains information about using dynamic views to display Oracle Automatic Storage Management (Oracle ASM). This view performs disk discovery every time it is queried. including disks that are not part of any disk group. Contains one row for every disk discovered by the Oracle ASM instance. contains no rows. In addition to attributes specified by that are created automatically. but to reduce overhead. correlated with V$ASM_FILESYSTEM. To see all disks. does not perform a discovery V$ASM_DISKinstead.acfsutil snap delete: Snapshot operation is complete. This view performs disk discovery every time it is queried. Contains information about mounted Oracle ACFS volumes. 0.0 fsck.. 0 orphans found fsck..0.0 ***************************** ********** Pass 1: ********** ***************************** The ACFS volume was created at Fri Nov 26 17:20:27 2010 Checking primary file system.39 (29-May-2006) fsck.0.39 (29-May-2006) fsck. Files checked in primary file system: 100% Checking if any files are orphaned.acfs: version = 11.acfs: ACFS-07656: Unable to continue The fsck operating cannot be performed while the file system is online..0.acfs: ACFS-00511: /dev/asm/docsvol3-300 is mounted on at least one node of the cluster.2.acfs: Checker completed with no errors.2.1.1.0 Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 39..[root@racnode1 ~]# /sbin/fsck -t acfs /dev/asm/docsvol3-300 fsck 1. fsck. Remount the cluster file system on all Oracle RAC nodes: [root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 Drop ACFS / ASM Volume Unmount the cluster file system from all Oracle RAC nodes: .acfs: version = 11. Unmount the cluster file system from all Oracle RAC nodes: [root@racnode1 ~]# umount /documents3 [root@racnode2 ~]# umount /documents3 Now check the cluster file system with the file system unmounted: [root@racnode1 ~]# /sbin/fsck -t acfs /dev/asm/docsvol3-300 fsck 1. The same task can be accomplished using the ASMCMD command-line utility: [grid@racnode1 ~]$ asmcmd voldelete -G docsdg1 docsvol3 Unregister the volume and mount point from the Oracle ACFS mount registry from one of the Oracle RAC nodes: [root@racnode1 ~]# acfsutil registry -d /documents3 acfsutil registry: successfully removed ACFS mount point /documents3 from Oracle Registry Finally.[root@racnode1 ~]# umount /documents3 [root@racnode2 ~]# umount /documents3 Log in to the ASM instance and drop the ASM dynamic volume from one of the Oracle RAC nodes: [grid@racnode1 ~]$ sqlplus / as sysasm SQL> ALTER DISKGROUP docsdg1 DROP VOLUME docsvol3. Diskgroup altered. remove the mount point directory from all Oracle RAC nodes (if necessary): [root@racnode1 ~]# rmdir /documents3 [root@racnode2 ~]# rmdir /documents3 .
Copyright © 2024 DOKUMEN.SITE Inc.