天天看點

NETAPP FlexClone FlexClone volumes 初體驗

前情提要:

        某資料中心需要将一個單oracle執行個體每天産生的新增資料往同台機器的另外一個執行個體(用作DW的資料源)做大量的資料傳輸,但是通過dblink的方式發現速度遠遠滿足不了第二天第二個執行個體正常通路的需要,且由于開啟高并行插入之後,占用系統資源太大,故咨詢netapp 存儲廠商後(系統基于netapp存儲的,這理所當然對否?),廠商提出了一個通過存儲本身自帶的FlexClone Volumes功能來瞬間完成庫資料檔案的複制的方案(當然此段時間生産庫要停20秒--算上停止和啟動時間)。

故事人物介紹之 FlexClone volumes :

       FlexClone volumes是基于lun 複制的方式直接在存儲級别将你需要的lun及裡面所有的檔案複制成另外一份新的lun,體驗速度也非常給力,1-3秒左右。

NETAPP FlexClone FlexClone volumes 初體驗

      對本劇主人公有興趣的童鞋,可以參考如下文章:https://communities.netapp.com/docs/DOC-10323。

故事發展線索之 圖形界面clone:

NETAPP FlexClone FlexClone volumes 初體驗

故事發展線索之指令行clone:

vol clone create clone_name [-s {volume|file|none}] -b parent_name [parent_snap] 
           

clone_name     is the name of the FlexClone volume that you want to create. -s {volume | file | none}

specifies the space guarantee setting for the new FlexClone volume. If no value is specified, the FlexClone volume is given the same space guarantee setting as its parent. 

 parent_name  is the name of the FlexVol volume that you intend to clone. 

 parent_snap   is the name of the base Snapshot copy of the parent FlexVol volume. 

If no name is specified, Data ONTAP creates a base Snapshot copy with the nameclone_cl_name_prefix.id,

where cl_name_prefix is the up to 16 characters of the name of the new FlexClone volume andid is a unique digit identifier (for example 1,2, and so on).

Note: The base Snapshot copy cannot be deleted as long as any clones based on that Snapshot copy exist. 

 The FlexClone volume is created and, if NFS is in use, an entry is added to the /etc/exports file for every entry found for the parent volume. 

 The base Snapshot copy becomes a shared Snapshot copy between the FlexClone volume and its parent.  

Example :

--To create a FlexClone volume named newclone from the parent FlexVol volume flexvol1, you would enter the following command:

vol clone create newclone -b flexvol1 
           

Note: The Snapshot copy created by Data ONTAP is named clone_newclone.1. 

場景1:克隆前資料庫配置

1.   建立新的.ora檔案,将克隆庫的路徑等資訊加入.(db_name不能修改)

2.   建立對應的日志.跟蹤等檔案的路徑

3.   擷取源庫的控制檔案,生成trace檔案,根據trace檔案生成用于建立控制檔案的sql腳本,生成的腳本存儲在伺服器端

4.   orapwd密碼檔案建立

5.   配置監聽檔案,修改service_name(可選)

場景2:克隆步驟:

1.   在業務空閑階段,将u01上業務資料庫執行關閉

2.   克隆u01資料庫(詳情請咨詢NetApp 廠商)

a)    通過存儲端的FlexClone功能對u01業務資料庫的LUN進行克隆(卷克隆名Clone2),不執行克隆分離動作.

b)    将u02 umount

c)    在存儲端對u02的LUN(克隆名Clone1)執行Offline,并将其删除

d)    重命名新建立的Clone2卷為Clone1

e)    将新生成的克隆LUNonline(LUN ID與原克隆LUN保持一緻),mount新克隆LUN至u02

3.   Oracle 參數修改

a)    Export ORACLE_SID=POCCLONE

b)    通過預置在伺服器端的sql腳本在u02端生成新的control檔案

c)    Recovery database

d)    Alter system set db_unique_name=POCClonescope=spfile

e)    Alter database open(打開u02的克隆資料庫)

4.   打開u01生産資料庫

拍攝花絮:clone 資料庫的方法其實很多,其中一種通過RMAN 的replicate方法見我的另一篇文章:http://space.itpub.net/22907091/viewspace-691959