Unix Technical Forum

Current thoughts on system partitioning

This is a discussion on Current thoughts on system partitioning within the Linux Operating System forums, part of the Unix Operating Systems category; --> Used to be the conventional wisdom for a *nix system was to have separate disk partitions for areas like ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 06:19 AM
Morris Jones
 
Posts: n/a
Default Current thoughts on system partitioning

Used to be the conventional wisdom for a *nix system was to have separate
disk partitions for areas like /boot, /var, /home, /usr.

I can certainly see the wisdom of a separate partition for a usenet volume,
if you're doing that.

My server hosts a handful of domains and email accounts for friends and
family. I've run into issues with the mounted /var partition filling up
with a runaway log file and causing other problems.

What's the current advice for partitioning a modern server? What's the
downside of using one large partition for the system?

One good thing I can think of is to have a small disk partition available
as an alternate boot for doing maintenance with the main partition
unmounted. That also might be practical with a live CD, saving the disk
space.

I'm building a new server and planning to migrate to it over the next few
weeks.

Mojo
--
Morris Jones <*>
Monrovia, CA
http://www.whiteoaks.com
Old Town Astronomers: http://www.otastro.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 06:19 AM
Peter T. Breuer
 
Posts: n/a
Default Re: Current thoughts on system partitioning

In comp.os.linux.misc Morris Jones <mojo@devilrock.whiteoaks.com> wrote:
> What's the current advice for partitioning a modern server?


Partition it the way you need to for your purposes. That would usually
entail splitting off /var /home /usr /usr/local etc. (not "/etc"!).


> What's the
> downside of using one large partition for the system?


What's the downside of having a house with no walls? A desk with no
drawer separators? When it breaks you lose everything. If you make a
mess somewhere you mae a mess everywhere.

Plus you have no control over what should be readonly, readwrite,
noatime, journalled, non-journalled, etc.

> One good thing I can think of is to have a small disk partition available
> as an alternate boot for doing maintenance with the main partition


It's normal to make / as small as possible and to keep a spare copy of
it smewhere as far away as possible, on another disk, or the other end
of the same disk.

> unmounted. That also might be practical with a live CD, saving the disk
> space.


There's no point - the disk space involved is tiny, about 256MB.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 06:19 AM
Rod Smith
 
Posts: n/a
Default Re: Current thoughts on system partitioning

In article <cs3noa$8hv$1@devilrock.whiteoaks.com>,
mojo@devilrock.whiteoaks.com (Morris Jones) writes:
>
> Used to be the conventional wisdom for a *nix system was to have separate
> disk partitions for areas like /boot, /var, /home, /usr.

....
> What's the current advice for partitioning a modern server? What's the
> downside of using one large partition for the system?


I expect you'll run into different opinions on this. Personally, I
recommend that newbies keep it simple -- swap, root (/), /home, and
possibly /boot. Experienced users can decide for themselves if the
benefits of more partitions (customizing filesystems for specific
purposes, security benefits, minimizing risks associated with filesystem
errors, etc.) outweigh the costs (the risk of filling up individual
partitions, mainly).

One relatively recent wrinkle on this, at least in the Linux arena, is
logical volume management (LVM), which enables you to define logical
partitions rather than "real" ones. The logical volumes can be more
easily resized and manipulated, gaining the best of both worlds, but at
the cost of increased administrative effort. If you want to look into
this, try doing a Web search on "Linux LVM."

--
Rod Smith, rodsmith@rodsbooks.com
http://www.rodsbooks.com
Author of books on Linux, FreeBSD, and networking
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 06:19 AM
John-Paul Stewart
 
Posts: n/a
Default Re: Current thoughts on system partitioning

Morris Jones wrote:
>
> My server hosts a handful of domains and email accounts for friends and
> family. I've run into issues with the mounted /var partition filling up
> with a runaway log file and causing other problems.
>
> What's the current advice for partitioning a modern server? What's the
> downside of using one large partition for the system?


Well, for starters, that runaway log that filled /var would (in a single
partition system) fill / instead. (It may have taken longer to fill a
larger single partition, but it would have happened eventually.)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 06:19 AM
Captain Dondo
 
Posts: n/a
Default Re: Current thoughts on system partitioning

On Wed, 12 Jan 2005 17:45:46 +0000, Morris Jones wrote:

> Used to be the conventional wisdom for a *nix system was to have separate
> disk partitions for areas like /boot, /var, /home, /usr.
>
> I can certainly see the wisdom of a separate partition for a usenet volume,
> if you're doing that.
>
> My server hosts a handful of domains and email accounts for friends and
> family. I've run into issues with the mounted /var partition filling up
> with a runaway log file and causing other problems.


Well, that's an argument *for* partitioning, not against. Problems in one
partition won't affect other partitions.

>
> What's the current advice for partitioning a modern server? What's the
> downside of using one large partition for the system?


Basically, I use /, /boot, /usr, /var, /home, and /data. I typically
symlink /opt to /usr/opt, and on this latest server, I created /tmp. Much
of this has to do with RAID. / and /boot have to be on raid-1. Since I
had 4 identical SCSI hard drives, I created / and /boot on two, and used
the space on the other two for swap and /tmp, which I did as raid-0...

/home got a raid-5 partition, so did /var and /usr. /data lives on two
IDE drives in a raid-0.

>
> One good thing I can think of is to have a small disk partition available
> as an alternate boot for doing maintenance with the main partition
> unmounted. That also might be practical with a live CD, saving the disk
> space.


Can't speak for others, but I've never needed this.

> I'm building a new server and planning to migrate to it over the next few
> weeks.


Figure on using RAID; with the price of hard drives it's silly not to.
Once you start to lay out your raid configuration, you'll find that
partitioning sort of falls in place.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 06:19 AM
Roger Leigh
 
Posts: n/a
Default Re: Current thoughts on system partitioning

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Captain Dondo <yan@NsOeSiPnAeMr.com> writes:

> On Wed, 12 Jan 2005 17:45:46 +0000, Morris Jones wrote:
>
>> What's the current advice for partitioning a modern server? What's the
>> downside of using one large partition for the system?

>
> Basically, I use /, /boot, /usr, /var, /home, and /data.


Nowadays, /srv is a standard place for your /data.

>> One good thing I can think of is to have a small disk partition available
>> as an alternate boot for doing maintenance with the main partition
>> unmounted. That also might be practical with a live CD, saving the disk
>> space.

>
> Can't speak for others, but I've never needed this.


I have. I also use a custom bootable ZIP disk with a minimal root and
all the recovery tools I need. I just copied selected parts of /boot,
/bin, /etc, /sbin, /lib and /var over, and then set up GRUB on it.

>> I'm building a new server and planning to migrate to it over the next few
>> weeks.

>
> Figure on using RAID; with the price of hard drives it's silly not to.
> Once you start to lay out your raid configuration, you'll find that
> partitioning sort of falls in place.


True. However, with today's stupidly big disks, fixed partitions are
making less sense. LVM is a logical choice, since it gives you
flexibility with your paritioning (logical volumes).


Regards,
Roger

- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFB5aDdVcFcaSW/uEgRAlKGAJ0c3oiSAVL3tN98a9Kx1pVSqckSZACfRO6K
Und4jeSoA/hBdP6Y4LpNxLM=
=dUHg
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 06:20 AM
Dave Brown
 
Posts: n/a
Default Re: Current thoughts on system partitioning

In article <cs3noa$8hv$1@devilrock.whiteoaks.com>, Morris Jones wrote:
> Used to be the conventional wisdom for a *nix system was to have separate
> disk partitions for areas like /boot, /var, /home, /usr.
>
> I can certainly see the wisdom of a separate partition for a usenet volume,
> if you're doing that.
>
> My server hosts a handful of domains and email accounts for friends and
> family. I've run into issues with the mounted /var partition filling up
> with a runaway log file and causing other problems.


You didn't mention *why* /var is filling up... giant spools--mail? news?

And you didn't say that you were using quotas. One a multi-user system, I
wouldn't be without them.

And "Amen!" to the use of LVM.

--
Dave Brown Austin, TX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 06:21 AM
Morris Jones
 
Posts: n/a
Default Re: Current thoughts on system partitioning

Morris Jones <mojo@devilrock.whiteoaks.com> wrote:
>Used to be the conventional wisdom for a *nix system was to have separate
>disk partitions for areas like /boot, /var, /home, /usr.


Thanks all for your feedback! Clearly LVM is the magic bullet to turn
this into a non-issue.

I also discovered that I'm not alone in agonizing about sizes for
partitions and where to build them.

Mojo
--
Morris Jones <*>
Monrovia, CA
http://www.whiteoaks.com
Old Town Astronomers: http://www.otastro.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 06:22 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: Current thoughts on system partitioning


"Morris Jones" <mojo@devilrock.whiteoaks.com> wrote in message
news:cs3noa$8hv$1@devilrock.whiteoaks.com...
> Used to be the conventional wisdom for a *nix system was to have separate
> disk partitions for areas like /boot, /var, /home, /usr.
>
> I can certainly see the wisdom of a separate partition for a usenet
> volume,
> if you're doing that.
>
> My server hosts a handful of domains and email accounts for friends and
> family. I've run into issues with the mounted /var partition filling up
> with a runaway log file and causing other problems.
>
> What's the current advice for partitioning a modern server? What's the
> downside of using one large partition for the system?


RedHat! No, Debian! No, Gentoo! (And the small voice in the corner says
FreeBSD!)

It's a religious argument. The old limitations had to do with how systems
got bootstrap booted and the need to use "dump/restore" backups, and small
disk sizes, and trying to prevent disk overflows from corrupting critical
material. These days, over-partitioning leads to trying to outguess the
users and the software about where material will live, which is pretty
deadly.

Use grub, enough swap for your purposes (and a swap file later if you want
to expand it in a rush), a bulky / partition to hold any surprises, and if
you feel the need a separate /home or /var/ftp or /var/www or whatever big
chunk of disk you might want separate and to have different filesystem
characteristics.

> One good thing I can think of is to have a small disk partition available
> as an alternate boot for doing maintenance with the main partition
> unmounted. That also might be practical with a live CD, saving the disk
> space.


The Live CD is almost always better unless you have a funky controller and
find it difficult to boot from CD.

> I'm building a new server and planning to migrate to it over the next few
> weeks.


Cool. What OS, what specs? We might be able to warn you of booby traps.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 06:22 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: Current thoughts on system partitioning


"Peter T. Breuer" <ptb@lab.it.uc3m.es> wrote in message
news:a59gb2-hnn.ln1@news.it.uc3m.es...
> In comp.os.linux.misc Morris Jones <mojo@devilrock.whiteoaks.com> wrote:
>> What's the current advice for partitioning a modern server?

>
> Partition it the way you need to for your purposes. That would usually
> entail splitting off /var /home /usr /usr/local etc. (not "/etc"!).
>
>
>> What's the
>> downside of using one large partition for the system?

>
> What's the downside of having a house with no walls? A desk with no
> drawer separators? When it breaks you lose everything. If you make a
> mess somewhere you mae a mess everywhere.


It means things fit in the desk without sticking out of the drawers, which
is a common problem for people who over-partition. You can't predict where
the next big software bundle will go? News spool in /var/spool? Mailman in
/usr/local/mailman? A user with ISO images? Building kernels in /usr/src?
Symlinks are fun for trying to fix that, but cause other nasty issues.

KISS, or Keep It Simple Stupid, is a key factor in OS configuration. Unless
you need specific characteristics for specific filesystems, such as noatime
for a big news spool or an encrypted file system for PGP keys, avoid
unnecessary partitions.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:59 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com