exadata启用回写闪存

在虚拟机下模拟的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

扫描二维码关注公众号,回复: 8684606 查看本文章
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

发布了754 篇原创文章 · 获赞 31 · 访问量 19万+

猜你喜欢

转载自blog.csdn.net/xxzhaobb/article/details/103495400