[wplug] How to Partition a 120 GB Hard Drive

Poyner, Brandon bpoyner at ccac.edu
Tue May 3 10:03:26 EDT 2005


My knee jerk reaction is to say that software mirroring (raid 1) doesn't
have any performance gains, but that might be an outdated concept and I
don't have the time right now to put it to test.  Do you have benchmarks
that show better performance using software mirroring of swap across two
disks is better than a single disk?  

Brandon Poyner
Network Engineer III
CCAC - College Office
412-237-3086
 

-----Original Message-----
From: wplug-bounces+bpoyner=ccac.edu at wplug.org
[mailto:wplug-bounces+bpoyner=ccac.edu at wplug.org] On Behalf Of
Christopher DeMarco
Sent: Tuesday, May 03, 2005 9:24 AM
To: General user list
Subject: Re: [wplug] How to Partition a 120 GB Hard Drive


On Mon, 2 May 2005 21:49:23 -0400, "Kevin Squire"

> 1) The current (5gb) drive will become /home

If you have other users on the box, they're going to fill up /home -
they can't write anywhere else, presumably.  /home should be your
biggest - or *potentially* biggest! - device.  Hold that thought...


> 1) How much would you dedicate for / ? 

1GB, since you've got the space to burn.  If you've got everything else
sliced up, you don't need more than ~400MB, but on a drive so huge it
can't hurt.


> 4) How would you break it up ?

Here's what I'd do: make two partitions, 1GB and 119GB.  Make the first
one /.  Put the second in LVM
(http://www.tldp.org/HOWTO/LVM-HOWTO/benefitsoflvmsmall.html) and carve
it up as follows:

/home: 10G
/var: 5G
/opt: 2G
/usr: 10G
/tmp: 2G
/boot: 100M
<swap>: (RAM * 2)

Run reiserfs on all of these filesystems.

LVM2 (which you have if you've got a relatively recent Linux
distribution) can GROW PARTITIONS ON THE FLY.  Reiserfs (ibid.) can,
too.

Now you've got ~90 GB sitting idle.  Whenever you find that you need
extra space, just do

"lvextend /dev/rootvg/home +10G; resize_reiserfs /dev/rootvg/home"
(for example)

Now your /home is 10 GB larger.  It takes about ten seconds to complete.
 Magic.

What about that old 5G drive?  

  - put <swap> on a RAID1 mirror across your two drives.  If you ever
  have to swap (and most people do) you'll have much better performance.

  - put it in the same volume group as the new drive, now you've got +5G
  to allocate.  

  - take backups of /etc, /boot and certain directories in /home

  - dual-boot to other distros, *BSD, OpenSolaris, etc.

  - just don't make it part of your filesystem (i.g. NOT /home)!  If you
  run LVM+reiserfs you can shrink and grow on-demand; if you've got a
  physical device in there you've got very few options when you
  want/need to expand.


Now, if you're doing all this, and you can afford to double your
spending, buy a second, identical drive.  Modern RAID1 in the Linux
kernel is very fast (benchmarked faster than hardware RAID controllers
in some cases) and easy to set up.  A RAID1 mirror will give you a
get-out-of-screwed-free card when (not "if") one of your hard drives
dies.
--
Christopher DeMarco <cmd at alephant.net>     
Alephant Systems     
+1 412 708 9660 (cell)
PGP public key at http://pgp.alephant.net

_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug




More information about the wplug mailing list