[wplug] How to Partition a 120 GB Hard Drive
Christopher DeMarco
cmd at alephant.net
Tue May 3 09:24:03 EDT 2005
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
More information about the wplug
mailing list