添加新的存储域。
创建新 StorageDomain 需要 名称
,type
,host
and storage
属性。使用 id
或 name
属性来识别 host
属性。在 oVirt 3.6 及之后的版本中,您可以在存储域上默认启用 wipe after delete 选项。要配置此功能,请在 POST 请求中指定 wipe_after_delete
。可以在创建域后编辑此选项,但是这样做不会在删除已存在的磁盘属性后更改擦除。
要添加 具有指定名称
的新存储域,请键入、storage.type
、storage.address
和 storage.path
,并使用 ID 为 123
的主机,发送如下请求:
POST /ovirt-engine/api/storagedomains
POST /ovirt-engine/api/storagedomains
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
使用请求正文,如下所示:
<storage_domain>
<name>mydata</name>
<type>data</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/exports/mydata</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
<storage_domain>
<name>mydata</name>
<type>data</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/exports/mydata</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
要创建新的 NFS ISO 存储域,请发送如下请求:
<storage_domain>
<name>myisos</name>
<type>iso</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/export/myisos</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
<storage_domain>
<name>myisos</name>
<type>iso</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/export/myisos</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
要创建新的 iSCSI 存储域,请发送如下请求:
<storage_domain>
<name>myiscsi</name>
<type>data</type>
<storage>
<type>iscsi</type>
<logical_units>
<logical_unit id="3600144f09dbd050000004eedbd340001"/>
<logical_unit id="3600144f09dbd050000004eedbd340002"/>
</logical_units>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
<storage_domain>
<name>myiscsi</name>
<type>data</type>
<storage>
<type>iscsi</type>
<logical_units>
<logical_unit id="3600144f09dbd050000004eedbd340001"/>
<logical_unit id="3600144f09dbd050000004eedbd340002"/>
</logical_units>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow