Linux disk fill
Linux disk fill fills up the available disk space at a given system path for a specific duration.
Use cases
Linux disk fill:
- Induces heavy disk usage scenario on the target Linux machines.
- Simulates a lack of storage space for the underlying applications in the system.
- Validates application failover and data resiliency in the scenario of low disk space.
- This fault can be executed on Ubuntu 16 or higher, Debian 10 or higher, CentOS 7 or higher, RHEL 7 or higher, and openSUSE LEAP 15.4 or higher.
- The
linux-chaos-infrastructure
systemd service should be in an active state, and the infrastructure should be inCONNECTED
state.
Fault tunables
Optional tunables
Tunable | Description | Notes |
---|---|---|
fillPath | System path to fill. | Path to a valid directory. |
fillPercentage | Percentage of available storage space to fill. | Mutually exclusive with fillStorageMebibytes . Defaults to 50 %. |
fillStorageMebibytes | Amount of storage to be filled (in mebibytes). | Mutually exclusive with fillPercentage . |
dataBlockSize | Size of each data block used to fill up the disk (in kilobytes). | Default: 256 KB. |
duration | Duration through which chaos is injected into the target resource (in seconds). | Default: 30 s |
rampTime | Period to wait before and after injecting chaos (in seconds). | Default: 0 s |
Fill path
The fillPath
input variable determines the system path to be filled up.
The following YAML snippet illustrates the use of this environment variable:
# specify the fill path
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-fill
labels:
name: disk-fill
spec:
diskFillChaos/inputs:
fillPath: "/"
duration: 30
Fill percentage
The fillPercentage
input variable determines the percentage of available storage space to be filled up at the given fillPath
.
The following YAML snippet illustrates the use of this environment variable:
# specify the fill percentage
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-fill
labels:
name: disk-fill
spec:
diskFillChaos/inputs:
fillPath: "/"
fillPercentage: 80
duration: 30
Fill storage mebibytes
The fillStorageMebibytes
input variable determines the amount of storage space to be filled up at the fillPath
path (in mebibytes).
The following YAML snippet illustrates the use of this environment variable:
# specify the fill percentage
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-fill
labels:
name: disk-fill
spec:
diskFillChaos/inputs:
fillPath: "/"
fillStorageMebibytes: 8048
duration: 30
Data block size
The dataBlockSize
input variable determines the size of a single block of data, that is used to fill up the disk (in kilobytes). A larger block size results in quick completion of the disk fill operation and vice-versa.
The following YAML snippet illustrates the use of this environment variable:
# specify the data block size
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-fill
labels:
name: disk-fill
spec:
diskFillChaos/inputs:
fillPath: "/"
fillPercentage: 80
dataBlockSize: 1000
duration: 30