Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have requirement to enforce quota settings at folder level. And this enforcement is purely based on folders and not on groups.

So I may have to monitor a folder /dev1/folder1 and its subfolder /dev1/folder1/folder1_2 separately.

And I think quota package in linux purely works on groups or users at file system level.

Creating a group for each folder to monitor may solve this issue, but it increases the complexity for management of user or group permissions.

Do I have any other solution for this?

share|improve this question

1 Answer 1

Use LVM(http://tldp.org/HOWTO/LVM-HOWTO/) or:

dd if=/dev/zero of=/tmp/file_fs1 count=20 bs=1M
mke2fs -F /tmp/file_fs1
mkdir -p /dev1/folder1
mount -o loop /tmp/file_fs1 /dev1/folder1

dd if=/dev/zero of=/tmp/file_fs2 count=10 bs=1M
mke2fs -F /tmp/file_fs2
mkdir /dev1/folder1/folder1_2
mount -o loop /tmp/file_fs2 /dev1/folder1/folder1_2

df -h:

/dev/loop0             20M  173K   19M   1% /dev1/folder1
/dev/loop1            9,7M   92K  9,1M   1% /dev1/folder1/folder1_2
share|improve this answer
    
@binddn But one trickey requirement is folder1 size should include its contents and folder1_2 size. And limit for folder1 includes contents in folder1_2 –  Sirish Kumar Sep 23 '10 at 10:23

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.