Snapshots and Clones

With snapshots and clones, you can leverage fast and thin point-in-time snapshots/clones of Lightbits volumes. A snapshot can be taken from a volume, and a volume can be created from a snapshot (aka a clone).

Creating the Initial Volume on Lightbits

To create a sample volume:

Bash
Copy

Get the cluster details for attaching the volume to the client.

Bash
Copy

Connect to the volume from a client to see the NVMe device.

Connect to the volume to attach the NVMe device to the client (this can be executed with a simple ‘for’ loop as well).

Bash
Copy

Check volumes are mapped

Bash
Copy

Sample Output

Bash
Copy

Mount the NVMe device to a mounting point on the client.

Make sure the e2fsprogs package is installed. If not: yum install e2fsprogs.

Bash
Copy

Put some data into the mounted NVMe disk.

Create a file using the dd command:

Bash
Copy

From the Lightbits server, create a snapshot of the initial volume.

Bash
Copy

Put more data from the client side to the mounted disk.

Bash
Copy

Create a clone from the snapshot that was created.

Bash
Copy

Connect to the clone and verify that it holds only the initial data.

If the same ACL is used, the cloned NVMe disk should be attached automatically on the client.

Bash
Copy

Mount the clone to a different directory

Bash
Copy

Check mounts

Bash
Copy

See that only the original sample file exists before the snapshot was taken

Bash
Copy

Roll back a volume to the snapshot, and verify that its contents now only have the file that was created before taking the snapshot.

The rollback operation takes a volume and restores it back to a snapshot state (data + md). It is recommended to either remove active mounts, detach the volume, or flush caches before performing this operation.

The process should be as follows:

  1. Stop process/es that use the volume.
  2. Unmount FS create on top of the volume; e.g., for mount point /mnt/volumetorollback.a. Unmount /mnt/volumetorollback.
  3. Perform rollback via lbcli.
  4. Mount the volume: mount /mnt/volumetorollback.

Unmount the device from the mount point:

Bash
Copy

Check the UUID of the snapshot, and of the volume you would like to roll back:

Bash
Copy

To roll back the volume to the snapshot, run:

Bash
Copy

Mount the volume again from the client side, and verify that only one file is there:

Bash
Copy

Create a snapshot-policy:

Bash
Copy
Bash
Copy

List snapshot-policies:

Bash
Copy

Get snapshot-policies:

Bash
Copy

Rollback volume:

Bash
Copy

Delete snapshots/snapshot-policy:

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard