[SWLUG] partitions
Robert McQueen
robot101 at debian.org
Fri Jan 10 16:44:07 UTC 2003
On Fri, Jan 10, 2003 at 12:36:37PM +0000, bascule wrote:
> i have a new disk drive and i'm going to do a new install, it occurs to me
> that i can have an awful lot of partitions if i want, so apart from /, /boot,
> /usr, /home, /var are there advantages to having other mount points, what
> about /etc/ or /usr/local for example and if so how large shoulod they be?
>
> bascule
The cautionary tales about having too many partitions are entirely true.
You can use LVM, but LVM1 sucks and will disappear your partitions on a
whim, or render them all inaccessible until you reboot, etc. These have
all happened to me. Stick to the miniumum number of partitions you need,
moving along this list in decreasing order of necessity:
[/boot] / /home /var /usr /opt /usr/local ...
In all cases, I allocate a generous swap partition, and put /tmp in
tmpfs, 'cause it's cool - your temporary files don't hit disk (usually).
Something like this in fstab does the trick:
tmpfs /tmp tmpfs defaults,size=128m,mode=1777 0 0
Size I usually put to something less than the physical RAM, although if
it is the same or more the kernel will swap bits of /tmp onto your
swapspace. Unlike ramdisk, tmpfs only takes up the memory of the files
inside it. It's like any other filesystem except the files live in the
cache layer and never get written out to any disk, and unlike other
filesystems the kernel will swap the cached contents of tmpfs.
These days /boot isn't really necessary, most bootloaders can address
your disk with LBA and find the kernel anywhere on it. If you're
worried, put it first on the disk. Only needs to be small. If it's a
desktop system, you only need go as far down that list as /home, for as
Telsa says, it's useful to be able to either reinstall with your user
data intact, or just have one partition which has it all on for backing
up or moving around.
If you're going to collect data (music, videos, whatever) in some
central repository, you could add a partition & directory for that. I
heinously abuse the FHS and put it in /opt on my system, but /music or
/data or /whatever is good.
For an internet-facing server you should consider /var as a seperate
partition just to avoid logs blowing up and clogging /, resulting in
"reduced system functionality". I've never had var exceed about
512Mb, provided you keep empting apt's (mostly useless) package
download cache, but I've never run an FTP server (why would you? =) or
a really busy e-mail server.
Other seperate partitions down that list are really probably overkill,
unless you have specific needs like using different filesystems for
/ to the rest, or you have the rest on LVM and / not, etc.
Hope this helps.
Regards,
Rob
More information about the Swlug
mailing list