LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Root File System Partitioning / Filesystems (https://www.linuxquestions.org/questions/linux-general-1/root-file-system-partitioning-filesystems-788770/)

Simon Barkwell 02-12-2010 04:21 PM

Root File System Partitioning / Filesystems
 
Hi,

I've been using *Unix systems for many years now, and I've always been led to believe that its best to partition certain dirs into separate FileSystems, off the main root FS.

For instance, /tmp /var /usr etc

Leaving as little as possible on the main / system.

Its so that you don't fill up the root system be accident, by some user putting in too bigger files in /tmp, for example.

I would presume that filling the / system would not be too good for Linux, as it would not be able to write logs and possibly other things that it needs to.

I believe that if root gets full, then there is something like a 5% amount saved for just 'root' to write to, so that it can do its stuff.

However, eventually, / will become full, and writes will fail.

On top of this, certain scripting tools, such as awk, use the /tmp/ system to store temp files in, and awk wont be able to write to /tmp/ as its full, so awk will fail.

However, I'm being advised that there is no need to put /tmp /var etc onto separate FSs, as there is no problem nowerdays with / filling up. So, /tmp /var /usr are all on the root FS.

I'm talking about large systems, with TBs of data (which is on a separate FS), and with a user populations of around 800-1000 users, and 24/7 system access.

However, I'm not convinced.

Any one have any views / problems that they would like to share with me, regarding this?

Thanks,

Simon.

GazL 02-12-2010 04:50 PM

Quote:

Originally Posted by Simon Barkwell (Post 3861920)
Hi,


However, I'm not convinced.

Any one have any views / problems that they would like to share with me, regarding this?

The biggest problem with individual partitions is getting into the situation where one filesystem runs out of free-space while others have plenty of space left. This is why many people prefer to go with the one big partition. If space efficiency isn't an issue and you have plenty of space which you can over-allocate, then I prefer to still split it up for all of the reasons you've already mentioned, and a couple of others.

At the end of the day though, it's all down to personal preference.

onebuck 02-13-2010 07:13 PM

Hi,

Welcome to LQ!

Quote:

Originally Posted by Simon Barkwell (Post 3861920)
Hi,

I've been using *Unix systems for many years now, and I've always been led to believe that its best to partition certain dirs into separate FileSystems, off the main root FS.

For instance, /tmp /var /usr etc

Leaving as little as possible on the main / system.

Its so that you don't fill up the root system be accident, by some user putting in too bigger files in /tmp, for example.

Some of this is true. Most of the time it is done to prevent the problem of filling the '/' from attacks by Crackers. By having partitions or space for '/','/tmp', '/var', '/usr' and '/home' the server can be maintained by admins without worry. Nothing says you cannot commit individual devices(drives) for each directory.

Quote:

Originally Posted by Simon Barkwell (Post 3861920)
I would presume that filling the / system would not be too good for Linux, as it would not be able to write logs and possibly other things that it needs to.

I believe that if root gets full, then there is something like a 5% amount saved for just 'root' to write to, so that it can do its stuff.

However, eventually, / will become full, and writes will fail.

On top of this, certain scripting tools, such as awk, use the /tmp/ system to store temp files in, and awk wont be able to write to /tmp/ as its full, so awk will fail.

However, I'm being advised that there is no need to put /tmp /var etc onto separate FSs, as there is no problem nowerdays with / filling up. So, /tmp /var /usr are all on the root FS.

I'm talking about large systems, with TBs of data (which is on a separate FS), and with a user populations of around 800-1000 users, and 24/7 system access.

However, I'm not convinced.

Any one have any views / problems that they would like to share with me, regarding this?

Thanks,

Simon.

That many users and we're talking a server environment. So other measures would be administered to prevent user generated problems. One way would be to create '/tmp' on a ramdisk therefore you could remove or clean without much effort.

As for '/var', I would be sure to clean the logs or rotate. The '/usr' would be a different challenge. How you allow the functionality with your groups and modifications allowed by a limited few therefore system admin should be limited to that same few. 'root' is golden and should be treated as such. 'su' should be treated the same as 'root', privileged therefore limited use by others.

Let 'users' perform/work within their '/home' environment.

:hattip:


All times are GMT -5. The time now is 12:20 PM.