Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there an easy way to cap the size of a directory? I don't think there is but just wanted to make sure. I would like to set max directory sizes for some user home dirs as well as some other dirs, mostly under /var in an attempt to better manage the disk resources.

share|improve this question
3  
Are quotas acceptable solution? –  dchirikov Jan 10 '13 at 17:31
1  
See also this (possible duplicate?) serverfault question on per-directory quotas. –  sr_ Jan 10 '13 at 17:33
    
@dchirikov -- if a quota will effectively cap a dir size, then yes –  amphibient Jan 10 '13 at 17:40

1 Answer 1

up vote 2 down vote accepted

You can have a separate filesystem for /var on a new disk partition/LUN created for this. Then, you can use LVM to manage the size. In future, if you feel the need to grow this filesystem, LVM will be more flexible for that.

share|improve this answer
    
This is probably what I would do. I was going to post this an an answer, and then I scrolled down and saw that you beat me to it. :) –  BenjiWiebe Jan 11 '13 at 0:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.