Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

4.18. storagedomain

storagedomain 资源类型对 Red Hat Virtualization 环境中的所有存储域资源进行分组。

表 4.44. 存储域参数

名称 类型 Description 必填 用户 Creatable User Updatable
--name
字符串
存储域的名称。
--format
布尔值
数据中心的元数据格式,包括 v1、v 2v3
--host-id|name
字符串
对应从中初始化此存储域的主机的引用。此主机的唯一限制是它应当有权访问指定的物理存储。
--storage-address
字符串
存储设备的 IP 地址或主机名。
--storage-logical_unit
集合
存储设备的逻辑单元信息。
请参见以下
--storage-mount_options
字符串
挂载存储域的选项。
请参见以下
--storage-override_luns
布尔值
定义是否覆盖逻辑单元号。状态可以是 truefalse
请参见以下
--storage-path
字符串
用于存储域的存储设备的路径。
请参见以下
--storage-type
字符串
数据中心的存储类型,包括 iscsifcpnfsglusterfslocalfsposixfs
--storage-vfs_type
字符串
定义存储域的文件系统类型。
请参见以下
--type
字符串
存储域的类型,包括 数据isoexport
--storage-logical_unit 参数是需要下表中所有子参数的集合。

表 4.45. storage-logical_unit parameters

名称 类型 Description
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
整数
目标的逻辑单元号设备映射。
logical_unit.portal
字符串
逻辑单元门户。
logical_unit.paths
整数
逻辑单元路径。
logical_unit.id
字符串
逻辑单元 ID 的引用。
根据 存储类型,使用以下参数:

表 4.46. 存储类型参数

类型 参数
nfs
--storage-address, --storage-path
iSCSIfcp
--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. 附加命令选项

选项 Description
--datacenter-identifier 将存储域作为 子资源添加到数据中心

例 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. 存储域操作

操作 Description
激活 在数据中心上激活存储域。
deactivate 取消激活数据中心上的存储域。