Show Table of Contents
4.18. storagedomain
storagedomain 资源类型是所有存储域资源在 Red Hat Virtualization 环境中的组合。
表 4.44. 存储域参数
| 名称 | 类型 | 描述 | 必需的 | 用户可创建 | 用户可更新 |
|---|---|---|---|---|---|
--name
|
字符串
|
存储域的名称。
|
否
|
是
|
是
|
--format
|
布尔值
|
数据中心的元数据格式,包括
v1、v2 或 v3。
|
是
|
是
|
否
|
--host-id|name
|
字符串
|
存储域进行初始化所在的主机。这个主机需要可以访问到指定的物理存储设备。
|
是
|
是
|
否
|
--storage-address
|
字符串
|
存储设备的 IP 地址和主机名。
|
是
|
是
|
否
|
--storage-logical_unit
|
集合
|
存储设备的逻辑单元信息。
|
参阅后面的信息
|
是
|
否
|
--storage-mount_options
|
字符串
|
挂载存储域的选项。
|
参阅后面的信息
|
是
|
否
|
--storage-override_luns
|
布尔值
|
指定是否覆盖逻辑单元号(logical unit number)。它的值只能是
true 或 false。
|
参阅后面的信息
|
是
|
否
|
--storage-path
|
字符串
|
存储设备上作为存储域使用的路径。
|
参阅后面的信息
|
是
|
否
|
--storage-type
|
字符串
|
用于数据中心的存储类型,其中包括
iscsi、fcp、nfs、glusterfs、localfs 和 posixfs。
|
是
|
是
|
否
|
--storage-vfs_type
|
字符串
|
定义存储域的文件系统类型。
|
参阅后面的信息
|
是
|
否
|
--type
|
字符串
|
存储域的类型,有效值包括
data、iso 和 export。
|
是
|
是
|
否
|
--storage-logical_unit 参数是一个使用下表中的子参数的集合。
表 4.45. storage-logical_unit 参数
| 名称 | 类型 | 描述 |
|---|---|---|
logical_unit.address
|
字符串
|
包括存储设备的服务器的地址。
|
logical_unit.port
|
整数
|
服务器的端口号。
|
logical_unit.target
|
字符串
|
存储设备的目标 IQN。
|
logical_unit.username
|
字符串
|
登录到一个目标的 CHAP 用户名。
|
logical_unit.password
|
字符串
|
登录到一个目标的 CHAP 密码。
|
logical_unit.serial
|
字符串
|
目标的序列 ID。
|
logical_unit.vendor_id
|
字符串
|
目标的厂商名。
|
logical_unit.product_id
|
字符串
|
目标的产品代码。
|
logical_unit.lun_mapping
|
整数
|
映射为目标的 LUN(Logical Unit Number) 设备。
|
logical_unit.portal
|
字符串
|
逻辑单元门户。
|
logical_unit.paths
|
整数
|
逻辑单元路径。
|
logical_unit.id
|
字符串
|
逻辑单元 ID 的标识。
|
根据
storage-type 的值使用以下参数。
表 4.46. 存储类型参数
| 类型 | 参数 |
|---|---|
nfs
| --storage-address、--storage-path
|
iscsi 或 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
|
下表列出了基于资源的命令中的
storagedomain 选项。
表 4.47. 额外的命令选项
| 选项 | 描述 |
|---|---|
--datacenter-identifier | 把存储域添加到一个 datacenter 作为一个子资源。 |
例 4.36. 创建一个新的存储域
[RHEVM shell (connected)]# add storagedomain --name DataStorage --datacenter-name Default -type data
例 4.37. 添加 gluster 存储域
[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
例 4.38. 更新一个存储域
[RHEVM shell (connected)]# update storagedomain DataStorage --name DataStorageOld
例 4.39. 删除一个存储域
[RHEVM shell (connected)]# remove storagedomain DataStorage
下表列出了针对存储域资源的操作。
表 4.48. 存储域操作
| 操作 | 描述 |
|---|---|
activate | 在数据中心中激活一个存储域。 |
deactivate | 在数据中心中取消激活存储域。 |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.