Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

4.18. storagedomain

The storagedomain resource type groups all storage domain resources in a Red Hat Virtualization environment.

Table 4.44. Storage domain parameters

Name Type Description Required User Creatable User Updatable
--name
string
The name of the storage domain.
No
Yes
Yes
--format
Boolean
The metadata format for the data center, including v1, v2 or v3.
Yes
Yes
No
--host-id|name
string
A reference to the host from which this storage domain should be initialized. The only restriction on this host is that it should have access to the physical storage specified.
Yes
Yes
No
--storage-address
string
The IP address or hostname of the storage device.
Yes
Yes
No
--storage-logical_unit
collection
The logical unit information of the storage device.
See below
Yes
No
--storage-mount_options
string
The options for mounting the storage domain.
See below
Yes
No
--storage-override_luns
Boolean
Defines whether to override the logical unit number. The status is either true or false.
See below
Yes
No
--storage-path
string
The path on the storage device to use for the storage domain.
See below
Yes
No
--storage-type
string
The type of storage for the data center, including iscsi, fcp, nfs, glusterfs, localfs or posixfs.
Yes
Yes
No
--storage-vfs_type
string
Defines the file system type of the storage domain.
See below
Yes
No
--type
string
The type of storage domain, including data, iso and export.
Yes
Yes
No
The --storage-logical_unit parameter is a collection that requires all sub-parameters in the following table.

Table 4.45. storage-logical_unit parameters

Name Type Description
logical_unit.address
string
The address of the server containing the storage device.
logical_unit.port
integer
The port number of the server.
logical_unit.target
string
The target IQN for the storage device.
logical_unit.username
string
A CHAP user name for logging into a target.
logical_unit.password
string
A CHAP password for logging into a target.
logical_unit.serial
string
The serial ID for the target.
logical_unit.vendor_id
string
The vendor name for the target.
logical_unit.product_id
string
The product code for the target.
logical_unit.lun_mapping
integer
The Logical Unit Number device mapping for the target.
logical_unit.portal
string
The logical unit portal.
logical_unit.paths
integer
The logical unit paths.
logical_unit.id
string
A reference to the logical unit ID.
Use the following parameters depending on storage-type.

Table 4.46. Storage type parameters

Type Parameters
nfs
--storage-address, --storage-path
iscsi or fcp
--storage-address, --storage-logical_unit, --storage-override_luns
glusterfs
--storage-address, --storage-path, --storage-vfs_type
local
--storage-path
posixfs
--storage-path, --storage-vfs_type, --storage-address, --storage-mount_options
The following table lists additional storagedomain options for resource-based commands.

Table 4.47. Additional command options

Option Description
--datacenter-identifier Adds the storage domain to a datacenter as a sub-resource.

Example 4.36. Creating a new storage domain

[RHEVM shell (connected)]# add storagedomain --name DataStorage --datacenter-name Default -type data

Example 4.37. Adding a gluster storage domain

[RHEVM shell (connected)]# add storagedomain --type data --storage-type glusterfs --name RHS_01 --storage-address 192.0.2.0 --storage-path Vol_ONE --storage-vfs_type glusterfs

Example 4.38. Updating a storage domain

[RHEVM shell (connected)]# update storagedomain DataStorage --name DataStorageOld

Example 4.39. Deleting a storage domain

[RHEVM shell (connected)]# remove storagedomain DataStorage
The following table lists actions for a storage domain resource.

Table 4.48. Storage domain actions

Action Description
activate Activate a storage domain on a data center.
deactivate Deactivate a storage domain on a data center.