Linux Learning - Quota Implemenation

###Quota Implemenation###
Features:
 1. Limit storage consumption per user/group
 2. Based on: disk block usage or inode usage
 3. Imposed in 2 stages (thresholds): soft & hard
   a. Soft limit: may be execeeded for up to the grace period
   b. Hard limit: may never be execeeded under any circumstance


Requires:
 1. 'quota*' RPM
 2. Must associates file system(s) with quota management: user and/or group


Steps:
 1. Enable in: '/etc/fstab'
   a. 'defaults,usrquota,grpquota' - impose on: '/home'
 2. Remount the file system: '/home'
Note: Effect quota management during single-user / installation modes to avoid disconnects in service
  a. 'mount -o remount /home' - remounts the file system
Note: Optional methods of remounting the file system include: umount/mount OR reboot the system
  b. 'mount' - reflects whether or not: 'usrquota', 'groupquota' options have been enabled


 3. Create quota database files and generate disk usage table - defines baseline
  a. 'quotacheck -cug /home' - applies user and group quotas
Note: 'quotacheck' should be run in: Single-user mode OR when the system reboots to facilitate: read-only remount of target file system
  b. Use: '-m' option to override


 4. Check defined quota database:
  a. 'quotacheck -amvug' - checks quotas - forces check


 5. Assign quota policies per user and/or group:
  a. 'edquota linuxcbt4' - uses default editor ($EDITOR)


 6. Run 'quotacheck -avugm' to update stats
 7. Run 'repquota /home' to show FS-wide usage report
 8. Use: 'edquota -t' to modify grace period
  a. 'edquota -T linuxcbt4'


 9. Use: 'quotaon ...' - to enter production mode
  a. 'quotaon -vug /home' - enters production mode
  b. 'quotaon -p /home' - echoes current quota status


Note: Default grace period is 7-days
10. Attempt to write data beyond soft limit grace period

你可能感兴趣的:(Implemenation,Linux/Quota)