On Mon, Sep 04, 2000 at 09:56:02PM +0200, Juli-Manel Merino Vidal wrote:
> Well, I have think the following organization:
>
> / of 100 mb in a primary partition at the beginning of the disk, so
> lilo or grub can boot it.
> /usr of 3 gb (no comments... but should it be bigger?)
> /usr/local of 1,5 gb (to install quake data, staroffice, etc)
> /tmp of 150 mb
> /var 250 mb (/var/cache/apt/archives will go in another place, as
> explained below)
> /home of 1 gb (I'm the only user in the system)
> /misc in the rest of the disk. I pretent to put here several
> subdirectories, as music (my mp3 collection), photos (some
> photos I have), and a link to /var/cache/apt/archives. I also
> would like to store here several other files, like tar ones.
Lose /misc, add it to /home. Maybe keep an odd gig or so around for
utility space.
> And at last, I forgot it, a swap partition of 128 mb (I have 128 mb of
> ram currently). But where I should place it physically on the disk ?
I prefer 2x, or even 3x phyiscal RAM as swap, to 2 GB max. It's cheap
insurance against really bad memory leaks. Placement: middle of disk
should minimize head movement.
My own partitioning preferences follow.
------------------------------------------------------------------------
The following is my recommended partitioning for a typical
workstation/server Debian GNU/Linux x86 box:
/ 50 - 100 MB
/tmp 50 - 100 MB
/var 200 - 500 MB
/usr 1 - 2+ GB
/usr/local 1 - 2+ GB
/home remainder
Swap:
I go with 3x physical RAM, in two or three seperate swap partitions,
to a maximum of 2 GB (Linux can't handle more than 2GB RAM
currently). This is more swap than you'll probably want to be using
on a typical basis (eg: if you're filling *all* your swap,
something's wrong). OTOH, it also provides you a buffer when the
system *does* go into a memory-overrun condition. Typically, things
will get so slow that you'll notice something's wrong. The extra
swap should buy you time to shut down the offending process(es).
Other sources say to provide 2x physical RAM. VA Linux configures
its servers with 1x physical RAM.
Primary, Extended, & Logical partitions:
Linux really doesn't care. IIRC, MS WinXX prefers a single primary
partition, so you may want to set things up this way if you're
multi-booting. I tend to create three primary partitions, one
extended, and the remainder physical. / usually goes on the first
partition and is marked bootable. YMMV.
Allocation variations
/: A minimal installation can fit in 30 MB or less. If you're
using more than ~50 MB, you've probably included something in your
root partition you don't need.
/tmp: Values suggested should work for most systems. /tmp is
system temporary storage. If you've got specific applications with
very large temporary storage requirements (eg: database, analytic
tools, multimedia), you're better off allocating storage to these
needs specifically.
/var: if you're running extensiver services (news, mail, website),
you may want to increase this allotment significantly. Often
various /var/spool subdirectories become their own partitions. Such
partitions may consume hundreds of MBs to multiple GBs.
/usr: A minimal installation can fit in a few hundred MB or less.
Likewise, if you have to install *all* packages and docs, you may
find 2GB is too thin, consider doubling the allocation. Tune to
your needs.
/usr/src, /usr/local/src: depending on space constraints and
variability, you may want to create these as seperate partitions.
/usr/local: This is where software installed directly by you, outside
of the Debian packaging system, goes. Tarballs, binary non-deb
installations, and locally built software. Again, if you're
installing lots of stuff or very large packages, you could easilly
utilize several GB of space.
OtherOS: If you have a multi-boot system, you'll want to allocate
space for other OSs as appropriate. Tools such as VMWare and Samba
may allow you to both run and access these partitions natively from
within Linux.
Subpartitioning. I'm running a set of (now) relatively small
drives -- 2/2.4 GB each. As a result I've split out several
subdirectories of /usr and parked them on other paritions. While
this is possible, it's probably generally best *not* to subdivide
your filesystems overly much -- it does increase system complexity
and management. Unless this is required by space constraints, I'd
suggest not doing it. But if you need the option, it's there.
Filesystem Layout
The following are simply my preferences and/or recommendations.
/opt -> /usr/local I recommend making this link as it rationalizes
space and conforms to typical third-party application preferences.
Some apps like to go under /usr/local, others under /opt. This link
supports both transparently.
/net This is a mountpoint for networked drives. Any SMB, NFS, or
other partions show up here.
/mnt The starting mountpoint for removable media and temporary
mountpoints. Usually contains /mnt/floppy, /mnt/cdrom, /mnt/zip,
/mnt/jaz, etc. Keeps your / partition cleaner and makes system
backups a bit more rational.
My own current filesystems and utilization:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 152247 51652 92733 36% /
/dev/sdb5 101089 3737 92133 4% /tmp
/dev/sdb6 303344 233213 54470 82% /var
/dev/hda5 495960 118804 351556 26% /var/spool/news
/dev/sda5 1209572 1038000 110128 91% /usr
/dev/sdb7 1517920 1240280 200532 87% /usr/local
/dev/hda8 253775 156210 84463 65% /usr/doc
/dev/hda6 249871 135434 101537 58% /usr/src
/dev/sda7 585008 352004 203288 64% /home
/dev/hda2 1007992 699120 257668 74% /mnt/misc1
/dev/hdc 47808 47808 0 100% /mnt/cdrom
Partition tables:
Disk /dev/hda: 128 heads, 63 sectors, 620 cylinders
Units = cylinders of 8064 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 39 157216+ 6 FAT16
/dev/hda2 40 293 1024128 83 Linux
/dev/hda3 294 332 157248 83 Linux
/dev/hda4 333 620 1161216 5 Extended
/dev/hda5 333 459 512032+ 83 Linux
/dev/hda6 460 523 258016+ 83 Linux
/dev/hda7 524 555 128992+ 83 Linux
/dev/hda8 556 620 262048+ 83 Linux
Disk /dev/sda: 255 heads, 63 sectors, 261 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 17 136521 82 Linux swap
/dev/sda2 18 261 1959930 5 Extended
/dev/sda5 18 170 1228941 83 Linux
/dev/sda6 171 187 136521 82 Linux swap
/dev/sda7 188 261 594373+ 83 Linux
Disk /dev/sdb: 255 heads, 63 sectors, 261 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 17 136521 82 Linux swap
/dev/sdb2 18 261 1959930 5 Extended
/dev/sdb5 18 30 104391 83 Linux
/dev/sdb6 31 69 313236 83 Linux
/dev/sdb7 70 261 1542208+ 83 Linux
------------------------------------------------------------------------
--
Karsten M. Self <kmself@ix.netcom.com> http://www.netcom.com/~kmself
Evangelist, Opensales, Inc. http://www.opensales.org
What part of "Gestalt" don't you understand? Debian GNU/Linux rocks!
http://gestalt-system.sourceforge.net/ K5: http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0
Attachment:
pgpD3zys50Mlo.pgp
Description: PGP signature