Storage domains
Where block volumes are placed. API v2.10. The key needs storage access.
What a caller can see
A storage domain is a placement pool: datacentres, VM hosts, and volume groups. List and get return domains you can use or manage. Manage (create, update, delete, membership) requires you to own the domain. A host you add must be in a datacentre the domain already covers (or a paired datacentre, for the first extra site).
Post to https://api.rackcorp.net/api/rest/v2.10/json.php.
Host pool bytes for capacity planning are vmhstorage, not this page.
Domain
| Command | Parameters |
|---|---|
storage.domain.getall | Optional deviceId (only domains usable for that VM), medium (SSD, HDD, NVME), includeDisabled (true includes disabled domains you can manage). |
storage.domain.get | storageDomainId or id. |
storage.domain.create | name required. Optional customerId (owner, default the caller), code (generated from the name), notes, inherit (default Y), storageMode STANDALONE or HIGH_AVAILABILITY, placementPolicy FASTEST or MAX_AVAILABILITY, clustering DRBD or IOENGINE, backing LVM (default) or ZFS, replicaIntervalMin (HA ZFS: 15, 30, or 60), volumeGroups for LVM, deviceIds for ZFS, dcIds when not implied by the groups. |
storage.domain.update | storageDomainId. Any of name, code, notes, inherit, enabled, customerId, storageMode, placementPolicy (alias placementStrategy), clustering, backing, replicaIntervalMin, dcIds, volumeGroups. Sending volumeGroups on an LVM domain replaces the allowlist. |
storage.domain.delete | storageDomainId. Refused while the domain has active volumes or member hosts. |
MAX_AVAILABILITY is only valid on HIGH_AVAILABILITY, and that combination needs members in at least two datacentres.
Standalone domains are coerced to FASTEST.
A domain object includes id, code, name, customerId, enabled, inherit, storageMode, placementPolicy, clustering, backing, replicaIntervalMin, dcIds, dcs, hostCount, and typeAvailability.
getall also returns localStorageOnly, localHostDeviceId, and localHostInAccount when you passed deviceId.
{
"cmd": "storage.domain.create",
"name": "syd-ha",
"storageMode": "HIGH_AVAILABILITY",
"placementPolicy": "FASTEST",
"backing": "LVM",
"volumeGroups": [
{"deviceId": 1001, "volGroupName": "vg_data"}
]
}Hosts
| Command | Parameters |
|---|---|
storage.domain.hosts.get | storageDomainId |
storage.domain.hosts.add | storageDomainId, deviceId. Optional childrenAvailable or inherit (Y/N, default Y), storageIp, ioEngineVersion. |
storage.domain.hosts.update | storageDomainId, deviceId. Optional childrenAvailable, storageIp (empty clears it), placementMode ACTIVE or DRAIN (NORMAL is accepted as active). |
storage.domain.hosts.remove | storageDomainId, deviceId |
childrenAvailable: N keeps the host in the domain but hides it from child customers. DRAIN stops new placements on that host.
Volume groups
| Command | Parameters |
|---|---|
storage.domain.volgroups.get | storageDomainId |
storage.domain.volgroups.add | storageDomainId, deviceId, volGroupName (or name). The group must already be reported by that host. Adding the group also joins the host. |
storage.domain.volgroups.remove | storageDomainId, deviceId, volGroupName |
storage.domain.volgroups.candidates.get | storageDomainId. Volume groups you can add. Once the domain has a datacentre, only that datacentre and its paired datacentres are listed. |
storage.volgroups.accessible.get | Optional medium (SSD, HDD, NVME) and deviceId (limit to that VM's datacentre and paired datacentres). |
Placement options
storage.domain.placementoptions.get is what a volume create screen uses.
Required: storageDomainId. medium defaults to SSD and must be SSD, HDD, or NVME.
Optional deviceId checks that the VM's datacentre is in the domain.
The domain's storageMode and placementPolicy decide the targets. You do not pick a strategy separately from the domain.
storage.domain.devices.get lists member hosts you can place on.
Required: storageDomainId. medium defaults to SSD (HDD or NVME otherwise).
allMedia: true, or medium: "ALL", returns every medium.