Mailing List Archive

Directory Size Limit?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all.

This is more of a general Linux question -- I am wondering if it is
possible to restrict the amount of information in a single directory?
What I am wanting to do is a limit a directory to 128MB, which is the
size of my Neuros I memory. I could then sync things up a whole lot
more easily. :)

Thanks!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBPicy5qcyxDPLrxARAtKBAJ43AWWcp5aTdLAftczEHdWIBFw1YwCeLymF
9ckRpMJrKwAPXHDust8gCBI=
=gVkv
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list
Re: Directory Size Limit? [ In reply to ]
Nicholas Pappas wrote:

> This is more of a general Linux question -- I am wondering if it is
> possible to restrict the amount of information in a single directory?
> What I am wanting to do is a limit a directory to 128MB, which is the
> size of my Neuros I memory. I could then sync things up a whole lot
> more easily. :)

you could do this with quotas.

are multiple users storing files here? or is it just one user? can you
make the directory it's own partition?

then setup quotas on it:
/etc/fstab:
/dev/hda5 /neuros reiserfs defaults,noatime,usrquota 1 1

now mount it
$ mount /neuros

make a aquota.user file on it for quota2 support:
$ touch /neuros/aquota.user

then check it to create the file properly:
$ quotacheck -fm /neuros

now turn it on:
$ quotaon /neuros

now you can set some quotas
$ setquota userbob 131072 131072 0 0 /neuros

Now, userbob can only put 128MB of data in /neuros

--
gentoo-user@gentoo.org mailing list
Re: Directory Size Limit? [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 07 September 2004 22:25, Nicholas Pappas wrote:
> Hello all.
>
> This is more of a general Linux question -- I am wondering if it is
> possible to restrict the amount of information in a single directory?
> What I am wanting to do is a limit a directory to 128MB, which is the
> size of my Neuros I memory. I could then sync things up a whole lot
> more easily. :)

I don't believe that's possible, but there is something you can do.
Create a 128MB file, full of zeros (dd if=/dev/zero of=128meg bs=1M
count=128), format it (mke2fs 128meg), then mount it (mount 128meg /some/dir
- -o loop).

- --
Mike Williams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBPi7HInuLMrk7bIwRAnQGAJ9oTbO3QVFJ+WBLC6VDThbL3CXq8ACeNdRH
dRKIsIrMU30AW9ce5D5AfwY=
=XCUe
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list