mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
83 lines
4.1 KiB
ReStructuredText
83 lines
4.1 KiB
ReStructuredText
.. _zfs:
|
|
|
|
zfs
|
|
***
|
|
|
|
The zfs class is used to manage and retrieve information about ZFS pools.
|
|
|
|
Every zfs class request contains the following parameters:
|
|
|
|
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
|
| **Parameter** | **Value** | **Description** |
|
|
| | | |
|
|
+=================================+===============+======================================================================================================================+
|
|
| id | | any unique value for the request; examples include a hash, checksum, or uuid |
|
|
| | | |
|
|
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
|
| name | zfs | |
|
|
| | | |
|
|
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
|
| namespace | sysadm | |
|
|
| | | |
|
|
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
|
| action | | supported actions include "list_pools" |
|
|
| | | |
|
|
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
|
|
|
|
The rest of this section provides examples of the available *actions* for each type of request, along with their responses.
|
|
|
|
.. index:: list_pools, zfs
|
|
|
|
.. _List Pools:
|
|
|
|
List Pools
|
|
==========
|
|
|
|
The "list_pools" action lists pool information. For each ZFS pool, the response includes the pool name, the amount of space that has been physically allocated, whether or not an alternate
|
|
root has been defined, capacity (percent used), the deduplication ratio, amount of uninitialized space (expandsz, which usually applies to LUNs), percentage of fragmentation, amount of free
|
|
space, pool health, and total size. This action is the equivalent of running :command:`zpool list` from the command line.
|
|
|
|
**REST Request**
|
|
|
|
.. code-block:: json
|
|
|
|
PUT /sysadm/zfs
|
|
{
|
|
"action" : "list_pools"
|
|
}
|
|
|
|
**WebSocket Request**
|
|
|
|
.. code-block:: json
|
|
|
|
{
|
|
"namespace" : "sysadm",
|
|
"args" : {
|
|
"action" : "list_pools"
|
|
},
|
|
"name" : "zfs",
|
|
"id" : "fooid"
|
|
}
|
|
|
|
**Response**
|
|
|
|
.. code-block:: json
|
|
|
|
{
|
|
"args": {
|
|
"tank": {
|
|
"alloc": "71.8G",
|
|
"altroot": "-",
|
|
"cap": "32%",
|
|
"dedup": "1.00x",
|
|
"expandsz": "-",
|
|
"frag": "18%",
|
|
"free": "148G",
|
|
"health": "ONLINE",
|
|
"size": "220G"
|
|
}
|
|
},
|
|
"id": "fooid",
|
|
"name": "response",
|
|
"namespace": "sysadm"
|
|
} |