I was about to change some Exadatas FlashCache to WriteBack (after some cells were added to some Exadatas) when I found some resources on the Internet stating that this action needed to stop the whole cluster. As this looked to be a
to me, I wrote this blog to verify it and show below that setting up FlashCache to WriteBack is a 100% online operation (as well as setting up WriteThrough)!
Before jumping into the procedure itself, let's remind that the Storage Cells must run 11.2.3.2.1+ version to be able to set the FlashCache mode to WriteBack. It is most likely your case as 11.2 is very old and I guess you patch your Exadatas on a regular basis. Also, if you are unsure of your storage cells versions, feel free to use this exa-versions.sh script.
Let's start by having a look at our cells FlashCache mode:
Now, Verify that your cells are healthy and you asmdeactivationoutcome is YES, you can do this using the below command line:
Let's now proceed and update this flashcachemode to WriteBack on this cell07 by dropping the flashacache first:
We did it and we did it 100% online ! here you may want to use cell-status.sh to double check that nothing has changed on your cells.
Now, let's see how to do the same thing but on many cells in parallel:
to me, I wrote this blog to verify it and show below that setting up FlashCache to WriteBack is a 100% online operation (as well as setting up WriteThrough)!
Before jumping into the procedure itself, let's remind that the Storage Cells must run 11.2.3.2.1+ version to be able to set the FlashCache mode to WriteBack. It is most likely your case as 11.2 is very old and I guess you patch your Exadatas on a regular basis. Also, if you are unsure of your storage cells versions, feel free to use this exa-versions.sh script.
Let's start by having a look at our cells FlashCache mode:
[root@exadatadb01 ~]# dcli -g ~/cell_group -l root "cellcli -e list cell attributes flashcachemode" exadatacel01: WriteBack exadatacel02: WriteBack exadatacel03: WriteBack exadatacel04: WriteBack exadatacel05: WriteBack exadatacel06: WriteBack exadatacel07: WriteThrough [root@exadatadb01 ~]#Here, clearly, our cel07 is still in WriteThrough mode, let's change it to WriteBack. As a first step, we need to verify that the FlashCache is in a normal state
[root@exadatadb01 ~]# dcli -g cell_group -l root cellcli -e list flashcache detail | grep status exadatacel01: status: normal exadatacel02: status: normal exadatacel03: status: normal exadatacel04: status: normal exadatacel05: status: normal exadatacel06: status: normal exadatacel07: status: normal [root@exadatadb01 ~]#
Now, Verify that your cells are healthy and you asmdeactivationoutcome is YES, you can do this using the below command line:
# dcli -g ~/cell_group -l root cellcli -e list griddisk attributes asmdeactivationoutcome, asmmodestatus
I personnaly use cell-status.sh to have a nice output:
Let's now proceed and update this flashcachemode to WriteBack on this cell07 by dropping the flashacache first:
[root@exadatadb01 ~]# ssh exadatacel07 [root@exadatacel07 ~]# cellcli CellCLI: Release 19.2.2.0.0 - Production on Tue Oct 15 19:24:39 CDT 2019 Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. CellCLI> list cell attributes flashcachemode WriteThrough CellCLI> drop flashcache Flash cache exadatacel07_FLASHCACHE successfully dropped CellCLI>Now, update the flashcache mode to WriteBack:
CellCLI> alter cell flashCacheMode=writeback Cell exadatacel07 successfully altered CellCLI>Recreate the flashcache
CellCLI> create flashcache all Flash cache exadatacel07_FLASHCACHE successfully created CellCLI>Verify
CellCLI> list cell attributes flashcachemode WriteBack CellCLI>On overview on all the cells now
[root@exadatadb01 ~]# dcli -g ~/cell_group -l root "cellcli -e list cell attributes flashcachemode" exadatacel01: WriteBack exadatacel02: WriteBack exadatacel03: WriteBack exadatacel04: WriteBack exadatacel05: WriteBack exadatacel06: WriteBack exadatacel07: WriteBack [root@exadatadb01 ~]#
We did it and we did it 100% online ! here you may want to use cell-status.sh to double check that nothing has changed on your cells.
Now, let's see how to do the same thing but on many cells in parallel:
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group -l root "cellcli -e list cell attributes flashcachemode" anotherexadatacel01: WriteBack anotherexadatacel02: WriteBack anotherexadatacel03: WriteBack anotherexadatacel04: WriteBack anotherexadatacel05: WriteBack anotherexadatacel06: WriteThrough anotherexadatacel07: WriteThrough anotherexadatacel08: WriteThrough anotherexadatacel09: WriteThrough anotherexadatacel10: WriteThrough anotherexadatacel11: WriteThrough anotherexadatacel12: WriteThrough [root@anotherexadatadb01 ~]#We need to set the FlashCache to WriteBack on the cells 6 to 12 on this one. We will then create a file with these cells only:
[root@anotherexadatadb01 ~]# cat ~/cell_group_6_to_12 anotherexadatacel06 anotherexadatacel07 anotherexadatacel08 anotherexadatacel09 anotherexadatacel10 anotherexadatacel11 anotherexadatacel12 [root@anotherexadatadb01 ~]#And verify the file
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root "cellcli -e list cell attributes flashcachemode" anotherexadatacel06: WriteThrough anotherexadatacel07: WriteThrough anotherexadatacel08: WriteThrough anotherexadatacel09: WriteThrough anotherexadatacel10: WriteThrough anotherexadatacel11: WriteThrough anotherexadatacel12: WriteThrough [root@anotherexadatadb01 ~]#Now check the flashcache status on cells 6 to 12
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root cellcli -e list flashcache detail | grep status anotherexadatacel06: status: normal anotherexadatacel07: status: normal anotherexadatacel08: status: normal anotherexadatacel09: status: normal anotherexadatacel10: status: normal anotherexadatacel11: status: normal anotherexadatacel12: status: normal [root@anotherexadatadb01 ~]#Drop the flashcache on these cells
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root cellcli -e drop flashcache anotherexadatacel06: Flash cache anotherexadatacel06_FLASHCACHE successfully dropped anotherexadatacel07: Flash cache anotherexadatacel07_FLASHCACHE successfully dropped anotherexadatacel08: Flash cache anotherexadatacel08_FLASHCACHE successfully dropped anotherexadatacel09: Flash cache anotherexadatacel09_FLASHCACHE successfully dropped anotherexadatacel10: Flash cache anotherexadatacel10_FLASHCACHE successfully dropped anotherexadatacel11: Flash cache anotherexadatacel11_FLASHCACHE successfully dropped anotherexadatacel12: Flash cache anotherexadatacel12_FLASHCACHE successfully dropped [root@anotherexadatadb01 ~]#Change the FlashCache mode to WriteBack
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root cellcli -e "alter cell flashCacheMode=writeback" anotherexadatacel06: Cell anotherexadatacel06 successfully altered anotherexadatacel07: Cell anotherexadatacel07 successfully altered anotherexadatacel08: Cell anotherexadatacel08 successfully altered anotherexadatacel09: Cell anotherexadatacel09 successfully altered anotherexadatacel10: Cell anotherexadatacel10 successfully altered anotherexadatacel11: Cell anotherexadatacel11 successfully altered anotherexadatacel12: Cell anotherexadatacel12 successfully altered [root@anotherexadatadb01 ~]#Recreate the FlashCache
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root cellcli -e create flashcache all anotherexadatacel06: Flash cache anotherexadatacel06_FLASHCACHE successfully created anotherexadatacel07: Flash cache anotherexadatacel07_FLASHCACHE successfully created anotherexadatacel08: Flash cache anotherexadatacel08_FLASHCACHE successfully created anotherexadatacel09: Flash cache anotherexadatacel09_FLASHCACHE successfully created anotherexadatacel10: Flash cache anotherexadatacel10_FLASHCACHE successfully created anotherexadatacel11: Flash cache anotherexadatacel11_FLASHCACHE successfully created anotherexadatacel12: Flash cache anotherexadatacel12_FLASHCACHE successfully created [root@anotherexadatadb01 ~]#Verify the flashcache mode
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root "cellcli -e list cell attributes flashcachemode" anotherexadatacel06: WriteBack anotherexadatacel07: WriteBack anotherexadatacel08: WriteBack anotherexadatacel09: WriteBack anotherexadatacel10: WriteBack anotherexadatacel11: WriteBack anotherexadatacel12: WriteBack [root@anotherexadatadb01 ~]#Check the FlashCache status
[root@anotherexadatadb01 ~]# dcli -g ~/cell_group_6_to_12 -l root cellcli -e list flashcache detail | grep status anotherexadatacel06: status: normal anotherexadatacel07: status: normal anotherexadatacel08: status: normal anotherexadatacel09: status: normal anotherexadatacel10: status: normal anotherexadatacel11: status: normal anotherexadatacel12: status: normal [root@anotherexadatadb01 ~]#And we are all done on all these cells in parallel and 100% online !
A last word about this: have a look at the cachingpolicy of your grid disks as it may have an impact when you enable WriteBack.
No comments:
Post a Comment