User Tools

Site Tools


computing:storage:linux_disk_quotas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
computing:storage:linux_disk_quotas [2012/12/28 10:44]
gcooper created
computing:storage:linux_disk_quotas [2015/12/28 08:33] (current)
gcooper
Line 1: Line 1:
 ====== Linux Disk Storage Quotas ====== ====== Linux Disk Storage Quotas ======
 +
 +===== Debian/Ubuntu EXT4 Journaled Quotas =====
 +
 +https://www.howtoforge.com/how-to-set-up-journaled-quota-on-debian-lenny
 +
 +===== CentOS 6 EXT4 Journaled Quotas =====
 +
 +Edit ''/etc/fstab'' and add ''usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0'' to be something like (adjust for your system):
 +
 +<file>
 +vim /etc/fstab
 +
 +UUID=add91b35-0362-4186-a001-1e0c9a5079a2 /home ext4    rw,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0  1 2
 +</file>
 +
 +Remount the filesystems with the new options:
 +<file>
 +
 +mount -o remount /
 +mount -o remount /home
 +mount
 +</file>
 +
 +Then create the quota files and enable quotas:
 +
 +:!: If quotas are already enabled on some filesystems, you may have to turn off quotas to run ''quotacheck''.
 +
 +<file>
 +quotaoff -avug
 +quotacheck -avugm
 +quotaon -avug
 +</file>
 +
 +You can **ignore** warnings like:
 +
 +<file>
 +quotacheck: Scanning /dev/mapper/VolGroup-lv_root [/] done
 +quotacheck: Cannot stat old user quota file //aquota.user: No such file or directory. Usage will not be substracted.
 +quotacheck: Cannot stat old group quota file //aquota.group: No such file or directory. Usage will not be substracted.
 +quotacheck: Cannot stat old user quota file //aquota.user: No such file or directory. Usage will not be substracted.
 +quotacheck: Cannot stat old group quota file //aquota.group: No such file or directory. Usage will not be substracted.
 +quotacheck: Checked 10337 directories and 204203 files
 +quotacheck: Old file not found.
 +quotacheck: Old file not found.
 +</file>
  
 ===== Quota Errors ===== ===== Quota Errors =====
Line 19: Line 64:
 </file> </file>
  
-If quotacheck segfaults or otherwise fails, you need to make sure quotas are off (''quotaoff -a'') and remove the quota files in / (for example, ''aquota.group'' and ''aquota.user'') and then run ''quotacheck -ugamn'' again.+If quotacheck segfaults or otherwise fails, you need to make sure quotas are off (''quotaoff -a'') and remove the quota files in ''/'' (for example, ''aquota.group'' and ''aquota.user'') and then run ''quotacheck -ugamn'' again.
  
 +===== Troubleshooting Journaled Quotas =====
 +
 +<file>
 +quotaoff -avug
 +rm -f /aquota.*
 +rm -f /home/aquota.*
 +reboot
 +</file>
computing/storage/linux_disk_quotas.1356716670.txt.gz · Last modified: 2012/12/28 10:44 by gcooper