Enforcing per-user storage quotas with `jupyterhub-home-nfs`
When sharing a storage disk between users, as is usually the case in a JupyterHub deployment, it is important to put in guardrails so that one user cannot eat up the whole storage capacity from the rest of the users.
To this end, 2i2c in close collaboration with
Development Seed have developed the
jupyterhub-home-nfs
project which is a Helm chart that permits enforcing per-user quotas on the storage space.
Under the hood, the Helm chart runs
NFS Ganesha as an in-cluster NFS server, backed by
XFS as the underlying filesystem. Storage quota is enforced through XFS’s native quota management utility xfs_quota
.
Since this feature moves our infrastructure away from managed filesystems (such as AWS’s Elastic File System) that cannot support per-user storage quotas, we have also developed monitoring and alerting mechanisms that will let us know when the disks are getting full, and automated back-ups for disaster recovery.
If you would like to try this on your 2i2c-managed hub, please get in touch.
This project can also be used with any Kubernetes-based JupyterHub, as per our Right to Replicate policy, so please try it out on your own deployment and let us know what you think!
Credit #
This project was developed and deployed in collaboration with Tarashish Mishra from Development Seed, funded through the NASA VEDA project.