Putting ACFS to work: how to create a mount point in the new Oracle File System

This post is a translation of another one that I’ve originally wrote in portuguese. I’ve decided to share with the international Oracle community through my weblog.

ACFS stands for ASM Cluster File System. ACFS is a new file system created by Oracle that is created on top of an ASM Disk Group. The architecture is very simple and these mount points can contain both general purpose files (except  db files) or Oracle Home binaries, which is very good for sharing binaries.


There are three ways to setup ACFS:

- Web (with Enterprise Manager)
- With  ASMCA (ASM Configuration Assistant) a graphic tool
- or through command line statements
We will show you examples using ASMCA because it’s nicer ;-)
Here’s the step-by-step:
1 – We had two 1GB LUNs/Disks for this example with which two raw devices were created:
[oracle@node1 ~]$ cat /etc/rc.local
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

raw /dev/raw/raw1 /dev/sdb1
raw /dev/raw/raw2 /dev/sdc1
chmod 666 /dev/raw/raw1
chmod 666 /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2

2 – Now it’s time to call ASMCA:

[oracle@node1 ~]$ . oraenv
ORACLE_HOME = [/home/oracle] ? /u01/11.2.0/grid
The Oracle base for ORACLE_HOME=/u01/11.2.0/grid is /u01/oracle
[oracle@node1 ~]$ asmca &

3 – Create one disk group (DG) with those two raw devices:
asmca - 01b - criar DG DATA
asmca - 01c - DG DATA criado
4 – We then create a ASM volume on top of this DG, naming it “volumezinho” (we show here several ways of doing so):
asmca - 02 - criar volumezinho
There are a few advanced options in ASMCA when you create a volume:
asmca - 02b - criar volumezinho advanced
5 – Create a directoy on the ext3 Linux file system so when can mount there the device created by “volumezinho”
[root@node1 ~]# mkdir /u02/oradata/acfs
[root@node1 ~]# chown oracle:oinstall /u02/oradata/acfs
6 – Now let’s create the ACFS mount point. We can choose between one of these two options:
asmca - 04 - acfs generico
But still you have to mount it manually:
asmca - 05 - acfs montado a mao

Et voilá!

Now we can go to the directory mounted on the ASM volume formated as ACFS, and create some bogus text file:
[oracle@node1 ~]$ df -m Filesystem           1M-blocks      Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 47551     16389     28708  37% / /dev/sda1                   99        11        83  12% /boot tmpfs                     1014       662       352  66% /dev/shm /dev/sdd1                  512       351       162  69% /u02/oradata/cluster-lmc /dev/asm/volumezinho-486 512       101       412  20% /u02/oradata/acfs/data_volumezinho [oracle@node1 ~]$ cd /u02/oradata/acfs/data_volumezinho [oracle@node1 data_volumezinho]$ ll total 68 -rw-r--r-- 1 oracle oinstall    89 Sep 24 14:33 ficheiro.txt drwx------ 2 root   root     65536 Sep 24 14:20 lost+found [oracle@node1 data_volumezinho]$ cat ficheiro.txt
Primeiro ficheiro de texto criado num volume ASM no qual foi montado um ACFS!!!
[oracle@node1 data_volumezinho]$
Technology is an amazing thing. So many twists and turns to end up in the same place ...
About these ads

11 thoughts on “Putting ACFS to work: how to create a mount point in the new Oracle File System

  1. Hi – when registering a mount point, it will be automatically mounted by the ora.registry.acfs resource within 30s – no need to mount it manually.

  2. Hi Allan.
    Thank you very much for the update, but that’s when you have ACFS on the RAC context right? On standalone Grid Infrastructure installations does that auto-mount happens too?



  3. Sorry! I missed you were doing standalone – you’re absolutely right!

    Yes, if you are not using RAC or RAC One, the resources will be unable to mount for you – they don’t exist. Similarly, you’ll need to load the drivers by hand as well.

    Just one more benefit of RAC One or RAC. :)

  4. Another one for the mix: Oracle says I can’t use an ACFS mount point for database files, so why did I managed to create a tablespace there?

    Here’s the example:

    SQL> create tablespace lmc datafile ‘/u02/oradata/acfs/data_volumezinho/lmc01.dbf’ size 5m;

    Tablespace created.

    SQL> !df -m | grep asm

    This time I’m running ACFS on RAC with a single node configuration. Does any one has any clues?

  5. Luis – I believe the appropriate answer is that it is not-supported, not that it cannot be done…. but I don’t know for sure on this one. Sorry!

  6. Hi Luis,

    Allan’s answer is correct. it can be done, but is not supported ;-)
    The idea is to maintain all database base files on ASM filesystem and ACFS for all the rest.

  7. As an FYI, you no longer need to use raw devices – in fact, it is deprecated in newer versions of RHEL/OEL and Oracle. You can just point at the block devices.

  8. I have two node rac database and 2 node application server. I need to mount the ACFS volume in my application node using NFS. can you provide the steps?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s