Scenerio:
Client has standalone GI installation and wants to check the ACFS feature.Brief:
Oracle ACFS is designed as a general-purpose, single-node and clusterwide file system that delivers support for customer file system application data maintained outside of Oracle Database. Users and applications can access and manage Oracle ACFS using native operating system file system application programming interfaces (APIs) and command-line interface (CLI) tools. Users can also manage Oracle ACFS with Oracle Enterprise Manager.
Oracle ACFS files systems are typically configured for clusterwide access. File systems, files, and directories are visible and accessible from all cluster members and can be referenced by users and applications using the same path names from any cluster member. This design enables simplified application deployments across cluster members and facilitates both multiple instance cluster applications and high availability (HA) failover of unmodified single-node applications.
For testing purpose we will create virtual block device to be used by ASM instance and then we will configure the ACFS on it.
Preparing environmnet for ACFS
1- Check space[root@SN3-IUB-RV-OD03 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
95G 28G 63G 31% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 3.9G 110M 3.8G 3% /dev/shm
[root@SN3-IUB-RV-OD03 ~]#
2- Create file on OS to be used as disk
[root@SN3-IUB-RV-OD03 ~]# dd if=/dev/zero of=mydisk3.img bs=5M count=2000
2000+0 records in
2000+0 records out
10485760000 bytes (10 GB) copied, 40.2008 seconds, 261 MB/s
3- Make it as block device, we have already used loop0 and loop1
[root@SN3-IUB-RV-OD03 ~]# losetup /dev/loop2 mydisk3.img
4- Create ASM disk for acfs
[root@SN3-IUB-RV-OD03 ~]# oracleasm createdisk ASMACFS /dev/loop2
Writing disk header: done
Instantiating disk: done
[root@SN3-IUB-RV-OD03 ~]# oracleasm listdisks
ASMACFS
ASMDSK1
ASMDSK2
5- Start ASMCA and create new diskgroup for ACFS usage
[oracle@SN3-IUB-RV-OD03 bin]$ export ORACLE_BASE=/u02/app
[oracle@SN3-IUB-RV-OD03 bin]$ export ORACLE_HOME=/u02/app/11.2.0/grid/
[oracle@SN3-IUB-RV-OD03 bin]$ export ORACLE_SID=+ASM
[oracle@SN3-IUB-RV-OD03 bin]$ ./asmca
Click on the "ASM Cluster File Systems" tab, then click the "Create" button.
Select "Create Volume" from the Volume list. Enter the Volume Name and Size and click the "OK" button. Wait for the volume to be created, then click the "OK" button on the subsequent message dialog.
The newly created volume will now be selected in the Volume list. Select the "General Purpose File System" option, enter a previously created mount point directory (or leave the suggested mount point), select the "Yes" option for Register Mount Point and click the "OK" button.
Click the "OK" button on the resulting message.
you will see the the volume as dismounted because related mount point directories are not existing.
Create the direcotyr for the mount point as suggested by ASMCA
[root@SN3-IUB-RV-OD03 ~]# mkdir -p /u02/app/acfsmounts/dgacfs_acfsvol
6- Now manually mount the mount point using root
[root@SN3-IUB-RV-OD03 ~]# /bin/mount -t acfs /dev/asm/acfsvol-388 /u02/app/acfsmounts/dgacfs_acfsvol
[root@SN3-IUB-RV-OD03 ~]#
7- Now check with ASMCA again
8- Navigate to the ACFS mount point and create a test file.
[root@SN3-IUB-RV-OD03 dgacfs_acfsvol]# echo "Testing of ACFS" >> acfstest.txt
[root@SN3-IUB-RV-OD03 dgacfs_acfsvol]# echo "By Inam" >> acfstest.txt
[root@SN3-IUB-RV-OD03 dgacfs_acfsvol]# cat acfstest.txt
Testing of ACFS
By Inam
[root@SN3-IUB-RV-OD03 dgacfs_acfsvol]#
[root@SN3-IUB-RV-OD03 dgacfs_acfsvol]# ls
acfstest.txt lost+found
ASM Cluster File System is working as expected.
9- If you want to dismount you can use below
/bin/umount /dev/asm/acfsvol-388
No comments:
Post a Comment