1833433 Members
3026 Online
110052 Solutions
New Discussion

limit / from filling up

 
keith demingware
Occasional Advisor

limit / from filling up

I am concerned with the possibility that / in my filesystem can get filled up with say a script that keeps running in a loop and fills it up. I am running unix 11.23 on my itanium server. So my question is, is there a way of locking down the / directory from say going over 95% but once it does get to 95% i still have the capability of logging into root and clearing the file that is taking up all of the space. I hope this is clear.
just when you thought you had the answer
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: limit / from filling up

Probably the best you can do is a cron script that monitors the size of / and emails you a warning whenever it starts to grow too large. There is no way to set a limit.


Pete

Pete
MarkSyder
Honored Contributor

Re: limit / from filling up

Make sure whoever writes scripts that will run on your system knows to put them in a dedicated filesystem with log files written to that filesystem.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
V. Nyga
Honored Contributor

Re: limit / from filling up

Hi,

another possibility is 'quota' - this should exist in 11.23 too.
You have to check if it works for your environment. Every single user should have less then this 5% you want to hold back ...
So no single user can fill up your file system - well maybe all together they can, so in addition you should use a script like mentioned before.

Check this
http://docs.hp.com/en/B2355-90672/ch05.html
http://docs.hp.com/en/B2355-60130/quota.1.html
and also:
http://docs.hp.com/en/B2355-90672/ch04s11.html

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Geoff Wild
Honored Contributor

Re: limit / from filling up

This is one of the reasons why you should NOT have a flat file system. (IE - create a single filesystem and not have tmp, home, usr, opt, and others...)

The only way to will up / (under normal setup) is by the root account.

So, a regular user shouldn't be able to - unless you change permissions to a directory that belongs to the / filesystem.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor

Re: limit / from filling up

Your concern is valid (don't let / fill up). But it is not possible unless the script is running as root. The / directory (and directories local to / such as /etc and /sbin) does not allow ordinary users to store anything there.

Now the only task is to have a proper peer review of EVERY script that will be run by root. No script should be allowed to write anything into the / directory.

However, the more common ways that / fills up are from backup programs that misspell the tape drive name, crashed applications dumping big core files, and the overuse of the root login when it is not needed.


Bill Hassell, sysadmin
dirk dierickx
Honored Contributor

Re: limit / from filling up

hpux should get this interesting features from linux.

/ filling up should never happen, but it does.