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.
Node Failure Handling
There is one pod with the naming schema <Backing image name>-<first 8 characters of the disk UUID> 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.
After the node is back, Longhorn will try to clean up, then recreate the pod for the backing image on the node.
All rebuilding/reused replicas on the node won’t become running until the pod becomes running again.
In brief, Longhorn will automatically recover the backing images after the node is back, users don’t need to worry about it.
The URL of the backing image should be public. We will improve this part in the further.