Operating System - Linux
1748076 Members
5345 Online
108758 Solutions
New Discussion юеВ

Minimum Linux File System Sizes

 
SOLVED
Go to solution
AlienRoadShow
Frequent Advisor

Minimum Linux File System Sizes

Using Red Hat 9

A) What are the O/S file systems?
B) ...their default types?
C) ...and their minimum sizes?
D) What are their recommended sizes?
E) What are their recommended types? (* Just accept Default or something else? *)

For example,

root = xxx mb
swap = xxx mb
Yours, Mine and Yours
12 REPLIES 12
Balaji N
Honored Contributor
Solution

Re: Minimum Linux File System Sizes

a tough question. requires more info before this can be answered.

what are you going to do with this.

swap = 2 X RAM.
root = 3-4 GB
a separate /home partition.

run as a mail server / proxy server, etc..

here the main criteria will be /var. so have a huge /var file system.

if you plan to compile from sources, u need to have lot of space in /usr/local. so plan accordingly.

hmmm.. this is what comes to my mind now.

but if u tell what are the services you are going to run, we can tell u more.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Stuart Browne
Honored Contributor

Re: Minimum Linux File System Sizes

Most of these questions depend upon how much space is available, and what kind of installation you are doing (workstation, server, custom).

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/s1-steps-type.html might be helpful to you however.
One long-haired git at your service...
Jerome Henry
Honored Contributor

Re: Minimum Linux File System Sizes

Hi Bill,

Adding to friends tips : when I set a machine up, I make several parititons, which will give you informations on some size : say you have 40 GB drive :
/boot : 100MB
swap : twice RAM, as you read on Stuart's link.
/home : 10 GB (why not !)
/tmp : 2 GB (making a partition for it will prevent anybody to flood my system with temp files)
/usr : 10 GB (there you'll install your programs, you can give more spece depending on what you intend to install).
If you install a server, you can also set up a parititon for var, same as /usr.
/ will contain the rest.

Making partitions is intended to physically limit some strategic directory size.

On a personnal standard install, RH9 will make swap partition (type swap, size 2xRAM), /boot partition (type ext2/ext3, 100 MB average), and / (type ext2/ext3, rest of disk), which is default choice and quite OK too.

So, installing, eh ? Cool !

J
You can lean only on what resists you...
Hans_8
Occasional Advisor

Re: Minimum Linux File System Sizes

Probably an answer you don't like, as there is not clear cut a-priori answer.

It all boils downs to two factors, that only YOU van determine:
a) what do you have (hardware)
b) what do you need (deamons, user programs)

First, let me elliminate one urban legend, like swap is amount of mem, or twice of it.
This is a relic from times where RAM was expensive and limmited.
swap-space is needed if you run more processes than the size of your physical ram. If you have enough RAM and/or limmited the amount of unneeded deamons, just use a tiny swap-space, like 64 MB. (for runaway processes)

The idea of having swap twice the amount of mem, comes from the times when unix systems (HP, SUN) needed an area in which they could dump the contents of the memory in case of a core-dump. And they used the swap area, also to save disk-space. If i were to follow that rule, i would have to define a swapspace of 4GB, No way!!!!
Nowadays, swap-space is a means of last resource, as the system will be awwfull slow (busy swapping in and out). When system incidentily uses swap, no problem, when it constantlu uses swap, it is a sign to either do some tuning, or buy more mem.
Even on our multi gig servers (HP & sun) i only have 512MB swap.

As for the rest, i would suggest the following:
Always make a seperate /boot, about 100MB
This partition should contain all you need to boot, and should in normal situation mounted as read-only, or not mounted at all, just to avoid accidents. If you need it (new kernel or so) mount it manually)

Make a swap of about 128MB
Leave the rest of your disk for /

Install everything YOU REALY NEED, and test your installation very wel.
Do a:
1) du -s /var
2) du -s /usr
3) du -s /home
4) du -s /opt
5) du -s /chroot
6) du -s /tmp
7) du -s /public etc etc etc

If done correctly 2) 4) and 5) won't grow much afterwards, so round it up to the next 100MB, or 80% limmit
Divide the rest of disk space between /, /var, /tmp and /home

With the top-command, you can easily check the use of the sawp-space (or xosview).
/var will grow fast when making a mail server, or logfiles
/home might be big when making a webserver, or for compilations (YES, even for the kernel!)
/tmp could grow big if you dont clear old files
/ should not grow, unless you have unqualified people, log in as root, and doing common mistakes like backing up to a file, instead of the tape-device ;-)), or polluting /root.

If you got theses numbers, re-install the whole lot, using separate partitions.
Use reiserfs for partitions that change much.

It takes some time, but in the end you have a solid configuration....

Hans
Balaji N
Honored Contributor

Re: Minimum Linux File System Sizes

well said Hans. and thanks for pointing out the swap=2XMem stuff. most of us come from the HP unix background and hence when we think of swap we always think it is swap+dump.

a well worded reply with lots of info.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
AlienRoadShow
Frequent Advisor

Re: Minimum Linux File System Sizes

Seeeeeee, youuuu guuuyyys.

Quote "... Red Hat 9 will install on any old PC...".

But you forgot to discuss limitations with IDE disk controllers which are typically limited to 512 mb disk sizes but will stretch all the way out to 1 gb.

"...whoopsie daisie..."

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa2d4506d69a7d711abdc0090277a778c,00.
Yours, Mine and Yours
AlienRoadShow
Frequent Advisor

Re: Minimum Linux File System Sizes

All right, I can still proceed with my 8 gb disk on the AMD K6. I'm just going to have to do some shuffling first since I currently use it for network backups.

Question:

1) du -s /var
2) du -s /usr
3) du -s /home
4) du -s /opt
5) du -s /chroot
6) du -s /tmp
7) du -s /public

...these are sub directories mounted under root and not file systems? Or are they file systems?

Any comments on using the 8 gb disk?
Yours, Mine and Yours
Claudio Cilloni
Honored Contributor

Re: Minimum Linux File System Sizes

I think 8 GB is a limit for old BIOSes. I remember an old Pentium 100Mhz that couldn't use more than 8 GB of a 20 GB harddisk.
Currently I use two 6 GB disks on a 486, and they work well.
So that 8 GB should be ok.

Ciao
Claudio
Hans_8
Occasional Advisor

Re: Minimum Linux File System Sizes

Question:

1) du -s /var
2) du -s /usr
3) du -s /home
4) du -s /opt
5) du -s /chroot
6) du -s /tmp
7) du -s /public

...these are sub directories mounted under root and not file systems? Or are they file systems?

Firstly, when trying to determine your need, just make all of them subdirectories under /.

Secondly, if you know how much each of them needs, make them (the ones you need) files systems, mounted on these mount-points.

Anyway, this is done automagically during the installation, at the point of partitioning the disk. (select manually, with disk-druid)
In the first case, just make /boot, swap and /.
In the second case, add all the partitions you need

Hans