Oracle acfs in oracle 11

4,196 views
4,037 views

Published on

Oracle ACFS is a general purpose portable cluster file system build on the enhanced ASM available since Oracle 11.2 and benefiting from the existing ASM mirroring and striping leading to performance and fault tolerance. In the presentation you will look at the concept and the architecture of ACFS. You will see how to use familiar tools such as sqlplus, asmca, asmcmd and OEM DC to configure, implement and manage ACFS. The presentation will provide an idea for deployment of ACFS for Snapshots and replications. Being fully integrated with ASM, ASM views can be used to monitor performance and usage.

Published in: Technology, News & Politics
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,196
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
159
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Oracle acfs in oracle 11

  1. 1. Oracle ACFS in Oracle 11.2<br />Concepts, Architecture, Deployment, Management and performance monitoring<br />Guenadi N. Jilevski: OCP 7,8,8i,9i,10g 11g OCM 9i<br />
  2. 2. Oracle ACFS in Oracle 11.2<br />Features & Concepts<br />ACFS is General Purpose Cluster Multi OS file system integrated with Grid Infrastructure. (Linux, Windows, AIX, Solaris in Oracle 11.2 and Oracle 11.2.0.2)<br />ACFS can be dynamically re-sized online. <br />ACFS can be managed with ASMCA, ASMCMD, OEM, sqlplus, Linux/UNIX command line.<br />ACFS is extend based.<br />ACFS in build on top of ASM.<br />ACFS depends on ASM striping.<br />ACFS depends on ASM mirroring.<br />ACFS is based on the ASM features. ( I/O and data balancing, disk group redundancy etc…)<br />ACFS is build on top of ASM volumes.<br />ASM volumes are created in a ASM disk group.<br />ASM volumes can be used for any FS ( do not assume FS is clustered FS if using ASM volumes).<br />Accessible via NAS protocols (NFS, CIFS), POSIX, X/OPEN compliant for Linux/Unix.<br />ASM Software stack ( ASM replaces the functionality of the Volume manager and File System)<br />
  3. 3. Oracle ACFS in Oracle 11.2<br />ASM concepts ( ADVM/ACFS) <br /><ul><li>ASM Dynamic Volumes
  4. 4. ASM volumes devices files in /dev/asm/<Volume-name>-<number> presented by ADVM as block devices
  5. 5. OS kernel modules (Linux): oracleasm, oracleadvm, oracleoks and oracleacfs
  6. 6. ASM layers are transparent to OS file system commands. Only files and directories created in ACFS and ACFS snapshots are visible.</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />ASM for Files<br />ASM for ACFS volumes<br />ASM contains files<br />ASM files are striped not disk volumes in case of LVM<br />ASM mirrors extends based on redundancy level<br />Online disk reconfiguration and rebalancing<br />For fast mirror resynch tracks the changed extends.<br />On extended clusters read from a preferred mirror extent that is local<br />Cluster aware<br />Part of Grid Infrastructure<br />ASM volumes are ALSO ASM files. Exposed to the OS via ADVM by /dev/asm/<Volume-number>-<number>. Created once a volume is created.<br />Inherit properties of disk group and behaves like ASM file. Rebalanced with add/remove disk to disk group.<br />ADVM represents the ASM volume to OS. Behaves like any block devices.<br />
  7. 7. Oracle ACFS in Oracle 11.2<br />ADVM processes in RAC ASM<br />VDBG – Volume Driver Background forwards ASM requests to the dynamic volume manager driver (kernel). Death of VDBG kills ASM instance.<br />VBGn – Volume Background processes wait for requests from dynamic volume manager driver (kernel) that need to be coordinated with ASM instance. Death of VBGn does NOT kill ASM instance.<br />VMB – Volume Membership Background coordinates cluster membership with ASM instance. Death of VMB does NOT kill ASM instance. <br />
  8. 8. Oracle ACFS in Oracle 11.2<br />Restrictions<br />ADVM volumes can not be used as boot devices or root file system.<br />ADVM volumes can not be used for RAW devices.<br />ADVM volume devices can not be used for multi-pathing.<br />ADVM volumes can not be used with ASMlib. Do not layer ASM over ASM.<br />ADVM volumes can not be partitioned with fdisk.<br />ADVM volumes are not to be used for Oracle Grid Infrastructure installation.<br />
  9. 9. Oracle ACFS in Oracle 11.2<br />Space allocation for volumes in ASM disk group<br />VAU – Volume Allocation Unit. Smallest allocation for a volume. On creation or extension of a volume space is allocated from an ASM disk group in multiples of VAU. <br />Stripe is the number of Volume Extents within VAU. Can very from 1 to 8. Default is 4. If 1 than there is no striping.<br />VAU=Stripe X Volume Extent<br />VE - Volume Extent has a static value based on AU. For a default AU=1MB the extent size is 64MB. Each volume extent is allocated round-robin on different disks of a disk group.<br />Example: if stripe is 4 and AU is 1MB than VAU=4X64=256MB. Space is allocated in multiples of VAU. For a requested volume of 400MB a volume of 512MB consisting of 2 VAU will be created. In case of re-size space will be added in multiple of 256MB (VAU).<br />
  10. 10. Oracle ACFS in Oracle 11.2 <br />Space allocation within a volume<br />Volume is created with <br />Stripe column – number of stripes. Default 4. From 1 to 8. If 1 no striping.<br />Stripe width – size of each stripe. Default 128K. Range from 4K, 8K,16K,32K,64K, 128K, 256K, 512K,1M.<br />Space for the volume is allocated as explained in VAU from ASM disk group.<br />Space within the volume, when a file is created/resized on the ACFS, is allocated in chunks: <br /><ul><li>size of VAU
  11. 11. the size of the strip width round-robin across all of the VE in the VAU.</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />Steps to create an ACFS<br />Prerequisites: <br />compatible.asm>=11.2<br />compatible.advm>=11.2, compatible.asm>=compatible.advm<br />Load ADVM drivers $GI_HOME/bin/acfsload start –s as root on Oracle Restart only. For clustered Oracle GI in ASM RAC is automatically loaded.<br />Create the ASM volume<br />Create the mount point<br />Make the file system as root or GI owner<br />Mount the file system as root unless using /sbin/acfsutil as GI owner.<br />Register the file system. For the file system to persists reboot register it similarly to /etc/fstab with acfsutil. Registering the File System automatically mounts the file system on restart/reboot and manage it as CRS resource. GI owner for /sbin/acfsutil.<br />
  12. 12. Oracle ACFS in Oracle 11.2<br />ASMCA <br />
  13. 13. Oracle ACFS in Oracle 11.2<br />ASMCA<br />Note: <br /><ul><li> ACFSUTIL registers and mounts the ACFS. After restart ACFS will be mounted. Similar to /etc/fstab functionality
  14. 14. DB Home FS=GP FS + Register Mount Point</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />Using sqlplus to <br /><ul><li>Create a volume ACFS_VOL2 with size 2GB.
  15. 15. Verify the creation process</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />Using ASMCMD to <br /><ul><li>Create a volume ACFS_VOL1 with size 1GB.
  16. 16. Verify the creation process</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />Create the file system<br />Register the file system using acfsutil –a. It mounts the ACFS automatically.<br />
  17. 17. Oracle ACFS in Oracle 11.2<br /><ul><li>ACFS can be dynamically resized (expand/shrink)
  18. 18. Example extend/u01/acfs with 2GB
  19. 19. /sbin/acfsutil size +2G /u01/acfs</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />ACFS snapshot<br />Online read-only point in time copy of the ACFS<br />ACFS store metadata in the ACFS volume for directories, filenames and pointers to file blocks. As a file on ACFS gets modified the original blocks are copied for recovery into the snapshot.<br />Useful for :<br />Recovery as of the snapshot time<br />Consistent backup of the files in the snapshot<br />You can have up to 63 snapshots per volume<br />
  20. 20. Oracle ACFS in Oracle 11.2<br /><ul><li>Create snapshots: </li></ul>/sbin/acfsutil snap create <snap_name> <mountpoint><br />.ACFS directory created as a subdirectory to the ACFS with two subdirectories<br /><ul><li>snap : store the snapshot data
  21. 21. repl
  22. 22. Delete snapshots: </li></ul>/sbin/acfsutil snap delete <snap_name> <mountpoint><br />
  23. 23. Oracle ACFS in Oracle 11.2<br />ACFS snapshot stores the data in .ACFS/snaps/<snapshot-name> directory<br />Example:<br /><ul><li>Make a snapshot on ACFS file system
  24. 24. Use the snapshot as a backup to restore ( from point in time copy)
  25. 25. Oracle internally maintains the file integrity</li></li></ul><li>Oracle ACFS in Oracle 11.2<br />Obtain ACFS info<br />[oracle@raclinux1 u03]$ /sbin/acfsutil info fs /u03<br />/u03<br /> ACFS Version: 11.2.0.2.0<br /> flags: MountPoint,Available<br /> mount time: Mon Jul 11 15:51:45 2011<br /> volumes: 1<br /> total size: 10737418240<br /> total free: 10514800640<br /> primary volume: /dev/asm/datavol-239<br /> label: <br /> flags: Primary,Available,ADVM<br /> on-disk version: 39.0<br /> allocation unit: 4096<br /> major, minor: 252, 122369<br /> size: 10737418240<br /> free: 10514800640<br /> ADVM diskgroup DATA<br /> ADVM resize increment: 268435456<br /> ADVM redundancy: unprotected<br /> ADVM stripe columns: 4<br /> ADVM stripe width: 131072<br /> number of snapshots: 0<br /> snapshot space usage: 0<br />[oracle@raclinux1 u03]$ <br />[oracle@raclinux1 u03]$ /sbin/acfsutil info fs /u03<br />/u03<br /> ACFS Version: 11.2.0.2.0<br /> flags: MountPoint,Available<br /> mount time: Mon Jul 11 15:51:45 2011<br /> volumes: 1<br /> total size: 10737418240<br /> total free: 10514767872<br /> primary volume: /dev/asm/datavol-239<br /> label: <br /> flags: Primary,Available,ADVM<br /> on-disk version: 39.0<br /> allocation unit: 4096<br /> major, minor: 252, 122369<br /> size: 10737418240<br /> free: 10514767872<br /> ADVM diskgroup DATA<br /> ADVM resize increment: 268435456<br /> ADVM redundancy: unprotected<br /> ADVM stripe columns: 4<br /> ADVM stripe width: 131072<br />number of snapshots: 1<br /> snapshot space usage: 32768<br />[oracle@raclinux1 u03]$ <br />
  26. 26. Oracle ACFS in Oracle 11.2<br />
  27. 27. Oracle ACFS in Oracle 11.2<br />
  28. 28. Oracle ACFS in Oracle 11.2<br />
  29. 29. Oracle ACFS in Oracle 11.2<br />
  30. 30. Oracle ACFS in Oracle 11.2<br />Example Resize /u01/acfs3 from 2GB to 6GB<br />
  31. 31. Oracle ACFS in Oracle 11.2<br />
  32. 32. Oracle ACFS in Oracle 11.2<br /> /sbin/acfsutil size [-|+]nnn[K|M|G|T|P] <path> - Resize file system<br />
  33. 33. Oracle ACFS in Oracle 11.2<br />ASM views<br />SQL> desc v$asm_volume<br /> Name Null? Type<br /> ----------------------------------------- -------- ----------------------------<br /> GROUP_NUMBER NUMBER<br /> VOLUME_NAME VARCHAR2(30)<br /> COMPOUND_INDEX NUMBER<br /> SIZE_MB NUMBER<br /> VOLUME_NUMBER NUMBER<br /> REDUNDANCY VARCHAR2(6)<br /> STRIPE_COLUMNS NUMBER<br /> STRIPE_WIDTH_K NUMBER<br /> STATE VARCHAR2(8)<br /> FILE_NUMBER NUMBER<br /> INCARNATION NUMBER<br /> DRL_FILE_NUMBER NUMBER<br /> RESIZE_UNIT_MB NUMBER<br /> USAGE VARCHAR2(30)<br /> VOLUME_DEVICE VARCHAR2(256)<br /> MOUNTPATH VARCHAR2(1024)<br />SQL><br />SQL> select * from v$asm_acfsvolumes;<br />FS_NAME VOL_DEVICE VOL_LABEL PRIMA TOTAL_MB FREE_MB<br />-------------------- -------------------- -------------------- ----- ---------- ----------<br />/u03 /dev/asm/datavol-239 TRUE 10240 9008.67969<br />/u04 /dev/asm/datavol1-23 TRUE 10240 10091.6523<br /> 9<br />/u06 /dev/asm/sec-351 TRUE 29696 29476.8047<br />SQL> select * from v$asm_filesystem;<br />FS_NAME AVAILABLE BLOCK_SIZE STATE CORRU NUM_VOL TOTAL_SIZE TOTAL_FREE TOTAL_SNAP_SPACE_USAGE<br />-------------------- --------- ---------- ------------- ----- ---------- ---------- ---------- ----------------------<br />/u03 11-JUL-11 4 AVAILABLE FALSE 1 10240 9008.67969 0<br />/u04 11-JUL-11 4 AVAILABLE TRUE 1 10240 10091.6523 .046875<br />/u06 11-JUL-11 4 AVAILABLE TRUE 1 29696 29476.8047 0<br />SQL><br />
  34. 34. Oracle ACFS in Oracle 11.2<br />ACFS information from asmcmd and acfcutil<br />[oracle@raclinux1 u03]$ /sbin/acfsutil info fs /u03<br />/u03<br /> ACFS Version: 11.2.0.2.0<br /> flags: MountPoint,Available<br /> mount time: Mon Jul 11 15:51:45 2011<br /> volumes: 1<br /> total size: 10737418240<br /> total free: 9446285312<br /> primary volume: /dev/asm/datavol-239<br /> label: <br /> flags: Primary,Available,ADVM<br /> on-disk version: 39.0<br /> allocation unit: 4096<br /> major, minor: 252, 122369<br /> size: 10737418240<br /> free: 9446285312<br /> ADVM diskgroup DATA<br /> ADVM resize increment: 268435456<br /> ADVM redundancy: unprotected<br /> ADVM stripe columns: 4<br /> ADVM stripe width: 131072<br /> number of snapshots: 0<br /> snapshot space usage: 0<br />[oracle@raclinux1 u03]$<br />ASMCMD> volinfo -G data -a<br />Diskgroup Name: DATA<br /> Volume Name: DATAVOL<br /> Volume Device: /dev/asm/datavol-239<br /> State: ENABLED<br /> Size (MB): 10240<br /> Resize Unit (MB): 256<br /> Redundancy: UNPROT<br /> Stripe Columns: 4<br /> Stripe Width (K): 128<br /> Usage: ACFS<br /> Mountpath: /u03 <br /> Volume Name: DATAVOL1<br /> Volume Device: /dev/asm/datavol1-239<br /> State: ENABLED<br /> Size (MB): 10240<br /> Resize Unit (MB): 256<br /> Redundancy: UNPROT<br /> Stripe Columns: 4<br /> Stripe Width (K): 128<br /> Usage: ACFS<br /> Mountpath: /u04 <br />ASMCMD> exit<br />
  35. 35. Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br />Designate a primary ACFS and DR standby ACFS asynchronously replicating changes across the network using Oracle Net.<br />Capture changes into a log change file on the primary ACFS. Transfer the changes to similar log change file to the DR ACFS. After application on the DR ACFS changes are purged.<br />Size properly ACFS to accommodate changes.<br />Make sure that the network have sufficient bandwidth. Refer to the docs how to gather sizing statistics.<br />
  36. 36. Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br />Limitations<br />There is presently only one standby site supported for a given primary files system.<br />Only up to 8 nodes in a cluster can mount a file system.<br />There is no support for ACFS file systems with encryption or ACFS security.<br />Prerequisites<br />compatible.ASM=11.2.0.2 <br />compatible.ADVM=11.2.0.2<br />
  37. 37. Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br />Example: Primary ACFS based on volume prim mounted on /u05 and DR secondary ACFS based on volume sec mounted on /u06.<br />ACFS needs to be mounted on only one node (primary) during setup.<br />Use the following commends for mount dismount.<br />/bin/umount /dev/asm/prim-481 # Unmount on raclinux1,raclinux2<br />/bin/mount -t acfs /dev/asm/prim-481 /u05 # Mount on raclinux1,raclinux2<br />/bin/mount -t acfs /dev/asm/sec-351 /u06 # Mount on raclinux1,raclinux2<br />/bin/umount /dev/asm/sec-351 # Mount on on raclinux1,raclinux2<br />/sbin/mount.acfs -o all # Mount all on raclinux1, raclinux2<br />
  38. 38. Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br />Create a user on ASM with sysasm and sysdba privileges (oracle in the example)<br />Create a service for the primary site (prim) and secondary site(sec). +ASMn will not work.<br />Initiate the standby ACFS<br />[root@raclinux1 bin]# /sbin/acfsutil repl init standby -p oracle/oracle@prim -c sec /u06<br /> Where prim is the service created in bullet two and oracle is the user created in bullet one. Note that before starting the initiation the standby and primary site you need to have the ACFS mounted on only one node ,that is, you need to dismount the both /u05 and /u06 on raclinux2 node.<br />Initiate the primary ACFS while as root ( In case of failure re-Initiate the standby)<br /> [root@raclinux1 bin]# /sbin/acfsutil repl init primary -s oracle/oracle@sec -m /u06 -c prim /u05validating the remote connection<br /> validating the remote connectionvalidating the remote connectionacfsutil repl init: ACFS-05050: remote connection cannot be establishedacfsutil repl init: ACFS-05052: standby replication site requires reinitialization[root@raclinux1 bin]# /sbin/acfsutil repl init standby -p oracle/oracle@prim -c sec /u06[root@raclinux1 bin]#[root@raclinux1 bin]# /sbin/acfsutil repl init primary -s oracle/oracle@sec -m /u06 -c prim /u05remote connection has been establishedRegistering with user specified service name-primwaiting for the standby replication site to initializewaiting for the standby replication site to initializeThe standby replication site is initialized. ACFS replication will begin.[root@raclinux1 bin]#<br />Step 4 starts the processes for ACFS replication and we can use already the ACFS replication. The replication can be validated and configuration checked with the following commands.<br />
  39. 39. Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br /><ul><li>Validation</li></ul>[root@raclinux1 bin]# /sbin/acfsutil repl info -c -v /u06<br />Site: Standby<br />Standby status: Online<br />Standby mount point: /u06<br />Standby Oracle Net service name: sec<br />Primary mount point: /u05<br />Primary Oracle Net service name: PRIM<br />Primary Oracle Net alias: oracle/****@prim<br />Replicated tags:<br />Log compression: Off<br />Debug log level: 0<br />[root@raclinux1 bin]#<br /> [root@raclinux1 bin]# /sbin/acfsutil repl bg info /u06<br />Resource: ora.repl.transport.sec.sec.acfs<br />Target State: ONLINE<br />Current State: ONLINE on raclinux1<br />Resource: ora.repl.main.sec.sec.acfs<br />Target State: ONLINE<br />Current State: ONLINE on raclinux1<br />Resource: ora.repl.apply.sec.sec.acfs<br />Target State: ONLINE<br />Current State: ONLINE on raclinux1<br />[root@raclinux1 bin]#<br /><ul><li>Mount primary and standby ACFS on all nodes of the cluster.</li></li></ul><li>Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br /><ul><li>Managing Replication
  40. 40. Check replication configuration & statistics
  41. 41. # /sbin/acfsutil repl info -c -v /u06
  42. 42. # /sbin/acfsutil repl info -c -v /u05
  43. 43. # /sbin/acfsutil repl info -s -v /u05
  44. 44. Start & Stop replication : Although ACFS replication is automatically started after initiation and registered with Grid Infrastructure as a resource for automatic restart the acfsutil repl bg command can be used to start and stop the background processes and daemons implementing the replication.
  45. 45. # /sbin/acfsutil repl bg stop /u06
  46. 46. # /sbin/acfsutil repl bg start /u06
  47. 47. Suspending and resuming ACFS replication. ACFS replication can be manually suspended and resumed. Prior to pausing the replication the sync must be executed. Pausing and resuming ACFS replication are done using the acfsutl repl [ pause | resume] /standby_fs command. Here we are going to suspend replication, resume replication create a file in the primary ACFS to synchronize with the standby ACFS file system.</li></li></ul><li>Oracle ACFS in Oracle 11.2 <br />Oracle 11gR2 ACFS Replication – New feature in 11.2.0.2 <br /># sync<br /># /sbin/acfsutil repl pause /u06<br /># /sbin/acfsutil repl info -s -v /u05<br />——————————————————-<br />Fri Dec 3 14:49:52 2010 – Fri Dec 3 16:44:18 2010<br />——————————————————-<br />Data replicated: 5.01GB<br />From writes: 5.01GB<br />From memory mapped updates: 0.00GB<br />File operations replicated: 11<br />......................................<br />#<br /># /sbin/acfsutil repl resume /u06<br />## Create another 1GB file on /u05<br /># /sbin/acfsutil repl sync /u05<br /># /sbin/acfsutil repl sync apply /u05<br /># /sbin/acfsutil repl info -s -v /u05<br />——————————————————-<br />Fri Dec 3 14:49:52 2010 – Fri Dec 3 16:56:55 2010<br />——————————————————-<br />Data replicated: 6.01GB<br />From writes: 6.01GB<br />From memory mapped updates: 0.00GB<br />File operations replicated: 19<br />........................................<br />#<br />
  48. 48. Oracle ACFS in Oracle 11.2 <br />Q & A<br />

×