quota for webhosting

Support for webhosts that use CentOS
Post Reply
robertmcnaught
Posts: 9
Joined: 2007/05/22 21:53:06
Contact:

quota for webhosting

Post by robertmcnaught » 2008/03/18 18:07:33

Hi,

Posting for advice on how to do this:

I have set up apache using virtual hosts - each virtual host has its document root in /home/user1/public_html, /home/user2/public_html etc etc

Trying to implement disk quotas, which would restrict each users home drive space.

Currently, my /etc/fstab file is:

[root@206 /]# cat /etc/fstab
LABEL=/ / ext3 suid,dev,defaults,exec 0 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
/dev/sda3 /home ext3 grpquota,suid,resgid=501,dev,resuid=501,usrquota,exec 0 0

df -h:
[root@206 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 31G 1.9G 28G 7% /
/dev/sda1 99M 21M 74M 22% /boot
tmpfs 506M 0 506M 0% /dev/shm
/dev/sda3 31G 1.9G 28G 7% /home

I am trying to use webmin, as a server management tool to make things easier, and did a test partition on /home - this shows up in 'df' but not in fstab, so am curious what I did here and how to remove it or set it up better.

Does anyone know the best practice here, do I have to create a separate partition for /home/user1 and do this for each user added to the system?

Many thanks for any advice on this

Robert

User avatar
toracat
Forum Moderator
Posts: 7426
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

quota for webhosting

Post by toracat » 2008/03/19 03:44:50

[quote]
robertmcnaught wrote:

[root@206 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 31G 1.9G 28G 7% /
/dev/sda1 99M 21M 74M 22% /boot
tmpfs 506M 0 506M 0% /dev/shm
/dev/sda3 31G 1.9G 28G 7% /home
[/quote]
There's your problem; you are mounting /dev/sda3 twice - once on / and another time on /home. If you wish to enable quota on /home, you need to make it a separate file system.

Post Reply

Return to “CentOS 5 - Webhosting Support”