Operating System - Linux
1824216 Members
3347 Online
109669 Solutions
New Discussion юеВ

Questions on quotacheck & quota (Redhat EL 3)

 
SOLVED
Go to solution
TANHM
Advisor

Questions on quotacheck & quota (Redhat EL 3)

Hi All,

I have the following 2 doubts or questions on Redhat.

a) I have added a new user and have assisgned him a quota on /home file system. After assisging the quota, I not able to find it by using quota -u username or using repquota -a|grep -i username...But when i issue edquota -u username, i able to edit his quota limit...so i tried to issue quotacheck:

[servername]# quotacheck -avug
quotacheck: Quota for users is enabled on mountpoint /home so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.

so it is safe to turn off the quota, quotacheck and follow by turn on the quota back?

b) How to delete a user - quota (If user system account was deleted away) from aquota.user?

Any ideas on the above questions??? Thanks in advance.

Thanks
HM
6 REPLIES 6
Sung Oh
Respected Contributor

Re: Questions on quotacheck & quota (Redhat EL 3)

Hi Tanhm,

here is howto coc about quota from the web
http://souptonuts.sourceforge.net/quota_tutorial.html

Regards,
Sung
Ivan Ferreira
Honored Contributor
Solution

Re: Questions on quotacheck & quota (Redhat EL 3)

a) Try creating a file as the user. Logon as the user and run the quota command.

b) Yes, use the /sbin/quotaoff and /sbin/quotaon. Quota information should not be updated while quotacheck is running.

c) Try editing the quota and set 0 to the limits.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
TANHM
Advisor

Re: Questions on quotacheck & quota (Redhat EL 3)

Hi Sung Ho,

Thanks for the url link, i think it is very useful.

Hi Ivan,

Thanks for your advice
As for point c, by editing the quota file does not remove the username/id from the quota file right, so the list will be very long after a period of time...so is there any way which i can remove it (username) from aquota.user? And I thinking of using a script to remove the user (remove the account and quota) when deleting a username from my system...by using edquota..it can only copy a user profile to another user profile but there is no option to delete the username/id.
Ivan Ferreira
Honored Contributor

Re: Questions on quotacheck & quota (Redhat EL 3)

For c) I just checked and the quota will still show up until you remove all files owned by the deleted user from the file system. You can use the find command to locate that files. Once you removed all files, the user will not show up in repquota.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
TANHM
Advisor

Re: Questions on quotacheck & quota (Redhat EL 3)

Hi Ivan,

Thanks for your info...i will try it out on my system..

Thanks
HM
TANHM
Advisor

Re: Questions on quotacheck & quota (Redhat EL 3)

Solved