PDA

View Full Version : Need Help with Quotas



mtekc
6th June 2004, 11:09 AM
Im running FC1 and i read the documentation on redhat on how to setup quotas on the problem is that on my

/etc/fstab

i dont have the : LABEL=/home

and thats where i want to set up quotas. What should i do ? :confused:

Here is what i have on my fstab:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


Any help would be very appreciated :)

mtekc
8th June 2004, 06:47 AM
Anyone ? :(

ilja
8th June 2004, 07:04 AM
The problem is, you don't have /home on a extra partition. To make a quota you have to make an extra partition for /home. Howto: http://www-106.ibm.com/developerworks/library/l-partplan.html
But maybe you will find a method to make quotas on directories.

mtekc
9th June 2004, 04:48 PM
Question ?

Can i Setup quotas on / root partition?


I really would hate to move home, because im kind of scared to be honest :(

dreamcatalyst
24th June 2004, 01:54 PM
I cannot get quotas runing no matter what I do. I just asume they dont work under either Fedora 1 or Fedora 2. I have a seperate /home partition and I added usrquota and grpquota to my fstab and says bad fs type, option ... when it tries to mount /home.

mtekc
14th July 2004, 04:51 AM
Can anyone share some light on this post ?

tommytomato
4th September 2004, 06:59 AM
I think i may have it now guys, well four days to get it going and 7 reboots

First thing i did was add a user into the system ( adduser tommy ) then his password ( passwd tommy )

Then i hoped into init 1 mode

Then i type the following command in vi /etc/fstab

Then i edited the file and added usrquota,grpquota to the top line so it looks like this

LABEL=/ / ext3 defaults,usrquota,grpquota 1 1

then i type in ( mount -o remount / )

then i type in the following

rm -rf /home/quota.user
rm -rf /home/quota.group

touch /home/quota.user
touch /home/quota.group

chmod 0600 /home/quota.user
chmod 0600 /home/quota.group

then i type in quotacheck -vagum

it came up with the following

quotacheck:Scanning/dev/hda2 [/] *

* means its flashing
then i type in edquota -u tommy

I added 50000 hoping its 50MB worth

then i type in init 3 to get out of int 1 mode

then i rebooted

then on reboot where all the green oks are, no errors but the very last one, ( where do i find the error boot log to see what the error is, its going to fast for me to see. some thing about events.

once booted up i type in
repquota /

which shows me this

[root@rockinghamgateway root]# repquota /
*** Report for user quotas on device /dev/hda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 1964445 0 0 139823 0 0
daemon -- 16 0 0 5 0 0
lp -- 8 0 0 2 0 0
rpm -- 42308 0 0 120 0 0
vcsa -- 0 0 0 128 0 0
rpcuser -- 32 0 0 8 0 0
smmsp -- 12 0 0 3 0 0
apache -- 48 0 0 12 0 0
squid -- 16 0 0 4 0 0
webalizer -- 24 0 0 6 0 0
xfs -- 8 0 0 3 0 0
named -- 36 0 0 9 0 0
ntp -- 12 0 0 3 0 0
postfix -- 88 0 0 22 0 0
mailman -- 0 0 0 1 0 0
mysql -- 16 0 0 4 0 0
postgres -- 28 0 0 8 0 0
tommy -- 28 50000 0 8 0 0


[root@rockinghamgateway root]#
[root@rockinghamgateway root]#


I see where i added tommy too, does this look right.

I'll turn on vsftpd and see if i can upload a file bigger than 50MB and see what happens

TT

Well it still let me upload over 50MB

I edited the vsftpd
and made tommys public_html


[root@rockinghamgateway root]# /etc/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ]
[root@rockinghamgateway root]# /etc/init.d/vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
[root@rockinghamgateway root]# mkdir /home/tommy/public_html
[root@rockinghamgateway root]# chown tommy /home/tommy/public_html
[root@rockinghamgateway root]# chmod 0755 /home/tommy/public_html
[root@rockinghamgateway root]# cd /home/tommy/public_html
[root@rockinghamgateway public_html]# ls
sovietufo2.rm
[root@rockinghamgateway public_html]# ls -al
total 57024
drwxr-xr-x 2 tommy root 4096 Sep 4 10:48 .
drwx------ 3 tommy tommy 4096 Sep 4 10:41 ..
-rw-r--r-- 1 tommy tommy 58322164 Sep 4 10:48 sovietufo2.rm
[root@rockinghamgateway public_html]#


do i have to Enforce Quotas ?

like so

#!/bin/bash

quotacheck -vagu

how do i make a cron job ( use webmin )

TT

and to top it off i'm still trying to get it going..

any ideas guys

GNU_Gravity
17th November 2006, 05:29 PM
I would recommend the following setup link - I used this to configure for FC6 and it worked fine.

http://yolinux.com/TUTORIALS/LinuxTutorialQuotas.html

Has anyone here redirected to output of repquota to their logwatch? I am in the process of scripting the quota maintenance and I would like to see the repquota output in my logwatch but I am slightly clueless as to how to redirect the output that way.

If you know, let me know!! - thx