File systém xfs a quota
http://linux.die.net/man/8/xfs_quota http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/xfsquota.html http://blogs.cae.tntech.edu/mwr/2009/09/01/setting-up-project-quotas-under-xfs-in-debian-gnulinux/
Vytvoření systému xfs na debianu.
aptitude install xfsdump xfslibs-dev xfsprogs (instalace potrebnych programu pro xfs) mkfs.xfs /dev/sdc1 -f (vytvoreni filesystemu xfs)
namountovani s pozadovanou quotou.
mount -o prjquota /dev/sdc1 /home/webland (namountuje jako project kvota – moznost mit kazdy adresar zvlast quotu)
touch /etc/projects
touch /etc/projid
definování jednotlivých adresaru v projektu, kde projects je id a cesta k adresari
root@marge:/home# cat /etc/projects 1:/home/webland/1 2:/home/webland/2 3:/home/webland/3
v projid jmeno projektu s odkazem na id (id muze byt i retezec)
root@marge:/home# cat /etc/projid webland-1:1 webland-2:2 webland-3:3
xfs_quota -x -c 'project -s webland-3' (zavedeni projektu do quoty)
xfs_quota -x -c 'limit -p bhard=1m webland-3' /home/webland (omezeni bhard na 1MB -s nazev projektu /cesta/disku)
xfs_quota -xc 'df -h' /home/webland
xfs_quota -xc 'report -h' /home/webland
EXAMPLES
Enabling quota enforcement on an XFS filesystem (restrict a user to a set amount of space).
# mount -o uquota /dev/xvm/home /home # xfs_quota -x -c 'limit bsoft=500m bhard=550m tanya' /home # xfs_quota -x -c report /home
Enabling project quota on an XFS filesystem (restrict files in log file directories to only using 1 gigabyte of space).
# mount -o prjquota /dev/xvm/var /var # echo 42:/var/log >> /etc/projects # echo logfiles:42 >> /etc/projid # xfs_quota -x -c 'project -s logfiles' /var # xfs_quota -x -c 'limit -p bhard=1g logfiles' /var
Same as above without a need for configuration files.
# rm -f /etc/projects /etc/projid # mount -o prjquota /dev/xvm/var /var # xfs_quota -x -c 'project -s -p /var/log 42' /var # xfs_quota -x -c 'limit -p bhard=1g 42' /var