QUOTA.USER(5)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– NAME πŸ’–

Bestie, welcome to QUOTA.USER(5), the File Formats Manual page for quota.user, quota.group β€” the per file system quota database. That's the name section and it's giving exactly what it needs to give. ✨

πŸŽ€ DESCRIPTION πŸŽ€

Okay so, every file system with active quotas should contain a quota.user and a quota.group file in the file system root. 🫢 These files are created by quotacheck(8), and they should be edited with edquota(8). You can also specify a different location and file name with the userquota and groupquota options in the fstab(5) file β€” flexible and iconic. πŸ’…

πŸ“ The data files contain

The data files are carrying this info, periodt:

  • Current block usage
  • Current number of files
  • Soft block limit
  • Soft file limit
  • Hard block limit
  • Hard file limit
  • Block grace time remaining if over the soft limit
  • File grace time remaining if over the soft limit

See edquota(8) for an explanation on the various limits and grace periods. It's literally the limit/grace-period lore. πŸ“–

During normal quota operations, the quotactl(2) interface is used to query or set quota information, and the kernel will maintain the data files as needed. If quotas are disabled on a file system, but marked as having quotas enabled in fstab(5), then the quota data files will be used directly. Lowkey important. πŸ‘€

The data files are stored as an array of struct dqblk structures, as defined in <ufs/ufs/quota.h>, and indexed by UID or GID. The data files will be written as a sparse file if possible. Data is only maintained for ids that have either non-zero usage or non-zero quota limits. If an attempt is made to access data for an id that would exist past the end of the current data file, a quota structure with all values set to zero will be created, and the data file extended as needed. The quotacheck(8) utility will truncate the data files to the minimum size needed to store the highest id with either non-zero file usage or non-zero quota limits. Slay, but make it storage-efficient. πŸ¦‹

The id 0 record is the main character here β€” it's the grace-period headquarters. πŸ‘‘

The data record for id 0 has special meaning. If the dqb_btime or dbq_itime fields are non-zero, they are used to indicate the grace period on that file system for users who have exceeded their soft limit. These times can be set by edquota(8) with the -t flag. If no explicit grace period has been set with edquota(8), then the default value of 7 days will be used. The default values are defined by MAX_DQ_TIME and MAX_IQ_TIME in <ufs/ufs/quota.h>.

Also yes, bestie: dqb_btime and dbq_itime are written exactly like that. Don't come for me. 😭

🌈 SEE ALSO 🌈

Go give these a read next:


This page is brought to you by Debian, dated October 30, 2007. Stay quota-fabulous. πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from