Create a Volume with a Backing Image

  1. Click Setting > Backing Image in the Longhorn UI.
  2. Click Create Backing Image to create a backing image with a unique name and a valid URL.
  3. During the volume creation, specify the backing image from the backing image list.
  4. Longhorn starts to download the backing image to disks for the replicas when a volume using the backing image is attached to a node.

Restore a Volume with a Backing Image

  1. Click and pick up a backup volume for the restore.
  2. As long as the backing image is already set for the backup volume, Longhorn will automatically choose the backing image during the restore.
  3. Longhorn allows you to re-specify/override the backing image during the restore.
  1. Set the fields backingImage and in a Longhorn StorageClass.
  2. Longhorn starts to download the backing images to disks for the replicas when a volume using the backing image is attached to a node.
  1. The backing image file in a disk will be shared among the replicas when these replicas in the same disk are using the same backing image.
  2. Please be careful of the escape character \ when you input a URL in a StorageClass.
  3. Users need to make sure the backing image existence when they use UI to create or restore a volume with a backing image specified.
  • Longhorn automatically cleans up the backing images in the disk based on the setting Backing Image Cleanup Wait Interval.
  • The unused backing images can be cleaned up manually via the Longhorn UI: Click Setting > Backing Image > CleanupBackingImage of one backing image. Then choose disks.
  • There is one pod with the naming schema handling the actual file for each backing image in each disk. Hence, whether a replica in a disk has access to a backing image totally depends on if the related pod is available or not.
  • When the node is down, Kubernetes evicts the pods on the node, and the backing image download state of the disks on the node will become failed.
  • Available since v1.1.1