DBA Hub

📋Steps in this guide1/7

How to create ACFS file system in RAC using command line DBACLASS

ACFS i.e Oracle ASM Cluster File System is cluster file system service used for High availability services. Example – For achieving high availability in goldenate for Oracle RAC, we can use ACFS for goldengate relate files. In this article, we will show how to create a ACFS file system in oracle RAC using command line. […]

oracle clusteringintermediate
by OracleDba
14 views
1

Overview

ACFS i.e Oracle ASM Cluster File System is cluster file system service used for High availability services. Example – For achieving high availability in goldenate for Oracle RAC, we can use ACFS for goldengate relate files. In this article, we will show how to create a ACFS file system in oracle RAC using command line. ENVIRONMENT DETAILS:
2

Section 2

ORACLE GRID VERSION – 12.1.0.2 NODES               – NODE1 , NODE2 OS                  – SOLARIS SPARC 1. Create an ASM DISKGROUP( ON NODE 1) 2. Mount the diskgroup from other nodes(On NODE 2)

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
echo $ORACLE_HOME
/crsapp/app/oracle/product/grid12c

echo $ORACLE_SID
+ASM1

sqlplus / as sysasm


SQL> CREATE DISKGROUP ACFSPOC EXTERNAL REDUNDANCY
DISK '/dev/rdsk/c0t514F0C5785C00A0Bd0s6' SIZE 269G
ATTRIBUTE 'compatible.asm' = '12.1.0.0.0',
'compatible.rdbms'='12.1.0.0.0' ,
'compatible.advm' = '12.1.0.0.0';
  

Diskgroup created.
3

Section 3

3. check the diskgroup status( from any node) 4. Create a new ADVM volume in the diskgroup(ACFSPOC):(ON NODE 1)

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
echo $ORACLE_HOME
/crsapp/app/oracle/product/grid12c

echo $ORACLE_SID
+ASM2

asmcmd

ASMCMD> mount ACFSPOC

SQL> SQL>  set lines 299
SQL> select GROUP_NUMBER,NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from gv$asm_diskgroup where NAME='ACFSPOC';

GROUP_NUMBER NAME                           COMPATIBILITY                                                DATABASE_COMPATIBILITY
------------ ------------------------------ ------------------------------------------------------------ ------------------------------------------------------------
          13 ACFSPOC                        12.1.0.0.0                                                   12.1.0.0.0
          13 ACFSPOC                        12.1.0.0.0                                                   12.1.0.0.0



$ crsctl stat res ora.ACFSPOC.dg -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ACFSPOC.dg
               ONLINE  ONLINE       node1                  STABLE
               ONLINE  ONLINE       node2                  STABLE
--------------------------------------------------------------------------------
4

Section 4

5. create mount point with proper permission on both nodes: 6.Create ACFS FILESYSTEM In the ADVM VOLUME (On node 1) ( as grid owner)

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ASMCMD> volcreate -G ACFSPOC -s 50G SHAREDVOL1

ASMCMD> volinfo --all
Diskgroup Name: ACFSPOC

         Volume Name: SHAREDVOL1
         Volume Device: /dev/asm/sharedvol1-201 --- >> This is the volume device
         State: ENABLED
         Size (MB): 51200
         Resize Unit (MB): 512
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage:
         Mountpath:
		 
		 
oracle@NODE2:~$ crsctl stat res ora.ACFSPOC.SHAREDVOL1.advm -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ACFSPOC.SHAREDVOL1.advm
               ONLINE  ONLINE       NODE1                  STABLE
               ONLINE  ONLINE       NODE2                  STABLE

------- node 1:(from root)

mkdir /acfspoc
chown oracle:oinstall /acfspoc


--------from node 2 also:

mkdir /acfspoc
chown oracle:oinstall /acfspoc
5

Section 5

> NOTE – In case of linux the command will be /sbin/mkfs -t acfs /dev/asm/sharedvol1-201 NOTE – In case of linux the command will be /sbin/mkfs -t acfs /dev/asm/sharedvol1-201 7.Register the ACFS file system with CRS:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
$ /sbin/mkfs -F acfs /dev/asm/sharedvol1-201
mkfs: version = 12.1.0.2.0
mkfs: on-disk version = 39.0
mkfs: volume = /dev/asm/sharedvol1-201
mkfs: volume size = 53687091200 ( 50.00 GB )
mkfs: Format complete.
6

Section 6

8. Start the ACFS file system resource:( on node 1 from the root) 9. Now validate the ACFS mount points

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
export ORACLE_HOME=/crsapp/app/oracle/product/grid12c

-- Run from root 

root@NODE1:~# $ORACLE_HOME/bin/srvctl add filesystem  -d  /dev/asm/sharedvol1-201 -m /acfspoc -u oracle -fstype ACFS  -autostart ALWAYS


-- Check the resource status

$ crsctl stat res ora.acfspoc.sharedvol1.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.acfspoc.sharedvol1.acfs
               OFFLINE OFFLINE      NODE1                  STABLE
               OFFLINE OFFLINE      NODE2                  STABLE
--------------------------------------------------------------------------------

root@NODE1:~# $ORACLE_HOME/bin/srvctl start filesystem -d /dev/asm/sharedvol1-201


---- Check the status

$ crsctl stat res ora.acfspoc.sharedvol1.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.acfspoc.sharedvol1.acfs
               ONLINE  ONLINE       NODE1                  mounted on /acfspoc,
                                                             STABLE
               ONLINE  ONLINE       NODE2                  mounted on /acfspoc,
                                                             STABLE
--------------------------------------------------------------------------------




$ srvctl config filesystem
Volume device: /dev/asm/sharedvol1-201
Canonical volume device: /dev/asm/sharedvol1-201
Auxiliary volume devices:
Mountpoint path: /acfspoc
User: oracle
Type: ACFS
Mount options:
Description:
ACFS file system is enabled
ACFS file system is individually enabled on nodes:
ACFS file system is individually disabled on nodes:
7

Section 7

Try creating a test file on node1 and check whether the same is available on node 2. We have successfully created the ACFS file system in a two node RAC. In this next article, we will show, How to create the ACFS file system using ASMCA GUI utility.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
oracle@NODE1$ df -kh /acfspoc
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/asm/sharedvol1-201
                        50G   178M        50G     1%    /acfspoc
						
						
oracle@NODE2:/acfspoc$ df -kh /acfspoc
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/asm/sharedvol1-201
                        50G   178M        50G     1%    /acfspoc

oracle@NODE1:/acfspoc$ touch test.log

oracle@NODE1:/acfspoc$ ls -ltr
total 128
drwx------   2 root     root       65536 Oct 30 10:34 lost+found
-rw-r--r--   1 oracle   oinstall       0 Oct 30 10:39 test.log



oracle@NODE2:~$ cd /acfspoc/
oracle@NODE2:/acfspoc$ ls -ltr
total 128
drwx------   2 root     root       65536 Oct 30 10:34 lost+found
-rw-r--r--   1 oracle   oinstall       0 Oct 30 10:39 test.log

Comments (0)

Please to add comments

No comments yet. Be the first to comment!