Skip to content

Instantly share code, notes, and snippets.

@agoose77
Created September 30, 2025 11:13
Show Gist options
  • Save agoose77/80617ae87bfeaf9e398dafdf468cafd8 to your computer and use it in GitHub Desktop.
Save agoose77/80617ae87bfeaf9e398dafdf468cafd8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
# We ensure that nothing has the wrong project by clearing project IDs
# Clear the /export/staging project (it's not actually a project, but this works)
xfs_quota -x -c "project -C -p /export/staging 0" /export -D /dev/null -P /dev/null
# We ensure no quotas are set, so that the reconciliation loop happens
# Clear all quotas
cut -d: -f1 /etc/projid | tail -n+2 | xargs -I{} xfs_quota -x -c 'limit -p bhard=0 {}' -D /etc/projects -P /etc/projid /export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment