Operating System - Linux
1830250 Members
2758 Online
110000 Solutions
New Discussion

How to set user quota in any directory?

 
SOLVED
Go to solution
Md. Shafiullah
Advisor

How to set user quota in any directory?

I am using hpux 11.1. I want to set user quota in his home directory. i.e: /home/test. What are the steps to do that?
3 REPLIES 3
Peter Godron
Honored Contributor
Solution

Re: How to set user quota in any directory?

Ivan Ferreira
Honored Contributor

Re: How to set user quota in any directory?

Quotas cannot be configured on a per directory basis, only per file system. So, you can set quota limits for a user in the /home file system, that means that if you set a quota of 100 MB, the users won't be able to create more files after reached the quota on any directory under /home.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Md. Shafiullah
Advisor

Re: How to set user quota in any directory?

# touch /filesystem/quotas
# edquota username
fs /hpium blocks (soft = 100, hard = 200) inodes (soft = 100, hard = 200)
(Here 1 block = 1 kbyte)
or
fs /mnt blocks time limit = 10.00 days, files time limit = 20.00 days
fs / blocks time limit = 0 (default), files time limit = 0 (default)
# vi /etc/fstab
Add option ‘quota’ to the line containing the file system.
/dev/vg00/lvol12 /hpium vxfs delaylog,quota 0 2
# unmount /filesystem
# mount /filesystem
# repquota –v /filesystem # to see all quota in a file system
# quota –v username # to see status of particular user quota

# quotaon /filesystem # not recommended to use
# quotaoff /filesystem # not recommended to use