[NTLUG:Discuss] Partition Size

Chris Cox cjcox at acm.org
Thu Sep 20 00:02:01 CDT 2007


Dennis Rice wrote:
> Last Saturday our speaker, Brett Rilling suggested that when a new 
> installation is made, that partitions be created for each of the basic 
> directories.  (An absolute excellent presentation also!!!)  His 
> suggestion was that directories be created for:
> /boot
> /root
> /home
> /var
> /usr
> 
> For discussion, what size, and why, would one make for each directory. 
>   The issue that must be made is what type of installation is being 
> made, namely minimum / medium / full install.  For discussion, since 
> hard drives are relatively low cost, say we have a 200 Giga-byte drive.
> 
> How would you complete the following table?
> 
> Partition	Minimum		Medium		Full
> /boot		.		.		100M
> /root		.		.		.
> /home		.		.		.
> /var		.		.		5G

That's huge.  A 5GB UPDATE!

On SUSE I usually can get by with 750M, maybe a 1GB.

On a good system / can be quite small.  With today's
newer/larger harddrives, my minimum filesystem size
now is 750M.

/         750M
/boot     60M (ext2)
/usr      1-2GB (larger if using Red Hat... FAT /usr concept)
/var      750M
/var/lib  750M (if you want to segregate for updates)
/opt      1-2GB (for distros that know what /opt is for)
/usr/local 750M
/tmp      750M
60M for /boot is pretty huge.  ext2 because a journal
occupies WAY too much space on a small filesystem.

Red Hat uses a VERY fat /usr... which IMHO is bad.  Because
it doesn't make the system very partitionable.  SUSE and
some others put LARGE standalone non-essential packages
(subsystems that have a directory tree) into /opt.  I think
that's a better idea.

/var is for spooling... so this needs to be as large as
you need it to be.  If it's a print server (for example),
you'll want this to be larger.   Ditto for mail server.

/srv (didn't mention this one), is often used for the
web server.  Find out where your web server document
root is going to be and consider the option of making
it a parition as well.

/tmp needs to be as large as needed.  If this is
a development build machine with lots of users doing
compiles, /tmp may need to be much bigger.

/usr/local can start off small... grow it to meet your
needs as you add tar-balls and such that populate it.

/home, I usually name mine /localhome since many
traditional *ix platforms multi-mount on top of /home and
Linux (in the past) didn't know how to handle complex
indirect and direct automounts using areas within
the same directory hierarchy.  This area can start
small and grow to meet your needs.

How do you "grow"?  Use a filesytem that is made
to be grown online and use LVM.  Choose reiserfs, jfs or xfs.
Too many limitations prevent ext3/4 from being a
good growable filesystem today.

Apart from isolation/security, partitioning can be used for
performance.  Consider a system with two drives.
/usr could be on one drive and /usr/lib could
be a partition on a different drive.  Thus executables
and their dependent libraries are possibly on two
pathways... and that might speed loads dramatically
(30% or more).


Step to grow a filesystem using LVM

lvextend -L +2G /dev/vg01/localhome
resize_reiserfs /dev/vg01/localhome

This does an online resize of the reiserfs
on /dev/vg01/localhome.  It's almost
instantaneous.

If security isn't a concern, cheapy desktops and laptops
will often use a fat root (/) style.  I personally don't
have much problem with that.  Especially where disk space
is tight.  Might not be safe... but then again, it's
not that important of a system.  I guess I should
say... I tolerate that situation in specific circumstances.




> /usr		.		.		.
> 
>  From experience, I know that the /var directory must be at minimum 5 
> GB to support an initial yum update after installation.
> 
> Hope we have an interesting discussion.
> 
> Dennis
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
> 
> 




More information about the Discuss mailing list