Search This Blog

Saturday, September 22, 2012

Oracle RAC 11gR2 ACFS Configuration & Snapshots.

On Oracle Version 11.2.0.1 ACFS is only supported on the following OS Platforms.

1) OL5 and RHEL5
2) Windows 2003 R1 (64-bit)
3) Windows 2003 R2 (64-bit)

Oracle ACFS Disk Space Usage.

1) Upto 64 million files in a file system.
2) 63 snapshots.
3) 64 Mounts on 32-bit systems.
4) 256 Mounts on 64-bit systems.

For this demonstration i am using RHEL5.4 with Oracle 11.2.0.1.

Note: RedHat variants with "UEK" kernel are not supported on Oracle 11.2.0.1.



  
Launch ASMCA as the grid user.

[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host

[root@rac1 ~]# su - grid
[root@rac1 ~]# asmca

Click on create in the DiskGroups section and Create a DiskGroup for cluster file system.
Go to Volumes section and create a volume out of the disk group we had created earlier.
Go to ACFS cluster file system section and make a mount point.
[root@rac1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 25G 18G 6.7G 73% / /dev/sda1 99M 14M 80M 15% /boot tmpfs 1014M 154M 860M 16% /dev/shm /dev/asm/asmstorage-83 3.0G 73M 3.0G 3% /u01/app/grid/acfsmounts/acfsg_asmstorage As you can see our new filesystem is mounted on /dev/asm/asmstorage-83. Now we can use it to store general purpose Non Oracle files. ACFS SNAPSHOTS With ACFS you can also take snapshots of your mount points. This feature is somewhat similar to virtual machine or disk snapshots. How snapshots work ?. Suppose there is some data in the ACFS mount point which needs to be saved. This can be done by taking a snapshot using "/sbin/acfsutil" command. After taking the snapshot if any modifications are done to the files in ACFS mount points then all the original pre-modified blocks relating to these files are automatically copied in the snapshot directory which we had created earlier. This behavior is somewhat similar to the read consistency concept which is achieved with the aid of Undo Tablespace. So, in order to rollback the changes you to replace the files in the mount point from the one's which are located in the snapshot directory. Example: [root@rac1 ~]# cd /u01/app/grid/acfsmounts/acfsg_asmstorage/ [root@rac1 acfsg_asmstorage]# ls lost+found [root@rac1 acfsg_asmstorage]# vi test.txt sample data needed to be saved. Create snapshot of the mount point. [grid@rac1 ~]$ /sbin/acfsutil snap create mysnap1 /u01/app/grid/acfsmounts/acfsg_asmstorage acfsutil snap create: Snapshot operation is complete. [grid@rac1 acfsg_asmstorage]$ vi test.txt sample data needed to be saved. wrong data entered Compare the file in the snapshot and the one which was modified. [grid@rac1 ~]$ cat /u01/app/grid/acfsmounts/acfsg_asmstorage/test.txt sample data needed to be saved. wrong data entered [grid@rac1 ~]$ cat /u01/app/grid/acfsmounts/acfsg_asmstorage/.ACFS/snaps/mysnap1/test.txt sample data needed to be saved.

0 comments:

Post a Comment