[conspire] Re: RHL 9 Install problems

Rick Moen rick at linuxmafia.com
Thu Jul 10 20:13:40 PDT 2003


Quoting Greg Dougherty (rhl at molecularsoftware.com):

> I HAD an ext2 partition on it.  I did another install, however, and this is my
> current setup:
> hda 1: ~10 GB, NTFS
> hda 2: 100 MB, ext3 /boot
> hda 3: 2000 MB swap
> hda 5: the rest ext3 /

[...]
 
> After reading the
> first chapters of the RedHat Linux 9 Bible, I was thinking about creating the
> following partitions and mount points:
> 
> 2 GB /tmp
> 2 GB /var
> 8 GB /usr
> 5 GB /home
> `8 GB / (i.e. it get's what's left over)
> 
> Is this reasonable for what I want to do?  Is this overly complicated, and I
> should just make one large partition?  TIA, anyone.

Really quickly, because I'm trying to get out the door:


Partition layout is something of an art form, because there are many
objectives you may or may not wish to further in doing it, and because
furthering some of those objectives requires guesswork.

Among the desiderata you _may_ be after:

o  Not running out of room in various parts of the system (no full
   filesystems, even after extended and somewhat unpredictable usage)
o  Ability to mount some parts of the tree read-only.
o  Making some parts of the tree journaled, and others not (the latter,
   for speed and efficiency where journaliing isn't helpful).
o  Using other useful mount options selectively.
o  Splitting drive "seeking" (head movement) between physical drives.
o  Locating parts of the file tree in a particular order adjacent to
   one another to minimise the average seek distance.  (Seeking is
   by far the slowest operation a hard drive carries out.)
o  Applying quota to some parts of the tree (/home, /var/mail, /tmp).
o  Having a separate /usr/local for "locally installed" things.
o  And swap, of course.  At least one partition on each physical drive.
   Ignore the guidelines about "3X physical RAM" and such, as they're 
   drivel.  Use your sense of what amount of swap might be actually
   needed, when your machine is stressed.  Put it where you think it
   will not create "thrashing" problems (excessive seeking).
o  Leaving unallocated space so that you can create "scratch" partitions
   to move stuff around, e.g., because you guessed wrong about how 
   big a partition had to be, and need somewhere to put its stuff 
   while you make a bigger replacement.
o  Keeping the system as a whole really simple and small, especially 
   if (as is rare, these days) you don't have gobs of space to play
   with.
o  Protecting the root filesystem from damage, by ensuring that it's 
   simple and has the fewest possible potentially problematic things
   on it.

A few random thoughts, starting with that last bit:  

1.  If, say, /usr can't be mounted at boot time because it's damaged,
the tools to recover, repair, or restore it will be in /sbin or /bin.
Any libs those need will be in /lib.  So, it's in your interest to make
sure the stuff that is _not_ needed for recovery/repair/restores is
_not_ part of the root filesystem:

/var
/tmp
/home
/opt
/usr

2.  A lot of us think the rationale for /opt is extremely bogus.  So, on
my systems, it's a symlink to /usr/local/opt, because I consider /opt
basically redundant to /usr/local .

3.  Here's the /etc/fstab from my server, in case it's of interest:

#<filesys>  <mountpoint> <type>  <options>                     <dump> <pass>
/dev/sda5   /             ext3    defaults,errors=remount-ro     1       1
/dev/sda7   none          swap    sw                             0       0
/dev/sdb6   none          swap    sw                             0       0
proc        /proc         proc    defaults			 0       0
/dev/fd0    /mnt/floppy   auto    defaults,user,noauto		 0       0
/dev/cdrom  /mnt/cdrom    iso9660 defaults,ro,user,noauto	 0       0
/dev/sda1   /boot         ext2    ro,noauto,noexec,nosuid,nodev	 1       2
/dev/sda6   /mnt/recovery ext2    rw,noauto                      0       2
/dev/sdb7   /var          ext3    rw,nodev,nosuid,noatime	 1       2
/dev/sda8   /var/log      ext3    rw,nodev,nosuid,noatime        0       2
/dev/sdb8   /usr          ext2    ro,nodev                       1       2
/dev/sda9   /usr/local    ext3    rw                             1       2
/dev/sdb1   /home         ext3    rw,nodev,nosuid                1       2
/dev/sdb5   /tmp          ext3    rw,nosuid,nodev,noexec,noatime 0       2


4.  Some would argue that, on a _single-user_ system, you might as well
go for simplicity.  Here's my laptop's fstab (which isn't quite as
simple as it should be, but is closer):

# <file system> <mount point>   <type>  <options>                  <dump> <pass>
/dev/hda3       /               ext3    defaults,errors=remount-ro  0      1
/dev/hda2       none            swap    sw                          0      0
proc            /proc           proc    defaults                    0      0
/dev/fd0        /floppy         auto    defaults,user,noauto        0      0
/dev/cdrom      /cdrom          iso9660 defaults,ro,user,noauto     0      0
none            /proc/bus/usb   usbdevfs defaults                   0      0
/dev/sda        /mnt/fob        vfat rw,uid=1000,gid=1000,user,noauto,noatime0 0
/dev/hda1       /boot           ext2    rw,noauto                   0      2


5.  I would _not_ have allocated the remainder of space left over to "/" .  
I would have a pretty small "/" partition, maybe 500MB.  Maybe 6GB to
/usr.  4 GB to /var.  1 GB to /tmp.  Maybe a separate /usr/local of some
number of gigs, ditto /home, which might get the leftover -- or you
could leave a bunch unallocated, to deploy as required in the future.

I'd keep "/" small with only reasonable breathing room because its
purpose is to be mostly static and protected, and I'd have taken care of
that by measures including carefully locating the busy stuff to other 
partitions.

6.  Stuff to read:

http://www.pathname.com/fhs/  Filesystem Hierarchy Standard.  What each
                              part of the tree is for.
http://kmself.home.netcom.com/Linux/FAQs/partition.html
                              My friend Karsten Self's opinions.

'Hope that helps.

-- 
Cheers,             We write precisely            We say exactly
Rick Moen           Since such is our habit in    How to do a thing or how
rick at linuxmafia.com Talking to machines;          Every detail works.
Excerpt from Prof. Touretzky's decss-haiku.txt @ http://www.cs.cmu.edu/~dst/



More information about the conspire mailing list