All about Oracle ACFS 1) Create the new ACFS diskgroup: [grid @ asmlnx2 ~] $ Sqlplus "/as sysasm" SQL * Plus: Release 11.2.0.3.0 Production on Fri Apr 6 17:38:38 2012 Copyright (c) 1982,201 1, Oracle. all rights reserved. connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-ProductionWith the Automatic Storage Management option SQL> CREATE DISKGROUP ACFSDG EXTERNAL REDUNDANCY DISK 'ORCL: ASMDISKNEW10 'size 14653 M attribute' compatible. rdbms '= '11. 2', 'com Patible. asm '= '11. 2', 'compatible. advm '= '11. 2'; 2 3 Diskgroup created. SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-ProductionWith the Automatic Storage Management option [grid @ asmlnx2 ~] $2) Create the ADVM volume in the new diskgroup: [grid @ asmlnx2 ~] $ Sqlplus "/as sysasm" SQL * Plus: Release 11.2.0.3.0 Production on Fri Apr 6 17:41:09 2012 Copyright (c) 1982,201 1, Oracle. all rights reserved. connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-ProductionWith the Automatic Storage Management option SQL> ALTER DISKGROUP ACFSDG ADD VOLUME EBERNALVOL SIZE 14G; Diskgroup altered. SQL> exitDisconnected from Oracle Database 11g Enter Prise Edition Release 11.2.0.3.0-ProductionWith the Automatic Storage Management option 3) Create the mount point as root OS user: [root @ asmlnx2 ~] # Mkdir/u03acfs [root @ asmlnx2 ~] # Chown grid: oinstall/u03acfs [root @ asmlnx2 ~] # Ls-ld/u03acfsdrwxr-xr-x 2 grid oinstall 4096 Apr 6/u03acfs 4) As grid user create the ACFS filesystem: [grid @ asmlnx2 ~] $ Iduid = 1100 (grid) gid = 501 (oinstall) groups = 500 (dba), 501 (oinstall), 1100 (asmadmin), 1300 (asmdba), 1301 (asmoper) [grid @ asmlnx2 ~] $/Sbin/mkfs-t acfs-B 4 k/dev/asm/ebernalvol-168mkfs.acfs: version = 11.2.0.3.0mkfs.acfs: on-disk version = 3920.mkfs.acfs: volume =/dev/asm/ebernalvol-168mkfs.acfs: volume size = 15032385536mkfs. acfs: Format complete. [grid @ asmlnx2 ~] $5) As grid user register the ACFS filesystem & ADVM volume: [grid @ asmlnx2 ~] $/Sbin/acfsutil registry-f-a/dev/asm/ebernalvol-168/u03acfsacfsutil registry: ACFS-05062: cannot query CRS resource [grid @ asmlnx2 ~] $ SQL>/* ASMCMD */alter diskgroup oggacfs drop volume 'oggvol1' 2013-05-16 14:29:28. 669000 + 08: 00 SUCCESS:/* ASMCMD */alter diskgroup oggacfs drop volume 'oggvol1' SQL> alter diskgroup oggacfs resize volume oggvol1 size 90G ORA-15032: not all alterations performedORA-15476: ACFS volumes must be resized with the 'acfsutil size' operating system command. ERROR: alter diskgroup oggacfs resize volume og Gvol1 size 90 GB -- can increase or decrease the file system size $ acfsutil size-10 Gb/ogg, multiple nodes will change. Acfsutil size: new file system size: 95563022336 (91136 MB) $ hostnamezehdb2 $ df-gFilesystem GB blocks Free % Used Iused % Iused Mounted on/dev/hd4 2.00 1.62 20% 11728 3% 4.00 // dev/hd2 1.28 69% 56972 16%/usr/dev/ hd9var 4.00 3.39 16% 8604 2%/var/dev/hd3 8.00 6.42 20% 13653 1%/tmp/dev/hd1 2.00 2.00 1% 1% 51 0.25/home/dev/hd11admin 0.25 1% 1% 5/ admin/proc---/proc/dev/hd10opt 4.00 3.32 17% 1 2042 2%/opt/dev/livedump 0.25 0.25 1% 4 1%/var/adm/ras/livedump/dev/fslv00 30.00 23.34 23% 1791/ftp/dev/fslv01 1% 30.00 8.78 71% 7%/u01/dev/asm/oggvol1-31 89.00 88.74 1% 542984/ogg $ # hostnamezehdb1 # df-gFilesystem GB blocks Free % Used Iused % Iused Mounted on/dev/hd4 1% 2.00 11729 4%/dev/hd2 4.00 1.28 69% 56976 16%/usr/dev/hd9var 4.00 3.40 16% 8651 2%/var/dev/hd3 8.00 6.8 5 15% 11478 1%/tmp/dev/hd1 2.00 2.00 1% 66 1%/home/dev/hd11admin 0.25 0.25 1% 1% 5/admin/proc---/proc/dev/ hd10opt 4.00 3.32 17% 12042/opt/dev/livedump 2% 0.25 0.25 4 1%/var/adm/ras/livedump/dev/fslv00 1% 10.00 3.38 67% 6238/ftp/dev/fslv01 30.00 7.16 77% 265813/u01/dev/asm/oggvol1-31 12% 89.00 88.74 1%/ogg # execute with root user $/sbin/helpers/acfs/mount/dev/asm/oggvo L1-31/ogg $/sbin/helpers/acfs/mount-o all one: Check whether acfs-related services are normal [grid @ rac1 ~] $ Crs_stat-t-v ora. registry. acfs Name Type R/ra f/FT Target State Host ---------------------------------------------------------------------- ora .... ry. acfs ora .... fs. type 0/5 0/ONLINE rac1 [grid @ rac1 ~] $ Crs_stat-t-v ora. ACFS. dg Name Type R/ra f/FT Target State Host ------------------------------------------------------------------------ ora. ACFS. dg ora .... up. type 0/5 0/ONLINE rac1 2: Create a volume in the asm disk group using the asmca graphical tool and format it into an ACFS File System [root @ rac1 ~] # Su-grid [grid @ rac1 ~] $! Exp export DISPLAY = 192.168.1.105: 0 [grid @ rac1 ~] $ Asmca 3: Check whether two nodes have been successfully mounted to ACFS and test read/write [grid @ rac1 ~] $ Df-h Filesystem Size Used Avail Use % Mounted on/dev/vda3 26G 14G 11G 58% // dev/vda1 99 M 12 M 83 M 13%/boot tmpfs 1.2G 787 M 441 M 65%/dev/shm/dev/asm/vol1-330 5.0G 75 M 5.0G 2%/u01/app/grid/acfsmounts/acfs_vol1 [grid @ rac1 ~] $ Ssh rac2 "df-h" Filesystem Size Used Avail Use % Mounted on/dev/vda3 26G 14G 10G 59%/dev/vda1 99 M 12 M 83 M 13%/ boot tmpfs 1.2G 787 M 441 M 65%/dev/shm/dev/asm/vol1-330 5.0G 75 M 5.0G 2%/u01/app/grid/acfsmounts/acfs_vol1 [grid @ rac1 ~] $ Cd/u01/app/grid/acfsmounts/acfs_vol1 [grid @ rac1 acfs_vol1] $ ls lost + found drwx ------ 2 root 65536 Jul 9 lost + found [grid @ rac1 acfs_vol1] $ cp/etc/passwd. /[grid @ rac2 ~] $ Cd/u01/app/grid/acfsmounts/acfs_vol1 [grid @ rac2 acfs_vol1] $ ls lost + found passwd [grid @ rac2 acfs_vol1] $ head-1 passwd root: x: 0: 0: root:/bin/bash 4: perform the following operations on the asmcmd command line [grid @ rac1 ~] $ Echo $ ORACLE_SID + ASM1 [grid @ rac1 ~] $ Asmcmd ASMCMD> ls ACFS/CRS/DATA/FRA/ASMCMD> volcreate // view the HELP command usage: volcreate-G diskgroup-s size [-- column number] [-- width stripe_width] [-- redundancy {high | mirror | unprotected}] [-- primary {hot | cold}] [-- secondary {hot | cold}] volume help: help volcreate ASMCMD> volcreate-g acfs-s 5G vol2 // if space is insufficient, this error is reported ORA-15032: not all alterations timed med ORA-15041: diskgroup "ACFS" space exh Austed (dbd error: OCIStmtExecute) ASMCMD> volcreate-g acfs-s 4G vol2 ASMCMD> volinfo-g acfs vol2 Diskgroup Name: ACFS Volume Name: VOL2 Volume Device: /dev/asm/vol2-330 State: ENABLED Size (MB): 4096 Resize Unit (MB): 32 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath: ASMCMD> volinfo-g acfs vol1 Diskgroup Name: ACFS Volume Name: VOL1 Volume Device:/dev/asm/vol1-3 30 State: ENABLED Size (MB): 5120 Resize Unit (MB): 32 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /u01/app/grid/acfsmounts/acfs_vol1 [root @ rac1 ~] # Mkdir/vol2 (node 2 creates the same mount point) [root @ rac1 ~] # Mkfs. acfs/dev/asm/vol2-330 mkfs. acfs: version = 11.2.0.3.0 mkfs. acfs: on-disk version = 39.0 mkfs. acfs: volume =/dev/asm/vol2-330 mkfs. acfs: volume size = 4294967296 mkfs. acfs: Format complete. [root @ rac1 ~] # Mount-t acfs/dev/asm/vol2-330/vol2/[root @ rac1 ~] # Df-h/vol2 Filesystem Size Used Avail Use % Mounted on/dev/asm/vol2-330 4.0G 45 M 4.0G 2%/vol2 [root @ rac1 ~] # Acfsutil registry-a/dev/asm/vol2-330/vol2/(after registration, node 2 will automatically mount) acfsutil registry: mount point/vol2 successfully added to Oracle Registry