ASM Dynamic Volume Manager (ADVM) & ASM Cluster File system (ACFS)

Following are the steps for creating ACFS

1. Create ASM disk group
2. Change the compatible parameter of disk groups to 11.2.x.x
3. Create ASM dynamic volume(s)
4. mkfs & mount the file system
5. Extend ACFS on other nodes in cluster

Create ASM disk group

SQL> select name, state,total_mb, free_mb,
usable_file_mb  from v$asm_diskgroup
/
NAME     STATE         TOTAL_MB    FREE_MB  USABLE_FILE_MB
-------- ----------- ---------- ----------  --------------
DATADG   MOUNTED          10200      10148           10148
 

Change the compatible parameter of disk groups to 11.2.0.2

SQL> select compatibility, database_compatibility 
from v$asm_diskgroup where name = 'DATADG';
COMPATIBILITY  DATABASE_COMPATIBILITY
------------   -----------------------
10.1.0.0.0     10.1.0.0.0

SQL> alter diskgroup datadg set attribute 'compatible.asm' = '11.2.0.2'
/
Diskgroup altered.
SQL> alter diskgroup datadg set attribute 'compatible.rdbms' = '11.2.0.2'
/
Diskgroup altered.

SQL> select compatibility, database_compatibility 
from v$asm_diskgroup where name = 'DATADG';
COMPATIBILITY    DATABASE_COMPATIBILITY
---------------- -----------------------
11.2.0.2.0       11.2.0.2.0

 Create ASM dynamic volumes

SQL> alter diskgroup datadg add volume datavol1 size 500M
/
Diskgroup altered.

SQL> alter diskgroup datadg add volume datavol2 size 500M
/
Diskgroup altered.

SQL> select volume_name, volume_device from  v$asm_volume
/

VOLUME_NAME                    VOLUME_DEVICE
------------------------------ ------------------------------
DATAVOL1                       /dev/asm/datavol1-316
DATAVOL2                       /dev/asm/datavol2-316

SQL> !ls -al /dev/asm/datavol*
brwxrwx--- 1 root asmadmin 252, 161793 Feb  3 16:35 /dev/asm/datavol1-316
brwxrwx--- 1 root asmadmin 252, 161794 Feb  3 16:36 /dev/asm/datavol2-316

Another method to check the volume information is ASMCMD

ASMCMD [+] > volinfo -a
Diskgroup Name: DATADG
         Volume Name: DATAVOL1
         Volume Device: /dev/asm/datavol1-316
         State: ENABLED
         Size (MB): 512
         Resize Unit (MB): 256
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: /data
         Volume Name: DATAVOL2
         Volume Device: /dev/asm/datavol2-316
         State: ENABLED
         Size (MB): 512
         Resize Unit (MB): 256
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: /data2 

 

mkfs & mount the file system

# mkfs -t acfs -b 8k /dev/asm/datavol1-316
mkfs.acfs: version                   = 11.2.0.2.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/datavol1-316
mkfs.acfs: volume size               = 536870912
mkfs.acfs: Format complete.

# mkfs -t acfs -b 4k /dev/asm/datavol2-316
mkfs.acfs: version                   = 11.2.0.2.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/datavol2-316
mkfs.acfs: volume size               = 536870912
mkfs.acfs: Format complete.

# mkdir -p /data /data2
# mount -t acfs /dev/asm/datavol1-316 /data
# mount -t acfs /dev/asm/datavol2-316 /data2

Verify that the file systems are mounted

# df -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/asm/datavol1-316
                      512M   38M  475M   8% /data
/dev/asm/datavol2-316
                      512M   38M  475M   8% /data2
# mount  | grep asm
/dev/asm/datavol1-316 on /data type acfs (rw)
/dev/asm/datavol2-316 on /data2 type acfs (rw)

# chown ora11gr2:dba /data /data2

Extend ACFS on other nodes in cluster

On second node

SQL> alter diskgroup datadg mount
/

Now try to mount the filesystem

# mount -t acfs /dev/asm/datavol1-316 /data
mount.acfs: CLSU-00100: Operating System function:
open64 failed with error data: 2
mount.acfs: CLSU-00101: Operating System error message:
No such file or directory
mount.acfs: CLSU-00103: error location: OOF_1
mount.acfs: CLSU-00104: additional error information:
open64 (/dev/asm/datavol1-316)
mount.acfs: ACFS-02017: Failed to open volume /dev/asm/datavol1-316.
Verify the volume exists.

Something wrong ..  Check the volume state

ASMCMD [+] > volinfo -a
Diskgroup Name: DATADG
         Volume Name: DATAVOL1
         Volume Device: /dev/asm/datavol1-316
         State: DISABLED
         Size (MB): 512
         Resize Unit (MB): 256
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: /data
         Volume Name: DATAVOL2
         Volume Device: /dev/asm/datavol2-316
         State: DISABLED
         Size (MB): 512
         Resize Unit (MB): 256
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: /data2

By default the state is disabled. Enable it using volenable

ASMCMD [+] > volenable -G DATADG DATAVOL1
ASMCMD [+] > volenable -G DATADG DATAVOL2

After enabling the volumes, mount the file system & change the owner

# mount -t acfs /dev/asm/datavol1-316 /data
# mount -t acfs /dev/asm/datavol2-316 /data2
# chown ora11gr2:dba /data /data2

 Test the ACFS

# uname -n
node1

# cd /data
# ls -al / > test.txt
# ls -al
total 92
drwxr-xr-x  4 ora11gr2 dba   4096 Feb  3 17:10 .
drwxr-xr-x 81 oragrid  dba   4096 Feb  3 16:42 ..
drwxr-xr-x  5 root     root  4096 Feb  3 17:08 .ACFS
drwx------  2 root     root 65536 Feb  3 17:08 lost+found
-rw-r--r--  1 root     root  5326 Feb  3 17:10 test.txt

# uname -n
node2
# cd /data
# ls -al
total 92
drwxr-xr-x  4 ora11gr2 dba   4096 Feb  3 17:10 .
drwxr-xr-x 60 oragrid  dba   4096 Feb  3 17:06 ..
drwxr-xr-x  5 root     root  4096 Feb  3 17:08 .ACFS
drwx------  2 root     root 65536 Feb  3 17:08 lost+found
-rw-r--r--  1 root     root  5326 Feb  3 17:10 test.txt

With 11.2.0.2 ACFS is supported now on Linux,Solaris & AIX. Unfortunately it is *NOT* yet supported for database files (datafiles, redo, control etc).

About these ads
This entry was posted in ACFS, ADVM, Oracle Automatic Storage Management and tagged , . Bookmark the permalink.

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