ACFS on Linux
Using the Oracle ASM Cluster File System (Oracle ACFS) on Linux
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.- 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
- ASM Configuration Assistant (ASMCA)
- Oracle Enterprise Manager (OEM)
- Command Line / SQL
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.
(use this command to resize ACFS - /sbin/acfsutil size 10g /u02)
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 34,359,738,368 ASMVOL +DOCSDG1 [DOCSVOL2] /dev/asm/docsvol2-300 34,359,738,368 ASMVOL +DOCSDG1 [DOCSVOL3] /dev/asm/docsvol3-300 26,843,545,600 ASMVOL 95,563,022,336 +FRA/RACDB/ARCHIVELOG/2010_11_08/thread_1_seq_69.264.734565029 42,991,616 ARCHIVELOG +FRA/RACDB/ARCHIVELOG/2010_11_08/thread_2_seq_2.266.734565685 41,260,544 ARCHIVELOG < SNIP > +FRA/RACDB/ONLINELOG/group_3.259.734554873 52,429,312 ONLINELOG +FRA/RACDB/ONLINELOG/group_4.260.734554877 52,429,312 ONLINELOG 12,227,537,408 +RACDB_DATA/RACDB/CONTROLFILE/Current.256.734552525 18,890,752 CONTROLFILE +RACDB_DATA/RACDB/DATAFILE/EXAMPLE.263.734552611 157,294,592 DATAFILE +RACDB_DATA/RACDB/DATAFILE/SYSAUX.260.734552569 1,121,984,512 DATAFILE +RACDB_DATA/RACDB/DATAFILE/SYSTEM.259.734552539 744,497,152 DATAFILE +RACDB_DATA/RACDB/DATAFILE/UNDOTBS1.261.734552595 791,683,072 DATAFILE +RACDB_DATA/RACDB/DATAFILE/UNDOTBS2.264.734552619 209,723,392 DATAFILE +RACDB_DATA/RACDB/DATAFILE/USERS.265.734552627 5,251,072 DATAFILE +RACDB_DATA/RACDB/ONLINELOG/group_1.257.734552529 52,429,312 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_2.258.734552533 52,429,312 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_3.266.734554871 52,429,312 ONLINELOG +RACDB_DATA/RACDB/ONLINELOG/group_4.267.734554875 52,429,312 ONLINELOG +RACDB_DATA/RACDB/PARAMETERFILE/spfile.268.734554879 4,608 PARAMETERFILE +RACDB_DATA/RACDB/TEMPFILE/TEMP.262.734552605 93,331,456 TEMPFILE +RACDB_DATA/RACDB/spfileracdb.ora 4,608 PARAMETERFILE 3,352,382,464 |
asmcmd volcreate -G docsdg1 -s 20G docsvol3 |
On the Linux platform, Oracle ADVM volume devices are created as block devices regardless of the configuration of the underlying storage in the Oracle ASM disk group. Do not use raw (8) to map Oracle ADVM volume block devices into raw volume devices. |
Under Linux, all volume devices are externalized to the OS and appear dynamically as special files in the /dev/asm directory. In this guide, we will use this OS volume device to create an Oracle ACFS:
$ ls -l /dev/asm total 0 brwxrwx--- 1 root asmadmin 252, 153601 Nov 28 13:49 docsvol1-300 brwxrwx--- 1 root asmadmin 252, 153602 Nov 28 13:49 docsvol2-300 brwxrwx--- 1 root asmadmin 252, 153603 Nov 28 13:56 docsvol3-300 $ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 –n "DOCSVOL3" |
ACFS Prerequisites
Install Oracle Grid Infrastructure
Oracle Grid Infrastructure 11g Release 2 (11.2) or higher is required for Oracle ACFS. Oracle grid infrastructure includes Oracle Clusterware, Oracle ASM, Oracle ACFS, Oracle ADVM, and driver resources software components, which are installed into the Grid Infrastructure Home using the Oracle Universal Installation (OUI) tool. 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.[grid@racnode1 ~]$ id uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper) [grid@racnode1 ~]$ . oraenv ORACLE_SID = [+ASM1] ? +ASM1 The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/grid [grid@racnode1 ~]$ dbhome /u01/app/11.2.0/grid [grid@racnode1 ~]$ echo $ORACLE_SID +ASM1 |
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, the Oracle ASM dynamic volume(s) can be created on that free space or a new ASM disk group can be created.
[grid@racnode1 ~]$ sqlplus / as sysasm SQL> select path, name, header_status, os_mb from v$asm_disk; PATH NAME HEADER_STATUS OS_MB ------------------ --------------- ------------- ---------- ORCL:ASMDOCSVOL1 PROVISIONED 98,303 ORCL:CRSVOL1 CRSVOL1 MEMBER 2,205 ORCL:DATAVOL1 DATAVOL1 MEMBER 33,887 ORCL:FRAVOL1 FRAVOL1 MEMBER 33,887 |
Verify Oracle ASM Volume Driver
[root@racnode1 ~]# uname -a Linux racnode1 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux |
[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s ADVM/ACFS is not supported on centos-release-5-5.el5.centos |
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. Do not attempt these steps on a critical production environment. You have been warned. |
[root@racnode1 ~]# cd /u01/app/11.2.0/grid/lib [root@racnode1 lib]# cp -p osds_acfslib.pm osds_acfslib.pm.orig [root@racnode2 ~]# cd /u01/app/11.2.0/grid/lib [root@racnode2 lib]# cp -p osds_acfslib.pm osds_acfslib.pm.orig |
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; however, if you attempt to load the Oracle ASM volume driver from either Oracle RAC node, you get the following error:
[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s acfsload: ACFS-9129: ADVM/ACFS not installed |
To install ADVM/ACFS, copy the following kernel modules from the Oracle grid infrastructure home to the expected location:
[root@racnode1 ~]# mkdir /lib/modules/2.6.18-194.el5/extra/usm [root@racnode1 ~]# cd /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode1 bin]# cp *ko /lib/modules/2.6.18-194.el5/extra/usm/ [root@racnode2 ~]# mkdir /lib/modules/2.6.18-194.el5/extra/usm [root@racnode2 ~]# cd /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode2 bin]# cp *ko /lib/modules/2.6.18-194.el5/extra/usm/ |
[root@racnode1 ~]# cd /u01/app/11.2.0/grid/bin [root@racnode1 bin]# ./acfsdriverstate -orahome /u01/app/11.2.0/grid version ACFS-9205: OS/ADVM,ACFS installed version = 2.6.18-8.el5(x86_64)/090715.1 [root@racnode2 ~]# cd /u01/app/11.2.0/grid/bin [root@racnode2 bin]# ./acfsdriverstate -orahome /u01/app/11.2.0/grid version ACFS-9205: OS/ADVM,ACFS installed version = 2.6.18-8.el5(x86_64)/090715.1 |
[root@racnode1 ~]# depmod [root@racnode2 ~]# depmod |
[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s [root@racnode2 ~]# /u01/app/11.2.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,oracleadvm oracleasm 84136 1 [root@racnode2 ~]# lsmod | grep oracle oracleacfs 877320 4 oracleadvm 221760 8 oracleoks 276880 2 oracleacfs,oracleadvm oracleasm 84136 1 |
If the Oracle grid infrastructure 'ora.registry.acfs' resource does not exist, create it. This only needs to be performed from one of the Oracle RAC nodes:
Next, copy the Oracle ACFS executables to /sbin and set the appropriate permissions. The Oracle ACFS executables are located in theGRID_HOME/install/usm/EL5/<ARCHITECTURE>/<KERNEL_VERSION>/<FULL_KERNEL_VERSION>/bin directory (12 files) and include any file without the *.ko extension:
[root@racnode1 ~]# cd /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode1 bin]# cp acfs* /sbin; chmod 755 /sbin/acfs* [root@racnode1 bin]# cp advmutil* /sbin; chmod 755 /sbin/advmutil* [root@racnode1 bin]# cp fsck.acfs* /sbin; chmod 755 /sbin/fsck.acfs* [root@racnode1 bin]# cp mkfs.acfs* /sbin; chmod 755 /sbin/mkfs.acfs* [root@racnode1 bin]# cp mount.acfs* /sbin; chmod 755 /sbin/mount.acfs* [root@racnode2 ~]# cd /u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode2 bin]# cp acfs* /sbin; chmod 755 /sbin/acfs* [root@racnode2 bin]# cp advmutil* /sbin; chmod 755 /sbin/advmutil* [root@racnode2 bin]# cp fsck.acfs* /sbin; chmod 755 /sbin/fsck.acfs* [root@racnode2 bin]# cp mkfs.acfs* /sbin; chmod 755 /sbin/mkfs.acfs* [root@racnode2 bin]# cp mount.acfs* /sbin; chmod 755 /sbin/mount.acfs* |
#!/bin/sh #
ORACLE_HOME=/u01/app/11.2.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ]; then ORA_CRS_HOME=$ORACLE_HOME fi ... |
- /sbin/acfsdbg
- /sbin/acfsutil
- /sbin/advmutil
- /sbin/fsck.acfs
- /sbin/mkfs.acfs
- /sbin/mount.acfs
SQL> SELECT compatibility, database_compatibility 2 FROM v$asm_diskgroup 3 WHERE name = 'DOCSDG1'; COMPATIBILITY DATABASE_COMPATIBILITY ---------------- ----------------------- 10.1.0.0.0 10.1.0.0.0 |
[grid@racnode1 ~]$ sqlplus / as sysasm SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.asm' = '11.2'; Diskgroup altered. SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.rdbms' = '11.2'; Diskgroup altered. SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.advm' = '11.2'; Diskgroup altered. |
If you receive an error while attempting to set the 'compatible.advm' attribute, verify that theOracle ASM volume driver is running: SQL> ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.advm' = '11.2'; ALTER DISKGROUP docsdg1 SET ATTRIBUTE 'compatible.advm' = '11.2' * ERROR at line 1: ORA-15032: not all alterations performed ORA-15242: could not set attribute compatible.advm ORA-15238: 11.2 is not a valid value for attribute compatible.advm ORA-15477: cannot communicate with the volume driver |
Verify the changes to the compatibility level:
SQL> SELECT compatibility, database_compatibility 2 FROM v$asm_diskgroup 3 WHERE name = 'DOCSDG1'; COMPATIBILITY DATABASE_COMPATIBILITY ---------------- ----------------------- 11.2.0.0.0 11.2.0.0.0 |
[root@racnode1 ~]# mkdir /documents1 [root@racnode2 ~]# mkdir /documents1 |
[grid@racnode1 ~]$ asmca |
[root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 /sbin/mount.acfs.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.acfs.bin: error while loading shared libraries: libhasgen11.so: cannot open shared object file: No such file or directory |
#!/bin/sh #
ORACLE_HOME=/u01/app/11.2.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ]; then ORA_CRS_HOME=$ORACLE_HOME fi ... |
[root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 [root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1 |
[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,gid=5,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,addr=192.168.1.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,gid=5,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,addr=192.168.1.121) oracleasmfs on /dev/oracleasm type oracleasmfs (rw) /dev/asm/docsvol1-300 on /documents1 type acfs (rw) |
[root@racnode1 ~]# chown oracle.dba /documents1 [root@racnode1 ~]# chmod 775 /documents1 |
Test
Now let's perform a test to see if all of our hard work paid off.
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),1201(asmdba),1300(dba),1301(oper) [oracle@racnode1 ~]$ echo "The Wiki of Deepak Kachole" > /documents1/test.txt [oracle@racnode1 ~]$ ls -l /documents1 total 72 drwxr-xr-x 5 root root 4096 Nov 23 21:17 .ACFS/ drwx------ 2 root root 65536 Nov 23 21:17 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 23 21:25 test.txt |
[oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper) [oracle@racnode2 ~]$ ls -l /documents1 total 72 drwxr-xr-x 5 root root 4096 Nov 23 21:17 .ACFS/ drwx------ 2 root root 65536 Nov 23 21:17 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 23 21:25 test.txt [oracle@racnode2 ~]$ cat /documents1/test.txt The Wiki of Deepak Kachole |
Oracle Enterprise Manager (OEM)
This section presents a second method that can be used to create an Oracle ASM cluster file system; namely, Oracle Enterprise Manager (OEM). Similar to the ASM Configuration Assistant (ASMCA), OEM provides a convenient graphical user interface for creating and maintaining ASM cluster 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 /documents2 [root@racnode2 ~]# mkdir /documents2 |
Create ASM Cluster File System
Log in to Oracle Enterprise Manager (OEM) as a privileged database user.
[oracle@racnode1 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://racnode1.abc.info:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/racnode1_racdb/sysman/log [oracle@racnode2 ~]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://racnode1.abc.info:1158/em/console/aboutApplication EM Daemon is running. Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/racnode2_racdb/sysman/log |
Verify Mounted Cluster File System
To verify that the new cluster file system mounted properly, 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,gid=5,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,addr=192.168.1.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,gid=5,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,addr=192.168.1.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@racnode1 ~]# chown oracle.dba /documents2 [root@racnode1 ~]# chmod 775 /documents2 |
Test
Now let's perform a test to see if all of our hard work paid off.
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),1201(asmdba),1300(dba),1301(oper) [oracle@racnode1 ~]$ echo " The Wiki of Deepak Kachole " > /documents2/test.txt [oracle@racnode1 ~]$ ls -l /documents2 total 72 drwxr-xr-x 5 root root 4096 Nov 24 13:32 .ACFS/ drwx------ 2 root root 65536 Nov 24 13:32 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 24 14:10 test.txt |
[oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper) [oracle@racnode2 ~]$ ls -l /documents2 total 72 drwxr-xr-x 5 root root 4096 Nov 24 13:32 .ACFS/ drwx------ 2 root root 65536 Nov 24 13:32 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 24 14:10 test.txt [oracle@racnode2 ~]$ cat /documents2/test.txt The Wiki of Deepak Kachole |
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; namely, the command line interface and SQL. Unlike using the ASM Configuration Assistant (ASMCA) or Oracle Enterprise Manager (OEM), using the command line tools does not require a graphic user interface and is the preferred method when working remotely over a slow network.
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),1200(asmadmin),1201(asmdba),1202(asmoper) [grid@racnode1 ~]$ . oraenv ORACLE_SID = [+ASM1] ? +ASM1 The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/grid [grid@racnode1 ~]$ dbhome /u01/app/11.2.0/grid [grid@racnode1 ~]$ echo $ORACLE_SID +ASM1 |
As the Oracle grid infrastructure owner, 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. |
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, query the view V$ASM_VOLUME (or since we are using Oracle RAC, GV$ASM_VOLUME). Make certain that the STATE column for each Oracle RAC instance is 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 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: |
[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, list the newly created device file on the file system:
[root@racnode1 ~]# ls -l /dev/asm/* brwxrwx--- 1 root asmadmin 252, 153601 Nov 26 16:55 /dev/asm/docsvol1-300 brwxrwx--- 1 root asmadmin 252, 153602 Nov 26 16:55 /dev/asm/docsvol2-300 brwxrwx--- 1 root asmadmin 252, 153603 Nov 26 17:20 /dev/asm/docsvol3-300 |
[grid@racnode1 ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/docsvol3-300 -n "DOCSVOL3" mkfs.acfs: version = 11.2.0.1.0.0 mkfs.acfs: on-disk version = 39.0 mkfs.acfs: volume = /dev/asm/docsvol3-300 mkfs.acfs: volume size = 21474836480 mkfs.acfs: Format complete. |
[root@racnode1 ~]# mkdir /documents3 [root@racnode2 ~]# mkdir /documents3 |
[root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol3-300 /documents3 /sbin/mount.acfs.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/docsvol3-300 /documents3 /sbin/mount.acfs.bin: error while loading shared libraries: libhasgen11.so: cannot open shared object file: No such file or directory |
#!/bin/sh #
ORACLE_HOME=/u01/app/11.2.0/grid ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ]; then ORA_CRS_HOME=$ORACLE_HOME fi ... |
[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, run thefollowing 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,gid=5,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,addr=192.168.1.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,gid=5,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,addr=192.168.1.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@racnode1 ~]# chown oracle.dba /documents3 [root@racnode1 ~]# chmod 775 /documents3 |
[root@racnode1 ~]# /sbin/acfsutil registry -f -a /dev/asm/docsvol3-300 /documents3 acfsutil registry: mount point /documents3 successfully added to Oracle Registry |
[root@racnode1 ~]# /sbin/acfsutil registry MountObject: Device: /dev/asm/docsvol1-300 Mount Point: /documents1 Disk Group: DOCSDG1 Volume: DOCSVOL1 Options: none Nodes: all MountObject: Device: /dev/asm/docsvol2-300 Mount Point: /documents2 Disk Group: DOCSDG1 Volume: DOCSVOL2 Options: none Nodes: all MountObject: Device: /dev/asm/docsvol3-300 Mount Point: /documents3 Disk Group: DOCSDG1 Volume: DOCSVOL3 Options: none Nodes: all |
[oracle@racnode1 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper) [oracle@racnode1 ~]$ echo " The Wiki of Deepak Kachole " > /documents3/test.txt [oracle@racnode1 ~]$ ls -l /documents3 total 72 drwxr-xr-x 5 root root 4096 Nov 24 18:44 .ACFS/ drwx------ 2 root root 65536 Nov 24 18:44 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 24 18:56 test.txt |
[oracle@racnode2 ~]$ id uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper) [oracle@racnode2 ~]$ ls -l /documents3 total 72 drwxr-xr-x 5 root root 4096 Nov 24 18:44 .ACFS/ drwx------ 2 root root 65536 Nov 24 18:44 lost+found/ -rw-r--r-- 1 oracle oinstall 42 Nov 24 18:56 test.txt [oracle@racnode2 ~]$ cat /documents3/test.txt The Wiki of Deepak Kachole |
No comments:
Post a Comment