linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Quota for root ?
@ 2006-03-07 19:00 Sion Khalaf
  2006-03-07 19:16 ` David Fierbaugh
  0 siblings, 1 reply; 6+ messages in thread
From: Sion Khalaf @ 2006-03-07 19:00 UTC (permalink / raw)
  To: linux-admin

Hi,

Is it possible to create quota for root?
I have process that runs with root, which I want to limit its writing,
so it will not fill the whole File System.

Can it be done with quota ?

Thanks in advanced,
Sion


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Quota for root ?
@ 2006-03-08  0:03 Sion Khalaf
  2006-03-08  1:53 ` Glynn Clements
  0 siblings, 1 reply; 6+ messages in thread
From: Sion Khalaf @ 2006-03-08  0:03 UTC (permalink / raw)
  To: David Fierbaugh, linux-admin

There is no possibility to do the first solution.
The second, regarding drive  mounting, is it ram drive?
If so, How to mount it ?

Anyway, I am looking for a way to make my file system read only.
That will surely, be the best solution.

My application is writing into certain folder, not on the physically /
File system,
So I can make the / FS read only, Do you have an idea how can I do that
?

Lots of questions, but I am really appreciate your help !
Thank anyway..


-----Original Message-----
From: David Fierbaugh [mailto:david@fierbaugh.org] 
Sent: Tuesday, March 07, 2006 9:16 PM
To: Sion Khalaf; linux-admin@vger.kernel.org
Subject: Re: Quota for root ?

That seems like a bad idea, even if it is possible.

I'd suggest having it direct it's output to another process running as a
different user. Then you can use quota for that user. And if it did fill
up the device, you'd still have root's reserved % to keep the system at
least partially functional.

Or, create a file of a set size, and mount that as a drive, then record
the data to that file, then you have an exact limit on the amount of
data recorded.

I'm sure there are quite a few other creative solutions, those are just
the two that popped into my mind as quick fixes.

On Tuesday 07 March 2006 14:00, you wrote:
> Hi,
>
> Is it possible to create quota for root?
> I have process that runs with root, which I want to limit its writing,

> so it will not fill the whole File System.
>
> Can it be done with quota ?
>
> Thanks in advanced,
> Sion
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin"

> in the body of a message to majordomo@vger.kernel.org More majordomo 
> info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Quota for root ?
@ 2006-03-08  6:12 Sion Khalaf
  2006-03-08 12:36 ` hackmiester (Hunter Fuller)
  0 siblings, 1 reply; 6+ messages in thread
From: Sion Khalaf @ 2006-03-08  6:12 UTC (permalink / raw)
  To: Glynn Clements; +Cc: linux-admin

Thanks, I will try that first. 

-----Original Message-----
From: Glynn Clements [mailto:glynn@gclements.plus.com] 
Sent: Wednesday, March 08, 2006 3:53 AM
To: Sion Khalaf
Cc: linux-admin@vger.kernel.org
Subject: RE: Quota for root ?


Sion Khalaf wrote:

> There is no possibility to do the first solution.
> The second, regarding drive  mounting, is it ram drive?

No, loopback filesystem.

> If so, How to mount it ?

	mount -o loop <filename> <mount point>

To create the file, first create a suitably-sized file with e.g.:

	dd if=/dev/zero out=loopfile.dat bs=1m count=100	#100Mb

then create a filesystem on it with:

	mke2fs -F loopfile.dat

> Anyway, I am looking for a way to make my file system read only.
> That will surely, be the best solution.
> 
> My application is writing into certain folder, not on the physically /

> File system, So I can make the / FS read only, Do you have an idea how

> can I do that ?

Normally, directories which need to be writable, e.g. /var and /tmp,
would use separate partitions. Those partitions would be writable (but
probably using the noexec and nodev options), but the root filesystem
would be read-only.

The most common issue with making the root filesystem read-only is that
"mount" tries to write to /etc/mtab, which will fail. Either use the -n
option to mount or recompile mount to use e.g. /var/run/mtab instead.

--
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-08 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 19:00 Quota for root ? Sion Khalaf
2006-03-07 19:16 ` David Fierbaugh
  -- strict thread matches above, loose matches on Subject: below --
2006-03-08  0:03 Sion Khalaf
2006-03-08  1:53 ` Glynn Clements
2006-03-08  6:12 Sion Khalaf
2006-03-08 12:36 ` hackmiester (Hunter Fuller)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).