[lug] Server Partitioning Recommendation

Daniel Webb lists at danielwebb.us
Wed Jan 17 17:33:56 MST 2007


On Tue, Jan 16, 2007 at 04:27:49PM -0800, karl horlen wrote:

> "If you were creating a mail/web/dns server and had 2
> x 160 G HDs, how would you partition / configure
> them?" 

This is almost exactly the setup I have.  Here's what I do:

Create two paritions on each of the drives.
  - 6GB for the system (spare system on the second drive)
  - the rest is for a soft RAID which will be /home.
Put LVM on the RAID device and format ext3.

I did this because I've had many cases in the past where I would have been
screwed if I had root on the RAID, but nowadays distros seem to be able to
handle this fine so it may be a silly precaution.  This way has some extra
overhead too because anything I really care about (/var/lib/subversion) is
stored in a tree in /home and symlinked.  On the plus side, that makes it easy
to backup important stuff regularly.

I figure if my root partition needs more than 6GB I need to remove some
software (that's what spurred me to learn aptitude).  I don't see much benefit
in having more than two paritions (system+data) for a small server.

> A) allow easier and better data backup/restore/recovery

I like a system/data separation like I described because it allows easy
recovery if you're rooted.  With my scheme, 

1) reinstall Debian
2) $ aptitude markauto '~i'
3) $ aptitude install $(cat previous_saved_manual_package_list)
4) Recreate the symlinks from /var to /home for important things

and you have a clean working system again.  The restore isn't that much harder
than doing a full-system restore, and a full-system restore is more difficult
to do right (did files change during the backup?), and is stupid if you got
rooted because you don't know if you're restoring dirty binaries back on the
system.

If I was really serious about it I would mount /home noexec, but I don't for
convenience.  I think this is less of a risk than restoring a system from
backups though, but maybe I'm wrong.

> B) help isolate the impacts of partition corruption.  

I've never seen this, only whole-drive failure.  I'm sure it can happen,
though.  Keep revisioned backups such as rdiff-backup or regular offline
backups.  Don't span LVM across multiple physical devices.
 
> C) Allow best performance

I'm the wrong person to comment on that one, my system performance stinks.  :)




More information about the LUG mailing list