Skip to content

Commit fdf4e70

Browse files
committed
docs: Create Documentation for Cordon Pools and modify other Docs
Signed-off-by: Bala Harish <bala.harish.ac@datacore.com>
1 parent 3cd752a commit fdf4e70

File tree

5 files changed

+112
-17
lines changed

5 files changed

+112
-17
lines changed
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
---
2-
id: node-cordon
3-
title: Node Cordon
2+
id: cordon-node
3+
title: Cordon a Node
44
keywords:
55
- Node Cordon
6+
- Cordon Node
67
description: This guide explains about the Node Cordon feature.
78
---
89

10+
# Cordon a Node
11+
12+
## Overview
13+
914
Cordoning a node marks or taints the node as unschedulable. This prevents the scheduler from deploying new resources on that node. However, the resources that were deployed prior to cordoning off the node will remain intact.
1015

1116
This feature is in line with the node-cordon functionality of Kubernetes.
1217

18+
## Cordon a Node
19+
1320
To add a label and cordon a node, execute:
1421
**Command**
1522
```
@@ -29,13 +36,12 @@ To view the labels associated with a cordoned node, execute:
2936
kubectl-mayastor get cordon node <node_name>
3037
```
3138

32-
### How to uncordon a node?
39+
## Uncordon a Node
3340

3441
To make a node schedulable again, execute:
3542
**Command**
3643
```
3744
kubectl-mayastor uncordon node <node_name> <label>
3845
```
3946

40-
The above command allows the Kubernetes scheduler to deploy resources on the node.
41-
47+
The above command allows the Kubernetes scheduler to deploy resources on the node.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
id: cordon-pools
3+
title: Cordon Pools
4+
keywords:
5+
- Cordon Replicated PV Mayastor Pools
6+
- Cordon and Uncordon Pools
7+
- Cordon Pools
8+
description: This guide explains how to cordon and uncordon pools.
9+
---
10+
11+
# Cordon Pools
12+
13+
## Overview
14+
15+
Pool Cordon allows you to temporarily prevent new replicas, snapshots, restores, or imports from being scheduled on a specific Replicated PV Mayastor pool.
16+
Use cordon during planned maintenance, hardware investigations, or controlled decommissioning. Existing data remains fully available and unaffected until explicitly migrated or removed.
17+
18+
## Requirements
19+
20+
You can configure the maximum pool size using the `maxExpansion` field in the DiskPool CR.
21+
22+
- Replicated PV Mayastor deployment with a version that supports pool cordoning
23+
24+
- `kubectl-mayastor` or `kubectl-openebs` plugin installed and configured with appropriate administrative access
25+
26+
## Cordon a Pool
27+
28+
When you cordon a pool, specify the resource types you want to block by including their flags. A flag’s presence sets that resource type to true (cordoned). If you omit a flag, that resource type remains uncordoned (false).
29+
30+
Cordon a pool to block new replicas and imports using `kubectl-openebs`. For Example: `kubectl-openebs mayastor`
31+
32+
**Cordon a Pool to Block New Replicas and Imports**
33+
34+
```
35+
kubectl-openebs mayastor cordon pool <pool-name> --replicas
36+
```
37+
38+
```
39+
kubectl-openebs mayastor cordon pool <pool-name> --replicas --imports
40+
```
41+
42+
**Flags**
43+
44+
- `--replicas` - Prevent new replicas from being created on the pool
45+
- `--snapshots` - Prevent new snapshots from being scheduled
46+
- `--restores` - Prevent new restore operations on the pool
47+
- `--imports` - Prevent pool import operations.
48+
49+
## Uncordon a Pool
50+
51+
When you uncordon a pool, you remove the scheduling restrictions and allow new resources to be created again. Use this when maintenance is complete or when you want the pool to resume normal operations.
52+
53+
**Uncordon a Pool and Re-enable All Resource Scheduling**
54+
55+
```
56+
kubectl-openebs mayastor uncordon pool <pool-name> --replicas --imports
57+
```
58+
59+
**Flags**
60+
61+
- The same flags apply as with cordon, letting you selectively enable scheduling for replicas, snapshots, restores, and imports.
62+
- By default, running uncordon pool without flags will remove all existing cordons, restoring full scheduling for the pool.
63+
64+
## Typical Use Cases
65+
66+
- Planned Maintenance: Isolate a pool before firmware upgrades or hardware replacement.
67+
- Capacity Management: Prevent new replicas on a pool nearing its operational threshold.
68+
- Controlled Decommissioning: Cordon, migrate replicas, and then retire the pool.
69+
70+
:::note
71+
- Cordoning blocks new resources only. It does not move or delete existing data.
72+
- Make sure enough other pools remain uncordoned to keep volumes healthy.
73+
- Pools stay cordoned across restarts until you explicitly uncordon them.
74+
:::
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
---
2-
id: node-drain
3-
title: Node Drain
2+
id: drain-node
3+
title: Drain a Node
44
keywords:
55
- Node Drain
6+
- Drain a Node
67
description: This guide explains about the Node Drain feature.
78
---
89

9-
The node drain functionality marks the node as unschedulable and then gracefully moves all the volume targets off the drained node.
10+
# Drain a Node
11+
12+
## Overview
13+
14+
The node drain functionality marks the node as unschedulable and then gracefully moves all the volume targets off the drained node.
15+
1016
This feature is in line with the [node drain functionality of Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/).
1117

18+
## Drain a Node
1219

1320
To start the drain operation, execute:
1421

@@ -26,6 +33,8 @@ To get the list of nodes on which the drain operation has been performed, execut
2633
kubectl-mayastor get drain nodes
2734
```
2835

36+
## Halt Drain
37+
2938
To halt the drain operation or to make the node schedulable again, execute:
3039

3140
**Command**

docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/kubectl-plugin.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ keywords:
99
- Replicated PV Mayastor kubectl plugin
1010
description: This guide will help you to view and manage Replicated PV Mayastor resources such as nodes, pools, and volumes.
1111
---
12-
# Kubectl Plugin
12+
# Kubectl Mayastor Plugin
1313

1414
The **Mayastor kubectl plugin** can be used to view and manage Replicated PV Mayastor resources such as nodes, pools and volumes. It is also used for operations such as scaling the replica count of volumes.
1515

16-
## Install kubectl plugin
16+
## Install `kubectl Mayastor plugin`
1717

18-
- The Mayastor kubectl plugin is available for the Linux platform. The binary for the plugin can be found [here](https://github.com/mayadata-io/mayastor-control-plane/releases).
18+
- The Mayastor kubectl plugin is available for the Linux platform. You can download the binary for the plugin from the [releases page](https://github.com/mayadata-io/mayastor-control-plane/releases).
1919

20-
- Add the downloaded Mayastor kubectl plugin under $PATH.
20+
- After downloading, add the downloaded Mayastor kubectl plugin under $PATH.
2121

2222
To verify the installation, execute:
2323

docs/sidebars.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ module.exports = {
461461
{
462462
type: "doc",
463463
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/kubectl-plugin",
464-
label: "Kubectl Plugin"
464+
label: "Kubectl Mayastor Plugin"
465465
},
466466
{
467467
type: "doc",
@@ -498,15 +498,21 @@ module.exports = {
498498
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/monitoring",
499499
label: "Monitoring"
500500
},
501+
502+
{
503+
type: "doc",
504+
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/cordon-node",
505+
label: "Cordon Node"
506+
},
501507
{
502508
type: "doc",
503-
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/node-cordon",
504-
label: "Node Cordon"
509+
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/drain-node",
510+
label: "Drain Node"
505511
},
506512
{
507513
type: "doc",
508-
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/node-drain",
509-
label: "Node Drain"
514+
id: "user-guides/replicated-storage-user-guide/replicated-pv-mayastor/advanced-operations/cordon-pools",
515+
label: "Cordon Pools"
510516
},
511517
{
512518
type: "doc",

0 commit comments

Comments
 (0)