7 Replies Latest reply: Oct 17, 2012 6:31 PM by Angel Perez RSS

    Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance

    Angel Perez
      My problem is that the Oracle Database holding the metadata of the VM Manager that currently owns my VM Server died completely and I'm unable to log in to the VM Manager to manage the VMs living in the Server.

      I have no (explicit) backup from the Manager Database so I'm unable to recreate the schema to bring the Manager up again.

      I have an alternate Manager instance in a different server but cannot tke the ownership of the Server because is already owned by another VM Manager (the corrupted one). The error shown is OVMRU_000009E Server <my OVM server> is already owned by an Oracle VM Manager.

      What is the best option to unassign the VM Server from the old VM Manager?

      These are my options so far, haven't tried them yet, though:

      1) As per the an alternate thread (https://forums.oracle.com/forums/thread.jspa?messageID=10633203#10633203)

      # service ovs-agent stop
      # rm /etc/ovs-agent/db/server
      # service ovs-agent start

      2) Uninstall the corrupted VM Manager using the runInslatter.sh script from the Manager installation media.

      I appreciate your help a lot!
        • 1. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
          budachst
          Best option will be to re-install OVMM. Prior to uninstall OVMM make note of your current ServerPool UUID. You can find it on your current OVMM in the hidden .config file in your OVMM installation directory or you can read it from the screen on your running VM server.

          Once you got that, just ditch the old OVMM and re-install it using the option -u <UUID>. Afterwards login to OVMM and discover your server and OVMM will gather all information from it and you will get a working OVMM again.
          • 2. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
            Angel Perez
            I had to improvise a little bit before you answer came so I went ahead and reinstalled the Manager without taking note of the current UUID, the new Manager installation was installed using the same old UUID, though.

            My next issue was that the new Manager was not able to recognize the existen Physical Repository, this might be due the SATA Disk was not empty (of course, it was holding all my VMs). I couldn't find a way for the new Manager to mount and recognize the existen Repo so I went ahead and backed the Repository Up to an alternate partition so was able to clean the disk.

            After the backup, I wiped the SATA disk out using the command:

            +# dd if=/dev/zero of=/dev/sda bs=1M+

            But my surprise was that the Manager, under Storage > Local Storage, was still showing the SATA disk as used, as if the content was still there, so I couldn't create a new Repository on it. Not sure how the mapper/ocfs2/SATA stuff combines to provide Physical devices for the VM Server.. I'm going to have to learn more about these stuff.

            Current Status, I decided to re-install the whole VM Server and the VM Manager (in the same box) and hopefully the new manager will recognize the SATA Disk as empty and will be able to create a new Repository on it, then I'll copy the VMs from the Backup and "hopefully" the VMs will be displayed.

            Am I walking the right way?
            • 3. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
              Angel Perez
              Bad news... :( (for me LOL)

              The new set of VM Server and Manager are still showing my SATA Disk as used, even after wiping the disk out and reinstalling OVM Server/Manager.

              What should I do in order to have my SATA disk empty and be able to create a Physical Repository?
              • 4. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
                budachst
                Hi,

                I have always wiped the first 100 MB or so from my repo disks/LUNs when I wanted to really clean them out. Usually, it should suffice to wipe the first couple of MBs of the repo disk to satisfy OVMM to accept the disk a a new one.

                However, you should definetively re-discover the VM server, after you messed around with the local drive(s).
                • 5. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
                  Angel Perez
                  budachst wrote:
                  Hi,

                  I have always wiped the first 100 MB or so from my repo disks/LUNs when I wanted to really clean them out. Usually, it should suffice to wipe the first couple of MBs of the repo disk to satisfy OVMM to accept the disk a a new one.

                  However, you should definetively re-discover the VM server, after you messed around with the local drive(s).
                  Thanks Budachst, I'm definitelly having a hard time with this server now, I will never forget to backup the Manager Database Again..

                  Do you habe the exact command to wipe the first X MB from the hard disk? whats the dd parameter I should use? What I'm trying at this time is, during the VM Server installation create an ext3 partition that I'm planning to remove later on, and see if the SATA disk is recognized again. I remember that worked the first time I got the disk available as Physical Storage, I didn't know that if the disk wasn't clean I was going to be unable to use it as Physical, I created a partition I was planning to use for it, having an ext3 partition worked for me when used OVM 2.2.0

                  Do you know why they remove ext3 support for Physical Repositories in this version??
                  • 6. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
                    budachst
                    Well, local physical disk have to be blank in OVM3 - you musn't create anything on them and if OVMM finds any hint of a former fs or partition, it will ignore that disk. Also, the disk needs to show up in /dev/mapper, otherwise it will be ignored as well.

                    Can you post your disk configuration?
                    • 7. Re: Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance
                      Angel Perez
                      Thanks Budachst,

                      I just realized of that, after clean my disk up, an ocfs2 file system was created automatically over it and was mounted at boot time, I noticed that by running:

                      mounted.ocfs2 -d

                      It showed something similar to this:

                      Device Stack Cluster F UUID Label
                      /dev/sdb None 0004FB0000050000492F421E44AB10FB OVSf421e44ab10fb
                      /dev/mapper/SATA_ST31000528AS_9VP26K90 None 0004FB0000050000492F421E44AB10FB OVSf421e44ab10fb

                      I had to run the dd command (again) to clean it.

                      dd if=/dev/zero of=/dev/mapper/SATA_ST31000528AS_9VP26K90 bs=1M count=100

                      After the dd command, I was not able to see the SATA disk in the Storage Tab, just tried to create a new repository and was able to select the SATA disk from there. Once the repository got created, the SATA disk was shown in the Storage Tab and was able to restore my VMs backup there.

                      There's a lot of things I don't understand of this architecture, but OVM is amazing.

                      I thing that's it for this post. All my VMs are running again.

                      Thanks for all your answers