From 3105d6039a03ea7f6a760ca1375bbe955f0aefd5 Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Tue, 8 Aug 2023 23:27:35 +0530 Subject: [PATCH 1/8] docs(vol-restore): added a doc for volume restore from a snapshot Signed-off-by: AJ_Datacore --- SUMMARY.md | 1 + reference/snapshot-restore.md | 107 ++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 reference/snapshot-restore.md diff --git a/SUMMARY.md b/SUMMARY.md index 4000953..ee59821 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -23,6 +23,7 @@ * [Node Cordon](reference/node-cordon.md) * [Node Drain](reference/node-drain.md) * [Volume Snapshots](reference/snapshot.md) +* [Volume Restore from Snapshot](reference\snapshot.md) ## Additional Information diff --git a/reference/snapshot-restore.md b/reference/snapshot-restore.md new file mode 100644 index 0000000..6cd2331 --- /dev/null +++ b/reference/snapshot-restore.md @@ -0,0 +1,107 @@ +--- +Title: Volume Restore from a Snapshot +--- + +Volume restore from an existing snapshot will create exact replicas of storage volumes captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore. + +## Prerequisites + +### Step 1: Create a storage class + +To begin, you'll need to create a StorageClass that defines the properties of the snapshot to be restored. Refer to [Storage Class Parameters](reference\storage-class-parameters.md) for more details. Use the following command to create the StorageClass: + + +{% tabs %} +{% tab title="Command" %} +```text +cat < Note the name of the StorageClass, which, in this example, is **mayastor-1-restore**. + + +### Step 2: Create a snapshot + +You need to create a volume snapshot before proceeding with the restore. Follow the steps outlined in [this guide](quickstart/snapshot.md) to create a volume snapshot. + +> Note the snapshot's name, for example, **pvc-snap-1**. + +------------------- + +## Create a volume restore of the existing snapshot + +After creating a snapshot, you can create a PersistentVolumeClaim (PVC) from it to generate the volume restore. Use the following command: + +{% tabs %} +{% tab title="Command" %} +```text +cat < Date: Mon, 28 Aug 2023 16:25:07 +0530 Subject: [PATCH 2/8] docs(snapshot-restore): added a note Signed-off-by: AJ_Datacore --- reference/snapshot-restore.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reference/snapshot-restore.md b/reference/snapshot-restore.md index 6cd2331..358216b 100644 --- a/reference/snapshot-restore.md +++ b/reference/snapshot-restore.md @@ -10,6 +10,9 @@ Volume restore from an existing snapshot will create exact replicas of storage v To begin, you'll need to create a StorageClass that defines the properties of the snapshot to be restored. Refer to [Storage Class Parameters](reference\storage-class-parameters.md) for more details. Use the following command to create the StorageClass: +{% hint style="info" %} +thin: "true" and repl: "1" are the only supported combination. +{% endhint %} {% tabs %} {% tab title="Command" %} From 44aee3550c09270b654a89f21a5918d62cf1a86d Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Mon, 28 Aug 2023 16:26:44 +0530 Subject: [PATCH 3/8] docs(snapshot-restore): added a note Signed-off-by: AJ_Datacore --- reference/snapshot-restore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/snapshot-restore.md b/reference/snapshot-restore.md index 358216b..6038a1e 100644 --- a/reference/snapshot-restore.md +++ b/reference/snapshot-restore.md @@ -11,7 +11,7 @@ Volume restore from an existing snapshot will create exact replicas of storage v To begin, you'll need to create a StorageClass that defines the properties of the snapshot to be restored. Refer to [Storage Class Parameters](reference\storage-class-parameters.md) for more details. Use the following command to create the StorageClass: {% hint style="info" %} -thin: "true" and repl: "1" are the only supported combination. +thin: "true" and repl: "1" is the only supported combination. {% endhint %} {% tabs %} From 7e5845f521d24ddad608f5168d87903afb9333ad Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Tue, 29 Aug 2023 15:20:48 +0530 Subject: [PATCH 4/8] docs: addressed comments Signed-off-by: AJ_Datacore --- reference/snapshot-restore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/snapshot-restore.md b/reference/snapshot-restore.md index 6038a1e..2eb918b 100644 --- a/reference/snapshot-restore.md +++ b/reference/snapshot-restore.md @@ -2,7 +2,7 @@ Title: Volume Restore from a Snapshot --- -Volume restore from an existing snapshot will create exact replicas of storage volumes captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore. +Volume restore from an existing snapshot will create an exact replica of storage volume captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore. ## Prerequisites From a4a9b33b0124cbdfe19deffc3aee305d12e4316d Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Tue, 29 Aug 2023 15:22:22 +0530 Subject: [PATCH 5/8] docs: addressed comments Signed-off-by: AJ_Datacore --- reference/snapshot-restore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/snapshot-restore.md b/reference/snapshot-restore.md index 2eb918b..38963f9 100644 --- a/reference/snapshot-restore.md +++ b/reference/snapshot-restore.md @@ -2,7 +2,7 @@ Title: Volume Restore from a Snapshot --- -Volume restore from an existing snapshot will create an exact replica of storage volume captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore. +Volume restore from an existing snapshot will create an exact replica of a storage volume captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore. ## Prerequisites From 64633a5cb2bf616dd658b023b2822eead9700268 Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Wed, 30 Aug 2023 18:10:35 +0530 Subject: [PATCH 6/8] docs(storage-calss-param): added details on cloneFsIdAsVolumeId Signed-off-by: AJ_Datacore --- reference/storage-class-parameters.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reference/storage-class-parameters.md b/reference/storage-class-parameters.md index 22f68e9..11b29d2 100644 --- a/reference/storage-class-parameters.md +++ b/reference/storage-class-parameters.md @@ -49,7 +49,7 @@ The `agents.core.capacity.thin` spec present in the Mayastor helm chart consists {% hint style="info" %} Note: 1. By default, the volumes are provisioned as `thick`. -2. For a pool of a particular size, say 10 Gigabytes, a volume > 10 Gigabytes cannot be created, as Mayastor 2.3.0 does not support pool expansion. +2. For a pool of a particular size, say 10 Gigabytes, a volume > 10 Gigabytes cannot be created, as Mayastor 2.4.0 does not support pool expansion. 3. The replicas for a given volume can be either all thick or all thin. Same volume cannot have a combination of thick and thin replicas {% endhint %} @@ -75,3 +75,10 @@ The `stsAffinityGroup` ensures that in such cases, the targets are distributed o By default, the `stsAffinityGroup` feature is disabled. To enable it, modify the storage class YAML by setting the `parameters.stsAffinityGroup` parameter to true. +## "cloneFsIdAsVolumeId" + +`cloneFsIdAsVolumeId` is a setting for volume clones with two options: `true` and `false`. By default, it is set to `false`. +- When set to `true`, the created clone/restore's filesystem `uuid` will be set to the new volume `uuid`. This is important because some file systems, like XFS, don't allow duplicate filesystem `uuid` on the same machine by default. +- When set to `false`, the created clone/restore's filesystem `uuid` will be same as the orignal volume `uuid`, but it will be mounted using the `nouuid` flag to bypass duplicate `uuid` validation. + + From 91584d18f4a6aad655481ec69ebcc6f035689177 Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Thu, 31 Aug 2023 17:31:56 +0530 Subject: [PATCH 7/8] docs(storage-calss-param): minor changes Signed-off-by: AJ_Datacore --- reference/storage-class-parameters.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/storage-class-parameters.md b/reference/storage-class-parameters.md index 11b29d2..136f1cc 100644 --- a/reference/storage-class-parameters.md +++ b/reference/storage-class-parameters.md @@ -49,7 +49,7 @@ The `agents.core.capacity.thin` spec present in the Mayastor helm chart consists {% hint style="info" %} Note: 1. By default, the volumes are provisioned as `thick`. -2. For a pool of a particular size, say 10 Gigabytes, a volume > 10 Gigabytes cannot be created, as Mayastor 2.4.0 does not support pool expansion. +2. For a pool of a particular size, say 10 Gigabytes, a volume > 10 Gigabytes cannot be created, as Mayastor currently does not support pool expansion. 3. The replicas for a given volume can be either all thick or all thin. Same volume cannot have a combination of thick and thin replicas {% endhint %} @@ -77,8 +77,8 @@ By default, the `stsAffinityGroup` feature is disabled. To enable it, modify the ## "cloneFsIdAsVolumeId" -`cloneFsIdAsVolumeId` is a setting for volume clones with two options: `true` and `false`. By default, it is set to `false`. -- When set to `true`, the created clone/restore's filesystem `uuid` will be set to the new volume `uuid`. This is important because some file systems, like XFS, don't allow duplicate filesystem `uuid` on the same machine by default. +`cloneFsIdAsVolumeId` is a setting for volume clones/restores with two options: `true` and `false`. By default, it is set to `false`. +- When set to `true`, the created clone/restore's filesystem `uuid` will be set to the restore volume's `uuid`. This is important because some file systems, like XFS, don't allow duplicate filesystem `uuid` on the same machine by default. - When set to `false`, the created clone/restore's filesystem `uuid` will be same as the orignal volume `uuid`, but it will be mounted using the `nouuid` flag to bypass duplicate `uuid` validation. From cc0c1c9beb5354975cad176942aa878668c66bc6 Mon Sep 17 00:00:00 2001 From: AJ_Datacore Date: Thu, 31 Aug 2023 18:23:10 +0530 Subject: [PATCH 8/8] docs(storage-calss-param): minor changes Signed-off-by: AJ_Datacore --- reference/storage-class-parameters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/storage-class-parameters.md b/reference/storage-class-parameters.md index 136f1cc..b3ac783 100644 --- a/reference/storage-class-parameters.md +++ b/reference/storage-class-parameters.md @@ -78,7 +78,7 @@ By default, the `stsAffinityGroup` feature is disabled. To enable it, modify the ## "cloneFsIdAsVolumeId" `cloneFsIdAsVolumeId` is a setting for volume clones/restores with two options: `true` and `false`. By default, it is set to `false`. -- When set to `true`, the created clone/restore's filesystem `uuid` will be set to the restore volume's `uuid`. This is important because some file systems, like XFS, don't allow duplicate filesystem `uuid` on the same machine by default. +- When set to `true`, the created clone/restore's filesystem `uuid` will be set to the restore volume's `uuid`. This is important because some file systems, like XFS, do not allow duplicate filesystem `uuid` on the same machine by default. - When set to `false`, the created clone/restore's filesystem `uuid` will be same as the orignal volume `uuid`, but it will be mounted using the `nouuid` flag to bypass duplicate `uuid` validation.