[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why bother partitioning?



alex wrote:

This is an extract from the Debian installation instructions.

"Most people choose to give GNU/Linux more than the minimum number of
partitions, however. There are two reasons you might want to break up
the filesystem into a number of smaller partitions. The first is for
safety. If something happens to corrupt the file system, generally only
one partition is affected. Thus, you only have to replace (from the
backups you've been carefully keeping) a portion of your system".

Suppose that you didn't partition as the instructions recommend and had
just one large / partition with all the usual file
systems in place.   Couldn't you make backups of critical file systems
just as if they were on their partitions?   And, couldn't you then
restore file systems just as described in the instructions?

Yeah, you could just have one large / partition. Some of the advantages of separate partitions are:

* if one partition fills up, like /home if some user's misbehaved app starts spitting out files by the gazillion or something similar, it doesn't fill up the / partition and cause the system to come to a screeching halt

* you can mount "system" partitions read-only, and mount read-write only those partitions that need to be read-write. Helps to cut down on cracker or accidental damage, etc.

* makes it easier to resize and move around partitions later if need be. For example, you've got a 300MB unused (or used by *cough cough* Windows) partition and you want to incorporate it into your Linux system. With separate partitions you can move data and rename partitions with finer-grained control than if you've just got one 4GB / partition and the extra 300MB partition.

*if you are exporting file systems via samba or nfs, etc, you can export only those directories you need exported more safely than if they're on the / partition. Again, helps to cut down on cracker damage, etc.

* if a partition goes corrupt for some reason, you'd really prefer a smaller partition that is just one piece of the system to go corrupt, than for the entire partition holding the entire system to go corrupt.

* you can mount only those partitions you need mounted. If you don't need your mp3 collection visible when your boss sits down at your machine to do a quick google, leave the mp3 partition unmounted except when you need it, so it'll be less visible (granted, this is a lousy example, but you get the idea). This is also helpful when you need to boot into single user mode and do "dangerous" things to the drive/partitions.

* you can spread the partitions over different hard drives, which could even speed up the system some (put the swap and /tmp partitions on a second drive and controller, etc). This also helps if you've got two or three small drives instead of one large one, or if one of your drives goes bad, the rest of your system will survive.

* it "modularizes" the system, which can help conceptually when managing the machine


Some disadvantages:

* it "modularizes" the system, which can make things more difficult to conceptualize when managing the machine

* if you make the partitions too big or too small when setting them up, it's a pain to fix things later. This is especially true on smaller hard drives.

* it requires more administrative knowledge to mount/fsck/etc multiple drives.


I'm sure there are other advantages/disadvantages. I nearly always mulit-partition my machines, just because I believe it makes good sense (security and anti-corruption safety), but one non-mission-critical home machines, a lot of people (and distros, I believe), just make one big / partition and a swap partition and be done with it. It's your system; do as you wish.

Kent



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: