Longhorn - Replica unable to start due to low available space in disk
This document (000021268) is provided subject to the disclaimer at the end of this document.
Situation
Longhorn UI shows one volume in Degraded state.
One or more of the replicas are not being scheduled and showing the following error:
"Scheduling Failure. Replica Schedule Failure".
Resolution
- The actual space usage condition:
(Storage Available - Actual Size) > (Storage Maximum * Minimal Available Percentage)/100) - The scheduling space condition:
(Size + Storage Scheduled) <= ((Storage Maximum - Storage Reserved)* Over Provisioning Percentage / 100)
Storage AvailableisStorage Availableof the disk in node detail page in the picture below.Actual Sizeis the actual size of the Longhorn volume.Storage MaximumisStorage Maxof the disk in node detail page in the picture below.Minimal Available Percentageis the setting https://longhorn.io/docs/1.5.3/references/settings/#storage-minimal-available-percentageSizeis the spec size of the Longhorn volume.Storage ScheduledisStorage Scheduledof the disk in node detail page in the picture below.Storage ReservedisStorage Reservedof the disk in node detail page in the picture below.Over Provisioning Percentageis the setting https://longhorn.io/docs/1.5.3/references/settings/#storage-over-provisioning-percentage
If one or both of these requisites are not being fulfilled, it is expected that some replica/s can not get scheduled.
To solve this, you may try to free space, or maybe you want to reduce your
Minimal Available Percentage¹, e.g., from 20 (0.2) to 10 (0.1).After both pre-conditions are satisfied, you should be able to schedule the volume with no issues.
Cause
Additional Information
Minimal Available Percentage value should be around 20-25% if you are making use of Longhorn in the root disk. However, if you're using a dedicated disk for Longhorn, you can lower the setting minimal available storage percentage to 10%.You can check these pre-conditions in the Longhorn code here: https://github.com/longhorn/longhorn-manager/blob/16c09fdd296bdd893ceaaa2717456d8ea8cc7036/scheduler/replica_scheduler.go#L709-L710
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021268
- Creation Date: 08-Nov-2023
- Modified Date:30-Nov-2023
-
- SUSE Rancher Longhorn
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com