VOLUME.ADMIN SET-STATUS
Changes the operational status of a named volume.
Syntax
Section titled “Syntax”VOLUME.ADMIN SET-STATUS <volume-name> <status>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
volume-name | string | Name of the volume to update, in <kind>-shard-<id> format (e.g. bucket-shard-0) |
status | string | New operational status: READWRITE, READONLY, or INOPERABLE (case-insensitive) |
Return Value
Section titled “Return Value”Simple string OK on success.
Behavior
Section titled “Behavior”Persists the new status. The status input is converted to uppercase before validation.
It does not require cluster initialization. It is available on the management port (default 3320).
Errors
Section titled “Errors”Argument errors:
| Error Code | Error message | Cause |
|---|---|---|
ERR | invalid number of parameters | - |
ERR | Unknown volume status: '<value>' | - |
Volume errors:
| Error Code | Error message | Cause |
|---|---|---|
ERR | Volume: '<name>' is not open | No volume with that name is managed by this member. |
Examples
Section titled “Examples”Set a volume to read-only:
127.0.0.1:3320> VOLUME.ADMIN SET-STATUS bucket-shard-0 READONLYOKVerify via DESCRIBE:
127.0.0.1:3320> VOLUME.ADMIN DESCRIBE bucket-shard-01# "name" => "bucket-shard-0"2# "status" => "READONLY"3# "data_dir" => "/tmp/kronotop/data/bucket-shard-0"4# "segment_size" => (integer) 2684354565# "segments" => 1# (integer) 0 => 1# "size" => (integer) 268435456 2# "free_bytes" => (integer) 268435200 3# "used_bytes" => (integer) 256 4# "garbage_percentage" => (double) 0.0 5# "cardinality" => (integer) 1Invalid status value:
127.0.0.1:3320> VOLUME.ADMIN SET-STATUS bucket-shard-0 INVALID(error) ERR Unknown volume status: 'INVALID'Volume not found:
127.0.0.1:3320> VOLUME.ADMIN SET-STATUS non-existent-volume READONLY(error) ERR Volume: 'non-existent-volume' is not open