Skip to main content

Storage method fields and error codes

When to use​

When writing an integration or examining a response, you need to know the exact set of fields, parameter type, role level, VDC (virtual data center) boundary, and meaning of an error code. For step-by-step procedures, see the instructions for viewing pools and for dataset properties; for the model, see Storage pools.

Group summary​

MethodModeParametersAccessWhat it returns
pool-mapsynchronous, from the databasenoneCluster master, Resource Viewerpools grouped by node_id
pool-map-by-guidsynchronous, from the databasenonenot specified in the canonical API documentationpools grouped by guid, with capacity
pools-listasynchronous, relayednodeIdCluster masterpools served by the node, with ZFS properties
pools-getasynchronous, relayednodeId, nameCluster masterfull properties of one pool
filesystems-getasynchronous, relayedguidrole <= 2, own VDCdataset properties
filesystems-setasynchronous, relayedguid, propertiesrole <= 2, own VDCupdated dataset properties

Asynchronous methods respond twice: an intermediate {"message": "relayed"} and a final callback from the Storage agent.

Methods​

pool-map​

A cluster pool map grouped by node_id — the serving node's number. No parameters.

{"jsonrpc": "2.0", "method": "pool-map", "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

pool-map-by-guid​

A detailed cluster pool map grouped by guid. No parameters.

{"jsonrpc": "2.0", "method": "pool-map-by-guid", "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

pools-list​

A list of pools served by the node specified in nodeId.

ParameterTypeRequiredConstraints
nodeIdnumberyesrange 1–99
{"jsonrpc": "2.0", "method": "pools-list", "params": {"nodeId": 5}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

pools-get​

Detailed information about a pool served by the node specified in nodeId.

ParameterTypeRequiredConstraints
nodeIdnumberyesrange 1–99
namestringyespool name
{"jsonrpc": "2.0", "method": "pools-get", "params": {"nodeId": 5, "name": "pool-a"}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

filesystems-get​

ZFS file system properties by disk GUID.

ParameterTypeRequiredConstraints
guidstring | numberyeslength of at least 1, numeric value
{"jsonrpc": "2.0", "method": "filesystems-get", "params": {"guid": "12345"}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

filesystems-set​

Changes ZFS file system properties by disk GUID. Requires the filesystem_options feature to be enabled.

ParameterTypeRequiredConstraints
guidstring | numberyeslength of at least 1, numeric value
propertiesobjectyesobject containing the ZFS properties to change
{"jsonrpc": "2.0", "method": "filesystems-set", "params": {"guid": "12345", "properties": {"compression": "zstd"}}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

Pool map fields​

Both map methods respond from the vStack Center database. Their sets of fields differ — the columns show which method returns each field.

Fieldpool-mappool-map-by-guidMeaning
guidyesyespersistent pool identifier
nameyesyespool name
healthyesyespool state; ONLINE for a healthy pool
consumingyesyesthe cluster has accepted the pool for active data storage
capacity_pctyesyespool usage as a percentage
sizeyesyesusable capacity, excluding the portion allocated to redundancy
node_idyes—number of the node currently serving the pool
nodeid—yesthe same field without the underscore in its name
size_raw—yesraw capacity, the sum of pool disk capacities
used—yesspace used by data
free—yesremaining usable capacity
provisioned—yesthe sum of requested sizes of the pool's datasets
provisioned_pct—yesthe ratio of provisioned to usable capacity
scrubbing—yesan integrity check is in progress
resilvering—yesredundancy restoration is in progress
lif—yesthe network address at which the pool is accessible

The difference in the node field name (node_id versus nodeid) is a property of the responses, not a documentation typo: a client parsing both methods must recognize both names.

Live method response fields​

Node pools: pools-list​

The key in the data object is the pool name. Record fields:

allocated capacity checkpoint comment dedupditto dedupratio expandsize
fragmentation freeing guid health leaked nodeId readonly size

Key field meanings: allocated — space used, capacity — usage as a percentage, fragmentation — fragmentation as a percentage, dedupratio — deduplication ratio, expandsize — available expansion, readonly — read-only mode, freeing — space being freed, leaked — lost blocks.

Pool properties: pools-get​

The data object returns the full set of ZFS pool properties:

allocated altroot ashift autoexpand autoreplace autotrim bootfs cachefile
capacity checkpoint comment compatibility consuming dedupditto dedupratio
delegation expandsize failmode fragmentation free freeing guid health
leaked listsnapshots load_guid maxblocksize maxdnodesize multihost name
readonly resilvering scrubbing size tname version

These include the map fields plus properties of the pool itself: ashift — pool block size; autoexpand, autoreplace, autotrim — automatic expansion, disk replacement, and TRIM; failmode — failure behavior; version — pool version; load_guid — identifier of the current pool load.

Dataset properties: filesystems-get and filesystems-set​

The filesystems-get response contains fs_name — the full dataset name, such as pool-a/vm-100-disk-0 — and the properties object. In the filesystems-set response, the dispatcher removes fs_name, leaving only properties. The result.code field also differs. For filesystems-get, the dispatcher sets it to 1; for filesystems-set, the code comes from the Storage agent unchanged.

Fields in properties:

available checksum compression compressratio context copies createtxg
creation dedup defcontext encryption fscontext guid inconsistent keyformat
keylocation logbias logicalreferenced logicalused mlslabel objsetid
pbkdf2iters pbkdf2salt primarycache readonly redacted redundant_metadata
refcompressratio referenced refreservation reservation rootcontext
secondarycache snapdev snapshot_count snapshot_limit unique used
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots
useraccounting volblocksize volsize written

Fields most frequently examined:

FieldMeaning
volsizerequested volume size — what the guest system sees
volblocksizevolume block size
usedspace the dataset currently occupies in the pool
usedbydatasetthe portion of that space used by the data itself
usedbysnapshotsthe portion of that space retained by snapshots
snapshot_countnumber of dataset snapshots
snapshot_limitsnapshot count limit; -1 means no limit
logicaluseddata size before compression
compressioncompression algorithm, such as lz4 or zstd
compressratiogains from compression
dedupdataset deduplication
encryptiondataset encryption
availableremaining space available to the dataset
readonlyread-only mode
reservationreserved space
refreservationreservation for the dataset's own data

Error codes​

CodeMessageMethodsMeaning
-403Access deniedall methods in the groupinsufficient role level or a request for another VDC
-21database errorpool-mapthe dispatcher could not read the map from the database
-29Unable to obtain pool map datapool-map-by-guiddatabase error or no pools in the cluster
-23relay error textpools-listthe request was not sent to the node
-24nodeId is not present in the clusterpools-listno node with this number exists in the cluster
-25Pool is not present on the requested nodepools-listthe node responded without pool data
-33relay error textpools-getthe request was not sent to the node
-34nodeId is not present in the clusterpools-getno node with this number exists in the cluster
-35Pool is not present on the requested nodepools-getthe node responded without data for the pool
-57param guid has bad valuefilesystems-getinvalid guid or a relay failure
-58Dataset does not exist at users scopefilesystems-getthe dataset does not exist or belongs to another VDC
-53Unable to locate the datasetfilesystems-getthe dataset row in the dispatcher's database has an empty name
-54Unable to locate the pool of the datasetfilesystems-getthe dataset's pool has no serving node assigned
-86param guid has bad valuefilesystems-setinvalid guid or a relay failure
-87Filesystems methods has not been enabledfilesystems-setthe filesystem_options feature is disabled in the cluster
-88Dataset does not exist at users scopefilesystems-setthe dataset does not exist or belongs to another VDC
-83Unable to locate the datasetfilesystems-setthe dataset row in the dispatcher's database has an empty name
-84Unable to locate the pool of the datasetfilesystems-setthe dataset's pool has no serving node assigned

The parameter validator rejects an invalid nodeId. The client receives -32602 Invalid params before the request reaches the method handler.

Two pairs of codes each cover two different cases: -57 and -86 cover an invalid guid and a relay failure; -58 and -88 cover a missing dataset and a dataset belonging to another VDC. The latter pair is intentional: the existence of a dataset in another VDC is not disclosed.

UI column mapping​

The ZFS pools table on the Storage Resources tab reflects the pool map fields. The UI defines the exact column mapping; the fields below contain the corresponding values.

ColumnMap field
GUIDguid
Namename
Healthhealth
Consumingconsuming
Scrubbingscrubbing
Resilveringresilvering
Current nodenodeid
Capacity (RAW)size_raw and capacity_pct

Example​

An end-to-end sequence: retrieve the map, select a pool from it, and query its dataset properties.

{"jsonrpc": "2.0", "method": "pool-map-by-guid", "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

Take "nodeid": 5 and "name": "pool-a" from the response. Request the pool properties:

{"jsonrpc": "2.0", "method": "pools-get", "params": {"nodeId": 5, "name": "pool-a"}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

Then request the properties of a disk dataset in this pool:

{"jsonrpc": "2.0", "method": "filesystems-get", "params": {"guid": "12345"}, "id": "cbf4478c-84b5-45ac-97cd-0390d7190585"}

Expected result: in the final response, fs_name starts with pool-a/ — the dataset is indeed in the requested pool.