Increase the size of a disk storing home directories#
Procedure#
export CLUSTER_NAME=<cluster-name>;
export HUB_NAME=<hub-name>
To increase the size of a disk storing users’ home directories, we need to increase its size in the tfvars file of the cluster
ebs_volumes = {
"staging" = {
size = 100 # in GiB. Increase this!
type = "gp3"
name_suffix = "staging"
tags = { "2i2c:hub-name": "staging" }
}
}
persistent_disks = {
"staging" = {
size = 100 # in GiB. Increase this!
name_suffix = "staging"
}
}
After updating the tfvars file, we need to plan and apply the changes using terraform:
terraform workspace select $CLUSTER_NAME
terraform plan -var-file=projects/$CLUSTER_NAME.tfvars
terraform apply -var-file=projects/$CLUSTER_NAME.tfvars
Warning
The size of a disk can only be increased, not decreased.
This automatically grows the filesystem within the next 5 minutes.
Community communication#
Increasing the size of a storage disk has cost implications. Downsizing the volume is also a complicated process. Please let the community know that we’ve performed an emergency resize using an email thread on FreshDesk after such resize has happened.
Email template
Dear all,
The home directory disk capacity for the <$CLUSTER_NAME> <$HUB_NAME> hub was close to its maximum limit. We have increased the disk so that now there is between 10% to 15% free space remaining. Recommended actions:
Instruct users to delete any unused files from their home directories (saves cloud costs)
OR
Instruct us to increase the home directory disk capacity in case you are expecting more of such increased usage (incurs cloud costs)
You can make use of the Grafana Dashboard JupyterHub Default Dashboards > Home Directory Usage Dashboard to get an overview of home directory usage per-user:
<$GRAFANA_URL>