{"id":771,"date":"2007-12-19T00:14:47","date_gmt":"2007-12-19T05:14:47","guid":{"rendered":"http:\/\/softbeam.net\/hobby\/?p=771"},"modified":"2007-12-19T00:14:47","modified_gmt":"2007-12-19T05:14:47","slug":"system-quota","status":"publish","type":"post","link":"https:\/\/softbeam.net\/hobby\/?p=771","title":{"rendered":"system quota"},"content":{"rendered":"<p>From: http:\/\/howtoforge.com\/samba-domaincontroller-swat-fedora8<\/p>\n<p>and http:\/\/howtoforge.com\/samba-domaincontroller-swat-fedora8-p3<\/p>\n<p>prepare the system for quota usage.<\/p>\n<p class=\"command\">vi \/etc\/fstab<\/p>\n<p>Add <span class=\"system\">usrquota<\/span> and <span class=\"system\">grpquota<\/span> to the line for the root partition. The options should look like in this line:<\/p>\n<p class=\"system\">\/dev\/VolGroup00\/LogVol00 \/                       ext3    defaults,usrquota,grpquota        1 1<\/p>\n<p>Afterwards we create the files for the quota settings and remount the root partition.<\/p>\n<p class=\"command\">touch \/aquota.user \/aquota.group<br \/>\nchmod 600 \/aquota.*<br \/>\nmount -o remount \/<br \/>\nquotacheck -avugm<br \/>\nquotaon -avug<\/p>\n<p>Note: You&#8217;ll get an error like this when you start <span class=\"system\">quotacheck -avugm<\/span> for the first time:<\/p>\n<p class=\"system\">quotacheck: WARNING &#8211;  Quotafile \/\/aquota.user was probably truncated. Cannot save quota settings&#8230;<br \/>\nquotacheck: WARNING &#8211;  Quotafile \/\/aquota.group was probably truncated. Cannot save quota settings&#8230;<\/p>\n<p>This is normal and nothing to worry about. How to use quota for users is explained later in this howto when we add users to our Samba domain.<\/p>\n<p>add a quota to the user via:<\/p>\n<p class=\"command\">setquota -u %username% %block-softlimit% %block-hardlimit% %inode-softlimit% %inode-hardlimit% -a<\/p>\n<p>E.g.:<\/p>\n<p>The following command will add a quota to the user james:<\/p>\n<p class=\"command\">setquota -u james 40960 51200 0 0 -a<\/p>\n<p>Now james has a block softlimit of 40MB, a block hardlimit of 50MB and no restrictions for inodes (folders and files).<\/p>\n<p>You can check the current quota settings and quota usage via:<\/p>\n<p class=\"command\">quota %username%<\/p>\n<p>E.g.:<\/p>\n<p class=\"command\">quota james<\/p>\n<p>The output should look like this:<\/p>\n<p class=\"system\">Filesystem  blocks   quota   limit   grace   files   quota   limit   grace<br \/>\n\/dev\/mapper\/VolGroup00-LogVol00<br \/>\n1108   40960   51200                     104     0           0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From: http:\/\/howtoforge.com\/samba-domaincontroller-swat-fedora8 and http:\/\/howtoforge.com\/samba-domaincontroller-swat-fedora8-p3 prepare the system for quota usage. vi \/etc\/fstab Add usrquota and grpquota to the line for the root partition. The options should look like in this line: \/dev\/VolGroup00\/LogVol00 \/ ext3 defaults,usrquota,grpquota 1 1 Afterwards we create the files for the quota settings and remount the root partition. touch \/aquota.user \/aquota.group chmod &hellip; <a href=\"https:\/\/softbeam.net\/hobby\/?p=771\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;system quota&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-771","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=771"}],"version-history":[{"count":0,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/771\/revisions"}],"wp:attachment":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}