Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Creating and using disk quotas System
OS X has long supported disk quotas to limit how much drive space each user is allowed. Way back in 2003, we ran this hint which explained how to set up and use disk quotas. Back then, the process seemed a bit scary to me, given the complexity of some of the Terminal commands.

Fast-forward five years, though, and things have gotten much simpler. While reading some messages on a mailing list, I found a pointer to Eric Crist's write-up on HFS+ disk quotas, which makes things look much simpler. While working through the instructions, though, I had an issue early on -- the repquota command listed in the third step failed to run. I managed to get it working by taking one command from our prior hint; below is an executive summary version of Eric's instructions, with my fix to get repquota working:
  1. Create a root shell session in Terminal with sudo -s, providing your admin password when asked.
  2. Create an empty quota options file with touch /.quota.ops.user.
  3. Run quotacheck -a to generate a list of drive space used by user. This is the step I had to add.
  4. Run repquota -a to list the drive space used by each user. The previous command creates the list, and this command displays it. I don't know why this command alone didn't work on my system, but it didn't.
  5. Enable quotas by typing quotaon /. (You can turn them off again with quotaoff /.)
  6. Set quota limits for a given use by typing edquota -u username. This will put you in a vi editing session, where you can set both hard (cannot be exceeded) and soft (can be exceeded for a certain period of time) limits on drive space and inodes (files).
Eric's writeup goes into greater detail, including an explanation on how to change the default one week grace period on soft limits.
  • Currently 2.30 / 5
  You rated: 5 / 5 (10 votes cast)

Creating and using disk quotas | 1 comments | Create New Account
Click here to return to the 'Creating and using disk quotas' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Creating and using disk quotas
Authored by: ionmuniz on Feb 05, '09 08:41:05PM

I use leopard 1.5.6 and managed to "kill" the other user.
My hd is getting full and nobody asked about quotas.

[ Reply to This | # ]