[96946] in RedHat Linux List

home help back first fref pref prev next nref lref last post

RE: Limiting disk space

daemon@ATHENA.MIT.EDU (Richardson,Anthony)
Fri Oct 30 09:34:53 1998

Date: Fri, 30 Oct 1998 21:32:00 -0500
From: "Richardson,Anthony" <ARichard@stark.cc.oh.us>
To: redhat-list <redhat-list@redhat.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com


If you have free space available maybe you could make a 10 MB partition
and move the user's home directory there.

ALternatively, you could use a loopback device, something like:

dd if=/dev/zero of=/home/file bs=1k count=10k
losetup /dev/loop0 /home/file
mkfs -t ext2 /dev/loop0
mount /dev/loop0 /home/username

see the losetup man page for details.  You'd need to modify /etc/fstab
so that it would be automatically remounted.

Quotos are probably best though

Tony


On Friday, October 30, 1998 8:31 AM, redhat-list   
[SMTP:redhat-list@redhat.com] wrote:
> On Fri, 30 Oct 1998, Vineeta wrote:
>
> >  I want to limit disk space for a single user to say,10 Mb on my
> >  server
> >since he frequently needs to upload & download data.
> >I had posted this question earlier and got answers all relating to
> >quotas.I don't want to make a quota filesystem.Isn't there any other
> >way
> >to restrict space he can use?Maybe a script will help.
> >
>
> Unless you set up quotas it'll be hard to prevent him from going over
> that
> limit.  A cheap and tacky alternative would be to run a script against
> his
> home directory every <n> minutes (from cron perhaps) that checks the
> disk
> usage and if needs be starts randomly deleting files.
>
> Not that I'd suggest that - much better to tell a user they don't
> have
> space to save a file than to unexpectedly remove files when he's not
> informed he's over quota.
>
>
> why don't you want to set up the quota support?
>
>
> -dave
>
> --
>
>    |     oOOooO           /
> --|    oOobodoO        /   dsb3@earthlink.net
> --|     ooOoOo       /
>    |       II       /     Kernel Panic: /dev/brain is on fire.
>    |       II     /      MD5: 13aa1b8724ce1885cd9e7cad9b2eb9ba
>
>
> --
>   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST
>   ARCHIVES!
>   http://www.redhat.com http://archive.redhat.com
>          To unsubscribe: mail redhat-list-request@redhat.com with
>                        "unsubscribe" as the Subject.
>


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post