LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-16-2013, 01:00 AM   #1
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111
Blog Entries: 1

Rep: Reputation: 17
Root filesystem full root cause


Dear All,

I am in a project to find a solution for root file system full (/) on Linux servers. I know that it is difficult to fix this as we don’t know who or what application will dump the files on root FS. But I was asked to find some sort of common solution for this problems or suggestions. Can anyone have gone through this before, If so please help me.
 
Old 07-16-2013, 01:28 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

having separate /var and /tmp partitions will go a *long* way to stopping random processes filling up /.

Evo2.
 
Old 07-16-2013, 01:48 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...what evo2 said plus prevention like analyzing what gets logged (in the sense that multiple consecutive errors should be fixed instead of letting them fill up logs and maybe add proactive measures where this concerns brute force attacks) and remote log / free disk space monitoring with say Nagios.
 
Old 07-16-2013, 02:15 AM   #4
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
/var /tmp & /home are created as a different file systems.
 
Old 07-16-2013, 03:02 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Have you found out which directory/ies the files filling the root file system are being created in?
 
Old 07-16-2013, 07:54 AM   #6
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
I am serching for a common solution or suggessions. In my list i have 200 incidents which has 50 repeated issues. Is it anything that can impliment on all servers to reduce the incidents.
 
Old 07-16-2013, 08:31 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you have /var, /tmp and /home as separate partitions they shouldn't be anything that routinely writes to / to fill it up. If that is a case I would find out what program does this and fix that issue. Usually, on a system configured like yours, you should be able to mount / as read-only, preventing any writes to that partition.
 
Old 07-16-2013, 08:54 AM   #8
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
Yes it was manually moved some files to the / file system by user or application team members. Once i informed them they removed the application files. Any work areound can u pls suggest?

Last edited by Febi881; 07-16-2013 at 09:29 AM.
 
Old 07-16-2013, 09:40 AM   #9
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by Febi881 View Post
Yes it was manually moved some files to the / file system by user or application team members. Once i informed them they removed the application files. Any work areound can u pls suggest?
first of all, off topic, but please spell out your words (text speak such as 'u' and 'pls' are against the rules here FYI)
second, it has been mentioned in your situation that mounting / as read-only is a viable option in your situation, this would deny anyone or anything privilege to write to / in the first place. this seems to me the most simple solution short of writing a script that checks for new files and moves them to their respective owner's home directory, which would be cumbersome at best.
 
1 members found this post helpful.
Old 07-16-2013, 09:42 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Work around for team members to not write to /? Why do they have that capability in the first place, are they working with root-privileges? Give them restricted privileges, use sudo for giving limited root access to those that need it.
 
2 members found this post helpful.
Old 07-16-2013, 08:37 PM   #11
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
Thank you all for your suggestions. But just a question is there is any disadvantage to mount root File Syatem as in read-only mode?

Last edited by Febi881; 07-16-2013 at 08:47 PM.
 
Old 07-16-2013, 08:51 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Yes, to change contents of it (like installing software or changing configuration files) you have to remount it r/w first, then go back to r/o later. Other than that, no.
The question still remains why your users are able to write to that partition. If they indeed work with root privileges there is nothing that hinders them to remount the partition themselves r/w to fill it up again. My first concern would be to fix that.
 
1 members found this post helpful.
Old 07-16-2013, 08:57 PM   #13
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
There are few users like Tivoli backup, few special customers they have root credentials etc. As per agreement they have those priviliages alredy.

I will put a suggession to remove those privliage as a part of prevention.
 
Old 07-17-2013, 04:25 AM   #14
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 111

Original Poster
Blog Entries: 1

Rep: Reputation: 17
Just a question, if we have few NFS/NETAPP filesystems mounted on this root file system with application user as owners, will this read-only root file system will affect them from read-write operations.
 
Old 07-17-2013, 06:12 AM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Febi881 View Post
Just a question, if we have few NFS/NETAPP filesystems mounted on this root file system with application user as owners, will this read-only root file system will affect them from read-write operations.
If you mount those filesystems rw then they are not affected.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Can't find root filesystem / error mounting /dev/root" when booting to new kernel sal_paradise42 Linux - Hardware 1 12-01-2012 04:03 PM
Root Filesystem (/) appears almost Full raheel_com88 Linux - Software 3 11-20-2012 10:09 AM
[SOLVED] Root filesystem is full so unable to mount the second device smilemukul Linux - Newbie 4 03-09-2012 04:53 AM
[SOLVED] how can i remount root filesystem as read/write after modify readonly-root file jcwkyl Linux - Newbie 3 12-21-2010 10:40 PM
RHEL4 root directory says full but sum of use is nowhere near full. Why? SteveInTallyFL Linux - Server 11 02-05-2009 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration