Skip Headers
Oracle® VM Server User's Guide
Release 2.2

Part Number E15444-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

9 Managing Storage Repositories

This Chapter contains information on managing Oracle VM Server storage repositories. It contains:

9.1 Storage Repository Directory Structure

When you create a server pool in Oracle VM Manager, the storage repository is automatically mounted with the source type, for example, NFS or OCFS2. The storage repository directory structure is also automatically created under the /OVS directory on the storage repository. These directories are listed in Table 9-1, "/OVS Directory Contents".

Table 9-1 /OVS Directory Contents

Directory Name Description

iso_pool

Contains ISO files imported using Oracle VM Manager.

publish_pool

Contains guest virtual machines deployed as public.

seed_pool

Contains guest virtual machine templates.

sharedDisk

Contains shared virtual disks.

running_pool

Contains virtual machine images and configuration files.


The /OVS directory is the cluster root and is a symbolic link mounted to the /var/ovs/mount/uuid directory. For example, the mount command might display something similar to:

# mount
example.com:/OVS on /var/ovs/mount/F4135C096045458195057412169071E5 type nfs (rw,addr=192.168.2.20)

And the ls command might display something similar to:

# ls -l /OVS
lrwxrwxrwx 1 root root 47 Sep 18 16:15 /OVS -> /var/ovs/mount/F4135C096045458195057412169071E5

9.2 Managing Storage Repositories

Storage repositories are managed by Oracle VM Agent. When you create a storage repository, Oracle VM Agent saves the configuration information in the Oracle VM Agent database. You can have multiple storage repositories for Oracle VM resources.

If you create a server pool using Oracle VM Manager, the storage repository is automatically propagated to the other nodes (Virtual Machine Servers) in the server pool (cluster).

You can manage storage repositories using the /opt/ovs-agent-2.3/utils/repos.py script. The repos.py script should be run on the Server Pool Master.

The repos.py script options are discussed in this section. The script has commands for:

The repos.py script also contains a function to display help on the script parameters. To display the full list of options for the repos.py script, enter

/opt/ovs-agent-2.3/utils/repos.py [-h | --help]

9.2.1 Listing the Storage Repositories

You can list all the storage repositories with the repos.py script. The script takes the following parameters to list the storage repositories:

/opt/ovs-agent-2.3/utils/repos.py [-l | --list]

[-l | --list]

Lists the storage repositories.

The output format used to list the repositories is:

[* | Del | New | R] uuid => source

[* | Del | New | R]

The status of the storage repository. The status be may empty, or one of:

  • *: The cluster root for the storage repository. The cluster root is linked to the /OVS directory and stores all the key meta data for Oracle VM Agent and the storage repositories.

  • Del: The storage repository is deleted.

  • New: The storage repository is created.

  • R: The storage repository is newly assigned as the root repository, but is not initialized.

uuid

The UUID (Universally Unique Identifier) of the storage repository.

source

The block device or path to the file system used for the storage repository.

For example, to list the storage repositories, enter

# /opt/ovs-agent-2.3/utils/repos.py -l

In this example, the output contains two storage repositories, the second being the default storage repository which is set as the cluster root:

[   ] e9253250-7955-4773-9e26-5954a5e95e57 => /dev/mpath/mpath1
[ * ] f4135c09-6045-4581-9505-7412169071e5 => example.com:/OVS

9.2.2 Adding a Storage Repository

You can add a file system or shared virtual disk as a storage repository using the repos.py script. The script identifies the file system or shared virtual disk as a storage repository and updates the storage repository configuration in the Oracle VM Agent database to enable it. You can use this command to create one or more storage repositories. The script takes the following parameters to add a storage repository:

/opt/ovs-agent-2.3/utils/repos.py [-n | --new] storage [-o NFS-options]

[-n | --new]

Adds the storage repository.

storage

The block device path to the file system to be added.

-o NFS-options

The NFS mount options to use. You should only use this parameter for NFS-based storage.

If you add an additional storage repository to an existing server pool, you must initialize it to create the storage repository directories, and mount it on all the nodes in the server pool (cluster). To initialize the storage repositories, see Section 9.2.4, "Initializing the Storage Repositories".

For example, to create a storage repository, on the Server Pool Master enter

# /opt/ovs-agent-2.3/utils/repos.py -n example.com:/test

In this example, the output displays the storage repository, which is marked as new:

[ NEW ] af60bcea-c588-4b51-8bec-d89d1a490e2e => example.com:/test

In the following example, an NFS mount is used to create the repository and the NFS mount options passed in.

# /opt/ovs-agent-2.3/utils/repos.py -n example.com:/test1 -o rw,fg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,nfsvers=3,timeo=600

9.2.3 Deleting a Storage Repository

You can remove a storage repository using the repos.py script. If the storage repository is mounted, it is automatically unmounted before it is deleted. Deleting a storage repository that is set as the cluster root causes the cluster configuration to be removed. The script takes the following parameters to delete a storage repository:

/opt/ovs-agent-2.3/utils/repos.py [-d | --delete] uuid

[-d | --delete]

Removes the storage repository.

uuid

The UUID (Universally Unique Identifier) of the storage repository.

If you delete a storage repository from an existing server pool, you must initialize any remaining storage repositories. To initialize the storage repositories, see Section 9.2.4, "Initializing the Storage Repositories".

For example, to delete a storage repository, on the Server Pool Master enter

# /opt/ovs-agent-2.3/utils/repos.py -d af60bcea-c588-4b51-8bec-d89d1a490e2e

In this example, the output displays the storage repository, which is marked as deleted:

[ DEL ] af60bcea-c588-4b51-8bec-d89d1a490e2e => example.com:/test

9.2.4 Initializing the Storage Repositories

Initializing the storage repositories creates the storage repository directories, and mounts them on all the nodes in the server pool (cluster).

You should initialize the storage repositories if you make any changes to existing storage repositories, such as adding, deleting or changing the cluster root.

Note:

If you use Oracle VM Manager to create a server pool, you do not need to initialize the storage repositories. Oracle VM Agent automatically mounts the shared storage on each Virtual Machine Server in the server pool.

The script takes the following parameters to initialize the storage repositories:

/opt/ovs-agent-2.3/utils/repos.py [-i | --init]

[-i | --init]

Initializes the storage repositories by creating the storage repository directories, if required, and mounting them on all nodes in the server pool (cluster).

For example, to initialize the storage repositories, on the Server Pool Master enter

# /opt/ovs-agent-2.3/utils/repos.py -i

9.2.5 Setting the Cluster Root

If you have multiple storage repositories, you can select one storage repository as the cluster root in a server pool (cluster). Alternatively, if you have only one Oracle VM Server in the server pool, you can select your local disk as the storage repository and set it as the cluster root. The script takes the following parameters to set a storage repository as the cluster root:

/opt/ovs-agent-2.3/utils/repos.py [-r | --root] uuid

[-r | --root]

Sets a storage repository as the cluster root.

uuid

The UUID (Universally Unique Identifier) of the storage repository.

If you change the cluster root from one storage repository to another in an existing server pool, you must initialize the storage repositories. To initialize the storage repositories, see Section 9.2.4, "Initializing the Storage Repositories".

For example, to set a storage repository as the cluster root, on the Server Pool Master enter

# /opt/ovs-agent-2.3/utils/repos.py -r e9253250-7955-4773-9e26-5954a5e95e57

In this example, the output displays the storage repository, which is marked as the cluster root:

[ * ] e9253250-7955-4773-9e26-5954a5e95e57 => /dev/mpath/mpath1