DM8使用共享儲存DMASM搭建DMRAC
1.環境準備
硬體:兩臺相同配置機器,8G記憶體,80G本地磁碟,2塊網路卡,另有6塊共享磁碟大小分別為2G,2G,10G,10G,10G,10G 作業系統:RedHat Linux 64位。
網路配置:ens32網路卡為10.10.10.0內網網段,兩臺機器分別為10.10.10.201/10.10.10.202;ens34為11.11.11.0外網網段,兩臺機器分別為11.11.11.11.1/11.11.11.2。內網網段用於MAL通訊。
DM各種工具位於目錄:/dm8/dmdbms/bin。配置檔案位於目錄:/dm8/data。
搭建2節點DMDSC(DMASM)
1.環境準備
主機 IP地址(對外服務) IP地址(內部通訊) 例項名 作業系統 dm8rac1 10.10.10.201 11.11.11.1 rac0 Redhat 7.8 dm8rac2 10.10.10.202 11.11.11.2 rac1 Redhat 7.8 共享儲存 /dev/sdb /dev/raw/raw1 dcr disk 2G /dev/sdc /dev/raw/raw2 voting disk 2G /dev/sdd /dev/raw/raw3 log disk 10G /dev/sde /dev/raw/raw4 data disk1 10G /dev/sdf /dev/raw/raw5 data disk2 10G /dev/sdg /dev/raw/raw6 data disk3 10G
二、作業系統配置
1、關閉防火牆和SELINUX
[root@gbase ~]# systemctl stop firewalld [root@gbase ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@gbase ~]# systemctl status firewalld firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) Dec 06 17:22:42 gbase systemd[1]: Starting firewalld - dynamic firewall daemon... Dec 06 17:22:48 gbase systemd[1]: Started firewalld - dynamic firewall daemon. Dec 07 08:21:59 gbase systemd[1]: Stopping firewalld - dynamic firewall daemon... Dec 07 08:22:00 gbase systemd[1]: Stopped firewalld - dynamic firewall daemon. [root@gbase ~]# setenforce 0 [root@gbase ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config [root@gbase ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted [root@gbase ~]# systemctl stop firewalld [root@gbase ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@gbase ~]# systemctl status firewalld firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) Dec 06 17:22:45 gbase systemd[1]: Starting firewalld - dynamic firewall daemon... Dec 06 17:22:51 gbase systemd[1]: Started firewalld - dynamic firewall daemon. Dec 07 08:19:39 gbase systemd[1]: Stopping firewalld - dynamic firewall daemon... Dec 07 08:19:40 gbase systemd[1]: Stopped firewalld - dynamic firewall daemon. [root@gbase ~]# setenforce 0 [root@gbase ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config [root@gbase ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
2、修改主機名
[root@gbase ~]# hostname dm8rac1 [root@gbase ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm8rac1:g /etc/sysconfig/network [root@gbase ~]# echo " > 10.10.10.201 dm8rac1 > 10.10.10.202 dm8rac2" >> /etc/hosts [root@gbase ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.10.10.201 dm8rac1 10.10.10.202 dm8rac2 [root@gbase ~]# hostname dm8rac2 [root@gbase ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm8rac2:g /etc/sysconfig/network [root@gbase ~]# [root@gbase ~]# echo " > 10.10.10.201 dm8rac1 > 10.10.10.202 dm8rac2" >> /etc/hosts [root@gbase ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.10.10.201 dm8rac1 10.10.10.202 dm8rac2
三、 安裝達夢軟體
3.1檢查Linux(Unix)系統資訊
[root@dm8rac1 ~]# getconf LONG_BIT 64 [root@dm8rac2 ~]# getconf LONG_BIT 64
查詢作業系統release資訊
[root@dm8rac1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.8 Beta (Maipo) [root@dm8rac2 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)
3.2建立安裝使用者
為了減少對作業系統的影響,使用者不應該以root系統使用者來安裝和執行DM。使用者可以在安裝之前為DM建立一個專用的系統使用者。
1. 建立安裝使用者組dinstall。
[root@dm8rac1 ~]# groupadd dinstall [root@dm8rac2 ~]# groupadd dinstall
2. 建立安裝使用者dmdba。
[root@dm8rac1 ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba [root@dm8rac2 ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
3. 初始化使用者密碼。
[root@dm8rac1 ~]# passwd dmdba Changing password for user dmdba. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@dm8rac2 ~]# passwd dmdba Changing password for user dmdba. New password: Retype new password: passwd: all authentication tokens updated successfully.
3.3 Linux(Unix)下檢查作業系統限制
在Linux(Unix)系統中,因為ulimit命令的存在,會對程式使用作業系統資源進行限制。為了使DM能夠正常執行,建議使用者檢查當前安裝使用者的ulimit引數。
執行ulimit -a進行查詢。如下圖所示:
[root@dm8rac1 ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 31152 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 31152 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [root@dm8rac2 ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 31152 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 31152 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
引數使用限制:
1.data seg size
data seg size (kbytes, -d)
建議使用者設定為1048576(即1GB)以上或unlimited(無限制),此引數過小將導致資料庫啟動失敗。
2. file size
file size(blocks, -f)
建議使用者設定為unlimited(無限制),此引數過小將導致資料庫安裝或初始化失敗。
3. open files
open files(-n)
建議使用者設定為65536以上或unlimited(無限制)。
4.virtual memory
virtual memory (kbytes, -v)
建議使用者設定為1048576(即1GB)以上或unlimited(無限制),此引數過小將導致資料庫啟動失敗。如果使用者需要為當前安裝使用者更改ulimit的資源限制,請修改檔案/etc/security/limits.conf。
[root@dm8rac1 ~]# vi /etc/security/limits.conf dmdba soft data unlimited dmdba hard data unlimited dmdba soft fsize unlimited dmdba hard fsize unlimited dmdba soft nofile 65536 dmdba hard nofile 65536 [root@dm8rac2 ~]# vi /etc/security/limits.conf dmdba soft data unlimited dmdba hard data unlimited dmdba soft fsize unlimited dmdba hard fsize unlimited dmdba soft nofile 65536 dmdba hard nofile 65536 [root@dm8rac1 ~]# su - dmdba [dmdba@dm8rac1 ~]$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 31152 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 4096 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [root@dm8rac2 ~]# su - dmdba [dmdba@dm8rac2 ~]$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 31152 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 4096 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
3.4.檢查系統記憶體與儲存空間
1.檢查記憶體
為了保證DM的正確安裝和執行,要儘量保證作業系統至少1GB的可用記憶體(RAM)。如果可用記憶體過少,可能導致DM安裝或啟動失敗。使用者可以使用以下命令檢查操作記憶體:
#獲取記憶體總大小
[root@dm8rac1 ~]# grep MemTotal /proc/meminfo MemTotal: 8009068 kB [root@dm8rac12 ~]# grep MemTotal /proc/meminfo MemTotal: 8009068 kB
#獲取交換分割槽大小
[root@dm8rac1 ~]# grep SwapTotal /proc/meminfo SwapTotal: 8257532 kB [root@dm8rac2 ~]# grep SwapTotal /proc/meminfo SwapTotal: 8257532 kB
#獲取記憶體使用詳情
[root@dm8rac1 ~]# free -g total used free shared buff/cache available Mem: 7 0 6 0 0 6 Swap: 7 0 7 [root@dm8rac2 ~]# free -g total used free shared buff/cache available Mem: 7 0 6 0 0 6 Swap: 7 0 7
2.檢查儲存空間
1) DM完全安裝需要1GB的儲存空間,使用者需要提前規劃好安裝目錄,預留足夠的儲存空間。使用者在DM安裝前也應該為資料庫例項預留足夠的儲存空間,規劃好資料路徑和備份路徑。使用者可使用以下命令檢查儲存空間:
#查詢目錄/dm8可用空間
[root@dm8rac1 ~]# mkdir /dm8 [root@dm8rac1 ~]# chown -R dmdba:dinstall /dm8 [root@dm8rac1 ~]# chmod -R 775 /dm8 [root@dm8rac2 ~]# mkdir /dm8 [root@dm8rac2 ~]# chown -R dmdba:dinstall /dm8 [root@dm8rac2 ~]# chmod -R 775 /dm8 [root@dm8rac1 ~]# df -h /dm8 Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 48G 5.6G 43G 12% / [root@dm8rac2 ~]# df -h /dm8 Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 48G 5.6G 43G 12% /
2) DM安裝程式在安裝時將產生臨時檔案,臨時檔案需要1GB的儲存空間,臨時檔案目錄預設為/tmp。使用者可以使用以下命令檢查儲存空間。
如下圖所示:
[root@dm8rac1 ~]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 48G 5.6G 43G 12% / [root@dm8rac2 ~]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 48G 5.6G 43G 12% /
3.5.安裝DM
建立目錄/soft/dmsoft用來儲存掛載iso檔案後來顯示軟體包中的檔案
[root@dm8rac1 ~]# cd /soft [root@dm8rac1 soft]# unzip dm8_20211021_x86_rh6_64_ent.zip Archive: dm8_20211021_x86_rh6_64_ent.zip creating: dm8_20211021_x86_rh6_64_ent/ inflating: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso extracting: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso_SHA256.txt extracting: dm8_20211021_x86_rh6_64_ent/verinfo.txt [root@dm8rac1 soft]# ls -lrt total 778320 drwxr-xr-x. 2 root root 132 Nov 12 13:43 dm8_20211021_x86_rh6_64_ent -rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip [root@dm8rac1 soft]# mv dm8_20211021_x86_rh6_64_ent dm8 [root@dm8rac1 soft]# ls -lrt total 778320 drwxr-xr-x. 2 root root 132 Nov 12 13:43 dm8 -rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip [root@dm8rac1 soft]# mkdir dmsoft [root@dm8rac1 soft]# mount -t iso9660 -o loop dm8/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso /soft/dmsoft mount: /dev/loop0 is write-protected, mounting read-only [root@dm8rac1 soft]# cd dmsoft [root@dm8rac1 dmsoft]# ls -lrt total 790160 -r-xr-xr-x. 1 root root 2802503 Oct 21 14:04 DM8 Install.pdf -r-xr-xr-x. 1 root root 806320703 Oct 21 14:11 DMInstall.bin [root@dm8rac12 ~]# cd /soft [root@dm8rac2 soft]# unzip dm8_20211021_x86_rh6_64_ent.zip Archive: dm8_20211021_x86_rh6_64_ent.zip creating: dm8_20211021_x86_rh6_64_ent/ inflating: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso extracting: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso_SHA256.txt extracting: dm8_20211021_x86_rh6_64_ent/verinfo.txt [root@dm8rac2 soft]# ls -lrt total 778320 drwxr-xr-x. 2 root root 132 Nov 12 13:43 dm8_20211021_x86_rh6_64_ent -rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip [root@dm8rac2 soft]# mv dm8_20211021_x86_rh6_64_ent dm8 [root@dm8rac2 soft]# ls -lrt total 778320 drwxr-xr-x. 2 root root 132 Nov 12 13:43 dm8 -rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip [root@dm8rac2 soft]# mkdir dmsoft [root@dm8rac2 soft]# mount -t iso9660 -o loop dm8/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso /soft/dmsoft mount: /dev/loop0 is write-protected, mounting read-only [root@dm8rac2 soft]# cd dmsoft [root@dm8rac2 dmsoft]# ls -lrt total 790160 -r-xr-xr-x. 1 root root 2802503 Oct 21 14:04 DM8 Install.pdf -r-xr-xr-x. 1 root root 806320703 Oct 21 14:11 DMInstall.bin
在/soft/dmsoft目錄下存在DMInstall.bin檔案, DMInstall.bin檔案就是DM的安裝程式。在執行安裝程式前,需要賦予DMInstall.bin檔案執行許可權。具體命令如下所示:
[root@dm8rac1 dmsoft]# chmod 755 DMInstall.bin chmod: changing permissions of ‘DMInstall.bin’: Read-only file system [root@dm8rac2 dmsoft]# chmod 755 DMInstall.bin chmod: changing permissions of ‘DMInstall.bin’: Read-only file system
在現實中,許多Linux(Unix)作業系統上是沒有圖形化介面的,為了使DM能夠在這些作業系統上順利安裝,DM提供了命令列的安裝方式。在終端進入到安裝程式所在資料夾,執行以下命令進行命令列安裝:
[dmdba@dm8rac1 dmsoft]$ ./DMInstall.bin -i Please select the installer's language (E/e:English C/c:Chinese) [E/e]:e Extract install files......... Welcome to DM DBMS Installer Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y TimeZone: [ 1]: GTM-12=West Date Line [ 2]: GTM-11=Samoa [ 3]: GTM-10=Hawaii [ 4]: GTM-09=Alaska [ 5]: GTM-08=Pacific(America and Canada) [ 6]: GTM-07=Arizona [ 7]: GTM-06=Central(America and Canada) [ 8]: GTM-05=East(America and Canada) [ 9]: GTM-04=Atlantic(America and Canada) [10]: GTM-03=Brasilia [11]: GTM-02=Middle Atlantic [12]: GTM-01=Azores [13]: GTM=Greenwich Mean Time [14]: GTM+01=Sarajevo [15]: GTM+02=Cairo [16]: GTM+03=Moscow [17]: GTM+04=AbuDhabi [18]: GTM+05=Islamabad [19]: GTM+06=Dakar [20]: GTM+07=BangKok,Hanoi [21]: GTM+08=China [22]: GTM+09=Seoul [23]: GTM+10=Guam [24]: GTM+11=Solomon [25]: GTM+12=Fiji [26]: GTM+13=Nukualofa [27]: GTM+14=Kiribati Please Select the TimeZone [21]:21 Installation Type: 1 Typical 2 Server 3 Client 4 Custom Please Input the number of the Installation Type [1 Typical]:4 1 Server component 2 Client component 2.1 Manager 2.2 Monitor 2.3 DTS 2.4 Console 2.5 Analyzer 2.6 DISQL 3 DM Drivers 4 Manual component 5 DBMS Service 5.1 Realtime Audit Service 5.2 Job Service 5.3 Instance Monitor Service 5.4 Assistant Plug-In Service Please Input the number of the Installation Type [1 2 3 4 5]:1 2 3 4 5 Require Space: 1242M Please Input the install path [/home/dmdba/dmdbms]:/dm8 Available Space:39G Please Confirm the install path(/dm8)? (Y/y:Yes N/n:No) [Y/y]:y Pre-Installation Summary Installation Location: /dm8 Require Space: 1242M Available Space: 39G Version Information: Expire Date: Installation Type: Custom Confirm to Install? (Y/y:Yes N/n:No):y 2021-12-07 10:57:53 [INFO] Installing DM DBMS... 2021-12-07 10:57:54 [INFO] Installing BASE Module... 2021-12-07 10:57:56 [INFO] Installing SERVER Module... 2021-12-07 10:57:56 [INFO] Installing CLIENT Module... 2021-12-07 10:57:57 [INFO] Installing DRIVERS Module... 2021-12-07 10:57:57 [INFO] Installing MANUAL Module... 2021-12-07 10:57:57 [INFO] Installing SERVICE Module... 2021-12-07 10:58:03 [INFO] Move log file to log directory. 2021-12-07 10:58:05 [INFO] Installed DM DBMS completely. Please execute the commands by root: /dm8/script/root/root_installer.sh End
以root使用者來執行上面的指令碼
[root@dm8rac1 ~]# /dm8/script/root/root_installer.sh Move /dm8/bin/dm_svc.conf to /etc Modify the files' mode of DM Server [dmdba@dm8rac2 dmsoft]$ ./DMInstall.bin -i Please select the installer's language (E/e:English C/c:Chinese) [E/e]:e Extract install files......... Welcome to DM DBMS Installer Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y TimeZone: [ 1]: GTM-12=West Date Line [ 2]: GTM-11=Samoa [ 3]: GTM-10=Hawaii [ 4]: GTM-09=Alaska [ 5]: GTM-08=Pacific(America and Canada) [ 6]: GTM-07=Arizona [ 7]: GTM-06=Central(America and Canada) [ 8]: GTM-05=East(America and Canada) [ 9]: GTM-04=Atlantic(America and Canada) [10]: GTM-03=Brasilia [11]: GTM-02=Middle Atlantic [12]: GTM-01=Azores [13]: GTM=Greenwich Mean Time [14]: GTM+01=Sarajevo [15]: GTM+02=Cairo [16]: GTM+03=Moscow [17]: GTM+04=AbuDhabi [18]: GTM+05=Islamabad [19]: GTM+06=Dakar [20]: GTM+07=BangKok,Hanoi [21]: GTM+08=China [22]: GTM+09=Seoul [23]: GTM+10=Guam [24]: GTM+11=Solomon [25]: GTM+12=Fiji [26]: GTM+13=Nukualofa [27]: GTM+14=Kiribati Please Select the TimeZone [21]:21 Installation Type: 1 Typical 2 Server 3 Client 4 Custom Please Input the number of the Installation Type [1 Typical]:4 1 Server component 2 Client component 2.1 Manager 2.2 Monitor 2.3 DTS 2.4 Console 2.5 Analyzer 2.6 DISQL 3 DM Drivers 4 Manual component 5 DBMS Service 5.1 Realtime Audit Service 5.2 Job Service 5.3 Instance Monitor Service 5.4 Assistant Plug-In Service Please Input the number of the Installation Type [1 2 3 4 5]:1 2 3 4 5 Require Space: 1242M Please Input the install path [/home/dmdba/dmdbms]:/dm8 Available Space:39G Please Confirm the install path(/dm8)? (Y/y:Yes N/n:No) [Y/y]:y Pre-Installation Summary Installation Location: /dm8 Require Space: 1242M Available Space: 39G Version Information: Expire Date: Installation Type: Custom Confirm to Install? (Y/y:Yes N/n:No):y 2021-12-07 10:57:53 [INFO] Installing DM DBMS... 2021-12-07 10:57:54 [INFO] Installing BASE Module... 2021-12-07 10:57:56 [INFO] Installing SERVER Module... 2021-12-07 10:57:56 [INFO] Installing CLIENT Module... 2021-12-07 10:57:57 [INFO] Installing DRIVERS Module... 2021-12-07 10:57:57 [INFO] Installing MANUAL Module... 2021-12-07 10:57:57 [INFO] Installing SERVICE Module... 2021-12-07 10:58:03 [INFO] Move log file to log directory. 2021-12-07 10:58:05 [INFO] Installed DM DBMS completely. Please execute the commands by root: /dm8/script/root/root_installer.sh End
以root使用者來執行上面的指令碼
[root@dm8rac2 ~]# /dm8/script/root/root_installer.sh Move /dm8/bin/dm_svc.conf to /etc Modify the files' mode of DM Server
四、繫結UDEV
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N" ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N" ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N" ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N" ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw /dev/raw/raw6 %N" ACTION=="add", KERNEL=="raw[1-6]", OWNER="dmdba", GROUP="dinstall", MODE="660" [root@dm8rac1 rules.d]# /sbin/udevadm trigger --type=devices --action=change [root@dm8rac2 rules.d]# /sbin/udevadm trigger --type=devices --action=change
如果不能正常顯示就重啟作業系統
[root@dm8rac1 ~]# ls -lrt /dev/raw total 0 crw-rw---- 1 root disk 162, 0 Dec 7 14:59 rawctl crw-rw---- 1 dmdba dinstall 162, 5 Dec 7 14:59 raw5 crw-rw---- 1 dmdba dinstall 162, 6 Dec 7 14:59 raw6 crw-rw---- 1 dmdba dinstall 162, 4 Dec 7 14:59 raw4 crw-rw---- 1 dmdba dinstall 162, 3 Dec 7 14:59 raw3 crw-rw---- 1 dmdba dinstall 162, 2 Dec 7 14:59 raw2 crw-rw---- 1 dmdba dinstall 162, 1 Dec 7 14:59 raw1 [root@dm8rac2 ~]# ls -lrt /dev/raw total 0 crw-rw---- 1 root disk 162, 0 Dec 7 14:59 rawctl crw-rw---- 1 dmdba dinstall 162, 5 Dec 7 14:59 raw5 crw-rw---- 1 dmdba dinstall 162, 6 Dec 7 14:59 raw6 crw-rw---- 1 dmdba dinstall 162, 4 Dec 7 14:59 raw4 crw-rw---- 1 dmdba dinstall 162, 3 Dec 7 14:59 raw3 crw-rw---- 1 dmdba dinstall 162, 2 Dec 7 14:59 raw2 crw-rw---- 1 dmdba dinstall 162, 1 Dec 7 14:59 raw1
可以透過blockdev --getsize64 /dev/raw/raw1命令檢視裸裝置大小
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw1 2147483648 [root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw2 2147483648 [root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw3 10737418240 [root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw4 10737418240 [root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw5 10737418240 [root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw6 10737418240 [root@dm8rac2 ~]# blockdev --getsize64 /dev/raw/raw1 2147483648 [root@dm8rac2 ~]# blockdev --getsize64 /dev/raw/raw2 2147483648 [root@dm8rac3 ~]# blockdev --getsize64 /dev/raw/raw3 10737418240 [root@dm8rac4 ~]# blockdev --getsize64 /dev/raw/raw4 10737418240 [root@dm8rac5 ~]# blockdev --getsize64 /dev/raw/raw5 10737418240 [root@dm8rac6 ~]# blockdev --getsize64 /dev/raw/raw6 10737418240
五.配置dmdcr_cfg.ini檔案
在2個節點的/dm8/data目錄下建立配置檔案dmdcr_cfg.ini,在檔案中新增如下內容:
[root@dm8rac1 ~]# su - dmdba Last login: Tue Dec 7 10:58:27 CST 2021 on pts/0 [dmdba@dm8rac1 ~]$ mkdir /dm8/data [root@dm8rac2 ~]# su - dmdba Last login: Tue Dec 7 10:58:27 CST 2021 on pts/0 [dmdba@dm8rac2 ~]$ mkdir /dm8/data [dmdba@dm8rac1 ~]$ cd /dm8/data [dmdba@dm8rac1 data]$ vi dmdcr_cfg.ini DCR_N_GRP = 3 DCR_VTD_PATH = /dev/raw/raw2 DCR_OGUID = 63635 [GRP] DCR_GRP_TYPE = CSS DCR_GRP_NAME = GRP_CSS DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_CSS] DCR_EP_NAME = CSS0 DCR_EP_HOST = 11.11.11.1 DCR_EP_PORT = 9541 [GRP_CSS] DCR_EP_NAME = CSS1 DCR_EP_HOST = 11.11.11.2 DCR_EP_PORT = 9541 [GRP] DCR_GRP_TYPE = ASM DCR_GRP_NAME = GRP_ASM DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_ASM] DCR_EP_NAME = ASM0 DCR_EP_SHM_KEY = 93360 DCR_EP_SHM_SIZE = 10 DCR_EP_HOST = 10.10.10.201 DCR_EP_PORT = 9641 DCR_EP_ASM_LOAD_PATH = /dev/raw [GRP_ASM] DCR_EP_NAME = ASM1 DCR_EP_SHM_KEY = 93361 DCR_EP_SHM_SIZE = 10 DCR_EP_HOST = 10.10.10.202 DCR_EP_PORT = 9641 DCR_EP_ASM_LOAD_PATH = /dev/raw [GRP] DCR_GRP_TYPE = DB DCR_GRP_NAME = GRP_RAC DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_RAC] DCR_EP_NAME = RAC0 DCR_EP_SEQNO = 0 DCR_EP_PORT = 5236 DCR_CHECK_PORT = 9741 [GRP_RAC] DCR_EP_NAME = RAC1 DCR_EP_SEQNO = 1 DCR_EP_PORT = 5236 DCR_CHECK_PORT = 9741 [dmdba@dm8rac2 ~]$ cd /dm8/data [dmdba@dm8rac2 data]$ vi dmdcr_cfg.ini DCR_N_GRP = 3 DCR_VTD_PATH = /dev/raw/raw2 DCR_OGUID = 63635 [GRP] DCR_GRP_TYPE = CSS DCR_GRP_NAME = GRP_CSS DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_CSS] DCR_EP_NAME = CSS0 DCR_EP_HOST = 11.11.11.1 DCR_EP_PORT = 9541 [GRP_CSS] DCR_EP_NAME = CSS1 DCR_EP_HOST = 11.11.11.2 DCR_EP_PORT = 9541 [GRP] DCR_GRP_TYPE = ASM DCR_GRP_NAME = GRP_ASM DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_ASM] DCR_EP_NAME = ASM0 DCR_EP_SHM_KEY = 93360 DCR_EP_SHM_SIZE = 10 DCR_EP_HOST = 10.10.10.201 DCR_EP_PORT = 9641 DCR_EP_ASM_LOAD_PATH = /dev/raw [GRP_ASM] DCR_EP_NAME = ASM1 DCR_EP_SHM_KEY = 93361 DCR_EP_SHM_SIZE = 10 DCR_EP_HOST = 10.10.10.202 DCR_EP_PORT = 9641 DCR_EP_ASM_LOAD_PATH = /dev/raw [GRP] DCR_GRP_TYPE = DB DCR_GRP_NAME = GRP_RAC DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_RAC] DCR_EP_NAME = RAC0 DCR_EP_SEQNO = 0 DCR_EP_PORT = 5236 DCR_CHECK_PORT = 9741 [GRP_RAC] DCR_EP_NAME = RAC1 DCR_EP_SEQNO = 1 DCR_EP_PORT = 5236 DCR_CHECK_PORT = 9741
六.使用 DMASMCMD 工具初始化(任意一節點執行)
[dmdba@dm8rac1 ~]$ dmasmcmd DMASMCMD V8 ASM>create dcrdisk '/dev/raw/raw1' 'dcr' [Trace]The ASM initialize dcrdisk /dev/raw/raw1 to name DMASMdcr Used time: 202.727(ms). ASM>create votedisk '/dev/raw/raw2' 'vote' [Trace]The ASM initialize votedisk /dev/raw/raw2 to name DMASMvote Used time: 184.178(ms). ASM>create asmdisk '/dev/raw/raw3' 'LOG0' [Trace]The ASM initialize asmdisk /dev/raw/raw3 to name DMASMLOG0 Used time: 105.666(ms). ASM>create asmdisk '/dev/raw/raw4' 'DATA0' [Trace]The ASM initialize asmdisk /dev/raw/raw4 to name DMASMDATA0 Used time: 116.970(ms). ASM>create asmdisk '/dev/raw/raw5' 'LOG1' [Trace]The ASM initialize asmdisk /dev/raw/raw5 to name DMASMLOG1 Used time: 174.756(ms). ASM>create asmdisk '/dev/raw/raw6' 'DATA1' [Trace]The ASM initialize asmdisk /dev/raw/raw6 to name DMASMDATA1 Used time: 132.282(ms). ASM>init dcrdisk '/dev/raw/raw1' from '/dm8/data/dmdcr_cfg.ini' identified by 'dameng123' [Trace]DG 126 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1). [Trace]DG 126 allocate 4 extents for file 0xfe000002. [Trace]DG 126 alloc 4 extents for 0xfe000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1. Used time: 00:00:02.397. ASM>init votedisk '/dev/raw/raw2' from '/dm8/data/dmdcr_cfg.ini' [Trace]DG 125 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1). [Trace]DG 125 allocate 4 extents for file 0xfd000002. [Trace]DG 125 alloc 4 extents for 0xfd000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1. Used time: 550.896(ms).
七.準備DMASM 的 MAL 配置檔案
在2個節點的/dm8/data目錄下建立 DMASM 的 MAL 配置檔案(命名為 dmasvrmal.ini),使用 DMASM 的所有節點都要配置,內容完全一樣。
[dmdba@dm8rac1 data]$ vi dmasvrmal.ini [MAL_INST1] MAL_INST_NAME = ASM0 MAL_HOST = 11.11.11.1 MAL_PORT = 7236 [MAL_INST2] MAL_INST_NAME = ASM1 MAL_HOST = 11.11.11.2 MAL_PORT = 7236 [dmdba@dm8rac2 data]$ vi dmasvrmal.ini [MAL_INST1] MAL_INST_NAME = ASM0 MAL_HOST = 11.11.11.1 MAL_PORT = 7236 [MAL_INST2] MAL_INST_NAME = ASM1 MAL_HOST = 11.11.11.2 MAL_PORT = 7236
八.準備dmdcr.ini 配置檔案
dmdcr.ini 是 dmcss、dmasmsvr、dmasmtool 工具的輸入引數。記錄了當前節點序列號以及 DCR 磁碟路徑。在2個節點的/dm/dmdbms/data目錄下建立dmdcr.ini 配置檔案,dmdcr_path 相同,dmasvrmal.ini 檔案內容也相同,dmdcr_seqo 分別為 0 和 1。
節點 1:
[dmdba@dm8rac1 data]$ vi dmdcr.ini DMDCR_PATH = /dev/raw/raw1 DMDCR_MAL_PATH =/dm8/data/dmasvrmal.ini DMDCR_SEQNO = 0 #ASM DMDCR_ASM_RESTART_INTERVAL = 0 DMDCR_ASM_STARTUP_CMD = /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini #DB DMDCR_DB_RESTART_INTERVAL = 0 DMDCR_DB_STARTUP_CMD = /dm8/bin/dmserver path=/dm8/data/rac0_config/dm.ini dcr_ini=/dm8/data/dmdcr.ini
節點2:
[dmdba@dm8rac2 data]$ vi dmdcr.ini DMDCR_PATH = /dev/raw/raw1 DMDCR_MAL_PATH =/dm8/data/dmasvrmal.ini DMDCR_SEQNO = 1 #ASM DMDCR_ASM_RESTART_INTERVAL = 0 DMDCR_ASM_STARTUP_CMD = /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini #DB DMDCR_DB_RESTART_INTERVAL = 0 DMDCR_DB_STARTUP_CMD = /dm8/bin/dmserver path=/dm8/data/rac1_config/dm.ini dcr_ini=/dm8/data/dmdcr.ini
九.啟動DMCSS、DMASM 服務程式
1、註冊 DMCSS和DMASM服務
節點一:
[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmcss -dcr_ini /dm8/data/dmdcr.ini -p rac1 Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicerac1.service to /usr/lib/systemd/system/DmCSSServicerac1.service. Finished to create the service (DmCSSServicerac1) [root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmasmsvr -dcr_ini /dm8/data/dmdcr.ini -p rac1 -y DmCSSServicerac1 Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicerac1.service to /usr/lib/systemd/system/DmASMSvrServicerac1.service. Finished to create the service (DmASMSvrServicerac1)
節點二:
[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmcss -dcr_ini /dm8/data/dmdcr.ini -p rac2 Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicerac2.service to /usr/lib/systemd/system/DmCSSServicerac2.service. Finished to create the service (DmCSSServicerac2) [root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmasmsvr -dcr_ini /dm8/data/dmdcr.ini -p rac2 -y DmCSSServicerac2 Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicerac2.service to /usr/lib/systemd/system/DmASMSvrServicerac2.service. Finished to create the service (DmASMSvrServicerac2)
2、啟動DMCSS和DMASM服務
節點一
[root@dm8rac1 ~]# service DmCSSServicerac1 start Redirecting to /bin/systemctl start DmCSSServicerac1.service [root@dm8rac1 ~]# service DmASMSvrServicerac1 start Redirecting to /bin/systemctl start DmASMSvrServicerac1.service [root@dm8rac1 ~]# service DmCSSServicerac1 status Redirecting to /bin/systemctl status DmCSSServicerac1.service DmCSSServicerac1.service - DM Cluster Synchronization Services Service(DmCSSServicerac1). Loaded: loaded (/usr/lib/systemd/system/DmCSSServicerac1.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-12-08 09:50:18 CST; 51s ago Process: 14654 ExecStart=/dm8/bin/DmCSSServicerac1 start (code=exited, status=0/SUCCESS) Main PID: 14682 (dmcss) Tasks: 10 CGroup: /system.slice/DmCSSServicerac1.service └─14682 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini Dec 08 09:50:03 dm8rac1 systemd[1]: Starting DM Cluster Synchronization Services Service(DmCSSServicerac1).... Dec 08 09:50:18 dm8rac1 DmCSSServicerac1[14654]: [38B blob data] Dec 08 09:50:18 dm8rac1 systemd[1]: Started DM Cluster Synchronization Services Service(DmCSSServicerac1).. [root@dm8rac1 ~]# service DmASMSvrServicerac1 status Redirecting to /bin/systemctl status DmASMSvrServicerac1.service DmASMSvrServicerac1.service - DM Auto Storage Manager Service(DmASMSvrServicerac1). Loaded: loaded (/usr/lib/systemd/system/DmASMSvrServicerac1.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-12-08 09:50:58 CST; 31s ago Process: 14729 ExecStart=/dm8/bin/DmASMSvrServicerac1 start (code=exited, status=0/SUCCESS) Main PID: 14755 (dmasmsvr) Tasks: 10 CGroup: /system.slice/DmASMSvrServicerac1.service └─14755 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini Dec 08 09:50:43 dm8rac1 systemd[1]: Starting DM Auto Storage Manager Service(DmASMSvrServicerac1).... Dec 08 09:50:58 dm8rac1 DmASMSvrServicerac1[14729]: [41B blob data] Dec 08 09:50:58 dm8rac1 systemd[1]: Started DM Auto Storage Manager Service(DmASMSvrServicerac1)..
節點二:
[root@dm8rac2 ~]# service DmCSSServicerac2 start Redirecting to /bin/systemctl start DmCSSServicerac2.service [root@dm8rac2 ~]# service DmASMSvrServicerac2 start Redirecting to /bin/systemctl start DmASMSvrServicerac2.service [root@dm8rac2 ~]# service DmCSSServicerac2 status Redirecting to /bin/systemctl status DmCSSServicerac2.service DmCSSServicerac2.service - DM Cluster Synchronization Services Service(DmCSSServicerac2). Loaded: loaded (/usr/lib/systemd/system/DmCSSServicerac2.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-12-08 09:52:00 CST; 1min 54s ago Process: 14424 ExecStart=/dm8/bin/DmCSSServicerac2 start (code=exited, status=0/SUCCESS) Main PID: 14452 (dmcss) Tasks: 10 CGroup: /system.slice/DmCSSServicerac2.service └─14452 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini Dec 08 09:51:45 dm8rac2 systemd[1]: Starting DM Cluster Synchronization Services Service(DmCSSServicerac2).... Dec 08 09:52:00 dm8rac2 DmCSSServicerac2[14424]: [38B blob data] Dec 08 09:52:00 dm8rac2 systemd[1]: Started DM Cluster Synchronization Services Service(DmCSSServicerac2).. [root@dm8rac2 ~]# service DmASMSvrServicerac2 status Redirecting to /bin/systemctl status DmASMSvrServicerac2.service DmASMSvrServicerac2.service - DM Auto Storage Manager Service(DmASMSvrServicerac2). Loaded: loaded (/usr/lib/systemd/system/DmASMSvrServicerac2.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-12-08 09:52:58 CST; 1min 16s ago Process: 14499 ExecStart=/dm8/bin/DmASMSvrServicerac2 start (code=exited, status=0/SUCCESS) Main PID: 14525 (dmasmsvr) Tasks: 15 CGroup: /system.slice/DmASMSvrServicerac2.service └─14525 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini Dec 08 09:52:43 dm8rac2 systemd[1]: Starting DM Auto Storage Manager Service(DmASMSvrServicerac2).... Dec 08 09:52:58 dm8rac2 DmASMSvrServicerac2[14499]: [41B blob data] Dec 08 09:52:58 dm8rac2 systemd[1]: Started DM Auto Storage Manager Service(DmASMSvrServicerac2)..
十、建立DMASM磁碟組
在任意節點使用 dmasmtool 工具建立 DMASM 磁碟組。
[dmdba@dm8rac1 ~]$ dmasmtool DCR_INI=/dm8/data/dmdcr.ini DMASMTOOL V8 ASM>create diskgroup 'DMLOG' asmdisk '/dev/raw/raw3' Used time: 358.430(ms). ASM>create diskgroup 'DMDATA' asmdisk '/dev/raw/raw4' Used time: 330.223(ms).
十一、準備dminit.ini 配置檔案
在2個節點的/dm8/data目錄下建立 dminit.ini 配置檔案,新增如下內容。 在2個節點都建立。
[dmdba@dm8rac1 data]$ vi dminit.ini db_name = rac system_path = +DMDATA/data system = +DMDATA/data/rac/system.dbf system_size = 128 roll = +DMDATA/data/rac/roll.dbf roll_size = 128 main = +DMDATA/data/rac/main.dbf main_size = 128 ctl_path = +DMDATA/data/rac/dm.ctl ctl_size = 8 log_size = 256 dcr_path = /dev/raw/raw1 #dcr 磁碟路徑,目前不支援 asm,只能是裸裝置 dcr_seqno = 0 auto_overwrite = 1 [RAC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 型別 group 中 DCR_EP_NAME 對應 config_path = /dm8/data/rac0_config port_num = 5236 mal_host = 11.11.11.1 mal_port = 9340 log_path = +DMLOG/log/rac0_log01.log log_path = +DMLOG/log/rac0_log02.log [RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 型別 group 中 DCR_EP_NAME 對應 config_path = /dm8/data/rac1_config port_num = 5236 mal_host = 11.11.11.2 mal_port = 9340 log_path = +DMLOG/log/rac1_log01.log log_path = +DMLOG/log/rac1_log02.log [dmdba@dm8rac2 data]$ vi dminit.ini db_name = rac system_path = +DMDATA/data system = +DMDATA/data/rac/system.dbf system_size = 128 roll = +DMDATA/data/rac/roll.dbf roll_size = 128 main = +DMDATA/data/rac/main.dbf main_size = 128 ctl_path = +DMDATA/data/rac/dm.ctl ctl_size = 8 log_size = 256 dcr_path = /dev/raw/raw1 #dcr 磁碟路徑,目前不支援 asm,只能是裸裝置 dcr_seqno = 0 auto_overwrite = 1 [RAC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 型別 group 中 DCR_EP_NAME 對應 config_path = /dm8/data/rac0_config port_num = 5236 mal_host = 11.11.11.1 mal_port = 9340 log_path = +DMLOG/log/rac0_log01.log log_path = +DMLOG/log/rac0_log02.log [RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 型別 group 中 DCR_EP_NAME 對應 config_path = /dm8/data/rac1_config port_num = 5236 mal_host = 11.11.11.2 mal_port = 9340 log_path = +DMLOG/log/rac1_log01.log log_path = +DMLOG/log/rac1_log02.log
十二、使用dminit初始化資料庫
在任意節點啟動 dminit 工具初始化資料庫。dminit 執行完成後,會在 config_path 目錄(/dm8/data/rac0_config 和/dm8/data/rac1_config)下生成配置檔案 dm.ini 和 dmmal.ini。
[dmdba@dm8rac1 ~]$ dminit control=/dm8/data/dminit.ini initdb V8 db version: 0x7000c file dm.key not found, use default license! License will expire on 2022-10-21 Normal of FAST Normal of DEFAULT Normal of RECYCLE Normal of KEEP Normal of ROLL log file path: +DMLOG/log/rac0_log01.log log file path: +DMLOG/log/rac0_log02.log log file path: +DMLOG/log/rac1_log01.log log file path: +DMLOG/log/rac1_log02.log write to dir [+DMDATA/data/rac]. create dm database success. 2021-12-08 10:17:36
將節點一上的/dm8/data/rac1_config的配置目錄複製到節點二:
[dmdba@dm8rac1 data]$ scp -r rac1_config 10.10.10.202:`pwd` The authenticity of host '10.10.10.202 (10.10.10.202)' can't be established. ECDSA key fingerprint is SHA256:6O8c9WEeEYPbL4ncdRR1RsrjxxmfzPq9Tkq4/6uLSP4. ECDSA key fingerprint is MD5:e1:73:3e:8d:79:be:5c:82:0f:c7:58:79:45:ad:df:86. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.10.10.202' (ECDSA) to the list of known hosts. dmdba@10.10.10.202's password: dmmal.ini 100% 200 18.1KB/s 00:00 dm.ini 100% 53KB 2.0MB/s 00:00 sqllog.ini 100% 481 79.8KB/s 00:00 [dmdba@dm8rac1 data]$
十三、啟動資料庫伺服器
1、在2個節點分別註冊DM 資料庫服務:
節點一:
[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmserver -dm_ini /dm8/data/rac0_config/dm.ini -dcr_ini /dm8/data/dmdcr.ini -p rac1 -y DmASMSvrServicerac1 Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicerac1.service to /usr/lib/systemd/system/DmServicerac1.service. Finished to create the service (DmServicerac1)
節點二:
[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmserver -dm_ini /dm8/data/rac1_config/dm.ini -dcr_ini /dm8/data/dmdcr.ini -p rac2 -y DmASMSvrServicerac2 Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicerac2.service to /usr/lib/systemd/system/DmServicerac2.service. Finished to create the service (DmServicerac2)
2、啟動資料庫
[root@dm8rac1 ~]# service DmServicerac1 start Redirecting to /bin/systemctl start DmServicerac1.service [root@dm8rac2 ~]# service DmServicerac2 start Redirecting to /bin/systemctl start DmServicerac2.service
手工啟動命令如下,手工啟動後視窗不能關閉,所以配置成服務。
./dmserver /dm8/data/rac0_config/dm.ini dcr_ini=/dm8/data/dmdcr.ini ./dmserver /dm8/data/rac1_config/dm.ini dcr_ini=/dm8/data/dmdcr.ini
十四.連線資料庫驗證
1.配置服務名檔案
[dmdba@dm8rac1 ~]$ vi /etc/dm_svc.conf TIME_ZONE=(480) LANGUAGE=(en) rac=(10.10.10.201:5236,10.10.10.202:5236) SWITCH_TIME=(10000) SWITCH_INTERVAL=(10) [dmdba@dm8rac2 ~]$ vi /etc/dm_svc.conf TIME_ZONE=(480) LANGUAGE=(en) rac=(10.10.10.201:5236,10.10.10.202:5236) SWITCH_TIME=(10000) SWITCH_INTERVAL=(10)
2.連線RAC叢集
節點一:
[dmdba@dm8rac1 ~]$ disql SYSDBA/SYSDBA@rac Server[10.10.10.202:5236]:mode is normal, state is open login used time : 4.611(ms) disql V8 SQL> select instance_name from v$instance; LINEID INSTANCE_NAME ---------- ------------- 1 RAC1 used time: 13.949(ms). Execute id is 100. SQL> select * from v$dsc_ep_info; LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS ---------- ------- ----------- -------------------- -------------------- ------------ --------- 1 RAC0 0 2383210041 2383210694 Control Node OK 2 RAC1 1 2383231629 2383232261 Normal Node OK used time: 3.176(ms). Execute id is 101.
節點二:
[dmdba@dm8rac2 ~]$ disql SYSDBA/SYSDBA@rac Server[10.10.10.201:5236]:mode is normal, state is open login used time : 6.405(ms) disql V8 SQL> select instance_name from v$instance; LINEID INSTANCE_NAME ---------- ------------- 1 RAC0 used time: 5.710(ms). Execute id is 53500. SQL> select * from v$dsc_ep_info; LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS ---------- ------- ----------- -------------------- -------------------- ------------ --------- 1 RAC0 0 2383210041 2383210726 Control Node OK 2 RAC1 1 2383231629 2383232293 Normal Node OK used time: 2.979(ms). Execute id is 53501. SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2852933/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DM8 使用裸裝置搭建DMRAC
- DM7使用DMASM安裝DMRACASM
- 配置Kubernetes共享使用Ceph儲存
- DM7使用裸裝置搭建DMRAC
- 【BUILD_ORACLE】Oracle 19c RAC搭建(三)使用UDEV配置共享儲存UIOracledev
- 使用 Docker 搭建 minio 檔案儲存Docker
- Oracle 共享儲存掛載Oracle
- NFS共享儲存服務NFS
- 使用MinIO搭建物件儲存服務物件
- vmware設定共享儲存(RAC)
- RHEL6 或CentOS 6配置共享儲存--使用iSCSICentOS
- [譯]在CUDA C/C++中使用共享儲存器C++
- mmap共享儲存對映(儲存I/O對映)系列詳解
- 【VMware vSphere】沒有共享儲存的ESXi主機之間如何共享本地儲存上的ISO檔案。
- CEPH分散式儲存搭建(物件、塊、檔案三大儲存)分散式物件
- centos7配置nfs共享儲存服務CentOSNFS
- Linux 下的程式間通訊:共享儲存Linux
- DM8搭建MPP叢集
- Docker儲存Volume使用Docker
- 本地儲存localStorage使用
- 1.05 docker的持久化儲存和資料共享Docker持久化
- Docker的持久化儲存和資料共享(四)Docker持久化
- linux nfs共享儲存服務詳細解釋。LinuxNFS
- linux online掃描共享儲存磁碟(無需reboot)Linuxboot
- 在K8S中,共享儲存的作用?K8S
- 批量修改vsphere共享儲存多路徑選擇策略
- DM8搭建2節點DMDSC
- DM8 MPP主備環境搭建
- 塊儲存 檔案儲存 物件儲存物件
- Esxi 6.7基於已有資料儲存配置虛擬機器(Linux類)間共享儲存(非RDM)虛擬機Linux
- 使用SpringBoot JPA進行自定義的儲存及批量儲存Spring Boot
- FastDFS+Nginx搭建分散式圖片儲存ASTNginx分散式
- Hadoop HDFS 3.3.1分散式儲存搭建Hadoop分散式
- 企業網盤儲存和共享檔案的好方法
- 儲存—物件儲存_Minio物件
- 使用SpringBoot-JPA進行自定義的儲存及批量儲存Spring Boot
- Go 中使用 memcache 儲存物件Go物件
- 使用 dd 檢查儲存效能