Go Back   Singapore Web Hosting Talk > LEARNING CENTER > Server Administration

Server Administration General dedicated servers administration topics.

Reply
 
Thread Tools
Old 16-10-2003, 00:06   #1
choon
SGWHT Senior Member
 
Join Date: 01-07-2002
Location: Singapore
Posts: 488
choon has a spectacular aura aboutchoon has a spectacular aura about
HOW TO: Enable Quota Support

Hi everyone,

Ok, since there are not many posts in this forum I will add in this little guide for anyone reference.

Following this guide at your own risk and I am not responsible for any damages caused to you. You have been warned!!!

This guide will help you to enable quota support in your Red Hat Linux system so that you can set user or/and group quota.

Step 1: Gain root access to your server using SSH.

Step 2: Check whether the quota package is install or otherwise please install it before continue.
Code:
rpm -qa|grep quota
Step 3: Modify /etc/fstab file
Partitions that you have not yet enabled quota normally look something like:
Code:
/dev/hda5     /home           ext3            default   1 2
To enable user quota support for that partition, simply add in usrquota next to default such as below:
Code:
/dev/hda5     /home           ext3            default,usrquota   1 2
To enable group quota, just add grpquota.
To enable both user and group quotas, add in both usrquota,grpquota.

Step 4: Reboot or Not to Reboot.
Normally I won't reboot, you can try this command on the partition that you have modified or added in quota support:
Code:
mount -o remount /home
Step 5: Quota Check
Code:
/sbin/quotacheck -cguvamf -F vfsv0
Step 6: Rerun Quota Check for old version
Code:
/sbin/quotacheck -cguvamf -F vfsold
Step 7: Turn on Quotas
Code:
/sbin/quotaon -a
To see the report of quotas, issue this command:
Code:
repquota -a
To set a user quota, issue the following command:
Code:
setquota -u USERNAME SOFTQUOTA HARDQUOTA SOFTFILELIMIT HARDFILELIMIT -a
Where:
USERNAME is the user
SOFTQUOTA in kilobytes
HARDQUOTA in kilobytes
SOFTFILELIMIT set it to 0 normally
HARDFILELIMIT set it to 0 also

You are done

Maybe next time I will post a quick step about compiling your own custom latest stable kernel with grsecurity patch

Thanks.

References:
Quota mini-HOWTO
__________________
Giam Teck Choon
System Administrator
Join my community today at choon.NET Community to share server related tips and tricks!
External/One-Year WHM/cPanel licenses | Linux/FreeBSD Server Management | Xen VPS Solutions (with/without WHM/cPanel or DirectAdmin)
choon is offline   Reply With Quote

Old 08-12-2003, 16:41   #2
Hostings
Guest
 
Posts: n/a
Hi

Had actually used this, and working on my server.

But just one query, hope anyone here has some knowledge on it. Right now, it seems that it's limiting specific user. Hopefully there's some way to set it in such a way that it'll be working for universal users, i mean all users in /home.

Sorry to trouble, but hope someone carries answer.
  Reply With Quote
Old 08-12-2003, 16:46   #3
choon
SGWHT Senior Member
 
Join Date: 01-07-2002
Location: Singapore
Posts: 488
choon has a spectacular aura aboutchoon has a spectacular aura about
Can't you just add all those users in a group then set limit in that group using group quota?
__________________
Giam Teck Choon
System Administrator
Join my community today at choon.NET Community to share server related tips and tricks!
External/One-Year WHM/cPanel licenses | Linux/FreeBSD Server Management | Xen VPS Solutions (with/without WHM/cPanel or DirectAdmin)
choon is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT +8. The time now is 11:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright (C) 2002-2015 Brought to you by Singapore Web Hosting Talk (SGWHT). All Rights Reserved.