Configuring Oracle 18c RAC Using NFS With ASM

來源:互聯網
上載者:User

標籤:預設   win   klist   ctime   f11   ffffff   restart   環境   create   

對於沒有共用預存環境下,可以使用基於NFS的ASM來配置RAC。這裡簡單描述如何在Oracle 18c RAC環境下配置基於NFS的ASM服務。

1、環境介紹

所用到的主機資訊中所示:

2、NFS Server配置
[[email protected] ~]# vi /etc/exports/u02    *(rw,sync,no_wdelay,insecure_locks,no_root_squash)[[email protected] ~]# systemctl restart nfs[[email protected] ~]# showmount -eExport list for onas:/u02 *
3、RAC節點掛載NFS共用

RAC節點分別編輯/etc/fstab檔案,加入以下內容:

[[email protected] ~]# vi /etc/fstabonas:/u02               /u02            nfs     rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0  0 0[[email protected] ~]# mount -a[[email protected] ~]# vi /etc/fstabonas:/u02               /u02            nfs     rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0  0 0[[email protected] ~]# mount -a
4、安裝Grid組件4.1 初始安裝

具體的安裝過程不做過多描述,只截取幾張ASM部分的。
這裡使用第二個選項“Configure ASM on NFS”,使用了此選項後,系統會自動建立共用磁碟。


指定OCR的位置,下一步。待Grid組件安裝並配置完成後,預設會建立一塊30G大小的磁碟ocrvfdgdisk0,用於OCRVFDG磁碟組,如下:

[[email protected] ~]# la /u02/asmrac/total 33Gdrwxr-xr-x 2 grid oinstall   40 Sep  4 17:05 .drwxr-xr-x 8 root root     4.0K Sep  4 15:09 ..-rw-rw---- 1 grid asmadmin  28G Sep  5 09:52 ocrvfdgdisk0

通過asmca圖形介面查看,如所示:

4.2 建立磁碟組

在共用目錄下,建立了10塊虛擬磁碟:asmdisk1~asmdisk10,分別示範使用asmca和命令列建立磁碟組。通過asmca圖形介面建立data磁碟組,通過asmca命令建立fra磁碟組。

[[email protected] ~]$ asmca -silent -sysAsmPassword abcABC12 -asmsnmpPassword abcABC12 -createDiskGroup -diskString ‘/u02/asmrac‘ -diskGroupName fra -diskList /u02/asmrac/asmdisk6 -redundancy external -au_size 4[INFO] [DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-180905AM105833.log for details.//添加磁碟[[email protected] ~]$ asmca -silent -sysAsmPassword abcABC12 -asmsnmpPassword abcABC12 -addDisk -diskString ‘/u02/asmrac‘ -diskGroupName fra -diskList /u02/asmrac/asmdisk7,/u02/asmrac/asmdisk8,/u02/asmrac/asmdisk9 [[email protected] ~]$ asmcmd lsdsk -t -G fraCreate_Date  Mount_Date  Repair_Timer  Path05-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk605-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk705-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk805-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk9
5、使用ASMLib配置5.1 建立虛擬共用磁碟
[[email protected] asmdisks]# for i in  {1..10};do dd if=/dev/zero of=/u02/asmrac/asmdisk$i bs=1024k count=10000;done[[email protected] ~]# ll /u02/asmrac/total 102400000-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk1-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk2-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk3-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk4-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk5-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk6-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk7-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk8-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk9-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk10
5.2 配置ASMLib服務

在RAC各個節點分別配置asmlib服務,如下:

[email protected] ~]# oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver.  The following questions will determine whether the driver isloaded on boot and what permissions it will have.  The current valueswill be shown in brackets (‘[]‘).  Hitting <ENTER> without typing ananswer will keep that current value.  Ctrl-C will abort.Default user to own the driver interface []: gridDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done[[email protected] ~]# oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasmLoading module "oracleasm": oracleasmConfiguring "oracleasm" to use device physical block sizeMounting ASMlib driver filesystem: /dev/oracleasm
5.3 建立塊裝置

如果使用asmlib,必須使用losetup命令建立塊裝置,如下:

[[email protected] ~]# for i in {1..10};do losetup /dev/loop$i /u02/asmdisks/asmdisk$i;done[[email protected] ~]# ll /dev/loop*brw-rw---- 1 root disk  7,   1 Sep  4 14:35 /dev/loop1brw-rw---- 1 root disk  7,  10 Sep  4 14:35 /dev/loop10brw-rw---- 1 root disk  7,   2 Sep  4 14:35 /dev/loop2brw-rw---- 1 root disk  7,   3 Sep  4 14:35 /dev/loop3brw-rw---- 1 root disk  7,   4 Sep  4 14:35 /dev/loop4brw-rw---- 1 root disk  7,   5 Sep  4 14:35 /dev/loop5brw-rw---- 1 root disk  7,   6 Sep  4 14:35 /dev/loop6brw-rw---- 1 root disk  7,   7 Sep  4 14:35 /dev/loop7brw-rw---- 1 root disk  7,   8 Sep  4 14:35 /dev/loop8brw-rw---- 1 root disk  7,   9 Sep  4 14:35 /dev/loop9crw-rw---- 1 root disk 10, 237 Sep  4 14:35 /dev/loop-control[[email protected] ~]# for i in {1..10};do losetup /dev/loop$i /u02/asmdisks/asmdisk$i;done[[email protected] ~]# ll /dev/loop*
5.4 建立ASM磁碟
[[email protected] ~]# for i in {1..10};do oracleasm createdisk vol$i /dev/loop$i;done[[email protected] ~]# oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks...Scanning system for ASM disks...Instantiating disk "VOL1"Instantiating disk "VOL2"Instantiating disk "VOL3"Instantiating disk "VOL4"Instantiating disk "VOL5"Instantiating disk "VOL6"Instantiating disk "VOL7"Instantiating disk "VOL8"Instantiating disk "VOL9"Instantiating disk "VOL10"
5.5 使用ASM磁碟

在安裝Grid組件時,在配置“Storage Option”中選擇第一個選項“Configure ASM using block devices”,如:


Configuring Oracle 18c RAC Using NFS With ASM

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.