根據數據復制運行的位置
基於存儲(Storage
基於服務器(Host
基於存儲交換機(SAN
基於數據庫/軟件應用 :代表廠商有Oracle DataGuard
上面介紹的主要的各廠商方案和產品可以參見下圖
本文主要介紹基於主機和邏輯卷的數據復制VVR
VERITAS的VVR(Veritas Volume Replicator)是用於有效的災難恢復的數據復制軟件
VVR系統架構如下圖
VVR具有的系統特性如下
(
(
(
(
(
(
(
(
(
(
(
(
VVR數據復制系統主要由下面五個組件組成
■ Replicated Volume Group (RVG) 復制卷組
RVG是位於VxVM 磁盤組(DG)內的一組邏輯卷
應用對邏輯卷的寫操作都可以保持以主節點上同樣的順序
對於多數數據庫系統來說
和DBWR進程
數據庫變化通常在寫入日志文件後才會寫入數據文件
邏輯卷的時候
每組RVG最多可以包括
下面介紹SRL和RLINK
■ Storage Replicator Log (SRL)
SRL用於記錄RVG中數據寫操作的日志
從VxVM的角度來看
不允許人工直接對SRL進行訪問
■ Replication Link—RLINK
用於連接主RVG和備用RVG之間的一個
的多個屬性來調整數據復制的參數
■ Data Change Map (DCM)
■ Replicated Data Set (RDS)
一個RDS包括了所有的主節點和備用節點的復制卷組(RVG)
在異步模式下VVR的數據復制和數據流向
在同步模式下VVR的數據復制和數據流向
另外
Veritas Volume Replicator 的安裝
主備節點硬件和軟件配置和版本如下
主節點 機器名
Sun Microsystems Sun Fire X
操作系統 solaris
VVR版本: Veritas Volume Replicator
Oracle 版本
磁盤陣列
Public網卡
備用節點機器名
軟硬件環境與主節點相同
兩個節點分別安裝VVR和vxfs
放入安裝介質
如果需要手工
mount
root@lxsfrac
root@lxsfrac
copyright docs installvvr pkgs release_notes scripts tools uninstallvvr
root@lxsfrac
total
drwxrwxr
drwxrwxr
drwxrwxr
drwxrwxr
drwxrwxr
root@lxsfrac
Veritas Volume Replicator
Copyright (c)
The Licensed Software and Documentation are deemed to be
Logs for installvvr are being created in /var/tmp/installvvr
Initial system check:
Checking VVR installation on lxsfrac
Checking architecture on lxsfrac
Veritas Volume Replicator
Checking system licensing
Installing licensing packages
VVR is not licensed on lxsfrac
Enter a VVR license key for lxsfrac
****************** successfully registered on lxsfrac
Permanent VVR license registered on lxsfrac
Do you want to enter another license key for lxsfrac
Veritas Volume Replicator
Checking installed packages on lxsfrac
Veritas Volume Replicator
VVR can be installed without optional packages to conserve disk space
Additional packages are typically installed to simplify future upgrades
Select the packages to be installed on all systems? [
Veritas Volume Replicator
The following VVR packages will be installed:
VRTSperl Veritas Perl
VRTSvlic Veritas Licensing
VRTSicsco Symantec Common Infrastructure
VRTSpbx Symantec Private Branch Exchange
VRTSsmf Symantec Service Management Framework
VRTSat Symantec Product Authentication Service
VRTSobc
VRTSob Veritas Enterprise Administrator Service
VRTSobgui Veritas Enterprise Administrator
VRTSccg Veritas Enterprise Administrator Central Control Grid
VRTSmh Veritas Storage Foundation Managed Host by Symantec
VRTSaa Veritas Enterprise Administrator Action Agent
VRTSspt Veritas Software Support Tools
SYMClma Symantec License Inventory Agent
VRTSvxvm Veritas Volume Manager Binaries
VRTSdsa Veritas Datacenter Storage Agent
VRTSfspro Veritas File System Management Services Provider
VRTSvmman Veritas Volume Manager Manual Pages
VRTSvmdoc Veritas Volume Manager Documentation
Press [Return] to continue:
ntinued:
VRTSdcli Veritas Distributed Command Line Interface
VRTSalloc Veritas Volume Manager Intelligent Storage Provisioning
VRTSvmpro Veritas Volume Manager Management Services Provider
VRTSddlpr Veritas Device Discovery Layer Services Provider
VRTSvrpro Veritas Volume Replicator Client Extension and Provider for
Veritas Enterprise Administrator
VRTSvcsvr Veritas Cluster Server Agents for VVR
VRTSjre Veritas Java Runtime Environment Redistribution
VRTSjre
VRTSweb Veritas Java Web Server
VRTSvrw Veritas Volume Replicator Web Console
VRTSvrdoc Veritas Volume Replicator Documentation
Press [Return] to continue:
Checking for any AP driver issues on lxsfrac
A copy of a previous VxVM configuration is present on the system lxsfrac
Do you want to restore and reuse the previous VxVM configuration of system lxsfrac
Veritas Volume Replicator
Installing VVR:
Installation completed successfully on all systems
It is optional to configure VVR now
Are you ready to configure VVR? [y
The enclosure
Do you want to set up the enclosure
Veritas Volume Replicator
Veritas Volume Manager default disk group name configuration:
Many Veritas Volume Manager commands affect the contents or configuration of a disk group
Note: The default disk group feature is not available with the DCLI vxadm(
Do you want to set up a default disk group for each system? [y
Veritas Volume Replicator
Following are the default ports that will be used by VVR on lxsfrac
Port for VVR heartbeat communication:
Port for vradmind daemon:
Port for vxrsyncd daemon:
Ports for data replication: Anonymous
The ports indicated for VVR heartbeats and vradmind are IANA assigned
The port settings should be identical for systems that will be part of the same Replicated Data Set
Do you want to change any of the VVR ports on lxsfrac
Veritas Volume Replicator
VVR Statistics Collection Tool
The VVR administrative daemon vradmind can collect and maintain various
statistics which are helpful in solving VVR performance issues
collection can be tuned using a few tunables like the frequency for
gathering the statistics and the number of days for which the collected
statistics should be preserved
automatically deleted
The frequency of VVR statistics collection on lxsfrac
Do you want to change the frequency of VVR statistics collection on lxsfrac
The maximum number of days for which VVR statistics can be retained is set to
Do you want to change the maximum number of days for retaining VVR statistics on lxsfrac
Veritas Volume Replicator
Configuration of VVR tunables (For the advanced user)
Do you want to view or modify VVR tunables on lxsfrac
Veritas Volume Replicator
Verify the install systems Fully Qualified Hostnames
Querying fully qualified domain name of host
Press [Return] to continue:
Unable to find FQHN for lxsfrac
Enter the fully qualified hostname of
Enter the fully qualified host name: lxsfrac
Veritas Volume Replicator
Choose how this install will be managed
This product can configured one of the two following ways:
* Storage Foundation Management Server managed host (Recommended)
* Standalone host
Pre
* A Storage Foundation Management Server (SFMS) is configured
* SFMS should be currently running and fully operational
* Authentication Broker that is used by SFMS should be running
The following information would be requested during configuration:
* The host name of the SFMS
* Previously set SFMS agent account password
There are no pre
Enabling Storage Foundation Management Server management simplifies and improves management of the complex data center
resources
Enable Storage Foundation Management Server Management? [y
Veritas Volume Replicator
Verify the install systems Fully Qualified Hostnames
Configuring VEA in STANDALONE mode on
Configuring gridnode on
Registering gridnode on
Configuring actionagent on
Registering actionagent on
Registering StorageAgent on
Do you want to start Veritas Volume Replicator processes now? [y
Veritas Volume Replicator
Starting VVR:
Startup completed successfully on all systems
You declined to set up the name of the default disk group for lxsfrac
Installation log files
/opt/VRTS/install/logs/installvvr
To enable Dynamic Multi
檢查vradmin deamon
root@lxsfrac
root
安裝Veritas File System
root@lxsfrac
root@lxsfrac
total
drwxrwxr
drwxrwxr
drwxrwxr
drwxrwxr
root@lxsfrac
Veritas Volume Replicator VVR的配置
修改兩個節點的/etc/hosts
分別創建私有網絡(專有)
root@lxsfrac
root@lxsfrac
root@lxsfrac
創建相同名稱的磁盤組(含有最少兩個磁盤)
分別在本地安裝Oracle
root@lxsfrac
root@lxsfrac
root@lxsfrac
root@lxsfrac
(這裡是
可以通過vxprint –l來得到disk group ID
root@lxsfrac
………
創建vxfs文件系統
mount
chown oracle:dba /oracle
切換到oracle用戶使用dbca建庫
創建Primary RVG
root@lxsfrac
其中的oravol是要復制的數據卷列表
創建Secondary RVG
root@lxsfrac
設置復制方式為異步
root@lxsfrac
開始復制
root@lxsfrac
Message from Primary:
VxVM VVR vxrlink WARNING V
VxVM VVR vxrlink INFO V
VxVM VVR vxrlink INFO V
VxVM VVR vxrlink INFO V
root@lxsfrac
root@lxsfrac
VxVM VVR vradmin INFO V
檢查相關信息和狀態
root@lxsfrac
rlk_lxsfrac
root@lxsfrac
Fri Nov
VxVM VVR vxrlink INFO V
root@lxsfrac
Fri Nov
VxVM VVR vxrlink INFO V
root@lxsfrac
Fri Nov
VxVM VVR vxrlink INFO V
root@lxsfrac
Fri Nov
VxVM VVR vxrlink INFO V
可以手工進行gracefully切換
root@lxsfrac
root@lxsfrac
VxVM VVR vradmin WARNING V
vradmin: Continue with migrate (y/n)? y
root@lxsfrac
下面我們就在上面搭建好的VVR環境中對容災數據進行切換測試
注
====================================== 顯示主備節點狀態 =================================
root@lxsfrac
Replicated Data Set: ora_rvg
Primary:
Host name: lxsfrac
RVG name: ora_rvg
DG name: oradg
RVG state: enabled for I/O
Data volumes:
VSets:
SRL name: srl
SRL size:
Total secondaries:
Secondary:
Host name: lxsfrac
RVG name: ora_rvg
DG name: oradg
Rlink from Primary: rlk_lxsfrac
Rlink to Primary: rlk_lxsfrac
Configured mode: asynchronous
Latency protection: off
SRL protection: autodcm
Data status: inconsistent
Replication status: resync in progress (autosync)
Current mode: asynchronous
Logging to: DCM (contains
Timestamp Information: N/A
Bandwidth Limit: N/A
==================================== 顯示replication link狀態 =================================
root@lxsfrac
Mon Nov
VxVM VVR vxrlink INFO V
==================================== 在主節點插入試驗數據
oracle@lxsfrac
SQL*Plus: Release
Copyright (c)
Connected to:
Oracle Database
With the Partitioning
SQL> create table test (a varchar(
Table created
SQL> insert into test values (
SQL> commit ;
Commit complete
SQL> insert into test values (
SQL>
SQL>
SQL> commit ;
Commit complete
====================================== 立即異常關閉oracle 和 操作系統 ============================
root@lxsfrac
root@lxsfrac
root@lxsfrac
root
oracle
oracle
oracle
root
root@lxsfrac
root@lxsfrac
從系統日志/var/tmp/messages可以查看到相關信息
Nov
======================================= 在備用節點進行接管 =======================================
root@lxsfrac
VxVM VVR vradmin WARNING V
vradmin: Continue with migrate (y/n)? y
Message from Host lxsfrac
VxVM VVR vradmin ERROR V
root@lxsfrac
root@lxsfrac
root@lxsfrac
Mon Nov
root@lxsfrac
dg oradg default default
dm AMS_WMS
dm AMS_WMS
rv ora_rvg
rl rlk_lxsfrac
v oravol ora_rvg ENABLED ACTIVE
pl oravol
sd AMS_WMS
pl oravol
sd AMS_WMS
pl oravol
sd AMS_WMS
v srl ora_rvg ENABLED ACTIVE
pl srl
sd AMS_WMS
root@lxsfrac
================================ 啟動備用節點Oracle數據庫
root@lxsfrac
root@lxsfrac
root@lxsfrac
Sun Microsystems Inc
oracle@lxsfrac
SQL*Plus: Release
Copyright (c)
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted
Database opened
SQL> select * from test ;
A
================================ 顯示數據正常 ===========================
在第二個節點vxdg import oradg
然後recover
直到兩個節點vxprint
root@lxsfrac
> srl
Message from Primary:
VxVM vxassist ERROR V
root@lxsfrac
Message from Host lxsfrac
VxVM vxassist ERROR V
root@lxsfrac
root
如果進程狀態不對
/etc/init
可以看到vradmin是隨系統自啟動的
root@lxsfrac
/etc/rc
/etc/rc
/etc/rc
/etc/rcS
From:http://tw.wingwit.com/Article/program/Oracle/201311/17441.html