To see overview of ACFS file System ,

Oracle ASM Cluster File System

Step 1 : Basic thing to use ACFS file system is compatible.rdbms, compatible.advm parameter should be set to 11.2 or higher.

[oracle@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 21 23:22:52 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup data set attribute 'compatible.advm'='11.2';
alter diskgroup data 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

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

I got error while updating compatible.advm parameter , to set compatible.advm to 11.2 we need to first start acfsload with root access.

[root@rac1 ~]# cd /u01/app/11.2.0/grid/bin/
[root@rac1 bin]# ./acfsload start
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9392: Validating ADVM/ACFS installation files for operating system.
ACFS-9393: Verifying ASM Administrator setup.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9322: completed

After starting acfsload I can change compatible.advm successfully.

[oracle@rac1 bin]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 21 23:24:41 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup data set attribute 'compatible.advm'='11.2';

Diskgroup altered.

SQL>
SQL> alter diskgroup data set attribute 'compatible.rdbms'='11.2';

Diskgroup altered.

SQL>

Now, Parameters are all set .

Step 2 : We need to create volume for acfs :

ASMCMD> volcreate -G data -s 3G volume1

ASMCMD> volinfo -G data -a
Diskgroup Name: DATA

	 Volume Name: VOLUME1
	 Volume Device: /dev/asm/volume1-167
	 State: ENABLED
	 Size (MB): 3072
	 Resize Unit (MB): 32
	 Redundancy: UNPROT
	 Stripe Columns: 4
	 Stripe Width (K): 128
	 Usage: 
	 Mountpath: 

ASMCMD>

Step 3: We can check details of newly created volume from sqlplus :

[oracle@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 21 23:48:30 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> SELECT volume_name, volume_device FROM V$ASM_VOLUME 
     WHERE volume_name ='VOLUME1';  2  

VOLUME_NAME
------------------------------
VOLUME_DEVICE
--------------------------------------------------------------------------------
VOLUME1
/dev/asm/volume1-167


SQL>

Step 4 : Create  ACFS file system using ORACLE ACFS mkfs command :

[oracle@rac1 ~]$ /sbin/mkfs -t acfs /dev/asm/volume1-167
mkfs.acfs: version                   = 11.2.0.4.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/volume1-167
mkfs.acfs: volume size               = 3221225472
mkfs.acfs: Format complete.
[oracle@rac1 ~]$

Step 5 :  Register file system with the acfsutil registry command [optional] :

[oracle@rac1 ~]$ /sbin/acfsutil registry -a /dev/asm/volume1-167 /u01/app/acfsmounts/myacfs
acfsutil registry: mount point /u01/app/acfsmounts/myacfs successfully added to Oracle Registry
[oracle@rac1 ~]$

Step 6 : Mount File System on specific directory :

[root@rac1 ~]# mkdir -p /u01/acfstest/test1
[root@rac1 ~]# 
[root@rac1 ~]# /bin/mount -t acfs /dev/asm/volume1-167 /u01/acfstest/test1
[root@rac1 ~]# 
[root@rac1 ~]# chown -R oracle:oinstall /u01/acfstest/test1/
[root@rac1 ~]#

Step 7 : we can test the ACFS mount point

[oracle@rac1 test1]$ touch test.txt
[oracle@rac1 test1]$ echo "test message" > ab.txt
[oracle@rac1 test1]$ cat ab.txt 
test message
[oracle@rac1 test1]$

Accessing ACFS file system on second node :

Step 1 : Enable volume created on first node with volenable using asmcmd :

ASMCMD> volenable -G data volume1

Step 2 : Check details using volinfo :

ASMCMD> volinfo -G data -a
Diskgroup Name: DATA

	 Volume Name: VOLUME1
	 Volume Device: /dev/asm/volume1-167
	 State: ENABLED
	 Size (MB): 3072
	 Resize Unit (MB): 32
	 Redundancy: UNPROT
	 Stripe Columns: 4
	 Stripe Width (K): 128
	 Usage: 
	 Mountpath: 

ASMCMD>

Step 3 : Create directory and mount acfs file system :

[root@rac2 ~]# mkdir -p /u01/acfstest/test1 
[root@rac2 ~]# 
[root@rac2 ~]# /bin/mount -t acfs /dev/asm/volume1-167 /u01/acfstest/test1

Step 4 : View file created with previous node :

[oracle@rac2 test1]$ cat ab.txt 
test message
[oracle@rac2 test1]$

Stay tuned for More articles on Oracle RAC

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel : https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.