RakDBA Oracle Posts Creating an ASM File System (ACFS)

Creating an ASM File System (ACFS)

1. Creating a Volume (ADVM) in a mounted Diskgroup

In this example we will create the volume ADVM_RMAN01 on the Diskgroup OACFS2020_RMAN with a size of 200GB.

Log in with the “grid” user account on one of the nodes of the RAC cluster, and execute the following command:

[grid@ ora_node1 ~]$  asmcmd
ASMCMD> volcreate -G OACFS2020_RMAN -s 200G ADVM_RMAN01

Diskgroup Name: OACFS2020_RMAN
Volume Name: ADVM_RMAN01
Volume Device: /dev/asm/advm_rman01-20
State: ENABLED
Size (MB): 204800
Resize Unit (MB): 32
Redundancy: MIRROR
Stripe Columns: 4
Stripe Width (K): 128
Usage:
Mountpath:



2. Create a Linux mount point /rman/backup

Execute the following command on all nodes of the RAC cluster 

[root@ ora_node1 ~]$  mkdir -p /rman/backup

[root@ ora_node2 ~]$  mkdir -p /rman/backup

3. Create a file system with the Oracle ACFS mkfs command
[grid@ ora_node1 ~]$  /sbin/mkfs -t acfs -b 4k /dev/asm/advm_rman01-20
mkfs.acfs: version                   = 11.2.0.4.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/advm_rman01-20
mkfs.acfs: volume size               = 858993459200
mkfs.acfs: Format complete.



4. Register the file system with Oracle ACFSUTIL command
[grid@ ora_node1 ~]$ /sbin/acfsutil registry -f -a /dev/asm/advm_rman01-20 /rman/backup
acfsutil registry: mount point /rman/backup successfully added to Oracle Registry




5.Mount the file system with Oracle ACFS mount command
[root@ ora_node1 ~]$  /bin/mount -t acfs /dev/asm/advm_rman01-20 /rman/backup

[root@ ora_node2 ~]$  /bin/mount -t acfs /dev/asm/advm_rman01-20 /rman/backup

6. Checking our ACFS creation

When we check the status of our ACFS we can see that the file system has been mounted on both nodes of our Oracle RAC cluster :

[root@ ora_node1 ~]$  df -hP /rman/backup
Filesystem               Size  Used Avail Use% Mounted on
/dev/asm/advm_rman01-20  200G  1.0G 199G    1% /rman/backup

And again on the other node :

[root@ ora_node2 ~]$  df -hP /rman/backup
Filesystem               Size  Used Avail Use% Mounted on
/dev/asm/advm_rman01-20  200G  1.0G 199G    1% /rman/backup

We can also check our ACFS via SQLPLUS from ASM instance :

[grid@ ora_node1 ~]$  sqlplus sys/password as sysasm
SQL> SET lines 254
col group_number for 999
col group_name for a20
col volume_name for a10
col state for a10
col redundancy for a10
col usage for a10
col volume_device for a25 
col volume_name for a25
col mountpath for a25

SELECT a.group_number,
       g.name group_name,
       a.volume_name,
       a.size_mb,
       a.volume_device,
       a.state,
       a.redundancy,
       a.usage,
       a.mountpath  
FROM v$asm_volume a , v$ASM_DISKGROUP g  
WHERE a.group_number=g.GROUP_NUMBER;

GROUP_NUMBER GROUP_NAME           VOLUME_NAME                  SIZE_MB VOLUME_DEVICE             STATE      REDUNDANCY USAGE      MOUNTPATH
------------ -------------------- ------------------------- ---------- ------------------------- ---------- ---------- ---------- -------------------------
           1 OACFS2020_RMAN       ADVM_RMAN01                   204800 /dev/asm/advm_rman01-20   ENABLED    MIRROR     ACFS       /rman/backup
		  

6. Change ownership and open up permissions for our new ACFS
[root@ ora_node1 ~]$  chown -R oracle:oinstall /rman/backup
[root@ ora_node1 ~]$  chmod -R 775 /rman/backup

7. ACFS test
[oracle@ ora_node1 ~]$  echo "ACFS writing test by Sami from `hostname -s`"  > /rman/backup/acfs_test.txt
[oracle@ ora_node2 ~]$  echo "ACFS writing test by Sami from `hostname -s`" >> /rman/backup/acfs_test.txt

Let’s see what our acfs_test.txt file contains :

[oracle@ ora_node1 ~]$  cat /rman/backup/acfs_test.txt
ACFS writing test by Sami from ora_node1
ACFS writing test by Sami from ora_node2

Happy Learning !!!

Hop this blog could help you 😉

0 0 votes
Article Rating
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] Creating an ASM File System (ACFS) […]