Chapter 7 Creating a Storage Repository
This section gives you the syntax and examples to use to create a storage repository.
7.1 Creating a storage repository on a file server
-
Find the file system you want to use to create the storage repository with the list command, for example:
OVM>
list FileSystem
id:66a61958-e61a-44fe-b0e0-9dd64abef7e3 name:nfs on 10.172.76.125:/mnt/vol1/poolfs03 id:0004fb0000050000b85745f78b0c4b61 name:fs on 350014ee2568cc0cf id:4ebb1575-e611-4662-87b9-a84b40ce3db7 name:nfs on 10.172.76.125:/mnt/vol1/poolfs04 id:858d98c5-3d8b-460e-9160-3415cbdda738 name:nfs on 10.172.76.125:/mnt/vol1/poolfs01 id:0dea4818-20e6-4d3a-958b-b12cf91588b5 name:nfs on 10.172.76.125:/mnt/vol1/poolfs02 id:35b4f1c6-182b-4ea5-9746-51393f3b515c name:nfs on 10.172.76.125:/mnt/vol2/repo03 id:aeb6143d-0a96-4845-9690-740bbf1e225e name:nfs on 10.172.76.125:/mnt/vol1/repo01 id:05e8536f-8d9c-4d7c-bbb2-29b3ffafe011 name:nfs on 10.172.76.125:/mnt/vol2/repo02 id:0004fb00000500006a46a8dbd2461939 name:MyServerPool_cluster_heartbeat id:0004fb00000500000809e28f4fab56b1 name:fs on 350014ee20137ee44 OVM>Then, refresh the file system you intend to use for the storage repository. To refresh the file system, use the syntax:
refresh
{AccessGroup
|Assembly
|FileServer
|FileSystem
|PhysicalDisk
|Repository
|Server
|StorageArray
|VirtualAppliance
}instance
For example:
OVM> refresh FileSystem name="nfs on 10.172.76.125://mnt//vol1//repo01"
For more information on the syntax and usage, see Section A.142, “refresh” .
-
Create the storage repository. Use the syntax:
create Repository
[sharePath=
]value
name=
[value
description=
]value
on
FileSystem
instance
For example:
OVM> create Repository name=MyRepository on FileSystem \ name="nfs on 10.172.76.125://mnt//vol2//repo01"
For more information on the syntax and usage, see Section A.42, “create Repository” .
-
To grant access to the storage repository to a server pool, you must present the repository. To present the storage repository to server pool, use the syntax:
add ServerPool
instance
to
{AccessGroup
|Repository
}instance
For example:
OVM> add ServerPool name=MyServerPool to Repository name=MyRepository
For more information on the syntax and usage, see Section A.12, “add ServerPool” .
-
Finally, refresh the storage repository using the syntax:
refresh
{AccessGroup
|Assembly
|FileServer
|FileSystem
|PhysicalDisk
|Repository
|Server
|StorageArray
|VirtualAppliance
}instance
For example:
OVM> refresh Repository name=MyRepository
For more information on the syntax and usage, see Section A.142, “refresh” .
7.2 To create a storage repository on a storage array
-
Find the physical disk (LUN) you want to use to create the storage repository with the list command, for example:
OVM>
list PhysicalDisk
id:0004fb000018000067ce80973e18374e name:MyLUN1 id:0004fb000018000035ce16ee4d58dc4d name:MyLUN2 id:0004fb0000180000a9c7a87ba52ce5ec name:MyLUN3 OVM> -
Find a local file system on an Oracle VM Server that has access to the LUN with the list command, for example:
OVM>
list FileServer
id:0004fb0000090000d773cb3fe655865a name:Local FS MyServer1 id:0004fb000009000014baa666cdf62317 name:Local FS MyServer2 id:0004fb00000900008ae3eb6203f5646c name:MyNFSStorage id:0004fb00000900001d523e2a6ce1f8c8 name:Local FS MyServer3 OVM> -
Create an OCFS2 file system on the LUN using the local file system on the Oracle VM Server as the FileServer. Use the syntax:
create FileSystem
physicalDisk=
value
name=
[value
description=
]value
on FileServer
instance
For example:
OVM> create FileSystem name=MyRepoFileSystem physicalDisk="MyLUN1" on FileServer \ name="Local FS MyServer1"
For more information on the syntax and usage, see Section A.39, “create FileSystem” .
-
Create the storage repository. Use the syntax:
create Repository
[sharePath=
]value
name=
[value
description=
]value
on
FileSystem
instance
For example:
OVM> create Repository name=MyRepository on FileSystem name=MyRepoFileSystem
For more information on the syntax and usage, see Section A.42, “create Repository” .
-
To grant access to the storage repository to a server pool, you must present the repository. To present the storage repository to server pool, use the syntax:
add ServerPool
instance
to
{AccessGroup
|Repository
}instance
For example:
OVM> add ServerPool name=MyServerPool to Repository name=MyRepository
For more information on the syntax and usage, see Section A.12, “add ServerPool” .
-
Finally, refresh the storage repository using the syntax:
refresh
{AccessGroup
|Assembly
|FileServer
|FileSystem
|PhysicalDisk
|Repository
|Server
|StorageArray
|VirtualAppliance
}instance
For example:
OVM> refresh Repository name=MyRepository
For more information on the syntax and usage, see Section A.142, “refresh” .
7.3 Importing resources to a storage repository
7.3.1 Importing a virtual appliance
To import a virtual appliance to the storage repository, use the following syntax:
importVirtualAppliance
Repository
instance
url=
[
value
proxy=
]value
For example:
OVM> importVirtualAppliance Repository name=MyRepository url="http:////example.com//myvirtualappliance.ova"
For more information on the syntax and usage, see Section A.133, “importVirtualAppliance”.
7.3.2 Importing a virtual machine template
To import a virtual machine template to the storage repository, use the following syntax:
importTemplate
Repository
instance
url=
[
value
proxy=
]value
For example:
OVM> importTemplate Repository name=MyRepository url="http:////example.com//mytemplate.tgz"
For more information on the syntax and usage, see Section A.132, “importTemplate”.
7.3.3 Importing an ISO file
To import an ISO file to the storage repository, use the following syntax:
importVirtualCdrom
Repository
instance
url=
[
value
proxy=
]value
For example:
OVM> importVirtualCdrom Repository name=MyRepository url="http:////example.com//myiso.iso"
For more information on the syntax and usage, see Section A.134, “importVirtualCdrom”.