1848431 Members
5728 Online
104027 Solutions
New Discussion

Re: Directory Size

 
Ramesh.K.R.
Regular Advisor

Directory Size

Hi Experts,

Is there any way in which we can restrict (limit) the size of a directory in HP-UX ??
If so, how ?

Thanks & Regards,
Ramesh.K.R.
hai
11 REPLIES 11
Muthukumar_5
Honored Contributor

Re: Directory Size

You can allocate a file size with prealloc. For directory size restriction we have to setup quota setup only.

See quota and quotaon man pages.

--
Muthu
Easy to suggest when don't know about the problem!
Ramesh.K.R.
Regular Advisor

Re: Directory Size

Hi,

Thanks for the repply. But, "quota" can only be used with users (home dir). Right ?

Regards,
Ramesh.K.R.
hai
Muthukumar_5
Honored Contributor

Re: Directory Size

We can setup for any directory also. It is based on file system.

--
Muthu
Easy to suggest when don't know about the problem!
Ramesh.K.R.
Regular Advisor

Re: Directory Size

Hi Muthu,

Can you pl explain with an example ?? (commands)

Thanks & Regards,
Ramesh.K.R.
hai
Robert-Jan Goossens_1
Honored Contributor

Re: Directory Size

there is an example in the quota man page

# man 5 quota

Regards,
Robert-Jan
Asif Sharif
Honored Contributor

Re: Directory Size

Yogeeraj_1
Honored Contributor

Re: Directory Size

hi Ramesh,

more information is available (with examples) in the docs!
see:
http://docs.hp.com/en/B3921-90010/quota.5.html

also note that Quotas can be defeated if the chown command is accessible to a user.

hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ivan Ferreira
Honored Contributor

Re: Directory Size

Hi Ramesh, quotas are enabled per file system, that is, you can enable quotas on any directory that acts as a mount point (what you see with bdf). The problem is that this is not on a per directory limit, is per user or group. You cannot set differents limits for the same user to different directories on the same file system.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
DCE
Honored Contributor

Re: Directory Size



If all you want to do is restict a directory to a set size, just make a lvol of the desired size and mount it as the directory in question.
Ramesh.K.R.
Regular Advisor

Re: Directory Size

Hi,

Thanks all for your important inputs.
After going through all the docs / man pages. I have come to this conclusion.
1. There is no direct way of restricting directory size in HP-UX.
2. quota command works / applies only w.r.t. users.

Thanks & Regards,
Ramesh.K.R.
hai
Ramesh.K.R.
Regular Advisor

Re: Directory Size

closed
hai