This is a discussion on Disk Quota within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi all. I need implement a disk quota system in Slackware 10.2. How to it? Thank's....
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| On Tue, 03 Jan 2006 20:29:00 +0100, Eric Hameleers <alien@penguin1.dyndns.org> wrote: >Diego wrote: >> Hi all. >> I need implement a disk quota system in Slackware 10.2. >> How to it? >Read the "Slackware-Mini-Quota-HOWTO" in /etc/rc.d/rc.M I would like to use user quotas to eliminate the need for a separate /var partition on my personal desktop 10.2 system. To do this I would create a new user 'quota' and then copy over everything in /var. Then soft link /var to the 'quota' home and add the quota files. Does this sound like it might work? Larry -- My real sig is much better. |
| |||
| larryalk wrote: > I would like to use user quotas to eliminate the need for a separate > /var partition on my personal desktop 10.2 system. > > To do this I would create a new user 'quota' and then copy over > everything in /var. Then soft link /var to the 'quota' home and add > the quota files. Nope, it wouldn't, as majority of files in /var are owned by specific and proper users. Instead of asking for a right tool to do a job, why don't you explain what kind of a job you want to do? One thing you should learn that asking for instructions on using a hammer are often pointless, when in fact a screwdriver would do a better job. The only way we can tell you about a screwdriver is when you tell us what you're fixing - a bookshelf or a tv. Ohh, not to mention - you really don't NEED separate /var. |
| |||
| larryalk <nobody@nowhere.com> wrote: > Does this sound like it might work? No, because quotas go on OWNER, which means all the files within the /var tree would have to be OWNED by that new user, including all the new and tempory files within that tree. Essentially quotas are _per filesystem_ and ON owner, all mail files (/var/spool/mail) will stay on their respective user-ids otherwise mail reading won't work anymore, all files in /var/tmp will still stay on their creating user ids, and probably most of the files in /var/spool/* too. If you want to restrict the total size of /var, make it its own fs (partition, disk or LVM volume), if you want to restrict the amount of space "normal users" can use in /var, still make it its own fs, but the quota has to be on the normal user ids OF the users creating files in there. For instance, we wanted "mail" to be restricted, so our /var/spool/mail is LINKED to the fs where the home dirs are and there's user quota on that fs, so that each user has a quota for all his/her files, INCLUDING the mail: $ ls -l /var/spool lrwxrwxrwx 1 root root 13 Oct 5 2004 mail -> /dsk2/p2/mail (/dsk2/p2 is "partition 2 of disk2", the home dirs are under the subdir "home" on that): $ ls -l /dsk2/p2 drwxr-xr-x 7 admin beheer 2048 Dec 7 09:30 home drwx------ 2 root root 16384 Sep 27 2004 lost+found drwxrwxrwt 2 admin mail 2048 Jan 5 07:55 mail -rw-r--r-- 1 root root 194016 Jan 2 02:03 quota.user PS: reiserfs does NOT support quotas (yet?) so the partition has to contain a ext2/3 type filesystem (that's why the "lost+found" dir, which e2fsck needs). XFS and JFS do, but XFS is quite diffferent, read the How-To's and man pages if you want to use quota on that type of fs. -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |
| |||
| Eef Hartman wrote: > PS: reiserfs does NOT support quotas (yet?) so the partition has to > contain a ext2/3 type filesystem (that's why the "lost+found" dir, > which e2fsck needs). reiserfs supports quotas v2, which are present in kernel 2.6. |
| |||
| On Wed, 04 Jan 2006 20:32:12 -0500, "Dominik L. Borkowski" <dom@vbi.vt.edu> wrote: >larryalk wrote: > >> I would like to use user quotas to eliminate the need for a separate >> /var partition on my personal desktop 10.2 system. >> >> To do this I would create a new user 'quota' and then copy over >> everything in /var. Then soft link /var to the 'quota' home and add >> the quota files. > >Nope, it wouldn't, as majority of files in /var are owned by specific and >proper users. > >Instead of asking for a right tool to do a job, why don't you explain what >kind of a job you want to do? I'm looking for a way to prevent or at least be notified when /var is starting to filling up. Right now I'm using a separate partition for /var which may not be as dangereous as filling up the main / partition because /var is in it. However, I'm anxious to pare down the number of partitions to the minimum, which for my single user workstation could be swap, / and /home. I've even considered having only a single partition (including swap) but like the idea of a separate /home when upgrading Slackware versions every 6 months. It also could be that the possibility of filling up /var for my type of single user workstation is an overrated danger. >Ohh, not to mention - you really don't NEED separate /var. "don't NEED" yes, but I have heard that the entire disk could fill up if /var is in the main / partition. Does this actually happen in real life? Larry -- My real sig is much better. |
| ||||
| larryalk wrote: > Right now I'm using a separate partition for /var which may not be as > dangereous as filling up the main / partition because /var is in it. > It also could be that the possibility of filling up /var for my type > of single user workstation is an overrated danger. for a single user workstation, chances of /var growing that large is very little, especially if you rotate the logs. >>Ohh, not to mention - you really don't NEED separate /var. > "don't NEED" yes, but I have heard that the entire disk could fill up > if /var is in the main / partition. think logically. if /anydir is on the same filesystem as /, then filling up /anydir will result in / also being full. > Does this actually happen in real life? yes, it does. the chances are higher if you actually run a mail server, etc [since that's where mailboxes often would be] |