Oracle RAC Interview Question - Restore Voting Disk

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends in this tutorial i'll talk about another oracle rack interview question is how to restore voting disk this particular tutorial will be done on oracle 19c and oel 7.5 so let's say you have and wreck environment and your voting risk is lost and how to recover that's what we are going to see in this particular tutorial if you like my channel please subscribe and keep motivating me and you know share my video as well thank you so let's start okay so what we i'll just show you that my cluster is up and running crs ctl start res t if i run this particular command then you can see okay so if i do stat rusty you can see that my cluster looks good i have everything online so if i do db then looks like everything is online so i don't see any offline resources which is a good news okay so everything seems to have started well so let me just show you my ocr my ocr is on this group called ocr let me show you where is my voting disk using crs ctl query css vote disk so this is the command i'm going to see so my vote disk is on this group called what disk so my vocr is on a different disk and my vote disk is on different disk and let me see where is my smp file sp file not p file asm sp get so i'm trying to see where is my asm and that is on sm data so literally i have got three disk groups so if i show you oracle uh asm cmd lsdg okay these are my three this groups this is my asm sp file and my database so there is a database hosted on this this group this is purely an ocr drive and this is a wood disk bricks this is just a 2d gb this is 5 gb and this is i believe 20 gb so uh yeah so 20 gb 5gb and 2gb disk so these are how it is and what we are going to do here and if i just show you that my voting disk is perfectly online so what we are going to do is we are going to destroy this voting disk and then we are going to see we are going to start try to start our cluster and see what exactly what happens whether our cluster comes up and all that stuff so we will do that so what i'm going to do is oracle asm i'm going to destroy my voting disk so where is my voting disk so this is this is the word disk this is the word disk i'm going to destroy it so what i'm going to do is i'm going to say delete disk okay i'm going to delete this particular disk so okay drop clearing disk header and that and i'm going to as i said it is a 2gb disk i'm going to go a little bit more further and i'll come here and i'll say fdisk minus l grab sd so that is my 2gb disk 2gb disk 2gb disk i can't see my eyes are not giving me okay yeah that's this one to 147 mb so i'm going to take that disk and i'm going to delete the partition from this particular disk as well so f disk not only i have removed the asm header i'm also going to delete the partition and that's done okay i cannot delete it because i believe my cluster is up and running which is not allowing me to delete the partition so let's do one thing let me stop my cluster so let's see whether i can still see what this what disk i can still see it looks like it is online so let me now crs ctl stop cluster i'm going to stop the cluster and once i have stopped my cluster i'm going to stop the crs as well so i'm going to do that once my cluster is down so i'm stopping the cluster and once my cluster is done i'm going to stop the crs as well and i'm going to try to restart it once again so i'm going to stop the crs okay that's done actually i should have not done this after this command only i should have done it but i'm in a hurry i need to finish this video i don't want to take lot of your time so i just press that and that is top but this one is not giving me so let me con control c i'm not bothered so let me try to stop the crs on this particular node and then what i'll do is while this is doing it's okay i'll try to start my crs on note 2 so i'm starting my crs on note 2 so and then i will also try to start my crs on node 1 as well so i don't have voting disk right now so let me see what exactly happens so now what i'll do is query crctl query css mode disk so that is my word disk i'm trying to query it okay i'm not getting any output maybe because the asm is not online ps minus ef grip pmon okay the asm is still not up so let me cancel this i'm not getting an output and asm is not up here either so let's give it a minute i just started the crs so crs ctl start crs so that's done and okay crs ctl starts crs that's done so now what i'll do is i'll say cluster all i'm trying to start the cluster all okay and while it is doing that let me see pmon okay my asm is not up on note 2 at least let's see if it is up on node one let me go on node one so right now i'm on node one no asm is not up either over there so no i don't have any luck with my asm it's not coming up okay so let's give it a minute and see whether asm comes up okay that has taken a really long time okay i hope my asm comes up but yeah so even if it doesn't that's fine let's see whether it came up on this node at least no asm has not come up anywhere so by now it should have come up but it looks like it has not come up it's refusing so now we know that we we don't have the okay so yeah so failed okay yeah okay so okay let's see okay so my asm is definitely not up uh that's all i'm okay now let me try on note 2 and okay so that's not a good news so what i'll do now is i will try to start i'll stop once again and this time i'm going to say force so i'm going to stop here and i'm going to stop here i'm stopping the cluster and then i'll disable the auto start once that is done and when we restore the voting disk we have to again make sure that we start the crs in exclusive mode only on one node probably you can keep the nodes up and running but it is a good idea to shut down all other nodes so we don't have any intrusion coming from all other nodes on and we have only one active node and we know that whatever commands that we are running it is what it is doing so but it is not mandatory so i'll just again it's a good practice to shut down all the nodes in this case but it is not mandatory so i'm just waiting for it to stop looks like it is hanged at this so what i'll do is i'll open a duplicate session and i'll kill okay i'm going to kill the css and ps minus ef grab css and ps minus i'm going to kill all of these processes on both the nodes together i can't do it together so let me do kill minus nine what are the processes so this this this and then i have this and i have this okay i'm doing this over here and that stop filled yeah i expected so let me try to do the same thing on this node as well and ps minus ef grep css so take that and take this and kill -9 all of these processes i'm going to kill them that's on note 2 that's done and let's see okay stop fail so i'm not bothered about that anyway it was not stopping so now what i'll do is i will start my crs in exclusive mode and no crs mode in only on one node so that's what i'm trying to do okay start crs okay i think i have some dash problems here so let me do that and okay so i'm trying to start my crs in exclusive mode and without crs on one of the note okay that's what i'm trying to do okay let me clear okay and then once my asm comes up on one of the nodes i need only the asm and once my asm comes up i don't need to create another disk so what i'm going to do is obviously i don't have this word disk so if i show you oracle asm list disks i no longer have the word disk maybe it is there on this one okay it should not be there because you know it has not scanned it again so let me do scan disk and you see it has cleaned this wood disk and if i do list this once again it's not not that on note 2 as well because i cleared the header i deleted the partition so that's what i have done so what i'm going to do now is i can do two things i can actually create one more disk and designate that as a word disk and that is going to take me some time so i'll have to create a disk and all that stuff so as a shortcut what i'm going to do is sorry it's one of the disc i'm going to dis designate as my voting disc as well so here if you see uh what are the two disc i have right now sm data 1 and i have ocr so how about we designate this ocr as our voting disk as well so ocr will store oracle cluster registry as well as it will store the vote disk it will be it will act as a vote disk so let's do that okay and we don't have to restore the backup and all that stuff all that we do is replace the current board disk with with this so that's what we are going to do okay and if we are good if this command works then yeah looks like voting successfully replaced now what we'll do is using this particular command we'll check our voting disk okay and that looks good and now which means all that we have to do is we have to stop the crs on this node and then we can start the crs on other doors so let me start it on another node while it is stopping and and with this single command with this single command we have been able to restore our voting days so no need no backup nothing we we did not create another voting desk we lost our existing voting days i just designated one of the other os asm disk as vote disk so that's what i did so right now if you see the ocr okay let's wait okay let me do cluster all i believe it will not do this because okay let me try just say cluster on this node to begin with because here the shutdown process has not completed okay that's done now crs ctl start crs that's what i'm doing and okay so now let me pick so i have only two disks now i don't have that wood disk because i've removed it and now the ocr is acting as the ocr disk ocr check if i do it will it won't work on node one probably it might work on node two because on node one i just started the crs so it's okay still not on note 2 as well okay let's give it a minute and see okay so that's done and i'll say start cluster as well on node one and okay still no it cannot access so give it a minute okay and we'll see okay so yeah that's done and we'll see if we can access our ocr so we are able to access our ocr so that is good news and what we what we have to check is this where is our vote disk so did i clear so where is our vote disk so our new disk is on here so let's make sure that our word disk came up fine so crs yeah and you see ocr okay and this is the two commands let me clear the screen and let me run the ocr check ocr check first and then let me run the second command the vote this command yeah and you can see that previously i had a different voting disk called word disk but now my this particular this group called oc ocr is acting as the ocr registry location as well as the voting disk so using this single command but remember that when we want to do this we have to start our cluster in exclusive and no crs mode that's what i've done and finally if everything goes well what we'll be doing is we'll be checking our cluster that everything looks good so let's use this crs ctl command the final command to make sure that everything looks good and i'll do that from this node and take this let's see okay so it's still not everything has not come online so we have some resources which are still offline so let's give it a minute and find out whether everything comes online and if it does yeah it has started coming up so still we have few more resources to come online give it a minute okay so they came online my instance is still is shutdown is starting it started on node 2 is starting on node 1 so that is that is also a good news so this was using this particular command crs ctl replace voltage this command we replaced the existing disk and now the this was the previous word what is but now we have replaced it to ocr so i can check this on both the nodes so this is your node one so let me check on node one and that is pointing to ocr and this is also pointed to ocr previously it was both disk the location was wood disk this group which i have deleted so this using this particular command we have successfully restored our voting disk and remember that we had no backup of what disk and all that stuff only thing that we had to do is we have to start our crs in exclusive mode with no crs that's all we have to do and we have to do it only on onenote so i hope you will be able to answer how to restore voting disk after this tutorial do subscribe to my channel like if you like the video please like and share the video and please pass on the comments if you have any doubts or you want to you want any specific videos put in the comments and i'll try to record something on your request and upload it on youtube thank you for watching and and see you in next video thank you bye
Info
Channel: Subodh Khaire
Views: 1,309
Rating: undefined out of 5
Keywords:
Id: UHyj4W4VIfg
Channel Id: undefined
Length: 17min 19sec (1039 seconds)
Published: Fri Feb 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.