vinfra node disk assign
Add multiple disks to the storage cluster:
usage: vinfra node disk assign --disk <disk>:<role>[:<key=value,…>]
[--node <node>]
--disk <disk>:<role> [:<key=value,…>]-
Disk configuration in the format:
<disk>: disk device ID or name<role>: disk role (cs,mds,journal,mds-journal,mds-system,cs-system,system)- comma-separated
key=valuepairs with keys (optional):tier: disk tier (0, 1, 2 or 3)journal-tier: journal (cache) disk tier (0, 1, 2 or 3)journal-type: journal (cache) disk type (no_cache,inner_cacheorexternal_cache)journal-disk: journal (cache) disk ID or device namebind-address: bind IP address for the metadata service
Example:
sda:cs:tier=0,journal-type=inner_cache.
This option can be used multiple times. --node <node>- Node ID or hostname (default:
node001.vstoragedomain)
Example:
# vinfra node disk assign --disk sdc:cs --node f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4 +---------+--------------------------------------+ | Field | Value | +---------+--------------------------------------+ | task_id | 080337ba-0508-44a0-9363-eddcd9df9f0d | +---------+--------------------------------------+
This command creates a task to assign the role cs to the disk sdc on the node with the ID f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4
Task outcome:
# vinfra task show 080337ba-0508-44a0-9363-eddcd9df9f0d
+---------+-------------------------------------------------------------+
| Field | Value |
+---------+-------------------------------------------------------------+
| args | [] |
| kwargs | cluster_id: 1 |
| | disks: |
| | - id: D3BEF4BB-AA3B-4DB6-9376-BC7CDA636700 |
| | role: cs |
| | service_params: {} |
| | logger: |
| | __classname: backend.logger.tracer.TracingLogger |
| | __dict: |
| | prefix: POST /api/v2/1/nodes/f59dabdb-bd1c-<...>/disks/ |
| | token: '3215629651314950' |
| | node_id: f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4 |
| name | backend.tasks.disks.BulkAssignDiskTask |
| result | {} |
| state | success |
| task_id | 080337ba-0508-44a0-9363-eddcd9df9f0d |
+---------+-------------------------------------------------------------+