Re: [SLUG] Participations

From: Derek Glidden (dglidden@illusionary.com)
Date: Thu Apr 26 2001 - 13:20:22 EDT


"A. Harry Harrison" wrote:
>
> Is there some advantage to partioning a drive in this way? I get asked this
> all the time, and really don't understand it. I understand boot and swap,
> and/or partitoins of different types but what I don't understand are
> multiple partions of the same type (ie four ext2 partions of various sizes)
>
> I understand having seperate mount points for different subsystems (ie the
> /home directory may be on a different drive or even different machine, etc)
> but is there an advantage to having a /home directory mounted on a seperate
> partition on the same physical drive?

Many advantages. Take a deep breath and get ready to listen to
experience my son... :)

Having several partitions rather than one big one can vastly reduce
mount time, and therefore time before the machine comes up and becomes
usable. On some of our servers with 80GB+ partitions, it is a fairly
noticable amount of time that the machine takes to mount a partition.
If we had one of our huge file servers with 360GB all in one partition,
and the machine needed to go into maintenaince mode, it could take quite
some time (a couple minutes even) to reboot the machine and mount just
the root partition (since it's just one partition) just to be able to go
to single-user mode.

It assists in ease of maintenance. Tools like "dump" and "restore" work
at the filesystem, or partition level. If you have a single 80GB
partition for everything, but all you want to "dump" is /home, you're
SOL. Or, like you say, sometimes you can have partitions on mutiple
drives. Let's say you have a single 60GB drive in your mail server.
Your /var partition fills up. You can "dump" and "restore" that
partition onto a new drive. (Yes you can do this with a single
partition too, but it's not as easy to manage the data for a single
subdirectory as it is a whole partition.)

Related to ease-of-maintenance, it keeps things "logically" separated.
It's easy for me as a sysadmin to log into a box and do "df -k" or
"mount" and see where everything is and how much space is left. I *hate
hate hate* logging into a box and doing "df -k" and seeing something
like this:

  Filesystem 1k-blocks Used Available Use% Mounted on
  /dev/hda1 9473132207 67547086 484878295 38% /

Imagine the power going out, or the power cable getting knocked out of
the wall, or for some reason your machine going down suddenly and
unexpectedly. It's much better if just your "/usr" or "/home"
partitions get munged up and have to be repaired than if you have one
single partition and the whole thing needs to be repaired. This is
something that just has to be experienced to be understood. (Like not
doing regular backups.) The first time your machine goes down
unexpectedly and your one great honking partition comes up during fsck
with "/: Unexpected inconsistency, please run fsck manually" is one of
the worst days of your life if there's something on there you absolutely
cannot lose. However, if it says "/usr: Unexpected inconsistency,
please run fsck manually" you say "fsck this", mount /home, copy the
files you need onto another machine or onto tape or something, rebuild
the machine, restore /home and you're back in business. (We have an
automated installer that can reinstall a machine in about 5 minutes, so
this is by far more efficient for us than trying to fix a corrupted
filesystem.)

The biggest advantage is with fsck times if your machine goes down
unexpectedly, even if there are no problems with the filesystems. On
all our machines we make /opt, which is always the largest partition, a
reiserfs or some other journaling filesystem which alleviates this
problem. But if you're not using journaled filesystems, ext2 is slow
slow slow at doing fscks on big partitions with lots of files. If you
ever get the chance, e2fsck a 60GB ext2 filesystem. It's not fun. It
can easily take an hour or more depending on the number of files on it.
Now take the same example of one of our 300GB+ fileservers and imagine
fsck'ing one of those partitions. If that machine goes down
unexpectedly, even for a power burp, it can be hours before it's
available again if it has to fsck. Having multiple partitions reduces
the amount of time to fsck the "system-critical" partitions such as "/",
"/var" and "/usr" and leaves us with a great honking big partition that
we can either check at our leisure once the machine is up, or like we
do, make sure the great honking partition is using a journaled
filesystem and not have to worry about kernel patches to make sure the
system can boot off of a non-ext2 filesystem.

Related, if you take it a step further and add an "/etc" partition, (or
put your /etc in a ramdrive or something) you can get to the point where
you can mount your / and /usr partitions read-only, which is another big
advantage if your have power outages for any reason because read-only
mounted partitions never need to be fsck'ed after an unexpected reboot.
It also helps for security if files in / and /usr are not writable since
most script-kiddie scripts don't include "mount -o remount,rw /" type
things in them and assume they'll be able to write to the files they
want to without fiddling with mounts.

So there you have it. Many reasons why people who have to do a lot of
sysadmining don't like one great big honking partition.

> ----- Original Message -----
> From: "Derek Glidden" <dglidden@illusionary.com>
> To: <slug@nks.net>
> Sent: Thursday, April 26, 2001 11:29 AM
> Subject: Re: [SLUG] Participations
>
> > Here's how I usually set them up:
> >
> > partition size
> > / 256MB
> > swap (2x RAM size)
> > /var 512MB
> > /usr 2-4GB
> > /home 100MB (because even at home everything lives on the server)
> > /opt remainder (yes, I'm an "/opt" person...)

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#!/usr/bin/perl -w
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map
{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;
$t^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)
[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h=5;$_=unxb24,join
"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d=
unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d
>>12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*
8^$q<<6))<<9,$_=$t[$_]^(($h>>=8)+=$f+(~$g&$t))for@a[128..$#a]}
print+x"C*",@a}';s/x/pack+/g;eval 

usage: qrpff 153 2 8 105 225 < /mnt/dvd/VOB_FILENAME \ | extract_mpeg2 | mpeg2dec -

http://www.eff.org/ http://www.opendvd.org/ http://www.cs.cmu.edu/~dst/DeCSS/Gallery/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:49:30 EDT