在虛擬機下模擬的cell,發現回寫功能默認是關閉的。測試打開。
CellCLI> list cell attributes flashcachemode
WriteThrough
CellCLI> list cell detail
name: cell1
bbuTempThreshold: 60
bbuChargeThreshold: 800
bmcType: absent
cellVersion: OSS_11.2.3.2.0_LINUX.X64_120713
cpuCount: 1
diagHistoryDays: 7
fanCount: 1/1
fanStatus: normal
flashCacheMode: WriteThrough
id: 66c6e844-c66a-4661-8291-359459443084
interconnectCount: 2
interconnect1: eth0
iormBoost: 0.0
ipaddress1: 10.10.10.1/24
kernelVersion: 2.6.39-400.215.10.el5uek
makeModel: Fake hardware
metricHistoryDays: 7
offloadEfficiency: 834.9
powerCount: 1/1
powerStatus: normal
releaseVersion: 11.2.3.2.0
releaseTrackingBug: 14212264
status: online
temperatureReading: 0.0
temperatureStatus: normal
upTime: 0 days, 1:51
cellsrvStatus: running
msStatus: running
rsStatus: running
CellCLI>
CellCLI> list griddisk attributes name,asmmodestatus
DATA_CD_disk01_cell1 ONLINE
DATA_CD_disk02_cell1 ONLINE
DATA_CD_disk03_cell1 ONLINE
DATA_CD_disk04_cell1 ONLINE
DATA_CD_disk05_cell1 ONLINE
DATA_CD_disk06_cell1 ONLINE
DATA_CD_disk07_cell1 ONLINE
DATA_CD_disk08_cell1 ONLINE
DATA_CD_disk09_cell1 ONLINE
DATA_CD_disk10_cell1 UNUSED
DATA_CD_disk11_cell1 UNUSED
DATA_CD_disk12_cell1 UNUSED
gd13 ONLINE
gd14 ONLINE
gd15 ONLINE
gd16 ONLINE
gd17 ONLINE
gd18 ONLINE
gd19 ONLINE
gd20 ONLINE
CellCLI> list flashcache detail
name: cell1_FLASHCACHE
cellDisk: FD_01_cell1,FD_00_cell1,FD_02_cell1,FD_03_cell1
creationTime: 2019-11-26T05:56:27+08:00
degradedCelldisks:
effectiveCacheSize: 2G
id: 1b05d15c-cc50-4cf7-80c9-77cd31dbab24
size: 2G
status: normal
使用滾動方式
1 drop掉flashcache,drop flashcache對asm實例和數據庫不會有影響,drop後,數據庫還是可以進行查詢
CellCLI> drop flashcache
Flash cache cell1_FLASHCACHE successfully dropped
CellCLI>
CellCLI> list flashcache detail
CellCLI>
2 檢查asm的狀態,看看griddisk是否offline,下面的檢查都是yes
CellCLI> list griddisk attributes name,asmmodestatus,asmdeactivationoutcome
DATA_CD_disk01_cell1 ONLINE Yes
DATA_CD_disk02_cell1 ONLINE Yes
DATA_CD_disk03_cell1 ONLINE Yes
DATA_CD_disk04_cell1 ONLINE Yes
DATA_CD_disk05_cell1 ONLINE Yes
DATA_CD_disk06_cell1 ONLINE Yes
DATA_CD_disk07_cell1 ONLINE Yes
DATA_CD_disk08_cell1 ONLINE Yes
DATA_CD_disk09_cell1 ONLINE Yes
DATA_CD_disk10_cell1 UNUSED Yes
DATA_CD_disk11_cell1 UNUSED Yes
DATA_CD_disk12_cell1 UNUSED Yes
gd13 ONLINE Yes
gd14 ONLINE Yes
gd15 ONLINE Yes
gd16 ONLINE Yes
gd17 ONLINE Yes
gd18 ONLINE Yes
gd19 ONLINE Yes
gd20 ONLINE Yes
CellCLI>
3 inactive the griddisk .因爲測試環境只有一個cell,所以inactive後,數據庫不可以使用了。實際環境中,每個cell都是一個故障組,是可以這樣操作的。(這個時候看磁盤組資源的狀態,都是offline的)
CellCLI> alter griddisk all inactive
GridDisk DATA_CD_disk01_cell1 successfully altered
GridDisk DATA_CD_disk02_cell1 successfully altered
GridDisk DATA_CD_disk03_cell1 successfully altered
GridDisk DATA_CD_disk04_cell1 successfully altered
GridDisk DATA_CD_disk05_cell1 successfully altered
GridDisk DATA_CD_disk06_cell1 successfully altered
GridDisk DATA_CD_disk07_cell1 successfully altered
GridDisk DATA_CD_disk08_cell1 successfully altered
GridDisk DATA_CD_disk09_cell1 successfully altered
GridDisk DATA_CD_disk10_cell1 successfully altered
GridDisk DATA_CD_disk11_cell1 successfully altered
GridDisk DATA_CD_disk12_cell1 successfully altered
GridDisk gd13 successfully altered
GridDisk gd14 successfully altered
GridDisk gd15 successfully altered
GridDisk gd16 successfully altered
GridDisk gd17 successfully altered
GridDisk gd18 successfully altered
GridDisk gd19 successfully altered
GridDisk gd20 successfully altered
CellCLI>
[grid@exadb01 ~]$ crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
OFFLINE OFFLINE exadb01
ora.DATA_ADD.dg
OFFLINE OFFLINE exadb01
ora.LISTENER.lsnr
ONLINE ONLINE exadb01
ora.TEST_NORMAL.dg
OFFLINE OFFLINE exadb01
ora.asm
ONLINE ONLINE exadb01 Started
ora.ons
OFFLINE OFFLINE exadb01
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE exadb01
ora.diskmon
1 ONLINE ONLINE exadb01
ora.evmd
1 ONLINE ONLINE exadb01
ora.exa.db
1 ONLINE OFFLINE Instance Shutdown
[grid@exadb01 ~]$
4 關閉cellsrv服務
CellCLI> alter cell shutdown services cellsrv
Stopping CELLSRV services...
The SHUTDOWN of CELLSRV services was successful.
CellCLI>
5 設置flashcache模式爲回寫模式
CellCLI> alter cell flashCacheMode=writeback
Cell cell1 successfully altered
CellCLI>
6 重啓cellsrv服務
CellCLI> alter cell startup services cellsrv
Starting CELLSRV services...
The STARTUP of CELLSRV services was successful.
CellCLI>
7 將griddisk active
CellCLI> alter griddisk all active
GridDisk DATA_CD_disk01_cell1 successfully altered
GridDisk DATA_CD_disk02_cell1 successfully altered
GridDisk DATA_CD_disk03_cell1 successfully altered
GridDisk DATA_CD_disk04_cell1 successfully altered
GridDisk DATA_CD_disk05_cell1 successfully altered
GridDisk DATA_CD_disk06_cell1 successfully altered
GridDisk DATA_CD_disk07_cell1 successfully altered
GridDisk DATA_CD_disk08_cell1 successfully altered
GridDisk DATA_CD_disk09_cell1 successfully altered
GridDisk DATA_CD_disk10_cell1 successfully altered
GridDisk DATA_CD_disk11_cell1 successfully altered
GridDisk DATA_CD_disk12_cell1 successfully altered
GridDisk gd13 successfully altered
GridDisk gd14 successfully altered
GridDisk gd15 successfully altered
GridDisk gd16 successfully altered
GridDisk gd17 successfully altered
GridDisk gd18 successfully altered
GridDisk gd19 successfully altered
GridDisk gd20 successfully altered
CellCLI>
8 確認griddisk是否online
CellCLI> list griddisk attributes name, asmmodestatus
DATA_CD_disk01_cell1 UNKNOWN
DATA_CD_disk02_cell1 UNKNOWN
DATA_CD_disk03_cell1 UNKNOWN
DATA_CD_disk04_cell1 UNKNOWN
DATA_CD_disk05_cell1 UNKNOWN
DATA_CD_disk06_cell1 UNKNOWN
DATA_CD_disk07_cell1 UNKNOWN
DATA_CD_disk08_cell1 UNKNOWN
DATA_CD_disk09_cell1 UNKNOWN
DATA_CD_disk10_cell1 UNUSED
DATA_CD_disk11_cell1 UNUSED
DATA_CD_disk12_cell1 UNUSED
gd13 UNKNOWN
gd14 UNKNOWN
gd15 UNKNOWN
gd16 UNKNOWN
gd17 UNKNOWN
gd18 UNKNOWN
gd19 UNKNOWN
gd20 UNKNOWN
CellCLI>
9 重新創建flashcache
CellCLI> create flashcache all
Flash cache cell1_FLASHCACHE successfully created
CellCLI>
10 檢查狀態,狀態爲回寫
[root@exacell01 ~]# cellcli -e list cell detail | grep flashCacheMode
flashCacheMode: writeback
[root@exacell01 ~]#
11 其他cell節點上重複以上步驟。
-- 非滾動方式(需要把ASM和數據庫都關閉)
1 drop flashcache on cell
drop flashcache
2 shutdown cellsrv service
alter cell shutdown services cellsrv
3 set the cell flashcache mode to writeback
alter cell flashcachemode=writeback
4 restart the cellsrv service
alter cell startup service cellsrv
5 recreate the flash cache
create flashcache all .
參考文檔:數據庫一體機Write-Back Flash Cache(WBFC)特性 - FAQ (Doc ID 2060508.1)
END