disk quota in CentOS

Status
Not open for further replies.

buntythecool

Broken In
Hi,
I want to apply disk quota in CentOS (Similar as Red Hat). At the time of installation i created 3 partition as follows
[root@localhost ~]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 905 7164990 83 Linux
/dev/sda3 906 970 522112+ 82 Linux swap / Solaris


For applying disk quota i have created one extended and logical partition from the remaining space after that my partition system is

[root@localhost ~]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 905 7164990 83 Linux
/dev/sda3 906 970 522112+ 82 Linux swap / Solaris
/dev/sda4 971 1305 2690887+ f W95 Ext'd (LBA)
/dev/sda5 971 1002 257008+ 83 Linux


Now I want to appy the quota on /dev/sda5 for that i have format that partition with ext3 filesystem and applied work label to it and also mounted it on /work
So now if i run the mount command it shows me the following output
[root@localhost ~]# mount
/dev/sda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda5 on /work type ext3 (rw)


Now i am entering the /dev/sda5 entry in my fstab file for permanat changes:
After that i edit the fstab file and add usrquota,grpquota for /dev/sda5 partition
I remounted the /work partition
After that i am runiing following commands for applying userquota on /dev/sda5
#quotacheck -cugv /work
#quotacheck -vguma
#repquota -u test

After applying user test 60 softlimit and 100 hard limit I am exiting the vi editior
#quotaon /work
Now it should show me that i have applied userquota for test user:
[root@localhost ~]# repquota -a
*** Report for user quotas on device /dev/sda5
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 6176 0 0 4 0 0

It is only showing root user. So there is some mistake i am doing, can somebody help me in solving this problem????
 

mediator

Technomancer
1. For applying quota, you have to specify a user.
Code:
# [url=*www.faqs.org/docs/securing/chap20sec158.html]edquota[/url] user_name
Now edit with vi in usual style

2. Also, try the 'quotaon' with paramaters.
Code:
quotaon -vug /work
 
OP
B

buntythecool

Broken In
have tried that also..but find out the good solution..when u apply user quota on /home partition the user files are already created in /home partition..so i just created user files in newly created partition and now i can apply usequota on my /work partition..
 
Status
Not open for further replies.
Top Bottom