5. Managing Storage¶
Robin discovers disks attached to the nodes and uses them for providing storage to applications. This applies to local disks, cloud volumes, and SAN stoage that are available to nodes which have the storage role assigned to them. During the process Robin collects all the required metadata about the disks and identifies them as HDD, SSD or NVMes. All the elligible disks (this excludes disks with parititions and/or without WWNs) are marked as Robin storage.
Cloud volumes like EBS volumes on AWS and Persistent disks on GCP are not physically tied to a cloud compute instance.
They can be detached from one cloud compute instance and attached to another instance at any time. Logical Units from a
Storage Array Network can similarly be visible from multiple physical servers in the same storage fabric or network. Robin
assigns a primary host for these devices and ensures that all IO access to a device only happens through one server at a
given time. As with local disks, these devices are automatically discovered by Robin and registered. However they are considered
to be re-attachable
given their properties. Robin makes sure these re-attachable disks are always accessible even in the event of node failure.
When a node goes down, Robin detaches the disk from failed node and attaches it to a healthy node so that application data remains accessible.
Note
Whilst installing if it is known that certain disks will not have a WWN, the --set-uuid
option can be provided via the installer alongside a list of disks on which there is no WWN. This in turn will result in Robin stamping a UUID on the disk and thus enabling it to be used as Robin storage.
Robin allows multiple operations, detailed below, to be performed on registered disks.
|
Attach an existing disk |
|
Detach a registered disk |
|
Provision and attach a cloud disk |
|
List disks |
|
Display detailed information about a disk |
|
Evacuate allocations off a disk |
|
Unregister a disk |
|
Delete a disk |
|
Update the attributes of a disk |
|
Unfault a disk |
5.1. Attaching a disk¶
If a disk was previously detached from a host due to the host undergoing decommissioning or to rebalance the storage available on the cluster one will need to attach the disk back to another host in the cluster. Issue the following command to do so:
Note
This command is only for supported for re-attachable
disks. Moreover if a host became unreachable Robin will automatically detach the disk and choose a new server to reattach it to based on the accessibility of the disk and the load on the other servers.
# robin disk attach <wwn>
--hostname <hostname>
--force
--mount-path <mount_path>
|
WWN of disk to attach |
|
Name of host to attach disk to. Note this is a mandatory parameter. |
|
Forcibly re-attach a disk that is already ONLINE |
|
Specify the mount path of the disk to be attached. Note this option is only valid for AWS disks and the specified path must start with ‘/dev/sd’. |
Example:
# robin disk detach 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --wait
Job: 187 Name: DiskAttach State: VALIDATED Error: 0
Job: 187 Name: DiskAttach State: WAITING Error: 0
Job: 187 Name: DiskAttach State: FINALIZED Error: 0
Job: 187 Name: DiskAttach State: COMPLETED Error: 0
Attaches a disk, which might have previously been detached due to the host undergoing decommissioning or a rebalancing of storage disks, to a particular host.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: PUT
URL Parameters: None
Data Parameters:
action: attach
- This mandatory field within the payload specifies that the attach operation is to be performed.hostname: <hostname>
- Utilizing this parameter results in the disk being attached to the specified host.force: true
- Utilizing this parameter enables one to force re-attach an ONLINE disk.mount_path: <mount_path>
- Utilizing this parameter results in the given disk being mounted at the path specified. Note this option is only valid for AWS disks and the specified path must start with ‘/dev/sd’.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 128
}
5.2. Detaching a disk¶
If a physical host is temporarily or permanently taken down and one can detach its storage disks to ensure future access. Issue the following command to do so:
Note
This command is only for supported for re-attachable
disks.
# robin disk detach <wwn>
--hostname <hostname>
--force
|
WWN of disk to detach |
|
Name of host to which disk is attached to. Note this is an optional parameter |
|
Forcibly detach a disk that is currently ONLINE |
Example:
# robin disk detach 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --wait
Job: 187 Name: DiskDetach State: VALIDATED Error: 0
Job: 187 Name: DiskDetach State: WAITING Error: 0
Job: 187 Name: DiskDetach State: FINALIZED Error: 0
Job: 187 Name: DiskDetach State: COMPLETED Error: 0
Detaches a disk from a host.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: PUT
URL Parameters: None
Data Parameters:
action: detach
- This mandatory field within the payload specifies that the detach operation is to be performed.hostname: <hostname>
- Utilizing this parameter results in the disk being detached from the specified host. This is optional as the host to which the disk is attached can be discovered implicitly.force: true
- Utilizing this parameter enables one to force detach an ONLINE disk.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 130
}
5.3. Provisioning a disk¶
Robin provides a utility through which it can provision disks of any size, attach them to hosts and discover them automatically on multiple cloud platforms. This enables users to expand the storage available for their cluster with convenience and ease.
Detailed below are the general options for the robin drive create
command, followed by specific examples for each supported cloud environment.
# robin disk create <hostname>
--type <type>
--number <number>
--size <size>
--iops <iops>
--mount-path <mount_path>
|
Name of host to attach disk to after creation |
|
Type of disks. Choices for GCP include: pd-ssd, pd-standard. Choices for AWS include: gp2, io1, st1. Choices for Anthos include: independent-persistent. Choices for Azure include: premium, standard. |
|
Number of disks to be created. The default value is 1 |
|
Size of disk to be created in GB. The default value is 500 GB |
|
IOPs for AWS ‘io1’ disk type. Can be between 100-160000 |
|
Specify the mount path of the disk to be created. Note this option is only valid for AWS disks and the specified path must start with ‘/dev/sd’. |
Provisions disks of any size, attaches and discovers them automatically on cloud based nodes.
End Point: /api/v3/robin_server/disks/
Method: POST
URL Parameters: None
Data Parameters:
hostname: <hostname>
- This mandatory field within the payload specifies the host to which the provisioned disk should be attached.type: <disk_type>
- This mandatory field within the payload specifies the type of disk to be created. Supported types include: pd-ssd, pd-standard (for GCP); gp2, io1, st1 (for AWS); independent-persistent (for Anthos).number: <num_of_disks>
- This mandatory field within the payload specifies the number of disks to be created. It should be an integer value.size: <size_of_disk>
- This mandatory field within the payload specifies the size of the disks to be created. It should be a string. An example value is ‘200GB’.iops: <iops_of_disk>
- Utilizing this parameter results in disks that can handle a maximum number of IOPs equal to <iops_of_disks> being created. Note this parameter is only valid for the ‘io1’ disk type for AWS nodes.mount_path: <mount_path>
- Utilizing this parameter results in disk(s) created being mounted at the paths specified. Note this option is only valid for AWS disks and the specified path must start with ‘/dev/sd’.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 196
}
5.3.1. Disk Provisioning On GCP¶
On Google Cloud Platform, you can attach disks to your instance via the UI or Google APIs and have them discovered by Robin by running the below command:
$ robin host probe <hostname> --rediscover
In order to verify the disk has been properly detected run the following command:
# robin disk list
Finally in order to format and initialize the disk such that it is available for use by Robin, issue the following command:
# robin host add-role <hostname> storage
Note
The hostname
parameter in the example commands above refer the hostname of the node where the disk is attached.
On the other hand you can utilize Robin to provision disks in GCP to use for application deployment. To create 100 GB disk in GCP, run following command:
$ robin disk create <hostname> --type <pd-standard | pd-ssd> --size 100
These disks will be attached automatically and auto discovered by Robin so they will be ready to use straightaway.
Note
Due to Robin’s advanced feature to make sure disks are always accessible, it needs the manage disks permission to be selected while deploying cluster on GCP.
5.3.2. Disk Provisioning On Google Anthos¶
On the Google Anthos platform, you can add disks to cluster VMs from vSphere and have them discovered by Robin by running the below command:
$ robin host probe <hostname> --rediscover
In order to verify the disk has been properly detected run the following command:
# robin disk list
Finally in order to format and initialize the disk such that it is available for use by Robin, issue the following command:
# robin host add-role <hostname> storage
Note
The hostname
parameter in the example commands above refer the hostname of the node where the disk is attached.
On the other hand you can utilize Robin to provision virtual disks to use for application deployment. To create 100 GB disk for Anthos, run following command:
$ robin disk create <hostname> --type independent-persistent --size 100
These disks will be attached automatically and auto discovered by Robin so they will be ready to use straightaway.
Note
Due to Robin’s advanced feature to make sure disks are always accessible, it needs credentials, provided via Kubernetes secret, to have all cluster and disk level API privileges.
5.3.3. Disk Provisioning On AWS¶
On AWS, you can attach disks to your EC2 instance via the UI or AWS CLI/APIs and have them discovered by Robin by running the below command:
$ robin host probe <hostname> --rediscover
In order to verify the disk has been properly detected run the following command:
# robin disk list
Finally in order to format and initialize the disk such that it is available for use by Robin, issue the following command:
# robin host add-role <hostname> storage
Note
The hostname
parameter in the example commands above refer the hostname of the node where the disk is attached.
On the other hand you can utilize Robin to provision disks in AWS to use for application deployment. To create 100 GB disk in AWS, run following command:
$ robin disk create <hostname> --type <gp2 | io1 | st1> --size 100
These disks will be attached automatically to the EC2 instances and auto discovered by Robin so they will be ready to use straightaway.
Note
Due to Robin’s advanced feature to make sure disks are always accessible, IAM Profiles associated with the host (or permissions granted to a user) must contain all Volume write and list actions.
5.3.4. Disk Provisioning On Azure¶
On Azure, you can attach disks to your Azure Virtual Machines via the UI or Azure CLI/APIs and have them discovered by Robin by running the below command:
$ robin host probe <hostname> --rediscover
In order to verify the disk has been properly detected run the following command:
# robin disk list
Finally in order to format and initialize the disk such that it is available for use by Robin, issue the following command:
# robin host add-role <hostname> storage
Note
The hostname
parameter in the example commands above refer the hostname of the node where the disk is attached.
On the other hand you can utilize Robin to provision disks in Azure to use for application deployment. To create 100 GB disk in Azure, run following command:
$ robin disk create <hostname> --type <premium | standard> --size 100
These disks will be attached automatically to the Azure Virtual Machines and auto discovered by Robin so they will be ready to use straightaway.
Note
Due to Robin’s advanced feature to make sure disks are always accessible, the Azure role(s) assigned to the user, whom the deployed virtual machines are associated with, must allow for management of data disks.
5.4. Listing all disks¶
In order to view all disks currently present on the cluster and some additional details such as the number of volumes allocated from each, their size, media type etc, issue the following command:
# robin disk list --host <hostname>
--role <role>
--media <media>
--reattachable
--eligible
--tags
|
Filter list by hostname |
|
Filter list by role. Valid choices include: all, storage, rootdisk and reserved |
|
Filter list by media type. Valid choices include: HDD and SSD |
|
Filter list to only display reattachable disks |
|
Filter list to only display disks that have free capacity and have not reached the maximum volume count |
|
Display tags for each disk |
Example:
# robin disk list
ID | WWN | Host | RPool | Path /dev/disk/by-id | Size(GB) | Movable | Type | Free/Max(GB) | Vols | Role | Status | LastOpr | Write Unit
---+-------------------------------------------+---------+---------+-----------------------------------------------+----------+---------+------+--------------+------+---------+--------+---------+---------
1 | 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b | vnode36 | default | scsi-0QEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b | 50 | N | HDD | 38/38 (100%) | 0/10 | Storage | ONLINE | READY | 512
2 | 0xQEMU_QEMU_HARDDISK_f12b1f33-8b71-4a8c-a | vnode36 | default | scsi-0QEMU_QEMU_HARDDISK_f12b1f33-8b71-4a8c-a | 50 | N | HDD | 28/38 (74%) | 1/10 | Storage | ONLINE | READY | 512
3 | 0xQEMU_QEMU_HARDDISK_e54d6149-0a4e-48ce-b | vnode88 | default | scsi-0QEMU_QEMU_HARDDISK_e54d6149-0a4e-48ce-b | 100 | N | HDD | 77/77 (100%) | 0/10 | Storage | ONLINE | READY | 4096
4 | 0xQEMU_QEMU_HARDDISK_89fc0488-2050-4f44-a | vnode88 | default | scsi-0QEMU_QEMU_HARDDISK_89fc0488-2050-4f44-a | 100 | N | HDD | 63/77 (82%) | 2/10 | Storage | ONLINE | READY | 4096
5 | 0xQEMU_QEMU_HARDDISK_19f9ac67-5e7e-4f00-8 | vnode89 | default | scsi-0QEMU_QEMU_HARDDISK_19f9ac67-5e7e-4f00-8 | 100 | N | HDD | 77/77 (100%) | 0/10 | Storage | ONLINE | READY | 4096
6 | 0xQEMU_QEMU_HARDDISK_d523b7f2-eba7-4edc-b | vnode89 | default | scsi-0QEMU_QEMU_HARDDISK_d523b7f2-eba7-4edc-b | 100 | N | HDD | 77/77 (100%) | 0/10 | Storage | ONLINE | READY | 4096
Only storage disks are shown. Issue `robin disk list --role all` to view all disks
Returns all disks currently present on the cluster and some additional details such as the number of volumes allocated from each, their size, and media type.
End Point: /api/v5/robin_server/disks
Method: GET
URL Parameters:
details=tags
: Utilizing this parameter results in tag information for each disk being present in the response payload.host=<hostname>
: Utilizing this parameter results in only disks attached to the specified host being returned.
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 200
Error Response Code: 500 (Internal Server Error)
Example Response:
Output
{
"items":[
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"READY",
"type":"HDD",
"nvols":3,
"dev":"\/dev\/sdb",
"aslices":7,
"stormgrid":1,
"pused":234881024,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":77,
"role":"Storage",
"wwn":"0x600224804c48fd7e16c608dea0919064",
"status":"ONLINE",
"free_alloc_slices":68,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
"alloc_slices":9,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":6390,
"capacity":107374182400,
"rpool": "default",
"pfree":104287174656
},
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"READY",
"type":"HDD",
"nvols":1,
"dev":"\/dev\/sdc",
"aslices":20,
"stormgrid":2,
"pused":939524096,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":77,
"role":"Storage",
"wwn":"0x600224803bcdafde95b1f5cd27ceb5fb",
"status":"ONLINE",
"free_alloc_slices":53,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/scsi-3600224803bcdafde95b1f5cd27ceb5fb",
"alloc_slices":24,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":6390,
"capacity":107374182400,
"rpool": "default",
"pfree":103582531584
},
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"INIT",
"type":"HDD",
"nvols":0,
"dev":"\/dev\/dm-1",
"aslices":0,
"stormgrid":0,
"pused":0,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":5,
"role":"RootDisk",
"wwn":"0x600224801d3ac9b6650afd3280aa5898-centos-swap",
"status":"UNKNOWN",
"free_alloc_slices":5,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/dm-uuid-LVM-vI83PDTxV3H0dWyAXfH5ef7rxTOuYyphaFy4aq3EUo1yluonS8FG0LF16ycBrdEw",
"alloc_slices":0,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":0,
"capacity":8254390272,
"rpool": "default",
"pfree":0
},
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"INIT",
"type":"HDD",
"nvols":0,
"dev":"\/dev\/dm-0",
"aslices":0,
"stormgrid":0,
"pused":0,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":38,
"role":"RootDisk",
"wwn":"0x600224801d3ac9b6650afd3280aa5898-centos-root",
"status":"UNKNOWN",
"free_alloc_slices":38,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/dm-uuid-LVM-vI83PDTxV3H0dWyAXfH5ef7rxTOuYyphgpZcvqGdfOKaXbEbOZzNthc6btsoSXDj",
"alloc_slices":0,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":0,
"capacity":53687091200,
"rpool": "default",
"pfree":0
},
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"INIT",
"type":"HDD",
"nvols":0,
"dev":"\/dev\/dm-2",
"aslices":0,
"stormgrid":0,
"pused":0,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":32,
"role":"RootDisk",
"wwn":"0x600224801d3ac9b6650afd3280aa5898-centos-home",
"status":"UNKNOWN",
"free_alloc_slices":32,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/dm-uuid-LVM-vI83PDTxV3H0dWyAXfH5ef7rxTOuYyphQObDlS6eMUSpSxH5zsvyg9I5a0Gpuj5W",
"alloc_slices":0,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":0,
"capacity":44350570496,
"rpool": "default",
"pfree":0
},
{
"node_hostname":"cscale-82-140.robinsystems.com",
"spf":0.8,
"state":"INIT",
"type":"HDD",
"nvols":0,
"dev":"\/dev\/sda",
"aslices":0,
"stormgrid":0,
"pused":0,
"nodeid":1,
"maintenance_mode":"DISABLED",
"availability_zone":null,
"max_alloc_slices":77,
"role":"RootDisk",
"wwn":"0x600224801d3ac9b6650afd3280aa5898",
"status":"UNKNOWN",
"free_alloc_slices":77,
"lused_size":0,
"devpath":"\/dev\/disk\/by-id\/scsi-3600224801d3ac9b6650afd3280aa5898",
"alloc_slices":0,
"reattachable":0,
"max_volumes_per_disk":10,
"protected":0,
"slices":0,
"capacity":107374182400,
"rpool": "default",
"pfree":0
}
]
}
5.5. Show information about a specific disk¶
In order to view detailed information about a disk such as the breakdown of its available capacity, current allocations including the associated applications, write unit etc, issue the following command:
# robin disk info <wwn>
|
WWN of disk to detach |
Example:
# robin disk info 0xQEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8
Drive: 0xQEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8
Id: 2
Role: Storage
Type: HDD
Make: None
Model: None
Write Unit: 512
Availability Zone: None
Zone Id: 1613675775
Path: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8
Node: vnode-95-28.robinsystems.com
Protected: No
Reattachable: No
State: READY
Status: MAINTENANCE
Maintenance: ON
Allocations:
Current: 15G
Maximum: 38G
Free: 23G
Capacity: 50G
Factor: 30%
AllocScore: 83
Physical Usage: 0.16G
Physical Free: 48G
Volumes: 3
Max volumes: 10
Max latency volumes: 2
Max throughput volumes: 1
Applications: 3
file-collection-1613696655681
Instance: file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2
Id | Volume Name | Workload | Size (GB) | Allocated (GB)
--------+--------------------------------------------------------------------+----------+----------------+----------------
1 | file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2 | ordinary | 5 | 5
pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d
Instance: pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d
Id | Volume Name | Workload | Size (GB) | Allocated (GB)
---------+------------------------------------------+----------+----------------+----------------
21 | pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d | ordinary | 5 | 5
Returns detailed information about a disk such as the breakdown of its available capacity, current allocations including the associated applications and write unit.
End Point: /api/v3/robin_server/disks/<wwn>
Method: GET
URL Parameters: None
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 200
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error)
Example Response:
Output
{
"items":[
{
"wwn":"0xQEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8",
"dev":"\/dev\/sdb",
"make":null,
"model":null,
"devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8",
"capacity":53687091200,
"type":"HDD",
"role":"Storage",
"state":"READY",
"status":"MAINTENANCE",
"maintenance_mode":"ON",
"alloc_score":83,
"slices":3190,
"aslices":15,
"pused":167772160,
"pfree":51774488576,
"nodeid":1,
"stormgrid":2,
"reattachable":0,
"protected":0,
"availability_zone":null,
"node_hostname":"vnode-95-28.robinsystems.com",
"reattachable_nodes":[
[
"vnode-95-28.robinsystems.com",
"ONLINE"
]
],
"reattachpolicy":{
"id":2,
"burst_start_time":0,
"burst_count":0,
"burst_interval":600,
"restart_limit":5,
"restarts_done":0
},
"zoneid":1613675775,
"allocations":[
{
"name":"file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2.0.e4623953-263e-4b91-b66b-6be69ab60018",
"slices":5,
"volume_group":"file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2.72.1.d9d9726c-8052-48b1-b7ee-b953dbe254ff",
"vols":[
{
"id":"1",
"name":"file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"ordinary"
}
],
"volume":{
"id":"1",
"name":"file-collection-1613696655681.b9307d9d-f1fe-4731-a815-99800f3811a2",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"ordinary"
}
},
{
"name":"pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d.0",
"slices":5,
"volume_group":"pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d.72.1",
"vols":[
{
"id":"21",
"name":"pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"ordinary"
}
],
"volume":{
"id":"21",
"name":"pvc-9369013d-cba4-41a9-b9b8-15228e5ea09d",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"ordinary"
}
},
{
"name":"pvc-71561296-4699-4b79-bf92-3dd5470929cb.0",
"slices":5,
"volume_group":"pvc-71561296-4699-4b79-bf92-3dd5470929cb.72.1",
"vols":[
{
"id":"22",
"name":"pvc-71561296-4699-4b79-bf92-3dd5470929cb",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"throughput"
}
],
"volume":{
"id":"22",
"name":"pvc-71561296-4699-4b79-bf92-3dd5470929cb",
"size":5368709120,
"state":"ONLINE",
"media":"HDD",
"workload_str":"throughput"
}
}
],
"tags":{
},
"max_volumes_per_disk":10,
"max_latency_sensitive_vols_per_disk":2,
"max_throughput_intensive_vols_per_disk":1,
"nvols":3,
"lused_size":0,
"preserved":0,
"write_unit":512
}
]
}
5.6. Evacuating volumes from a disk¶
This command allows users to move Robin storage volumes from one disk to another. As a result, it can be utilized to free up space on a disk when it is getting full, or to move data out of a disk before it is decommissioned. To evacuate a volume, issue the following command:
Note
Robin’s placement algorithm will determine the best disks to evacuate volumes to if target disks are not specified.
# robin disk evacuate <wwn>
--volume <volume>
--to-disks <target_disks>
--exclude-disks <excluded_disks>
|
WWN of disk to evacuate |
|
Name of volume to be evacuated. Note if not provided all the volumes will be evacuated |
|
List of WWNs representing disks to evacuate to |
|
List of WWNs representing disks to avoid evacuating to |
|
Do not prompt the user for confirmation of evacuation |
Example:
# robin disk evacuate 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --wait --yes
Job: 65 Name: DiskEvacuate State: VALIDATED Error: 0
Job: 65 Name: DiskEvacuate State: WAITING Error: 0
Job: 65 Name: DiskEvacuate State: COMPLETED Error: 0
Evacuates volumes residing on one disk to another.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: PUT
URL Parameters: None
Data Parameters:
action: evacuate
- This mandatory field within the payload specifies that the evacuate operation is to be performed.volume: <volume_name>
- Utilizing this parameter results in only the specified volume being evacuated from the disk. If this is not specified all volumes on the disk are evacuated.target_drives: <list_of_target_drives>
- Utilizing this parameter, by specifying a list of WWNs representing respective target drives, ensures the evacuated volumes will be transferred to one of the specified disks.exclude_drives: <list_of_excluded_drives>
- Utilizing this parameter, by specifying a list of WWNs representing respective excluded drives, ensures the evacuated volumes will not transferred to one of the specified disks.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 145
}
5.7. Unregistering a disk¶
In order to unregister disk from the Robin cluster due to the fact it has physically malfunctioned or it is faulted, issue the following command:
Note
A disk can only be unregistered if there are no storage volumes allocated from it and it is still attached to the node from the perspective of the platform.
# robin disk unregister <wwn>
--yes
|
WWN of disk to unregister |
|
Do not prompt the user for confirmation of disk unregistration |
Example:
# robin disk unregister 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --wait --yes
Job: 101 Name: DiskUnregister State: VALIDATED Error: 0
Job: 101 Name: DiskUnregister State: WAITING Error: 0
Job: 101 Name: DiskUnregister State: COMPLETED Error: 0
Unregisters a disk from the Robin cluster.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: DELETE
URL Parameters: None
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 130
}
5.8. Deleting a disk¶
Robin provides a utility through which it detaches and deletes disks on multiple cloud platforms. This enables users to remove the cloud storage present within their clusters with convenience and ease. One caveat is that a disk can only be removed if there are no storage volumes allocated from it. In order to remove disks via the aforementioned utility, issue the following command:
Note
This command is only valid for cloud disks.
# robin disk remove <wwn>
--yes
|
WWN of disk to remove |
|
Do not prompt the user for confirmation of disk removal |
Example:
# robin disk remove 0x087648bb1c5b68a7a --wait --yes
Job: 101 Name: DiskRemove State: VALIDATED Error: 0
Job: 101 Name: DiskRemove State: WAITING Error: 0
Job: 101 Name: DiskRemove State: COMPLETED Error: 0
Removes a cloud disk from the Robin cluster.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: DELETE
URL Parameters:
remove=true
: This mandatory field within the URL indicates that the disk should be removed from the cluster.
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 134
}
5.9. Updating disk properties¶
In certain circumstances, due to the hardware or environmental reasons, Robin may not correctly discover all the attributes of a device correctly. As a result, in order to modify a disk properties such that they are correct, issue the following command:
# robin disk update <wwn>
--maxvolumes <max_volumes>
--maxlatencysensitivevolumes <max_latency_volumes>
--maxthroughputintensivevolumes <max_throughput_volumes>
--role <role>
--type <type>
--all
--set-reattachable
--unset-reattachable
--set-maintenance
--unset-maintenance
|
WWN of disk to update |
|
Max number of volumes allowed on the disk |
|
Max number of latency sensitive volumes allowed on the disk |
|
Max number of throughput intensive volumes allowed on the disk |
|
Role of the disk to update to |
|
Type of the disk to update to |
|
Run the update for all disks. Should be specified if no WWN is given |
|
Mark the disk as re-attachable |
|
Mark the disk as not re-attachable |
|
Put the disk into maintenance mode |
|
Remove the disk from maintenance mode |
Example:
# robin disk update 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --maxvolumes 100 --type SSD --wait --yes
Job: 101 Name: DiskModify State: VALIDATED Error: 0
Job: 101 Name: DiskModify State: WAITING Error: 0
Job: 101 Name: DiskModify State: COMPLETED Error: 0
Modifies a disk’s discovered and/or Robin specific properties.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: PUT
URL Parameters: None
Data Parameters:
action: update
- This mandatory field within the payload specifies that the update operation is to be performed.role: <role>
- Utilizing this parameter results in the role of the disk being set to the value specified. Options include: Storage, Swap, RootDisk, and Reserved.type: <type>
- Utilizing this parameter results in the type of the disk being set to the value specified. Options include: HDD and SSD.maxvolumesperdisk: <max_vols_on_disk>
- Utilizing this parameter results in the maximum number of volumes allowed on the disk being set to the value specified.maxlatencysensitivevolumesperdisk: <max_lat_sens_vols_on_disk>
- Utilizing this parameter results in the maximum number of latency sensitive volumes allowed on the disk being set to the value specified.maxthroughputintensivevolumesperdisk: <max_through_ints_vols_on_disk>
- Utilizing this parameter results in the maximum number of throughput intensive volumes allowed on the disk being set to the value specified.reattachable: [0,1]
- Utilizing this parameter results in the reattachable attribute of the disk being set. By specifying a value of 1, the disk is said to be reattachable and vice versa for a value of 0.maintenance: [0,1]
- Utilizing this parameter results in the maintenance mode attribute of the disk being set. By specifying a value of 1, the disk is said to be in maintenance mode and vice versa for a value of 0.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 54
}
5.10. Unfaulting a disk¶
When the Robin storage stack encounters an IO error on a disk, it will mark the disk as FAULTED. Sometimes the error is NOT due to the disk, but due to environmental or other hardware errors such as controller errors. In this case one can determine that the disk is actually healthy. In turn this command allows a user to inform Robin that the disk which is presumed to be FAULTED is actually healthy and the external issues that caused the IO failure have been resolved. Robin will proceed to mark the disk as ONLINE and resume normal access to the disk. In order to an unfault a disk, issue the following command:
Note
This functionality should be used with extreme care. If the disk is actually bad, and a user utilizes this command to reverse the error reported by the Robin storage stack, it could result in data loss.
# robin disk unfault <wwn>
--yes
|
WWN of disk to unfault |
|
Do not prompt the user for confirmation of unfaulting the drive |
Example:
# robin disk unfault 0xQEMU_QEMU_HARDDISK_3c71c872-fe13-4fd5-b --wait --yes
Job: 101 Name: DiskUnfault State: VALIDATED Error: 0
Job: 101 Name: DiskUnfault State: WAITING Error: 0
Job: 101 Name: DiskUnfault State: COMPLETED Error: 0
Unfaults a disk that has been marked as FAULTED due to an IO error. Note this functionality should be used with extreme care and only in situations where one has determined that external issues such as hardware/controller errors, that have since been resolved, caused the IO failure. If this condition is not met, unfaulting the disk could result in data loss.
End Point: /api/v3/robin_server/disks/<disk_wwn>
Method: PUT
URL Parameters: None
Data Parameters:
action: unfault
- This mandatory field within the payload specifies that the unfault operation is to be performed.wwn: <disk_wwn>
- This mandatory field within the payload specifies the WWN of the disk on which the unfault operation should be performed on.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 187
}
5.11. Managing Volumes¶
A Robin volume is the unit of storage allocation from Robin storage. A volume is reflective of the PersistentVolume
object within
the native Kubernetes world. It provides logical storage for an application to persist data. Robin allows one to manipulate several properties
of these base volumes at the time of creation including it’s replication factor (in order to avoid data loss) and the encryption/compression algorithm applied to the data stored within.
In order to aid the management of volumes, the following commands are described in this section:
|
View all volumes |
|
Retrieve information about a particular volume |
|
List all volume clones |
|
Configure snapshot space limits for a volume |
|
Import a volume from a volume backup |
|
Attach a repository to a volume |
|
Detach a repository from a volume |
|
Hydrate a volume |
5.11.1. Listing all volumes¶
In order to view all volumes currently present on the cluster and some additional details such as the physical usage of the volume, replica state, and mount details, issue the following command:
# robin volume list --all
--repl
--nfs
--pvcinfo
|
Display all volumes including those marked for deletion |
|
Filter list to only display replicated volumes |
|
Filter list to only display RWX volumes that have NFS exports |
|
Display information about the PVC |
Example:
# robin volume list
ID | Name | Media | Type | BlockSz | Size (GB) | Used (GB) | Storage Status | SnapshotSpaceUsed (GB) | Replicas | Replica State | Compression | Encryption | Mount | Marked for deletion
---+---------------------------------------------------------------------+-------+---------+---------+-----------+-----------+----------------+------------------------+----------+---------------+-------------+------------+------------------------------------------------+---------------------
1 | file-collection-1602783389182.edc29729-1bfe-4da2-87af-3e0e1fbbe8bd | HDD | REGULAR | 4096 | 5 | 0.44 | ONLINE | -/- | 2 | SYNCED | LZ4 | NONE | cscale-82-35.robinsystems.com:/dev/sdd MOUNTED | False
20 | mdcap-dev.engine.01.data.1.d0710617-4e5c-419a-9453-b77ea32d6a78 | HDD | REGULAR | 4096 | 10 | 0.53 | ONLINE | 0/0.0 | 1 | SYNCED | NONE | NONE | cscale-82-35.robinsystems.com:/dev/sdf MOUNTED | False
21 | mdcap-dev.engine.01.scripts.1.5c434f33-7e2a-421b-bc04-044d42202b75 | HDD | REGULAR | 4096 | 10 | 0.53 | ONLINE | 0/2 | 1 | SYNCED | NONE | NONE | cscale-82-35.robinsystems.com:/dev/sdg MOUNTED | False
22 | mdcap-dev.postgres.01.data.1.22af4bf6-12d5-4ee1-83b3-0361f15c9d13 | HDD | REGULAR | 4096 | 10 | 1 | ONLINE | 0/2 | 1 | SYNCED | NONE | NONE | cscale-82-35.robinsystems.com:/dev/sde MOUNTED | False
23 | mdcap-dev.playground.01.home.1.a266bca7-8169-410a-ab58-529b58d4b319 | HDD | REGULAR | 4096 | 10 | 0.53 | ONLINE | 0/2 | 1 | SYNCED | NONE | NONE | cscale-82-35.robinsystems.com:/dev/sdh MOUNTED | False
24 | mdcap-dev.logstore.01.data.1.3ee94e27-7368-4e77-90f3-d506a73bb29c | HDD | REGULAR | 4096 | 10 | 0.53 | ONLINE | 0/20 | 1 | SYNCED | NONE | NONE | cscale-82-34.robinsystems.com:/dev/sdd MOUNTED | False
25 | mdcap-dev.nginx.01.data.1.802a6117-1dd4-4c2a-b3a7-a8b622b08ac8 | HDD | REGULAR | 4096 | 10 | 0.53 | ONLINE | 0/2 | 1 | SYNCED | NONE | NONE | cscale-82-34.robinsystems.com:/dev/sde MOUNTED | False
Returns all volumes currently present on the cluster and some additional details such as the physical usage of the volume, replica state, and mount details.
End Point: /api/v3/robin_server/volumes
Method: GET
URL Parameters: None
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 200
Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error)
Example Response:
Output
{
"items":[
{
"media":72,
"respoolid":1,
"replication":1,
"storstatus_str":"ONLINE",
"volgroupname":"mdcap-dev.logstore.01.72.1.f2c3a591-a34c-40fe-9277-4dd743098c19",
"volumeid":24,
"qgroupid":24,
"tags":[
],
"rsize":10737418240,
"slice_size":1073741824,
"appname":"default",
"storstatus":1,
"current_snapshotid":1,
"compress_str":"NONE",
"lsize":10737418240,
"name":"mdcap-dev.logstore.01.data.1.3ee94e27-7368-4e77-90f3-d506a73bb29c",
"snapshot_space_used":0,
"snapshot_space_limit":21474836480,
"active_snapshot_count":0,
"ctime":1602802778,
"volgroupid":24,
"volume_ops":{
"volops_list":[
]
},
"state":2,
"genkey":1602802778089095,
"fsfree":0,
"alloc":[
{
"nodeid":2,
"zonename":"default",
"devid":2,
"zoneid":1602807544,
"devname":"\/dev\/disk\/by-id\/scsi-3600224800aba82fe29ee8770cc6440f5",
"nodename":"cscale-82-34.robinsystems.com"
}
],
"total_snapshot_count":1,
"status":1,
"partitions":0,
"fssize":0,
"compress_algo":0,
"asize":10737418240,
"marked_for_deletion":false,
"vtype_str":"REGULAR",
"mounts":[
{
"nodeid":2,
"zonename":"default",
"state":14,
"zoneid":1602807544,
"readonly":0,
"state_str":"MOUNTED",
"nodename":"cscale-82-34.robinsystems.com",
"mntpath":"\/dev\/sdd"
}
],
"data_state":7,
"block_size":4096,
"protection":0,
"vtype":0,
"psize":570425344,
"resync_state":1,
"media_str":"HDD",
"next_backupid":1,
"multinode_mounting":0,
"appid":1,
"resync_progress":100,
"next_snapshotid":2,
"encrypt_str":"NONE",
"parent_alloc":[
],
"cloud_psize":0,
"encrypt_algo":0
},
{
"media":72,
"respoolid":1,
"replication":1,
"storstatus_str":"ONLINE",
"volgroupname":"mdcap-dev.engine.01.72.1.6c3cddfa-dea8-408f-bea8-a08ec489711c",
"volumeid":21,
"qgroupid":21,
"tags":[
],
"rsize":10737418240,
"slice_size":1073741824,
"appname":"default",
"storstatus":1,
"current_snapshotid":1,
"compress_str":"NONE",
"lsize":10737418240,
"name":"mdcap-dev.engine.01.scripts.1.5c434f33-7e2a-421b-bc04-044d42202b75",
"snapshot_space_used":0,
"snapshot_space_limit":2147483648,
"active_snapshot_count":0,
"ctime":1602802777,
"volgroupid":22,
"volume_ops":{
"volops_list":[
]
},
"state":2,
"genkey":1602802777582450,
"fsfree":0,
"alloc":[
{
"nodeid":1,
"zonename":"default",
"devid":4,
"zoneid":1602807544,
"devname":"\/dev\/disk\/by-id\/scsi-360022480b410ddebc69ecdea69c2bf34",
"nodename":"cscale-82-35.robinsystems.com"
}
],
"total_snapshot_count":1,
"status":1,
"partitions":0,
"fssize":0,
"compress_algo":0,
"asize":10737418240,
"marked_for_deletion":false,
"vtype_str":"REGULAR",
"mounts":[
{
"nodeid":1,
"zonename":"default",
"state":14,
"zoneid":1602807544,
"readonly":0,
"state_str":"MOUNTED",
"nodename":"cscale-82-35.robinsystems.com",
"mntpath":"\/dev\/sdg"
}
],
"data_state":7,
"block_size":4096,
"protection":0,
"vtype":0,
"psize":570425344,
"resync_state":1,
"media_str":"HDD",
"next_backupid":1,
"multinode_mounting":0,
"appid":1,
"resync_progress":100,
"next_snapshotid":2,
"encrypt_str":"NONE",
"parent_alloc":[
],
"cloud_psize":0,
"encrypt_algo":0
}
]
}
5.11.2. Show information about a specific volume¶
In order to view detailed information about a volume such as the breakdown of its available replicas, descriptions of its intrinsic properties including backing media type, encryption/compression applied etc., and tags associated with it issue the following command:
# robin volume info <name>
--pvc-name <pvc_name>
--namespace <namespace>
|
Name of the volume to retrieve information of. |
|
The name of PVC that maps to a Robin volume. Note this option can only be used if the Robin volume name is not specified. |
|
Namespace the PVC is bound to. Note this option is only valid and mandatory if the PVC name is specified. |
Note
Either one of volume_name
or pvc-name
options must be specified.
Example 1 (Querying a volume via volume name):
# robin volume info file-collection-1602783389182.edc29729-1bfe-4da2-87af-3e0e1fbbe8bd
Name : file-collection-1602783389182.edc29729-1bfe-4da2-87af-3e0e1fbbe8bd
ID : 1
State : READY
Storage Status : ONLINE
Media : HDD
Compression : LZ4
Encryption : NONE
Volume Type : REGULAR
Workload Type : ordinary
Block Size : 4096
Logical Size : 5G
Physical Size : 448M
Cloud Tiered Size : -
Multi Node Mounting : False
Replica Count : 2
Replica State : SYNCED
QGroup ID : 1
Resource Pool Id : 1
Tags : []
Creation Time : 15 Oct 2020 10:36:29
Mounts:
+-------------------------------+------------+------------+---------+-----------+
| Host Name | Mount Path | Zone ID | State | Read-Only |
+-------------------------------+------------+------------+---------+-----------+
| cscale-82-35.robinsystems.com | /dev/sdd | 1602807544 | MOUNTED | False |
+-------------------------------+------------+------------+---------+-----------+
Allocations:
-------
Replica 1
+----+-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
| ID | WWN | Host Name | Devpath | Allocated (GB) |
+----|-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
| 1 | 0x3600224800aba82fe29ee8770cc6440f5 | cscale-82-34.robinsystems.com | /dev/disk/by-id/scsi-3600224800aba82fe29ee8770cc6440f5 | 5 |
+----+-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
Replica 2
+----+-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
| ID | WWN | Host Name | Devpath | Allocated (GB) |
+----+-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
| 2 | 0x360022480b410ddebc69ecdea69c2bf34 | cscale-82-35.robinsystems.com | /dev/disk/by-id/scsi-360022480b410ddebc69ecdea69c2bf34 | 5 |
+----+-------------------------------------+-------------------------------+--------------------------------------------------------+----------------+
Snapshot Info:
-------
Snapshot Count : 0
Snapshot Space Used : 0G/-
Example 2 (Querying a volume via PVC name):
# robin volume info --pvc-name data-my-release-mysql-0 --namespace default
Name : pvc-35855033-3505-4dba-bf74-b8746322c528
ID : 6
State : READY
Status : ONLINE
Storage Status : ONLINE
Media : HDD
Compression : NONE
Encryption : NONE
Volume Type : REGULAR
Workload Type : ordinary
Block Size : 4096
Logical Size : 8G
Physical Size : -
Cloud Tiered Size : -
Multi Node Mounting : True
Replica Count : 1
Replica State : SYNCED
Fault Domain : N/A
QGroup ID : 6
Resource Pool Id : 1
Tags : []
Creation Time : 03 Oct 2021 09:27:08
Mounts:
+-------------------------------+------------+------------+---------+-----------+
| Host Name | Mount Path | Zone ID | State | Read-Only |
+-------------------------------+------------+------------+---------+-----------+
| cscale-82-83.robinsystems.com | /dev/sde | 1633270151 | MOUNTED | False |
+-------------------------------+------------+------------+---------+-----------+
Allocations:
-------
Replica 1
+----+------------------------------------+-------------------------------+--------------------------------------------------------+-----------+
| ID | WWN | Host Name | Devpath | Size (GB) |
+----+------------------------------------+-------------------------------+--------------------------------------------------------+-----------+
| 5 | 0x60022480a889d05f4df285d75cf253e0 | cscale-82-83.robinsystems.com | /dev/disk/by-id/scsi-360022480a889d05f4df285d75cf253e0 | 8 |
+----+------------------------------------+-------------------------------+--------------------------------------------------------+-----------+
Snapshot Info:
-------
Snapshot Count : 0
Snapshot Space Used : 0G/-
Returns detailed information about a volume such as the breakdown of its available replicas, descriptions of its intrinsic properties including backing media type, encryption/compression applied etc., and tags associated with it.
End Point: /api/v3/robin_server/volumes/
Method: GET
URL Parameters: None
Data Parameters:
name: <volume_name>
- Utilizing this parameter within the payload by specifying the name of a volume results in information for the aforementioned volume being retrieved.pvc_name: <pvc_name>
- Utilizing this parameter within the payload by specifying the name of a PVC results in information for the aforementioned volume being retrieved.namespace: <namespace>
- Utilizing this parameter within the payload by specifying the name of a namespace results in only PVC’s bound to that namespace being queried. Note this option is only valid and mandatory when thepvc_name
parameter is utilized.
Note
Either one of the name
or pvc_name
parameters must be provided.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 200
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error)
Example Response:
Output
{
"items":{
"volumeid":32,
"resync_progress":100,
"total_snapshot_count":1,
"psize":503316480,
"ctime":1615831965,
"snapshot_space_used":0,
"appid":1,
"multinode_mounting":0,
"protection":1,
"name":"file-collection-1615831964492.12f41f8a-1cd9-451d-b719-010832f8521d",
"snapshot_space_limit":0,
"active_snapshot_count":0,
"parent_alloc":[
],
"status":1,
"media":72,
"resync_state":1,
"next_backupid":1,
"vtype":0,
"current_snapshotid":1,
"genkey":1615831965016901,
"volgroupname":"file-collection-1615831964492.12f41f8a-1cd9-451d-b719-010832f8521d.72.1.01ceef4e-d5e9-417e-8c62-e3352d26643d",
"appname":"default",
"next_snapshotid":2,
"qgroupid":1,
"block_size":4096,
"slice_size":1073741824,
"compress_algo":1,
"encrypt_algo":0,
"tags":[
],
"replication":3,
"state":2,
"data_state":7,
"mounts":[
{
"zoneid":1613675775,
"zonename":"default",
"nodename":"vnode-95-28.robinsystems.com",
"nodeid":1,
"mntpath":"\/dev\/sdd",
"readonly":0,
"state":14,
"state_str":"MOUNTED"
}
],
"partitions":0,
"lsize":5368709120,
"fssize":0,
"fsfree":0,
"volume_ops":{
"volops_list":[
]
},
"rsize":16106127360,
"asize":16106127360,
"cloud_psize":0,
"respoolid":1,
"volgroupid":32,
"alloc":[
[
{
"id":2,
"wwn":"0xQEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8",
"allocation":5,
"node":"vnode-95-28.robinsystems.com",
"devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_80cb8b56-aef2-48a8-8"
}
],
[
{
"id":1,
"wwn":"0xQEMU_QEMU_HARDDISK_40b30feb-02eb-4a5a-b",
"allocation":5,
"node":"vnode-95-12.robinsystems.com",
"devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_40b30feb-02eb-4a5a-b"
}
],
[
{
"id":3,
"wwn":"0xQEMU_QEMU_HARDDISK_50c07412-3cbb-428e-8",
"allocation":5,
"node":"vnode-95-83.robinsystems.com",
"devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_50c07412-3cbb-428e-8"
}
]
],
"storstatus":1,
"media_str":"HDD",
"vtype_str":"REGULAR",
"compress_str":"LZ4",
"encrypt_str":"NONE",
"storstatus_str":"ONLINE",
"storstate_str":"READY",
"rwx_vol":false,
"workload":0,
"workload_str":"ordinary",
"nfs_exports":[
]
}
}
5.11.3. Listing all volume clones¶
In order to view all clone volumes currently present on the cluster and some additional details such as the physical usage of the volume, parent volume, and mount details, issue the following command:
# robin volume clone-list --json
|
Output in JSON format |
Example:
ID | Name | ParentSnap | ParentVolume | Media | BlockSz | Size (GB) | Psize (GB) | Storage Status | SnapshotSpaceUsed (GB) | Replicas | Replica State | Compression | Encryption | Mount
---+---------------------------------------------------------------------+---------------------+------------------------------------------------------------------+-------+---------+-----------+------------+----------------+------------------------+----------+---------------+-------------+------------+-------------------------------------------------
9 | clone-demo.server.01.block.1.2c69deaa-52bc-40ba-b455-5271e4fae4a1 | snapshot-1603479973 | centos1.server.01.block.1.c90c49c0-74ab-4459-be69-fea9f730cc9e | HDD | 4096 | 1 | - | ONLINE | 0/0.2 | 1 | SYNCED | NONE | NONE | cscale-82-140.robinsystems.com:/dev/sdm MOUNTED
10 | clone-demo.server.01.root_fs.1.63262a2c-b8b2-4f03-9fea-65b47a95a5a8 | snapshot-1603479973 | centos1.server.01.root_fs.1.2d59b0b3-c33a-4594-9d3d-44def625a38b | HDD | 4096 | 1 | 0.03 | ONLINE | 0/0.2 | 1 | SYNCED | NONE | NONE | cscale-82-140.robinsystems.com:/dev/sdn MOUNTED
11 | clone-demo.server.01.data.1.dd86ccb2-ce0a-4f39-a041-66ec4d492fbc | snapshot-1603479973 | centos1.server.01.data.1.8dec6c3f-839a-439c-b830-130386ff40f4 | HDD | 4096 | 1 | 0.03 | ONLINE | 0/0.2 | 1 | SYNCED | NONE | NONE | cscale-82-140.robinsystems.com:/dev/sdl MOUNTED
Returns all clone volumes currently present on the cluster and some additional details such as the physical usage of the volume, parent volume, and mount details.
End Point: /api/v3/robin_server/volumes/clone
Method: GET
URL Parameters: None
Data Parameters: None
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 200
Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error)
Example Response:
Output
{
"items":[
{
"qgroupid":10,
"rsize":1073741824,
"multinode_mounting":0,
"volgroupname":"clone-demo.server.01.72.1.3a122025-f911-4ecf-b689-f5492bbefd72",
"parent_volumeid":6,
"encrypt_algo":0,
"parent_alloc":[
{
"devid":1,
"zoneid":1603415748,
"nodeid":1
}
],
"volgroupid":9,
"fsfree":0,
"psize":33554432,
"next_snapshotid":2,
"replication":1,
"cloud_psize":0,
"lsize":1073741824,
"status":1,
"encrypt_str":"NONE",
"volumeid":11,
"vtype":1,
"ctime":1603480455,
"snapshot_space_used":0,
"storstatus_str":"ONLINE",
"respoolid":1,
"marked_for_deletion":false,
"appid":1,
"appname":"default",
"protection":0,
"media":72,
"media_str":"HDD",
"genkey":1603480455171116,
"next_backupid":1,
"tags":[
],
"block_size":4096,
"asize":1073741824,
"partitions":0,
"parent_snapshotid":1,
"slice_size":1073741824,
"storstatus":1,
"name":"clone-demo.server.01.data.1.dd86ccb2-ce0a-4f39-a041-66ec4d492fbc",
"total_snapshot_count":1,
"vtype_str":"CLONE",
"alloc":[
{
"devid":1,
"nodeid":1,
"nodename":"cscale-82-140.robinsystems.com",
"zoneid":1603415748,
"zonename":"default",
"devname":"\/dev\/disk\/by-id\/scsi-3600224803bcdafde95b1f5cd27ceb5fb"
}
],
"volume_ops":{
"volops_list":[
]
},
"data_state":7,
"mounts":[
{
"nodeid":1,
"nodename":"cscale-82-140.robinsystems.com",
"state_str":"MOUNTED",
"state":14,
"zoneid":1603415748,
"zonename":"default",
"mntpath":"\/dev\/sdl",
"readonly":0
}
],
"parent_appname":"default",
"active_snapshot_count":0,
"current_snapshotid":1,
"fssize":0,
"parent_volumename":"centos1.server.01.data.1.8dec6c3f-839a-439c-b830-130386ff40f4",
"compress_str":"NONE",
"resync_state":1,
"snapshot_space_limit":214748364,
"resync_progress":100,
"parent_snapshotname":"snapshot-1603479973",
"state":2,
"parent_appid":1,
"compress_algo":0
},
{
"qgroupid":9,
"rsize":1073741824,
"multinode_mounting":0,
"volgroupname":"clone-demo.server.01.72.1.bc0f9bf3-3df2-4ec8-8a03-2edad0d4d176",
"parent_volumeid":8,
"encrypt_algo":0,
"parent_alloc":[
{
"devid":1,
"zoneid":1603415748,
"nodeid":1
}
],
"volgroupid":11,
"fsfree":0,
"psize":33554432,
"next_snapshotid":2,
"replication":1,
"cloud_psize":0,
"lsize":1073741824,
"status":1,
"encrypt_str":"NONE",
"volumeid":10,
"vtype":1,
"ctime":1603480455,
"snapshot_space_used":0,
"storstatus_str":"ONLINE",
"respoolid":1,
"marked_for_deletion":false,
"appid":1,
"appname":"default",
"protection":0,
"media":72,
"media_str":"HDD",
"genkey":1603480455157228,
"next_backupid":1,
"tags":[
],
"block_size":4096,
"asize":1073741824,
"partitions":0,
"parent_snapshotid":1,
"slice_size":1073741824,
"storstatus":1,
"name":"clone-demo.server.01.root_fs.1.63262a2c-b8b2-4f03-9fea-65b47a95a5a8",
"total_snapshot_count":1,
"vtype_str":"CLONE",
"alloc":[
{
"devid":2,
"nodeid":1,
"nodename":"cscale-82-140.robinsystems.com",
"zoneid":1603415748,
"zonename":"default",
"devname":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064"
}
],
"volume_ops":{
"volops_list":[
]
},
"data_state":7,
"mounts":[
{
"nodeid":1,
"nodename":"cscale-82-140.robinsystems.com",
"state_str":"MOUNTED",
"state":14,
"zoneid":1603415748,
"zonename":"default",
"mntpath":"\/dev\/sdn",
"readonly":0
}
],
"parent_appname":"default",
"active_snapshot_count":0,
"current_snapshotid":1,
"fssize":0,
"parent_volumename":"centos1.server.01.root_fs.1.2d59b0b3-c33a-4594-9d3d-44def625a38b",
"compress_str":"NONE",
"resync_state":1,
"snapshot_space_limit":214748364,
"resync_progress":100,
"parent_snapshotname":"snapshot-1603479973",
"state":2,
"parent_appid":1,
"compress_algo":0
},
{
"qgroupid":11,
"rsize":1073741824,
"multinode_mounting":0,
"volgroupname":"clone-demo.server.01.72.1.f366e12b-ae61-4f1d-a441-0258d764d5f3",
"parent_volumeid":7,
"encrypt_algo":0,
"parent_alloc":[
{
"devid":1,
"zoneid":1603415748,
"nodeid":1
}
],
"volgroupid":10,
"fsfree":0,
"psize":0,
"next_snapshotid":2,
"replication":1,
"cloud_psize":0,
"lsize":1073741824,
"status":1,
"encrypt_str":"NONE",
"volumeid":9,
"vtype":1,
"ctime":1603480455,
"snapshot_space_used":0,
"storstatus_str":"ONLINE",
"respoolid":1,
"marked_for_deletion":false,
"appid":1,
"appname":"default",
"protection":0,
"media":72,
"media_str":"HDD",
"genkey":1603480455077815,
"next_backupid":1,
"tags":[
],
"block_size":4096,
"asize":0,
"partitions":0,
"parent_snapshotid":1,
"slice_size":1073741824,
"storstatus":1,
"name":"clone-demo.server.01.block.1.2c69deaa-52bc-40ba-b455-5271e4fae4a1",
"total_snapshot_count":1,
"vtype_str":"CLONE",
"alloc":[
],
"volume_ops":{
"volops_list":[
]
},
"data_state":7,
"mounts":[
{
"nodeid":1,
"nodename":"cscale-82-140.robinsystems.com",
"state_str":"MOUNTED",
"state":14,
"zoneid":1603415748,
"zonename":"default",
"mntpath":"\/dev\/sdm",
"readonly":0
}
],
"parent_appname":"default",
"active_snapshot_count":0,
"current_snapshotid":1,
"fssize":0,
"parent_volumename":"centos1.server.01.block.1.c90c49c0-74ab-4459-be69-fea9f730cc9e",
"compress_str":"NONE",
"resync_state":1,
"snapshot_space_limit":214748364,
"resync_progress":100,
"parent_snapshotname":"snapshot-1603479973",
"state":2,
"parent_appid":1,
"compress_algo":0
}
]
}
5.11.4. Configure the snapshot space limit of a volume¶
Robin stores snapshot(s) of a volume within a dedicated space, referred to as the snapshot space
of the volume. The snapshot space is considered to be a percentage of the allocated space for a volume (by default this percentage is 40%). However after the volume is provisioned the size of the snapshot might need to be modified. In order to achieve this, issue the following command:
# robin volume snapshot-space-limit <volume_name> <snapshot_space_limit>
Note
Only the snapshot space limit of individual volumes can be configured at this time. To configure the snapshot space limit for an application, update the snapshot space limit of each of the volumes it consists of.
|
Name of the volume to configure the snapshot space limit for |
|
Size of the snapshot space limit in bytes |
Example:
# robin volume snapshot-space-limit pvc-bd01bcd9-9e4d-4a34-ac13-5a98395935b3 4G --wait
Job: 163 Name: VolumeUpdateSnapshotLimit State: PROCESSED Error: 0
Job: 163 Name: VolumeUpdateSnapshotLimit State: FINALIZED Error: 0
Job: 163 Name: VolumeUpdateSnapshotLimit State: COMPLETED Error: 0
Configures the snapshot space limit of a volume.
End Point: /api/v3/robin_server/volumes/<volume_name>
Method: PUT
URL Parameters: None
Data Parameters:
action: snapshot_limits
- This mandatory field within the payload specifies that the snapshot limit of the volume is to be modified.name: <volume_name>
- This mandatory field within the payload specifies the name of the volume for which the snapshot limits are to be modified.snapshot_space_limit: <snap_limit>
- This mandatory field within the payload specifies the size, in bytes, the snapshot space limit of the aforementioned volume should be set to.
Port: RCM Port (default value is 29442)
Headers:
Authorization: <auth_token>
: Authorization token to identify which user is sending the request. The token can be acquired from the login API.
Success Response Code: 202
Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)
Example Response:
Output
{
"jobid": 163
}
5.11.5. Import a volume¶
Robin enables users to import data from a volume backup and create a new volume on the source cluster of the volume backup or on a different cluster that has access to the same external cloud repository. After the import process is complete, the new volume will contain the same data as the source volume. However, there is no relationship between the original volume and the volume created using the backup. If a volume backup contains multiple volumes, each volume must be imported in a serial and seperate manner. With regards to the objects created as part of the import process, there are two options available:
Create only a Robin volume. This is the default behavior and is intended for those who will be directly handling the creation of PersistentVolumeClaim, PersistentVolume, and volume, manually stitching them all together. With the option, the user can specify the volume name, as well as various attributes pertaining to the volume itself (e.g., replication, faultdomain, access mode, etc.). The one caveat is, the PersistentVolume name and Robin volume name must be the same.
A PersistentVolumeClaim, PersistentVolume, and Robin volume will be created. This option is intended for those who want to create or recreate a PersistentVolumeClaim that can can be referenced by a Pod for storage. With this option, the user cannot specify the volume name. They can, however, specify the name of the PersistentVolumeClaim, as well as the various volume attributes (e.g., replication, faultdomain, access mode, etc.).
To import a volume, run the following command:
# robin volume import <backupid> <import_volume> <rpool>
--name <name>
--namespace <namespace>
--media <media>
--replication <replication>
--faultdomain <faultdomain>
--blocksize <blocksize>
--access-mode <access_mode>
--pvc-name <pvc_name>
--storage-class <storage_class>
--username <username>
--tenant <tenant>
--start-hydration
--create-pvc
|
ID of volume backup containing the volume to import |
|
Name of the volume to import data from. The volume must be included in the referenced volume backup |
|
Name of the resource pool in which to create the volume |
|
Custom name for the new volume. If a custom volume name is not specified, then
a standardized volume name will be generated. Note that a custom volume name cannot
be used in conjunction with the |
|
The namespace to bind the newly created PVC to. By default, the current user’s current
namespace is used. Note this option can only be used in conjunction with the |
|
Specify which type of drives to allocate storage for the new volume from. Valid choices include ‘HDD’ and ‘SSD’. Default media type is HDD. |
|
Replication level for the new volume. The default is same as the source volume |
|
Fault domain for replicas. Valid choices include: ‘disk’, ‘host’, and ‘rack’. This option is only valid when |
|
Block size for the new volume. Valid choices include 512 and 4096. |
|
Storage access mode. Valid choices include: ‘ReadWriteOnce’, ‘ReadOnlyOnce’, and ‘ReadWriteMany’. If access mode is not specified then the access mode of the PVC bound to the imported volume will be used. If there is no bound PVC, then ‘ReadWriteOnce’ will be used. |
|
Name to set for the newly created PVC. Note this option can only be used with the |
|
Name of storage class for the new volume. Valid choices include: ‘robin’ and ‘robin-immediate’. By default, ‘robin-immediate’ is used. Note this option can
only be used in conjunction with the |
|
|
|
Name of tenant the volume backup will be bound to |
|
Start the hydration of imported volume in the background |
|
Instead of creating the imported volume directly, create a PVC that binds to a PV and the resulting Robin volume. |
5.11.6. Attach a volume to an external repository¶
In order to attach a volume to an external repository such that any volume snapshot containing the volume can be backed up, issue the following command:
# robin volume attach-repo <volume_name> <repo_name>
|
Name of volume to be attached |
|
Name of the already registered external respositry to attach to |
Note
A volume can only be attached to one repository at a time.
Example:
# robin volume attach-repo pvc-bd01bcd9-9e4d-4a34-ac13-5a98395935b3 testrepo --wait
Job: 331 Name: VolumeAddRepo State: VALIDATED Error: 0
Job: 331 Name: VolumeAddRepo State: WAITING Error: 0
Job: 331 Name: VolumeAddRepo State: COMPLETED Error: 0
5.11.7. Detach a volume from an external repository¶
In order to detach a volume from an external repository such that it cannot be backed up using a volume snapshot, issue the following command:
Note
Imported volumes created from volume or application backups need to be hydrated first before they can be detached. Volumes in other states can be detached regardless as long as no backup operation involving the volumes is in progress.
# robin volume detach-repo <volume_name> <repo_name>
|
Name of volume to be detached |
|
Name of the external respositry the aforementioned volume is currently attached to |
Example:
# robin volume detach-repo pvc-bd01bcd9-9e4d-4a34-ac13-5a98395935b3 testrepo --wait
Job: 333 Name: VolumeRemoveRepo State: VALIDATED Error: 0
Job: 333 Name: VolumeRemoveRepo State: WAITING Error: 0
Job: 333 Name: VolumeRemoveRepo State: COMPLETED Error: 0
5.11.8. Hydrate a volume¶
In order to hydrate an imported volume such that it becomes a standalone volume with no need to be associated with an external repository, issue the following command:
# robin volume hydrate <name>
|
Name of volume to be hydrated |
Note
Only imported volumes created from volume or application backups can be hydrated.
Example:
# robin volume hydrate pvc-bd01bcd9-9e4d-4a34-ac13-5a98395935b3 --wait
Job: 332 Name: VolumeHydrate State: VALIDATED Error: 0
Job: 332 Name: VolumeHydrate State: WAITING Error: 0
Job: 332 Name: VolumeHydrate State: COMPLETED Error: 0
5.12. Managing Volume Snapshots¶
The Volume Snapshot feature enables you to create crash-consistent snapshots containing one or more Robin volumes (Regular or PDVs) from multiple unrelated applications. Eventhough an application’s volume(s) may be captured, no application metadata such as its configuration and state is saved within the volume snapshot. When creating volume snapshots, to ensure data consistency, the Robin storage layer waits for I/O operations to complete on all of the volumes before copying the volume data.
Note
You can use the volume snapshot and volume backup features only for volumes that are not part of Robin bundle applications.
You can back up volume snapshots to any supported external storage repository in the cloud. For example, Amazon S3 Cloud, Google Cloud Storage, or Azure Cloud. In addition clone volumes can be created using volume snapshots.
Important
Only users with the superadmin role can create volume snapshots however they can be shared to users within tenants.
Topics covered in this section:
|
Create a volume snapshot using one or more volumes |
|
List all volume snapshots |
|
Delete a snapshot containing one or more volumes |
5.12.1. Create a volume snapshot¶
In order to create a snapshot of one or more volumes, run the following command:
# robin volume-snapshot create <volume_list>
--snapname <snapshot_name>
|
Comma separated list of names of volumes to snapshot |
|
Custom volume snapshot name |
Note
The robin volume list
command, detailed here, can be used to view a list of available volumes and their respective names.
Example
# robin volume-snapshot create pvc-fc5e7624-05f2-4b31-b266-386fa0771458 --snapname test135 --wait
Job: 16352 Name: VolumeSnapshotCreate State: VALIDATED Error: 0
Job: 16352 Name: VolumeSnapshotCreate State: PROCESSED Error: 0
Job: 16352 Name: VolumeSnapshotCreate State: PREPARED Error: 0
Job: 16352 Name: VolumeSnapshotCreate State: FINALIZED Error: 0
Job: 16352 Name: VolumeSnapshotCreate State: NOTIFIED Error: 0
Job: 16352 Name: VolumeSnapshotCreate State: COMPLETED Error: 0
5.12.2. List volume snapshots¶
To view a list of all the volume snapshots the current user is entitled to view alongside details such as the ID, name, state, and creation time for each snapshot, run the following command:
# robin volume-snapshot list [<name>]
--snapshotid <snapshotid>
--volume-name <volume_name>
--full
|
List the volume snapshot for a given name. Note this parameter is optional |
|
List the volume snapshot for a given ID. Note this option can’t be used in conjunction with |
|
Only list volume snapshots that contain the given volume |
|
Display additional information about each volume snapshot |
Example
# robin volume-snapshot list
+----------------------------------+---------+--------+-------------+----------------------+----------+
| Snapshot ID | Name | State | Num Backups | Creation Time | Restored |
+----------------------------------+---------+--------+-------------+----------------------+----------+
| a32fba4ca59511ec862741acf1229685 | test123 | ONLINE | 0 | 14 Mar 2022 21:27:33 | False |
| ed68f80ca59511ec951ef7e504ddbe6e | test135 | ONLINE | 0 | 14 Mar 2022 21:27:33 | False |
+----------------------------------+---------+--------+-------------+----------------------+----------+
5.12.3. Delete a volume snapshot¶
To delete a volume snapshot run the following command:
# robin volume-snapshot delete <name>
--yes
|
Volume snapshot name |
|
Do not prompt the user for confirmation |
Example
# robin volume-snapshot delete test123
Are you sure you want to delete [y/n]? y
5.13. Managing Volume Backups¶
A volume backup is a volume snapshot of a single or multiple volumes that you can push to an external cloud storage repository. Robin CNP enables you to push the existing volume snapshots to the registered external cloud storage repository. Alternatively volume snapshots can be created on the fly as part of the volume backup creation process. Volume backups allow users to save storage space and provides a means of recreating (recovering) the volumes when required.
Volume backups can coexist with application backups on the cloud storage repository. The Robin CNP CLI displays the Volume backups as Type Volume.
Note
You can use the volume snapshot and volume backup features only for volumes that are not part of Robin bundle applications.
When required, you can import a volume backup from the cloud storage repository and create new volumes to the same cluster or a different cluster.
Note
When you import volume backups of multiple volumes, you can import one volume at a time. Also, there is no relationship/dependency between backed-up volumes, imported volumes, and applications.
Topics covered in this section:
|
Push a volume snapshot to an external cloud storage repo |
|
List all volume snapshot backup |
|
Delete a volume snapshot backup |
5.13.1. Create a volume backup¶
As described previously a volume backup is essentially a volume snapshot that has been pushed a registered external cloud repository. As a result, either a pre-existing volume snapshot needs to be specified as part of the creation command or a list of volumes from which to create a volume snapshot on the fly needs to be given. To create a volume backup, run the following command:
# robin volume-backup create <repo_name>
--snapname <snapshot_name>
--snapshotid <snapshotid>
--volume-list <volume_list>
--backup-name <backup_name>
--username <username>
--tenant <tenant>
--retain-snapshot
|
Registered external cloud repository name |
|
Name of volume snapshot to backup. Note this option cannot be used if either |
|
ID of volume snapshot to backup. Note this option cannot be used if either |
|
Comma separated the list of names for volumes to include in the auto-generated snapshot. Note this option cannot be used if either |
|
Name to assign to the newly created volume backup. |
|
Username of user the volume backup is bound to. |
|
Name of tenant the volume backup is bound to. |
|
Don’t delete the temporary snapshot that gets created when |
Important
Before a pre-existing volume snapshot can be backed up, all volumes associated with the aforementioned snapshot must be attached to the respective external repo where the volume snapshot will be pushed. The robin volume attach-repo
command, detailed here, can be used to achieve this.
Example 1 (Creating a volume backup directly by specifying a list of volumes):**
# robin volume-backup create remote-repo --volume-list pvc-6d1fbf4b-13ab-419e-8fc1-0c6c250959b3,pvc-5e414c69-b922-4caa-8c95-fab4e8b21924 --backup-name test
Example 2 (Creating a volume backup using a pre-existing volume snapshot):**
# robin volume-backup create testrepo --snapshotid 836b180aaa7a11ecbf5e61eb92e252a8 --backup-name testbackup
Creating volume backup 'testbackup' from snapshot '836b180aaa7a11ecbf5e61eb92e252a8'
5.13.2. List volume backups¶
In order to view a list of all volume backups the current user is entitled to view alongside details such as the ID, name, associated external repo, state, and creation time for each backup, run the following command:
# robin volume-backup list [<name>]
--backupid <backupid>
--snapshot-name <snapshot_name>
--volume-name <volume_name>
--full
|
List the volume backup for a given name. Note this parameter is optional |
|
List the volume backup for a given ID. Note this option can’t be used in conjunction with |
|
Only list volume backups that contain a given snapshot |
|
Only list volume backups that contain a given volume |
|
Display additional information about each volume backup (e.g., volumes) |
Example
# robin volume-backup list
+----------------------------------+------------+----------+------------------+---------------+----------------------+
| Backup ID | Name | Repo | State | Snapshot | Creation Time |
+----------------------------------+------------+----------+------------------+---------------+----------------------+
| 270e5b24aa7b11eca35ff9a1e6fb8ced | testbackup | testrepo | Push in progress | Deleted | 19 Mar 2022 06:19:13 |
+----------------------------------+------------+----------+------------------+---------------+----------------------+
5.13.3. Delete a volume backup¶
To delete a volume backup, run the following command:
# robin volume-backup delete <backup_name>
--yes
|
Name of volume backup to delete |
|
Do not prompt the user for confirmation |
Example
# robin volume-backup delete testbackup --yes --wait
Job: 115 Name: VolumeBackupDelete State: VALIDATED Error: 0
Job: 115 Name: VolumeBackupDelete State: PREPARED Error: 0
Job: 115 Name: VolumeBackupDelete State: COMPLETED Error: 0
5.14. ReadWriteMany (RWX) Volumes¶
Robin supports the ReadWriteMany (RWX) access mode of Persistent Volumes (PVs). An RWX PVC can be used by many Pods in the same namespace for read and write operations. More information on these types of volumes can be found here.
Robin provides support for RWX volumes by utilizing a shared file system. Specifically the network file system (NFS) is used. These volumes can be mounted within any Pods deployed via Helm or YAML files and consequently can support multiple read/write clients. In addition, support for RWX volumes also extends to non-root application Pods, details for which can be found here.
Note
RWX volumes are not supported within Robin Bundle applications.
5.14.1. Default Configuration¶
When creating a RWX volume, the default values for replication factor and faultdomain
are 2 and host
respectively. That is to say even if the robin.io/replication
and robin.io/faultdomain
labels are not explicitly defined within the PVC definition YAML, these values will be assumed.
In order to override the default replication factor such that only a single replica is provisioned , the label robin.io/rwx_force_single_replica: "1"
must be specified. If an increased number of replicas are needed (the maximum being 3), the label robin.io/replication
must be specified with the appropriate value.
Note
The robin.io/replication
and robin.io/rwx_force_single_replica
labels cannot both be specified within a PVC definition YAML.
The following is an exmaple of a PVC defintion YAML where the default replication factor has been overridden such that only 1 replica is provisioned:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-shared-1
labels:
robin.io/nfs-server-type: "shared"
robin.io/rwx_force_single_replica: "1"
spec:
storageClassName: robin
accessModes:
- ReadWriteMany
resources:
requests:
storage: 500Gi
5.14.2. NFS server Pod¶
Every RWX PVC results in an NFS export from an NFS server Pod. When you create a PVC, the NFS server Pod is created and configured on demand. All Robin NFS server Pods are High Availability (HA) compliant. Robin monitors the health of the NFS server Pods and executes a failover if any NFS server Pod is offline.
There are two types of NFS server Pod, shared
and exclusive
, which are described in the sections below. The default NFS server Pod type is shared
. In order to update this value, the following command can be used:
# robin config update nfs default_server_type <pod_type>
Example
# robin config update nfs default_server_type exclusive
5.14.2.2. Exclusive NFS server Pod¶
With an exclusive NFS server Pod, only one RWX PVC is associated the Pod resulting in a dedicated NFS server Pod for the PVC. To allocate an exclusive NFS server Pod for a PVC, use the following annotation. An example of its usage is shown below as well.
robin.io/nfs-server-type: "exclusive"
Example
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-excl-1
annotations:
robin.io/nfs-server-type: "exclusive"
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
Note
Exclusive NFS server Pods are deleted when associated volumes are unmounted or deleted.
5.14.3. Set resource limits for exclusive NFS Pods¶
The requests and limits for the CPU and memory consumption of exclusive NFS server Pods can be set using PVC annotations. This allows users to control the resource utilization of dedicated RWX volumes and override the default config values for each of the attributes.
To set the requests and limits for CPU, use the respective annotation shown below.
robin.io/nfs-cpu-limit: <limit_value>
robin.io/nfs-cpu-request: <request_value>
To set the requests and limits for memory, use the respective annotation shown below.
robin.io/nfs-memory-limit: <limit_value>
robin.io/nfs-memory-request: <request_value>
Example
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: CSI-PVC-robin
labels:
app.kubernetes.io/instance: robin
app.kubernetes.io/managed-by: robin.io
app.kubernetes.io/name: robin
annotations:
robin.io/media: HDD
robin.io/compression: LZ4
robin.io/nfs-server-type: "exclusive"
robin.io/nfs-cpu-limit: 300m
robin.io/nfs-memory-limit: 300Mi
robin.io/nfs-cpu-request: 240m
robin.io/nfs-memory-request: 240Mi
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
StorageClassName: robin
Note
The annotations above must be specified during the initial creation of the PVC otherwise they will not take affect even if given at a later time.
5.14.4. Configure NFS server Pod attributes¶
Listed below are all the attributes a user can configure with regards to the configuration of the NFS server pods to be created.
Note
These attributes can be seen using the command robin config list nfs
.
Attribute |
Default value |
Valid Values |
---|---|---|
|
shared |
|
|
100m |
As needed but should conform to the standard Kubernetes notation for CPU requests as documented here. |
|
200Mi |
As needed but should conform to the standard Kubernetes notation for memory requests as documented here. |
|
UNLIMITED |
As needed but should conform to the standard Kubernetes notation for CPU limits as documented here. |
|
UNLIMITED |
As needed but should conform to the standard Kubernetes notation for memory limits as documented here. |
|
1 |
Can be set to ‘0’ in order to disable failovers and ‘1’ in order to enable them. |
|
8 |
As needed per the planned requirments but has to be an integer. |
|
none |
|
|
600 |
As needed per the planned requirements but must be an integer. |
|
60 |
As needed per the planned requirments but has to be an integer. |
|
100m |
As needed per the planned requirments but has to be an integer. |
|
UNLIMITED |
As needed per the planned requirments but has to be an integer. |
|
1 |
Can be set to ‘0’ in order to disable shared Pod failovers and ‘1’ in order to enable them. |
|
200Mi |
As needed but should conform to the standard Kubernetes notation for memory requests as documented here. |
|
UNLIMITED |
As needed but should conform to the standard Kubernetes notation for memory limits as documented here. |
|
shared |
|
In order to update an NFS server Pod attribute, run the following command:
# robin config update nfs <attribute> <valid_value>
Example
# robin config update nfs shared_pod_placement SPREAD
The 'nfs' attribute 'shared_pod_placement' has been updated
Note
The modified values only applicable to NFS server Pod to be created. The updated values are not applied to existing NFS server Pods.
5.14.5. List all NFS server Pods¶
To view the list of all NFS server Pods currently present on the cluster alongside additional details such as the ID, state, Kuberentes name, type and associated host for each Pod, run the following command:
# robin nfs server-list --json
|
Output in JSON |
Example
# robin nfs server-list
+--------+-------------------------+---------------------------------+---------------------+--------+
| Pod ID | NFS Server Pod | Hostname | NFS Server Pod Type | State |
+--------+-------------------------+---------------------------------+---------------------+--------+
| 180 | robin-nfs-excl-v108-180 | hypervvm-62-35.robinsystems.com | EXCLUSIVE | ONLINE |
| 181 | robin-nfs-shared-181 | hypervvm-62-35.robinsystems.com | SHARED | ONLINE |
| 170 | robin-nfs-excl-v107-170 | hypervvm-62-33.robinsystems.com | EXCLUSIVE | ONLINE |
| 185 | robin-nfs-excl-v104-185 | hypervvm-62-34.robinsystems.com | EXCLUSIVE | ONLINE |
| 184 | robin-nfs-excl-v110-184 | hypervvm-62-35.robinsystems.com | EXCLUSIVE | ONLINE |
+--------+-------------------------+---------------------------------+---------------------+--------+
5.14.6. List all NFS exports¶
To view the list of NFS exports currently present on the cluster alongside additional details such as the ID, state, associated RWX volume, NFS server Pod and client host for each export, run the following command:
# robin nfs export-list --server <server>
--volume <volume>
--verbose
|
Filter the list of NFS exports by the specified NFS server Pod. Either the NFS server Pod name or ID should be given |
|
Filter the list of NFS exports by the specified volume. Either the volume name or ID should be given |
|
Include additional information in the output |
Example
# robin nfs export-list
+--------------+-----------+------------------------------------------+-------------------------+-----------------------------------------------------------------------+
| Export State | Export ID | Volume | NFS Server Pod | Export Clients |
+--------------+-----------+------------------------------------------+-------------------------+-----------------------------------------------------------------------+
| READY | 18 | pvc-2985f5f7-fd32-4645-95d1-551bce9ed002 | robin-nfs-excl-v112-175 | ["hypervvm-62-33.robinsystems.com"] |
| READY | 21 | pvc-9b1ea557-f0f5-419d-ad2a-54eed25c22c1 | robin-nfs-excl-v115-179 | ["hypervvm-62-33.robinsystems.com"] |
| READY | 2 | pvc-6ec4aa2d-6b56-4746-85c2-4bc8bf494115 | robin-nfs-shared-181 | ["hypervvm-62-35.robinsystems.com"] |
| READY | 5 | pvc-6f5747b5-88c9-4e92-9547-0cf7cdf7b12a | robin-nfs-shared-181 | ["hypervvm-62-35.robinsystems.com","hypervvm-62-33.robinsystems.com"] |
| READY | 4 | pvc-a5e14684-761b-4f3e-8f0a-a1828de3fa3f | robin-nfs-shared-181 | ["hypervvm-62-35.robinsystems.com"] |
| READY | 13 | pvc-7fb597c8-f976-4ea6-9422-5349e37e544d | robin-nfs-excl-v107-170 | ["hypervvm-62-34.robinsystems.com"] |
| READY | 19 | pvc-33827f5a-4004-49fb-b6ef-22f3b0ff6c40 | robin-nfs-excl-v113-182 | ["hypervvm-62-34.robinsystems.com"] |
+--------------+-----------+------------------------------------------+-------------------------+-----------------------------------------------------------------------+
5.14.7. List all applications associated with an NFS server Pod¶
To view the list of all applications currently present on the cluster that are linked to a NFS server Pod alongside additional details such as the name, type and associated NFS server Pod for each application, run the following command:
# robin nfs app-list --server <server>
|
Filter applications that are using the respective NFS server Pod. |
|
Output in |
Note
Only applications whose objects (Pods, controllers etc.) have both the app
and release
labels within their definition or contain the updated app.kubernetes.io/name
and app.kubernetes.io/instance
labels within their specification will be shown by the above command.
Example
# robin nfs app-list
+-------------+------------------+----------------------+
| Application | Application Type | NFS Server |
+-------------+------------------+----------------------+
| myapp1 | helm | robin-nfs-shared-181 |
| myapp2 | helm | robin-nfs-shared-181 |
| myapp3 | helm | robin-nfs-shared-181 |
+-------------+------------------+----------------------+
5.14.8. View NFS server Pod used by application¶
You can view the following information about the NFS server Pod being used by the application:
Name of application
Name of volume
Name of NFS server Pod
To view the NFS server Pod being used by an application, run the following command:
# robin nfs server-info [name]
--json <json>
|
Name of the Application. |
|
Output in |
Example
# robin nfs server-info myapp1
+-------------+------------------------------------------+----------------------+
| Application | Volume Name | NFS Server Pod |
+-------------+------------------------------------------+----------------------+
| myapp1 | pvc-6ec4aa2d-6b56-4746-85c2-4bc8bf494115 | robin-nfs-shared-181 |
+-------------+------------------------------------------+----------------------+
5.14.9. Non-root user configuration¶
In Kubernetes, only root user(s) can access all persistent volumes. Moreover, by default non-root users don’t have write permission on the volume mount path for NFS-backed storage. As a result, if a standard RWX volume is used within an application’s configuration that assumes a non-root user as the owner of the mount path, the container will fail to be provisioned due to a lack of sufficient permissions. Detailed below are two methods through which the ownership of the the RWX volume can be modified. Although both solutions rely on creating a custom StorageClass, one assumes prior knowledge of the user ID and group ID of the owner of the necessary mount path(s) whilst the other is more general albeit less secure resolution.
5.14.9.1. Preknown UID and GID¶
If the user ID and group ID associated with the container that needs access to an RWX volume is known beforehand, the gidFixed
and uidFixed
parameters can be specified within a StorageClass that uses robin
as its provisioner. This results in any users matching these security parameters having read and write access for volumes provisioned using this StorageClass. As a result if a Pod’s security context contains equivalent values for the runAsUser
and runAsGroup
parameters respectively, it will be able to write to the NFS-backed file storage of a RWX volume created with the custom StorageClass. This approach provides stricter access control as only the specified non-root GID and UID have full permissions for the provisioned volume.
The following is a sample YAML file for a StorageClass where the UID and GID values are specified:
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
labels:
app.kubernetes.io/instance: robin
app.kubernetes.io/managed-by: robin.io
app.kubernetes.io/name: robin
metadata:
name: robin-gid
parameters:
gidAllocate: "true"
gidFixed: "1001"
uidFixed: "1001"
media: HDD
provisioner: robin
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
Note
There is a known permission issue in Kubernetes when a volume is mounted using the subPath
parameter for non-root users. As a workaround, the subPath
parameter can be replaced or an init container can be used to change the ownership of the path beforehand. More details about the issue can be found here.
5.14.9.2. Unknown UID and GID¶
If the user ID and group ID associated with the container that needs access to an RWX volume is not known beforehand the runAsAny
parameter can be specified within a StorageClass that uses robin
as its provisioner. This enables any user other than the root user to read or write to an NFS mountpoint of an RWX volume. Moreover this is particularly useful in the scenario where multiple containers running as multiple users from different groups need access to the RWX volume data.
The following is a sample YAML file for a StorageClass where the runAsAny
parameter is enabled:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: run-as-any-imm
labels:
app.kubernetes.io/instance: robin
app.kubernetes.io/managed-by: robin.io
app.kubernetes.io/name: robin
provisioner: robin
reclaimPolicy: Delete
allowVolumeExpansion: true
volumeBindingMode: Immediate
parameters:
replication: '2'
media: HDD
runAsAny: "true"
5.15. Managing Application Ephemeral Volumes¶
Robin CNP supports Application Ephemeral Volumes (AEVs). An AEV is non-persistent temporary storage that is attached to a Robin bundle application and consequently available on-demand for use. They are mounted inside application container(s) at a specified mount point which in turn allows the application to access the files inside the AEV filesystem. When an application is stopped or deleted the storage space used by an AEV will be reclaimed such that it can be used by other applications on the cluster. On the other hand, when an application is restarted the requested AEV(s) are provisioned again.
Note
The storage space consumed by an AEV is not reserved by a stopped application. As a result, there is no guarantee that the application will be able to restart given the fact that there might not be enough storage space to satisfy the AEV(s) requirements.
Robin provides multiple ways to provision an application with AEVs; namely AEV(s) can either be configured within the manifest file of a Robin bundle, within the template of an application to be deployed or can be set at runtime using the Robin UI. Each of these methods are described in the sections below.
5.15.1. Configuring Application Ephemeral Volumes¶
AEVs can be configured within the manifest file of the bundle the application is based of. More details about configuring AEVs within the manifest file can be found here. In addition they can also be specified at runtime via the input YAML which is used to customize a template an application is based of. More details on how to configure AEVs within a template when creating an application can be found here.
5.15.2. Create Application Ephemeral Volumes from Robin UI¶
The Robin UI contains full support for provisioning AEVs. When creating an application from a bundle, there is an option of adding one or more AEVs for each role defined in the application manifest. If the required AEVs are already specified within the manifest file, the AEV section automatically appears populated with the preconfigured AEVs. However, these can be modified to suit the needs of the application deployment at. runtime. On the other hand if no AEVs have been specified within the manifest, the APPLICATION EPHEMERAL STORAGE
option must be enabled and the respective AEV(s) configured in order for them to be provisioned alongside the application.
Note
A maximum of 10 AEVs per application can be provisioned via the Robin UI.
5.15.3. Application Ephemeral Volumes in Snapshots and Backups¶
AEVs are not included in application snapshots and backups. They are, however, included in the application spec that is part of the metadata captured with each snapshot and backup. New volumes will be created for each configured AEV when creating a clone of an application from an application snapshot, or a new applications from an application backup.
Note
When creating a clone or new application from a snapshot or backup that contains AEVs, special care needs to be taken if the disk_tag
attribute is specified for any of the AEVs. This is because there needs to be an adequate number of disks that not only match the tag specified but also satisfy the storage space requirement for the new AEVs. If this is not the case, the tag specified may need to be modified or removed entirely before deploying the new application instance.
5.16. Auto Disk Rebalance¶
Robin supports an Auto Disk Rebalance feature which manages the storage space of all disks in order to ensure that the space used on any disk never exceeds a certain threshold. This feature is enabled by default, but can be disabled.
5.16.1. How it works¶
The storage space on a disk is used by one or more volumes. Over time, some disks in the cluster might use storage space to their maximum threshold capacity, while other disks might still have free space.
Robin Central Manager (RCM) continuously collects the physical usage of all disks in the cluster from the Storage Manager (SM) and updates its database. When a disk reaches a high watermark, the disk rebalance job automatically starts to move the volumes from the high watermark disk to the below low watermark disk.
SM selects the volume slices from a high watermark disk and moves these slices to the below low watermark disk. The target disk is chosen based on the following scenarios:
The current physical usage of the disk is below the low watermark threshold.
The physical usage after the volume slices movement must not exceed the low watermark threshold.
5.16.2. Watermark threshold¶
The watermark threshold is an attribute that enables you to set the maximum and minimum limits on the disk’s space usage.
There are two types of watermarks:
High watermark - the maximum threshold of the used disk space that, when exceeded, automatically triggers the disk rebalancing. The default value is 90%.
Low watermark - the minimum threshold of the used disk space that, when reached, automatically stops the disk rebalancing. The default value is 80%.
Note
The low watermark value cannot be greater than or equal to the high watermark value.
5.16.3. Configure high watermark for disk¶
The high watermark threshold for a disk can be configured by updating the respective attribute as shown in the following command:
# robin config update server disk_used_space_high_watermark <value>
Example
# robin config update server disk_used_space_high_watermark 87
The 'server' attribute 'disk_used_space_high_watermark' has been updated
Note
The value set above is a percentage and by default, the high watermark threshold is 90%.
5.16.4. Configure low watermark for disk¶
The low watermark threshold for a disk can be configured by updating the respective attribute as shown in the following command:
# robin config update server disk_used_space_low_watermark <value>
Example
# robin config update server disk_used_space_low_watermark 75
The 'server' attribute 'disk_used_space_low_watermark' has been updated
Note
The value set above is a percentage and by default, the low watermark threshold is 80%.
5.16.5. Disable Auto Disk Rebalance¶
The Auto Disk Rebalance feature can be disabled in order to allow users to manage the storage space on disks manually. This can be achieved by setting the high watermark threshold needs to 100% as shown in the example below:
# robin config update server disk_used_space_high_watermark 100
The 'server' attribute 'disk_used_space_high_watermark' has been updated
Note
By default, the Auto Disk Rebalance feature is enabled.
5.17. Thin Provisioning¶
Robin supports thin provisioning of the Volumes so that large storage volumes can be created without upfront physical capacity. Thin provisioning is disabled by default and can be enabled on a cluster by updating the storage_provision_factor
config attribute to value greater than 1.
However precaution must be taken when thin provisioning is enabled especially if there exists application(s) on the cluster that write data to disk resulting in physical space usage. This is because out of space issues may be encountered by said application(s) due to the aforementioned writes. For example, a drive of size 100GB can host 2 volumes with a total size of 200GB when thin provisioning is enabled but if the combined size of the data written to those volumes goes above 100GB, the volumes would see ERR_NOSPACE errors and filesystem would be moved to read-only state. As a result, thin provsioned clusters must be actively managed.
5.17.1. View current Thin Provisioning factor¶
In order to check the current value for storage_provision_factor
config attribute and also the current storage capacity on the cluster, run the following commands. Note that the max amount that can be allocated from the drives is roughly 80% of their capacity given the value of the storage_provision_factor
.
# robin config list server storage_provision_factor
Section | Attribute | Value
--------+--------------------------+-------
server | storage_provision_factor | 0.8
# robin drive list
ID | WWN | Host | RPool | Path /dev/disk/by-id | Size(GB) | Movable | Type | Free/Max(GB) | Vols | Role | Status | LastOpr | Write Unit
---+------------------------------------+---------------+---------+----------------------------------------+----------+---------+------+--------------+------+---------+--------+---------+------------
1 | 0x60022480aa4ad2c596745b897d5051 | centos-02-250 | default | scsi-360022480aa4ad2c596745b897d5051 | 50 | N | HDD | 38/38 (100%) | 0/10 | Storage | ONLINE | READY | 512
2 | 0x600224806c9386e9faab2c271b2581 | centos-02-250 | default | scsi-3600224806c9386e9faab2c271b2581 | 100 | N | HDD | 38/38 (100%) | 1/10 | Storage | ONLINE | READY | 4096
Only storage disks are shown. Issue `robin disk list --role all` to view all disks
5.17.2. Update Thin Provisioning factor¶
In order to update the thin provisioning factor and validate that the max amount that can be allocated. from the drives has been adjusted accordingly, run the following commands. Note that the max allocatable amount is roughly 200% of each drive’s respective capacity given the value of the storage_provision_factor
.
Note
When the storage_provision_factor
attribute has a value of greater than 1, thin provisioning is enabled. In the case that it is lower than 1, thin provisioning is disabled.
# robin config update server storage_provision_factor 2
The 'server' attribute 'storage_provision_factor' has been updated
# robin config list server storage_provision_factor
Section | Attribute | Value
--------+--------------------------+-------
server | storage_provision_factor | 2
# robin drive list
ID | WWN | Host | RPool | Path /dev/disk/by-id | Size(GB) | Movable | Type | Free/Max(GB) | Vols | Role | Status | LastOpr | Write Unit
---+------------------------------------+---------------+---------+----------------------------------------+----------+---------+------+--------------+------+---------+--------+---------+------------
1 | 0x60022480aa4ad2c596745b897d5051 | centos-02-250 | default | scsi-360022480aa4ad2c596745b897d5051 | 50 | N | HDD | 96/96 (100%) | 0/10 | Storage | ONLINE | READY | 512
2 | 0x600224806c9386e9faab2c271b2581 | centos-02-250 | default | scsi-3600224806c9386e9faab2c271b2581 | 100 | N | HDD | 96/96 (100%) | 1/10 | Storage | ONLINE | READY | 4096
Only storage disks are shown. Issue `robin disk list --role all` to view all disks
5.18. Storage Metrics¶
By default, Robin exposes certain storage metrics that can be scraped and manipulated by end users to suit their needs. These metrics cover a wide variety of objects, ranging from device based statistics such as their usage to details on individual application read and write operations on a volume. Each section detailed below is a grouping of related metrics with a description of each metric attached.
5.18.1. Disk based Metrics¶
Listed below are several disk related metrics that are exposed by Robin:
Metric |
Description |
robin_disk_freeslices |
The number of free slices on a disk for a new storage request from an application. Each slice is 1GB in size. |
robin_disk_maxsegs |
The number of segments in a disk. Each segment is 32MB in size. |
robin_disk_nsegs |
The number of used segments in a disk. |
robin_disk_rawused |
The used space of a disk, represented in bytes. |
robin_disk_size |
The capacity of a disk, represented in bytes. |
robin_disk_freespace |
The free space on a disk that can be used for allocations, represented in bytes. |
robin_disk_maxvols |
The maximum number of Kubernetes volumes that can be stored in a disk. The default size is 10. |
robin_disk_nvols |
The number of Kubernetes volumes currently stored on a disk. |
robin_disk_freevols |
The number of additional Kubernetes volumes that can be accommodated on a disk. |
robin_disk_maxslices |
The maximum number of slices that can be accommodated on a disk. |
robin_disk_nslices |
The number of used slices of a disk. |
5.18.2. Read/Write based Metrics¶
Listed below are several read and write based metrics related to volumes that are exposed by Robin:
Metric |
Description |
robin_rdvm_vol_total_bytes_read |
The number of bytes read from a volume. |
robin_rdvm_vol_total_bytes_written |
The number of bytes written to a volume. |
robin_rdvm_vol_total_read_ios |
The number of read requests on a volume. |
robin_rdvm_vol_total_read_qdepth |
The number of pending reads in the queue for a volume. |
robin_rdvm_vol_total_read_usecs |
The cumulative time in microseconds taken for all read requests on a volume. |
robin_rdvm_vol_total_write_ios |
The number of write requests to a volume. |
robin_rdvm_vol_total_write_qdepth |
The number of pending writes in the queue for a volume. |
robin_rdvm_vol_total_write_usecs |
The cumulative time in microseconds taken for all write requests on a volume. |
Listed below are several read and write based metrics related to disks that are exposed by Robin:
Metric |
Description |
robin_rdvm_dev_total_bytes_read |
The number of bytes read from a specified storage device for a specified volume. |
robin_rdvm_dev_total_bytes_written |
The number of bytes written to a specified storage device for a specified volume. |
robin_rdvm_dev_total_read_ios |
The number of reads from a specified storage device for a specified volume. |
robin_rdvm_dev_total_read_qdepth |
The number of pending reads in the queue on a specified storage device for a specified volume. |
robin_rdvm_dev_total_read_usecs |
The cumulative time in microseconds taken by all read requests on a specified storage device for a specified volume. |
robin_rdvm_dev_total_write_ios |
The number of writes to the specified storage device for a specified volume. |
robin_rdvm_dev_total_write_qdepth |
The number of pending writes in the queue on a specified storage device for a specified volume. |
robin_rdvm_dev_total_write_usecs |
The cumulative time in microseconds taken by all write requests on a specified storage device for a specified volume. |
Listed below are several read and write based metrics related to applications that are exposed by Robin:
Metric |
Description |
robin_rio_vol_total_bytes_read |
The number of bytes that an application reads from a volume. |
robin_rio_vol_total_bytes_written |
The number of bytes that an application wrote to a volume. |
robin_rio_vol_total_read_ios |
The number of the read requests that an application performed on a volume. |
robin_rio_vol_total_read_qdepth |
The number of the pending read requests from an application on a volume. |
robin_rio_vol_total_read_usecs |
The cumulative time in microseconds taken for all read requests on a volume. |
robin_rio_vol_total_write_ios |
The number of writes requested by an application on a volume. |
robin_rio_vol_total_write_qdepth |
The number of pending writes from an application on a volume. |
robin_rio_vol_total_write_usecs |
The cumulative time in microseconds taken for all write requests on a volume. |
5.18.3. Snapshot based Metrics¶
Listed below are several snapshot related metrics that are exposed by Robin:
Metric |
Description |
robin_snap_dsegs |
The number of on-disk segments written by a snapshot. |
robin_snap_nclones |
The number of clones of a snapshot. |
robin_snap_osegs |
The total number of segments owned by a snapshot. |
robin_snap_state |
The snapshot state of a volume. |
5.18.4. Volume based Metrics¶
Listed below are several volume related metrics that are exposed by Robin:
Metric |
Description |
robin_vol_nsnaps |
The number of snapshots of a volume. |
robin_vol_rawused |
The number of used bytes for a volume. |
robin_vol_size |
The allocated size of a volume. |
5.18.5. RCM Metrics¶
Listed below are the RCM metrics:
Metric |
Description |
robinio_robin_server_api_requests_created |
The number of API calls based on its response status code |
robin_vol_replicas_status |
Replicas overall status. 1 Represents health. 0 Represents degraded |
robin_vol_replicas_degradation |
Degradation status. 100 represents fully degraded while 0 is no degradation. |
5.18.6. Accessing Storage Metrics¶
All the metrics detailed above can be accessed by running the following command:
# curl -k "https://<ipaddress>:29446/metrics"
The ipaddress
parameter showcased above can be one of three options:
The Cluster IP associated with the
robin-master
service. This can be attained by running the command:kubectl get svc -n robinio robin-master
.The IP Address of the node which is currently running as the master manager node.
The Virtual IP Address associated with cluster. Note this option is only applicable to highly available clusters with multiple manager nodes.
Example
# curl -k "https://172.19.47.240:29446/metrics"
# Robin storage/server metrics
robin_server{instance="master"} 1
robin_disk_freeslices{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_freevols{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_rawused{wwn="0x60022480db8a635ee6764e60418f9ef7",devpath="/dev/sda",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freeslices{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_freevols{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_rawused{wwn="0x600224803f4fe2dbd4d0bca550800af9",devpath="/dev/sdb",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freeslices{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_freevols{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 107374182400
robin_disk_rawused{wwn="0x60022480e965d11b83cd0d074f84fe4f",devpath="/dev/sdc",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freeslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 53687091200
robin_disk_freevols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 53687091200
robin_disk_rawused{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-root",devpath="/dev/dm-0",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freeslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 8254390272
robin_disk_freevols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 8254390272
robin_disk_rawused{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-swap",devpath="/dev/dm-1",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freeslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_freespace{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 44350570496
robin_disk_freevols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_maxvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 10
robin_disk_maxslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nsegs{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nslices{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_nvols{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
robin_disk_size{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 44350570496
robin_disk_rawused{wwn="0x60022480db8a635ee6764e60418f9ef7-centos-home",devpath="/dev/dm-2",node_idx="1", node_name="telxvm-53-150"} 0
5.19. Handling Disruptions¶
With Robin, highly available applications can be deployed on Kubernetes as Robin can handle failures of drives, rack or hosts automatically. On a Baremetal setup, volumes can be setup with a replication factor of 2 or 3 to ensure that storage is available even if a drive fails. Users can also choose the fault domain to be ‘host’ to protect against node reboots or lost.
However, in a public cloud environment the cloud disks can be detached from one cloud node and reattached to another one. For example, in AWS an EBS volume can be detached on one EC2 host and reattached to a different EC2 host. Same with GCP where a PD can be moved across GCE nodes. If a cloud node (EC2, GCE, Azure VM) is terminated or rebooted, one would want any cloud drive attached to them (EBS, PD, Block) to be moved to the one or more of the remaining healthy nodes automatically. This is not limited to just cloud disks, but also SAN LUNS that are offered to Robin as disks. The SAN LUNS can also be multi-mounted onto multiple nodes or moved around from node to node. User can still choose to replicate volume on public cloud as it takes sometime to detach and attach drives on cloud platforms.
Just having the storage available during a disruption will not help if Kubernetes can not access it from the Pod. For example a Kubernetes StatefulSet serializes the mounting and unmounting of a volume to protect against possible corruptions. Robin utilizes smart detection techniques to ensure that even if a volume is mounted on multiple nodes, it can differentiate the IOs issued from the previous stale mount and the new mount. With this consistency guarantees, Robin enables the Kubernetes StatefulSet to unmount a volume from a dead node and remount it on a healthy node where the Pod is scheduled to run. Robin actively monitors these events to allow for the fast failover of the Pods without user intervention and consequently enables users to reliably deploy highly available stateful applications on Kubernetes.
5.20. Hardware RAID Controllers¶
5.20.1. Robin Recommendations¶
Robin recommends not using Redundant Array of Independent Disks (RAID) configurations for the physical storage devices that you plan to format with Robin storage. To understand the reasons for this recommendation, review the explanations presented here. However if RAID usage cannot be avoided, Robin recommends the following:
Use the hardware RAID controllers only to set up RAID-1 protection for boot and OS devices. This ensures that the failure of one device does not take the entire node down.
To protect Robin volumes against node and rack failures, you must configure replication across the fault domains. All RAID configurations (RAID-0, RAID-1, RAID-5, and RAID-6) protect data only against device failure on the node. They reduce the storage capacity of the cluster, thus increasing the data storage costs.
Robín’s replication provides maximum protection against all hardware failures including storage devices, storage nodes, and rack failures.
If a RAID controller has a cache, it must have a battery backup. If the cache on the RAID controller does not have a battery backup, Robin recommends disabling the cache as the data on the cache could be lost during a power outage.
5.20.2. Advantages and Disadvantages¶
The following are the advantages and disadvantages of RAID usage with Robin:
RAID-0 - In RAID-0, data is striped across all devices and provides the best performance. However, if one of the physical devices fails, the data on the RAID volume is lost.
RAID-1 - In RAID-1, data is mirrored across two devices. It gives the most redundancy. However, the performance of the volume is determined by the performance of the slowest device in the mirror and the data capacity is reduced by half.
RAID-5 - In RAID-5, data is striped across “n-1” devices. The controller calculates and writes parity data to the nth device. The RAID-5 configuration can tolerate one device failure and provides good performance. However, if one of the devices fails, the admin has to replace the device immediately and start a RAID rebuild to maintain the redundancy. All devices should be of the same size or the size of the smallest device decides the total usable capacity.
RAID-6 - In RAID-6, data is striped across “n-2” devices. The controller calculates and writes parity to two devices. The RAID-6 configuration can tolerate two device failures and provides good performance. However, the disadvantages are the same as RAID-5.
The striped RAID configurations (RAID-0, RAID-5, and RAID-6) provide better IO performance. However, RAID-0 does not give data protection, and RAID-5 and RAID-6 configurations reduce the storage capacity.
All RAID configurations are managed outside of Robin CNP. Therefore, the administrator must manually manage the device failures and it leads to an increase in operations cost.
If you enable hardware RAID, the RAID controller becomes a single point of failure for all the storage devices on the node. If the RAID controller fails, all data on all the storage devices in the node is lost.
Note
For more details on Robin recommendations for RAID controllers, review the points made here.