This discussion is archived
11 Replies Latest reply: Dec 11, 2009 10:38 AM by Avi Miller RSS

how to add new disk to oracle VM?

user12019148 Newbie
Currently Being Moderated
How to add new/more disk to Oracle VM?

I have server with 400GB internal disk. I have installed oracle vm 2.2 on this server (oravmserver).

I created two virtual machines (test1 and test2 ) with 100 gb each. Now I added 1tb disk to oravmserver using iscsi. I want to create 500gb disk for virtual machines test1 and test2.

when i try to create disk with 500GB on test1, I get error message ovm-4006 max disk size can be 200GB.


I tried few things like creating new repository and then create new disk of size 500GB and I get same error message.

However, I am able to create shared virtual disk of 500GB? I haven't read much about using shared disk. all I read is shared disk is used for HA. I am not using HA or have no plans of using HA.

How do i add more disk to virtual machines test1 and test2?

thanks
  • 1. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user12019148 wrote:
    How to add new/more disk to Oracle VM?
    Read all about [Preparing External Storage and Storage Repositories|http://download.oracle.com/docs/cd/E15458_01/doc.22/e15444/storage.htm#sthref68] in the Oracle VM manual.
  • 2. Re: how to add new disk to oracle VM?
    user12019148 Newbie
    Currently Being Moderated
    I read but I am still not getting it.


    according to document


    If you used the default /OVS partition during installation, and you have only one Oracle VM Server in your server pool, you do not need to create a storage repository. If you want to add more Oracle VM Servers to your server pool, you must create a storage repository and remove the local /OVS partition created during installation.

    If you have only one Oracle VM Server in your server pool, but want to use iSCSI, SAN or NFS-based storage for your guest domains, you must create a storage repository, even though it will not be shared.

    You prepare the external storage and storage repository at the Oracle VM Server command line, and then use Oracle VM Manager to create a server pool, and propagate the storage repository to all Oracle VM Servers in the server pool.


    NOw Since I am using iscsi I need to create new repository. I created New storage and new repository using fdisk and mkfs.ocfs2 and repos.py ....


    now what i need to do.

    Thanks for your help.
  • 3. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user12019148 wrote:
    NOw Since I am using iscsi I need to create new repository. I created New storage and new repository using fdisk and mkfs.ocfs2 and repos.py ....
    Did you run ./repos.py -i to initialize this new repository? What is the output of ./repos.py -l? Once the new repository is visible to Oracle VM, it should allow you to create a new disk. However, there is a limitation: if you want to create a new 500GB disk, but the filesystem on which your guest is installed doesn't have that much space available, it will fail. The workaround is to create the disk as a "Shared Virtual Disk" (which can exist in any repository), but only assign it to a single guest.
  • 4. Re: how to add new disk to oracle VM?
    user12019148 Newbie
    Currently Being Moderated
    Thanks a lot. I was thinking that only.

    So to clear my doubts.

    I can add disks to Vm but limited to free disk available in same repository where Vm is Installed.

    Or I can add new repository and then create virtual machine with disk size 500GB . In this case, it will create new virtual machine in new repository.

    am i right?


    Also does /etc/ovs/ovsrepositorities exists?

    Also on side note. I found following link How to add more disk space to OVS? , where user attached new disk to repository.

    Isn't it possible to add new disk to same repository?
  • 5. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user12019148 wrote:
    I can add disks to Vm but limited to free disk available in same repository where Vm is Installed.
    Or I can add new repository and then create virtual machine with disk size 500GB . In this case, it will create new virtual machine in new repository.
    Yes, and yes.
    Also does /etc/ovs/ovsrepositorities exists?
    Not on Oracle VM 2.2 any more.
    Isn't it possible to add new disk to same repository?
    No. Each disk that is presented to Oracle VM has to be created as a single repository. This includes NFS mounts, SAN LUNs or iSCSI volumes. But, you can have multiple repositories on a single server or across a pool of servers.
  • 6. Re: how to add new disk to oracle VM?
    user12019148 Newbie
    Currently Being Moderated
    Thanks a lot for info.

    Is there any guide where it says limitation of creating repositories/disks/files?
  • 7. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user12019148 wrote:
    Is there any guide where it says limitation of creating repositories/disks/files?
    I'm not sure, to be honest. It may be in My Oracle Support, which requires a subscription for access. I'll make a note of this thread and fling it to our documentation author with the hope of getting it added when the documentation is reviewed.
  • 8. Re: how to add new disk to oracle VM?
    739517 Newbie
    Currently Being Moderated
    I'm not getting it either. I'm on 2.2, not using HA, don't need anything shared, just one single host where I want to create some VMs. The doc isn't clear at all and is aimed at people who want shared storage or HA.

    I've got four SAN LUNs storage, and when I install Server I use linux mpath (because not using mpath causes I/O errors). During the installation, do I want to make these for LUNs available to Server, or not? By default they're all checked.

    I created a Server Pool in Manager. Is there really no way to add/view storage repos from within Manager?

    In /proc/partitions I see many sd* devices as well as dm-0 through dm-3. ll /dev/mapper shows mpath0 through mpath3 as well as four VG_XenStorage--... entries. Which do I want?

    If I install them as unavailable then try to mkfs.ocfs2 /dev/dm-0 or /dev/sdp, it reports that it's apparently in use. I can use -F to force it, then /opt/ovs-agent-2.3/utils/repos.py -i works. But there's nothing under /OVS.

    As you can see I'm terribly confused. Please help? Thanks much.
  • 9. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user4806362 wrote:
    I'm not getting it either. I'm on 2.2, not using HA, don't need anything shared, just one single host where I want to create some VMs. The doc isn't clear at all and is aimed at people who want shared storage or HA.
    The document talks about external storage, which is most often used for shared/HA configurations. However, you just need to follow the documentation as if you were creating shared storage but you only do it for your single server. There is no way currently to view/manage repository information from within the Manager utility.

    So, taking your questions one by one:
    During the installation, do I want to make these for LUNs available to Server, or not?
    Yes or no, but probably not: you don't mention if your server has any local storage or not. If it does, you'd only want to use that local storage during installation. This will ensure your server can at least boot if your SAN is offline. If you have no local storage, you're in SAN boot territory and would need to only use a single LUN during installation. Once you've finished the installation, you can then chose what to do with the additional LUNs: the installer does not automatically create repositories for them.
    In /proc/partitions I see many sd* devices as well as dm-0 through dm-3. ll /dev/mapper shows mpath0 through mpath3 as well as four VG_XenStorage--... entries. Which do I want?
    I'm curious as to why you have four VG_XenStorage entries. Those look like LVM volume groups/logical volumes and should not have been created by the installer. Did you configure LVM manually during install? Most often, you'd use the /dev/mapper/mpathX devices, though. You would however need to partition them using fdisk so that you see /dev/mapper/mpath0p0 for example.
    If I install them as unavailable then try to mkfs.ocfs2 /dev/dm-0 or /dev/sdp, it reports that it's apparently in use. I can use -F to force it, then /opt/ovs-agent-2.3/utils/repos.py -i works. But there's nothing under /OVS.
    The process to add /dev/mapper/mpath0 would be:

    1. Run fdisk /dev/mapper/mpath0 and create one big partition
    2. Run mkfs.ocfs2 on /dev/mapper/mpath0p0 to format that parition
    3. Run ./repos.py -n /dev/mapper/mpath0p0 to add the new repository
    4. Run ./repos.py -i to initialize the new repository

    You will not see anything new under /OVS nor will there be more space available. You will see a new mount under /var/ovs/mount which is what Oracle VM uses for its repositories.
  • 10. Re: how to add new disk to oracle VM?
    739517 Newbie
    Currently Being Moderated
    Thank you, Avi. I appreciate your quick response.

    I have an internal disk where I installed Oracle VM Server, and I have four SAN LUNs presented to the server that I want to use for VM storage.

    I'm accustomed to having to init those LUNs to make them a repository that the management GUI can use.

    I'm curious as to why you have four VG_XenStorage entries. Those look like LVM volume groups/logical volumes and should not have been created by the installer. Did you configure LVM manually during install?

    Unfortunately I can't remember whether I checked these off during the installation and made them available. During installation I tried both checking them and unchecking them, and when the server booted, as I wrote above I couldn't figure out where the LUNs were.

    I now see that the hypervisor automatically grouped the four LUNs into one metaLUN at /var/ovs/mount/BE9.... Is there a way to break this metaLUN out into the four separate LUNs so I can pick and choose which VMs reside on which LUNs?
  • 11. Re: how to add new disk to oracle VM?
    Avi Miller Guru
    Currently Being Moderated
    user4806362 wrote:
    I now see that the hypervisor automatically grouped the four LUNs into one metaLUN at /var/ovs/mount/BE9.... Is there a way to break this metaLUN out into the four separate LUNs so I can pick and choose which VMs reside on which LUNs?
    There should be four UUID directories under /var/ovs/mount, one for each LUN: Oracle VM does not group LUNs together by default. If you did this manually with LVM, then you would need to remove all the LVM components to see the four individual LUNs again. Once you do that, you can add and initialise each LUN.

    However, Oracle VM 2.2 does not allow you to pick and chose which VMs reside on which LUN. It automatically creates VMs on the LUN with the most amount of available disk space. Advanced disk management capabilities are part of the 3.0 roadmap.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points