Creating and managing ACFS File System
Documentation: Automatic Storage Management Administrator’s Guide -> 5 Introduction to Oracle
ACFS is an ASM based clustered file system that is used to store all type of data types and is installed with Grid Infrastructure. There are different ways to create ACFS. The way how to create an ACFS file system using ASMCA utility is shown below.
ACFS is based on the volumes that are created in a disk group. So, first of all, an ASM diskgroup should be created. Then the volume will be created in an ASM diskgroup. This volume device will be used to create an ACFS. Before starting to create a new diskgroup, make sure you deleted all diskgroups that are created in the previous section.
Run asmca command to open ASM Configuration Assistant page as shown in figure 7.12.
FIGURE 7-12. ASM Configuration Assistant
Click Create button to create a new diskgroup named DF_ACFS with external redundancy and provide 2 disks as shown in Figure 7.13.
FIGURE 7-13. Creating DG_ACFS diskgroup
Now switch to Volumes tab and create a new volume based on the newly created disk group as shown in Figure 7.14.
FIGURE 7-14. Creating a Volume
Next, switch to the “ASM Cluster File Systems” tab and click Create button to create an ASM Cluster file system as in Figure 7.15.
FIGURE 7-15. Create ASM Cluster File System
Click on “Show mount command” to see the command that is needed to run to mount the ACFS on other nodes as in Figure 7.16.
FIGURE 7-16. Mount All ACFS Command
In the exam, you might be asked to create an ACFS using command line and the GUI might not be available. Check the following documentation and following steps to see how to create an ACFS using command line:
Documentation: Automatic Storage Management Administrator’s Guide -> Basic Steps to Manage
Oracle ACFS Systems
First of all, create an ASM diskgroup by using the last two disks:
SQL> CREATE DISKGROUP dg_acfs2 EXTERNAL REDUNDANCY DISK ‘/dev/newdisk3’,’/dev/newdisk4’;
SQL> CREATE DISKGROUP dg_acfs2 EXTERNAL REDUNDANCY DISK ‘/dev/newdisk3’,’/dev/newdisk4’ ATTRIBUTE ‘compatible.asm’ = ‘11.2’;
SQL> ALTER DISKGROUP dg_acfs2 ADD VOLUME VL_ACFS2 SIZE 200M;
Run the following command to create a volume from ASMCMD utility:
ASMCMD [+] > volcreate –G data –s 200m vl_acfs2
Check if the volume device is created:
ASMCMD [+] > volinfo –G data vl_acfs2
To get more information about volume management with ASMCMD command, run it with
the help option to see the available options as follows:
[oracle@ocmnode1 ~]$ asmcmd help
< —- Output trimmed —- >
volcreate, voldelete, voldisable, volenable, volinfo
volresize, volset, volstat
Query GV$ASM_VOLUME view to get information about volume devices:
SQL> SELECT inst_id, volume_name, volume_device, size_mb, usage, state FROM gv$asm_
volume ORDER BY inst_id, volume_name;
SQL> SET LINESIZE 150
SQL> COL volume_device FORMAT a30
INST_ID VOLUME_NAME VOLUME_DEVICE SIZE_MB USAGE STATE
— —————- ——————– ———- ———————- ——–
1 VL_ACFS /dev/asm/vl_acfs-31 256 ACFS ENABLED
1 VL_ACFS2 /dev/asm/vl_acfs2-238 256 ENABLED
Now using the volume device and create a file system:
[root@ocmnode1 ~]# /sbin/mkfs -t acfs /dev/asm/vl_acfs2-238
mkfs.acfs: version = 126.96.36.199.0.0
mkfs.acfs: on-disk version = 39.0
mkfs.acfs: volume = /dev/asm/vl_acfs2-238
mkfs.acfs: volume size = 268435456
mkfs.acfs: Format complete.
Register the new filesystem in the ACFS mount registry:
[root@ocmnode1 ~]# /sbin/acfsutil registry -a /dev/asm/vl_acfs2-238 /u01/acfs2
acfsutil registry: mount point /u01/acfs2 successfully added to Oracle Registry
Mount the filesystem:
[root@ocmnode1 ~]# /bin/mount -t acfs /dev/asm/vl_acfs2-238 /u01/acfs2
Verify if the filesystem is mounted correctly:
[root@ocmnode1 acfs2]# mount
< — Output trimmed — >
/dev/asm/vl_acfs-31 on /u01/acfs type acfs (rw)
/dev/asm/vl_acfs2-238 on /u01/acfs2 type acfs (rw)
Resize ACFS file system
To resize ACFS file system, use acfsutil as follows:
[oracle@ocmnode1 ~]$ /sbin/acfsutil size +100m /u01/acfs
Creating ACFS Snapshots
To create a snapshot of an ACFS filesystem, “snap create” syntax is used. Create an empty
file in the ACFS folder, and create a snapshot of the filesystem.
[oracle@ocmnode1 ~]$ touch /u01/acfs2/a
[oracle@ocmnode1 ~]$ /sbin/acfsutil snap create test_snapshot /u01/acfs2
acfsutil snap create: Snapshot operation is complete.
Once you created a snapshot, a “test_snapshot” folder is created under
/u01/acfs2/.ACFS/snaps/ folder and all files are moved from the ACFS file system to this folder.
Now remove that file and restore it from the snapshot folder:
[oracle@ocmnode1 ~]$ rm –rf /u01/acfs2/a
[oracle@ocmnode1 acfs2]$ cp /u01/acfs2/.ACFS/snaps/test_snapshot/a /u01/acfs2/
Deregsitering and Dismounting ACFS file system
To cleanup the environment or just to remove the ACFS file system, follow below steps.
Deregister the ACFS:
[oracle@ocmnode1 ~]$ /sbin/acfsutil registry -d /u01/acfs
Dismount the ACFS:
[oracle@ocmnode1 ~]$ /bin/umount /u01/acfs
[oracle@ocmnode1 ~]$ /sbin/fsck -a -v -y -t acfs /dev/asm/vl_acfs-31
Remove the file system:
[oracle@ocmnode1 acfs2]$ /sbin/acfsutil rmfs /dev/asm/vl_acfs-31
Disable a Volume:
ASMCMD> voldisable -G data vl_acfs
Delete the volume:
ASMCMD> voldisable -G data vl_acfs
► Create an ACFS file system using ASMCA utility ►10 min.
► Create an ACFS file system manually ►15 min.
► Deregister and Dismount an ACFS file system ►7 min.