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..38963f9 --- /dev/null +++ b/reference/snapshot-restore.md @@ -0,0 +1,110 @@ +--- +Title: Volume Restore from a Snapshot +--- + +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 + +### 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: + +{% hint style="info" %} +thin: "true" and repl: "1" is the only supported combination. +{% endhint %} + +{% 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 < 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 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 %} @@ -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/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, 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. + +