Understanding allocatable disk space
When monitoring disk space information in the cluster, you also need to pay attention to the space reported by the vstorage top
utility as allocatable. Allocatable space is the amount of disk space that is free and can be used for storing user data. Once this space runs out, no data can be written to the cluster.
Calculation of allocatable disk space is illustrated on the following example:
- The cluster has 3 chunk servers. The first chunk server has 200 GB of disk space, the second one — 500 GB, and the third one — 1 TB.
- The default replication factor of 3 is used in the cluster, meaning that each data chunk must have 3 replicas stored on three different chunk servers.
In this example, the available disk space is 200 GB, which equals the amount of disk space on the smallest chunk server:
# vstorage -c stor1 top connected to MDS#1 Cluster 'stor1': healthy Space: [OK] allocatable 180GB of 200GB, free 1.6TB of 1.7TB <...>
In this cluster configuration each server is set to store one replica for each data chunk. So once the disk space on the smallest chunk server (200 GB) runs out, no more chunks in the cluster can be created until a new chunk server is added or the replication factor is decreased.
If the replication factor changes to 2, the vstorage top
command will report the available disk space as 700 GB:
# vstorage set-attr -R /mnt/vstorage replicas=2:1 # vstorage -c stor1 top connected to MDS#1 Cluster 'stor1': healthy Space: [OK] allocatable 680GB of 700GB, free 1.6TB of 1.7TB <...>
The available disk space has increased because now only 2 replicas are created for each data chunk and new chunks can be made even if the smallest chunk server runs out of space (in this case, replicas will be stored on a bigger chunk server).
Allocatable disk space may also be limited by license.