大佬教程收集整理的这篇文章主要介绍了How To Create ACFS File System In RAC Using Command Line:,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
ACFS i.e Oracle aSM Cluster File System is cluster file system service used for High availability services.
Example – For achieving high availability in goldenate for Oracle RAC, we can use ACFS for goldengate relate files.
In this article, we will show how to create a ACFS file system In Oracle RAC using command line.
ENVIRONMENT DETAILS:
OracLE GRID VERSION – 12.1.0.2NODES – NODE1 , NODE2OS – SOLARIS SPARC
1. Create an ASM DISKGROUP( ON NODE 1)
echo $OracLE_HOME /crsapp/app/Oracle/product/grid12c echo $oracle_sid +ASM1 sqlplus / as sysasm SQL> CREATE DISKGROUP ACFSPOC EXTERNAL REDUNDANCY DISK '/dev/rdsk/c0t514F0C5785C00A0Bd0s6' SIZE 269G ATTRIBUTE 'compatible.asm' = '12.1.0.0.0', 'compatible.rdbms'='12.1.0.0.0' , 'compatible.advm' = '12.1.0.0.0'; Diskgroup created.
2. Mount the diskgroup from other nodes(On NODE 2)
echo $OracLE_HOME /crsapp/app/Oracle/product/grid12c echo $oracle_sid +ASM2 asmcmd ASMCMD> mount ACFSPOC
3. check the diskgroup status( from any nodE)
SQL> SQL> set lines 299 SQL> SELEct GROUP_numbER,NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from gv$asm_diskgroup where NAME='ACFSPOC'; GROUP_numbER NAME COMPATIBILITY DATABASE_COMPATIBILITY ------------ ------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ 13 ACFSPOC 12.1.0.0.0 12.1.0.0.0 13 ACFSPOC 12.1.0.0.0 12.1.0.0.0 $ crsctl stat res ora.ACFSPOC.dg -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local resources -------------------------------------------------------------------------------- ora.ACFSPOC.dg ONLINE ONLINE node1 STABLE ONLINE ONLINE node2 STABLE --------------------------------------------------------------------------------
4. Create a new ADVM volume in the diskgroup(ACFSPOC):(ON NODE 1)
ASMCMD> volcreate -G ACFSPOC -s 50G SHAREDVOL1
ASMCMD> volinfo --all Diskgroup Name: ACFSPOC Volume Name: SHAREDVOL1 Volume Device: /dev/asm/sharedvol1-201 --- >> This is the volume device State: ENABLED Size (MB): 51200 Resize Unit (MB): 512 Redundancy: UNPROT @R_772_10495@pe columns: 8 @R_772_10495@pe Width (K): 1024 Usage: Mountpath: Oracle@NODE2:~$ crsctl stat res ora.ACFSPOC.SHAREDVOL1.advm -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local resources -------------------------------------------------------------------------------- ora.ACFSPOC.SHAREDVOL1.advm ONLINE ONLINE NODE1 STABLE ONLINE ONLINE NODE2 STABLE
5. create mount point with proper permission on both nodes:
------- node 1:(from root) mkdir /ACFSpoc chown Oracle:oinstall /ACFSpoc --------from node 2 also: mkdir /ACFSpoc chown Oracle:oinstall /ACFSpoc
6.Create ACFS FILESYSTEM In the ADVM VOLUME (On node 1) ( as grid owner)
$ /sbin/mkfs -F ACFS /dev/asm/sharedvol1-201 mkfs: version = 12.1.0.2.0 mkfs: on-disk version = 39.0 mkfs: volume = /dev/asm/sharedvol1-201 mkfs: volume size = 53687091200 ( 50.00 GB ) mkfs: Format complete.
NOTE – In case of linux the command will be /sbin/mkfs -t ACFS /dev/asm/sharedvol1-201
7.Register the ACFS file system with CRS:
export OracLE_HOME=/crsapp/app/Oracle/product/grid12c -- Run from root root@NODE1:~# $OracLE_HOME/bin/srvctl add filesystem -d /dev/asm/sharedvol1-201 -m /ACFSpoc -u Oracle -fstype ACFS -autostart ALWAYS -- check the resource status $ crsctl stat res ora.ACFSpoc.sharedvol1.ACFS -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local resources -------------------------------------------------------------------------------- ora.ACFSpoc.sharedvol1.ACFS OFFLINE OFFLINE NODE1 STABLE OFFLINE OFFLINE NODE2 STABLE --------------------------------------------------------------------------------
8. Start the ACFS file system resource:( on node 1 from the root)
root@NODE1:~# $OracLE_HOME/bin/srvctl start filesystem -d /dev/asm/sharedvol1-201 ---- check the status $ crsctl stat res ora.ACFSpoc.sharedvol1.ACFS -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local resources -------------------------------------------------------------------------------- ora.ACFSpoc.sharedvol1.ACFS ONLINE ONLINE NODE1 mounted on /ACFSpoc, STABLE ONLINE ONLINE NODE2 mounted on /ACFSpoc, STABLE -------------------------------------------------------------------------------- $ srvctl config filesystem Volume device: /dev/asm/sharedvol1-201 Canonical volume device: /dev/asm/sharedvol1-201 Auxiliary volume devices: Mountpoint path: /ACFSpoc User: Oracle Type: ACFS Mount options: Description: ACFS file system is enabled ACFS file system is individually enabled on nodes: ACFS file system is individually disabled on nodes:
9. Now validate the ACFS mount points
Oracle@NODE1$ df -kh /ACFSpoc Filesystem Size Used Available Capacity Mounted on /dev/asm/sharedvol1-201 50G 178M 50G 1% /ACFSpoc Oracle@NODE2:/ACFSpoc$ df -kh /ACFSpoc Filesystem Size Used Available Capacity Mounted on /dev/asm/sharedvol1-201 50G 178M 50G 1% /ACFSpoc
Try creaTing a test file on node1 and check whether the same is available on node 2.
Oracle@NODE1:/ACFSpoc$ touch test.log Oracle@NODE1:/ACFSpoc$ ls -ltr @R_737_10586@l 128 drwx------ 2 root root 65536 Oct 30 10:34 lost+found -rw-r--r-- 1 Oracle oinstall 0 Oct 30 10:39 test.log Oracle@NODE2:~$ cd /ACFSpoc/ Oracle@NODE2:/ACFSpoc$ ls -ltr @R_737_10586@l 128 drwx------ 2 root root 65536 Oct 30 10:34 lost+found -rw-r--r-- 1 Oracle oinstall 0 Oct 30 10:39 test.log
We have successfully created the ACFS file system in a two node RAC.
In this next article, we will show, How to create the ACFS file system using ASMCA GUI utility.
以上是大佬教程为你收集整理的How To Create ACFS File System In RAC Using Command Line:全部内容,希望文章能够帮你解决How To Create ACFS File System In RAC Using Command Line:所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。