Unix Technical Forum

Disk Quota

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....


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 01:49 PM
Diego
 
Posts: n/a
Default Disk Quota

Hi all.
I need implement a disk quota system in Slackware 10.2.
How to it?

Thank's.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 01:49 PM
Eric Hameleers
 
Posts: n/a
Default Re: Disk Quota

Diego wrote:
> Hi all.
> I need implement a disk quota system in Slackware 10.2.
> How to it?
>
> Thank's.
>


Read the "Slackware-Mini-Quota-HOWTO" in /etc/rc.d/rc.M

Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 01:51 PM
larryalk
 
Posts: n/a
Default Re: Disk Quota

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 01:51 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: Disk Quota

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 01:52 PM
Eef Hartman
 
Posts: n/a
Default Re: Disk Quota

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 **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 01:52 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: Disk Quota

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 01:52 PM
larryalk
 
Posts: n/a
Default Re: Disk Quota

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 01:52 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: Disk Quota

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]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:52 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com