# Dealing with DiskPressure

**URL:** <https://forums.suse.com/t/dealing-with-diskpressure/16666>\
**Category:** SUSE Storage\
**Created:** [February 24, 2020, 3:18pm UTC](https://forums.suse.com/t/dealing-with-diskpressure/16666 "2020-02-24T15:18:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manuel-koch](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@manuel-koch](https://forums.suse.com/u/manuel-koch)\
**Post date:** [February 24, 2020, 3:18pm UTC](https://forums.suse.com/t/dealing-with-diskpressure/16666/1 "2020-02-24T15:18:36Z")

</div>

We have a small cluster setup with some nodes ( running longhorn 0.7.0 ) that have rather small disk resources.  
The default longhorn setting for `Storage Minimal Available Percentage` is 10%.  
It seems the default trigger for a k8s node `DiskPressure` signal is 15%.

Thus in the default setup it is likely that longhorn exhausts disk space of a node ( because there is still more than 10% of disk space avail ) and triggers `DiskPressure` because node now has less than 15% of disk space avail.

Shouldn’t longhorn take into account the current level of free disk space that would trigger a `DiskPressure` too to avoid longhorn getting evicted from current node ?  
In such a scenario the replicated volumes get re-scheduled to other nodes, that again may trigger the `DiskPressure` problem.

How can one avoid such chain-reaction ?

With such limited resources I already got two incidences where multiple volumes on nodes got lost because there was one node with DiskPressure in the cluster.

---

<div class="post-metadata">

**Author:** ![yasker](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/yasker/32/137_2.png) [@yasker](https://forums.suse.com/u/yasker)\
**Post date:** [February 24, 2020, 5:19pm UTC](https://forums.suse.com/t/dealing-with-diskpressure/16666/2 "2020-02-24T17:19:25Z")

</div>

Yeah, currently we didn’t take the available space into the consideration of the DiskPressure (though we did take that into consideration when scheduling a replica). We should do that. Can you help to file a github issue for it?

One thing might help in the currently release to reduce the `OverProvisioningPercentage` to e.g. `100%` or even less to stop Longhorn from overprovisioning the volume.

You can also add dedicated disks to Longhorn to prevent competing with system and Kubernetes processes.

---

<div class="post-metadata">

**Author:** ![manuel-koch](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@manuel-koch](https://forums.suse.com/u/manuel-koch)\
**Post date:** [February 25, 2020, 8:23am UTC](https://forums.suse.com/t/dealing-with-diskpressure/16666/3 "2020-02-25T08:23:16Z")

</div>

I have already reduced OverProvisioningPercentage to 125% but soon afterwards the same DiskPressure issue happened again.  
My current setup is StorageMinimalAvailablePercentage = 20% and OverProvisioningPercentage = 100%.

I will try to attach an additional disk for longhorn to some of my nodes to improve stability.

I created ticket [https://github.com/longhorn/longhorn/issues/1068](https://github.com/longhorn/longhorn/issues/1068)

---

<div class="post-metadata">

**Author:** ![manuel-koch](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@manuel-koch](https://forums.suse.com/u/manuel-koch)\
**Post date:** [February 25, 2020, 10:36am UTC](https://forums.suse.com/t/dealing-with-diskpressure/16666/4 "2020-02-25T10:36:08Z")

</div>

I tried your suggestion in adding disks to node(s) and stumbled over an issue ( or maybe it was just my fault setting it up properly ), see [https://github.com/longhorn/longhorn/issues/1069](https://github.com/longhorn/longhorn/issues/1069).
