Gestion des quotas
Configuration
Les quotas permettent de gérer l'espace disque sur des serveurs multi-utilisateurs.
[root@jaguar ~]# yum list quota
quota.x86_64 1:3.13-1.2.3.2.el5 installed
[root@jaguar ~]# grep -i quota /boot/config-2.6.18-92.1.13.el5
CONFIG_QUOTA=y
[root@jaguar ~]# vim /etc/rc.d/rc.sysinit
if [ -x /sbin/quotaon ]; then
action $"Enabling local filesystem quotas: " /sbin/quotaon -aug
fi
[gillet@jaguar ~]$ cat /etc/fstab
/dev/cciss/c0d0p1 /export/home ext3 defaults,usrquota 1 2
-bash-3.2# touch /export/home/aquota.user
-bash-3.2# chmod 600 /export/home/aquota.user
-bash-3.2# mount -o remount /export/home
-bash-3.2# quotacheck -auvg
quotacheck: Scanning /dev/cciss/c0d0p1 [/export/home] /
done
quotacheck: Checked 7685 directories and 46574 files
-bash-3.2# quotaon -av
/dev/cciss/c0d0p1 [/export/home]: user quotas turned on
-bash-3.2# edquota -t
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem Block grace period Inode grace period
/dev/cciss/c0d0p1 7days 7days
-bash-3.2# edquota -u gillet
-bash-3.2# quota -u gillet
Disk quotas for user gillet (uid 505):
Filesystem blocks soft hard inodes soft hard
/dev/cciss/c0d0p1 29824 2097152 3145728 475 0 0