Re: question regarding quotas
On Mon, 30 Jun 2003, Dan Nelson wrote: If you're adventurous, you could use growfs :) Reading the archives, it seems as if you would use growfs, but then run into performance problems because you did not defragment afterward (and there is no defrag utility for UFS). Something about the performance getting worse and worse as you filled up the grown FS, since the go get some free space algorithm would fail a lot more since the first half of the disk would be packed full, and the space you grew on would not be ? comments ? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Hi Dan, On Sat, 28 Jun 2003, Dan Nelson wrote: Quotas are per-user, not per-directory. Any files those users create, anywhere in that filesystem, will contribute to their quota. Files created by other userids but placed in those directories will count against the other user's quota. Basically what happens with per-directory quotas is that the users learn not to put files in their homedir :) They end up finding someplace that they can write to outside their homedir and put files there instead. Thank you. Do per-directory quotas exist (in any fashion) in FreeBSD ? I am looking for a way to do per-directory, even if it is a hack of some kind... thanks. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Hello. On 29 Jun 2003, Lowell Gilbert wrote: Dan Nelson [EMAIL PROTECTED] writes: The only thing I can think of that might work: if you didn't mind a whole lot of filesystems, you could create a filesystem per directory you wanted to control. Then the filessytem size itself would be the quota. I'm not following this suggestion. Quotas are per-user, *per-filesystem*, as you said the first time. So it's not necessary to put each user's critical space on a different filesystem. In fact, what quotas do is protect users from each other on a given filesystem. What he is saying is, if I want to control the size of a directory, but there will be file creations in that directory from more than one user, I need to do something besides quotas, since quotas only count how much that user has created, NOT how much is in the directory total. So my question was, is there a way to control how big a directory can grow, regardless of who is putting what files in that directory. So far, his answer was that I could just make each directory its own filesystem, which would definitiely work, but I wondering if perhaps there is a more elegant way to do this ? Again, I am just trying to take an arbitrary directory, say: /export/data7/homes/jerry and place a configurable limit on how big that directory can get, without mounting it as its own filesystem... thanks. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Josh Brooks wrote: [ ... ] Again, I am just trying to take an arbitrary directory, say: /export/data7/homes/jerry and place a configurable limit on how big that directory can get, without mounting it as its own filesystem... FreeBSD doesn't have a filesystem with per-directory quota support. For a top-level mount point like /export/data7, a per-filesystem quota should do just fine, but if that isn't good enough for your needs, okay: so be it. I guess you'll have to find another OS which fits your requirements better. -- -Chuck ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Josh Brooks wrote to Lowell Gilbert: Again, I am just trying to take an arbitrary directory, say: /export/data7/homes/jerry and place a configurable limit on how big that directory can get, without mounting it as its own filesystem... FreeBSD doesn't support any filesystems that do this proactively. From an OS point of view, it doesn't really make sense. However, I can see a few scenarios where this would be helpful, and it is more than possible to enforce directory size limits reactively. For example: #!/bin/sh if [ $# -ne 1 ]; then echo usage: $0 pathname 12 exit 2 fi QUOTA=102400; # Max. usage, kilobytes SIZE=`du -xd 0 $1 | cut -f 1` echo Directory size is $SIZE if [ $SIZE -gt $QUOTA ]; then echo $1 is over quota;# Take appropriate action, here... else echo $1 is OK; fi That's an illustrative example; it'll be easy to extend that to loop over an arbitrary list of users (or all system users). You can then run it periodically from cron(8) to check disk usage at the interval of your choosing, and react accordingly. As others have mentioned, users may find other directories and filesystems to store files, thereby circumventing your quota check. So, it's up to you to harden your system to mitigate that. Also, as this is a reactive approach, your users still have the ability to fill up your disk, but at least you can react appropriately (and possibly automatically). Though, I think I've at least answered your question. :-) Hope this helps, - Ryan -- Ryan Thompson [EMAIL PROTECTED] SaskNow Technologies - http://www.sasknow.com 901-1st Avenue North - Saskatoon, SK - S7K 1Y4 Tel: 306-664-3600 Fax: 306-244-7037 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Josh Brooks wrote: So my question was, is there a way to control how big a directory can grow, regardless of who is putting what files in that directory. So you are going to make a directory N Mbytes large... Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and mount to your directory. You should be solved then. man vnconfig for details. HTH, DoubleF ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
Hi, On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote: Josh Brooks wrote: So my question was, is there a way to control how big a directory can grow, regardless of who is putting what files in that directory. So you are going to make a directory N Mbytes large... Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and mount to your directory. You should be solved then. Yes, I am familiar with this way of solving the problem, its just that I would like to try to avoid having all those partitions mounted (even if they are just vn-partitions) because then it is very hard to increase or decrease those quota sizes - you have to dump, dd a bigger file, re-vnconfig, then restore ... very time consuming. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
In the last episode (Jun 29), Josh Brooks said: On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote: So you are going to make a directory N Mbytes large... Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and mount to your directory. You should be solved then. Yes, I am familiar with this way of solving the problem, its just that I would like to try to avoid having all those partitions mounted (even if they are just vn-partitions) because then it is very hard to increase or decrease those quota sizes - you have to dump, dd a bigger file, re-vnconfig, then restore ... very time consuming. If you're adventurous, you could use growfs :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
On Mon, Jun 30, 2003 at 12:25:45AM -0500 or thereabouts, Dan Nelson wrote: In the last episode (Jun 29), Josh Brooks said: On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote: So you are going to make a directory N Mbytes large... Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and mount to your directory. You should be solved then. Yes, I am familiar with this way of solving the problem, its just that I would like to try to avoid having all those partitions mounted (even if they are just vn-partitions) because then it is very hard to increase or decrease those quota sizes - you have to dump, dd a bigger file, re-vnconfig, then restore ... very time consuming. If you're adventurous, you could use growfs :) For example, to enlarge the quota by 100 MBytes: # umount /the/quota/dir # dd if=/dev/zero bs=1m count=100 /the/vn/file # growfs /dev/vn?c Did you make backups? yes ... # mount /dev/vn?c /the/quota/dir Alas, no way to shrink it :( -- Josh -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
question regarding quotas
Hello! I have a group of 5 users that I want to set up quotas for - their home directories are: /export/data1/user1 /export/data1/user2 /export/data1/user3 /export/data1/user4 /export/data1/user5 And they will be given free reign to fill up those directories however they choose. At the same time, there will be a fair number of automated processes on the system that place files and directories and logs and other files into their home directories. So, as time goes by, not only will the users themselves fill up their dirs, but other processes on the system will fill up their dirs. These files and dirs that are created by these other processes will be owned by various usernames - bind, www, root - and have different groups set to them as well. My question is, will the extra files and dirs that get placed in their home dir by all these automated processes count towards their quota ? If not, is there a way to set up quotas so that _they do_ ? Basically I just want the quota to calculate how much is in their home dir and enforce based on that... comments are be appreciated ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: question regarding quotas
In the last episode (Jun 28), Josh Brooks said: I have a group of 5 users that I want to set up quotas for - their home directories are: /export/data1/user1 /export/data1/user2 /export/data1/user3 /export/data1/user4 /export/data1/user5 And they will be given free reign to fill up those directories however they choose. At the same time, there will be a fair number of automated processes on the system that place files and directories and logs and other files into their home directories. So, as time goes by, not only will the users themselves fill up their dirs, but other processes on the system will fill up their dirs. These files and dirs that are created by these other processes will be owned by various usernames - bind, www, root - and have different groups set to them as well. My question is, will the extra files and dirs that get placed in their home dir by all these automated processes count towards their quota ? If not, is there a way to set up quotas so that _they do_ ? Quotas are per-user, not per-directory. Any files those users create, anywhere in that filesystem, will contribute to their quota. Files created by other userids but placed in those directories will count against the other user's quota. Basically what happens with per-directory quotas is that the users learn not to put files in their homedir :) They end up finding someplace that they can write to outside their homedir and put files there instead. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]