It is currently Sat, 05 Dec 2020 13:11:09 GMT



 
Author Message
 Partitioning a hard disk (optimal configurations)

I am going to configure my disk as 100% linux (it is now 50/50
Win95/Linux).  I'm curious what people think about the best way to
partition a hard disk (mine is about 12 gig) for a 100% linux system.

I think I should have more than 1 large partition (+ swap), but I'm not
sure about this.  I've been thinking about putting the system stuff in
one partition, and then mounting a second partition at /home for all the
user related stuff.  Are there arguments for having even more than 2
partitions?

I was just curious what others have done with this problem, and what
works best.

Blake LeBaron



 Tue, 12 Nov 2002 03:00:00 GMT   
 Partitioning a hard disk (optimal configurations)
  Blake LeBaron <bleba...@brandeis.edu>,
  In a message on Fri, 26 May 2000 01:02:44 GMT, wrote :

BL> I am going to configure my disk as 100% linux (it is now 50/50
BL> Win95/Linux).  I'm curious what people think about the best way to
BL> partition a hard disk (mine is about 12 gig) for a 100% linux system.
BL>
BL> I think I should have more than 1 large partition (+ swap), but I'm not
BL> sure about this.  I've been thinking about putting the system stuff in
BL> one partition, and then mounting a second partition at /home for all the
BL> user related stuff.  Are there arguments for having even more than 2
BL> partitions?

Yes, many.

I generally use a partition scheme like this:

P#      Size            Type    Mounted as

1       64M             Ext2    /
2       128M            swap
3       1.5G            Ext2    /usr
4       <remainder>       Extended...
  5     64M             Ext2    /var
  6     2gig            Ext2    /home
  7     <remainder>       Ext2    /scratch

The size of /home can be larger and or /scratch can be broken up into
multiple partitions -- this is user preference, but might determined by
your backup capabilities.

Having a (relatively) small root partition gives you a saftey margin in
case of a disaster.  This small root partition is likely to be safe,
which means you can generally be able to boot in single-user mode.

Having /usr split off also protects it as well.  /var gets lots of
pounding (log files, lock files, pid files, etc.).  Putting /home and
/scratch off separately gives the 'users' a safe area to 'play' that
won't touch the important system stuff.

A partitioning scheme like this also makes backups easier.  Once the
system has been properly installing and configured, the /, /usr, and
/var partitions only need a base level backup.  You can concentrate
regular / frequent backups on the /home partition.  Splitting off user
scratch space (/scratch) from user perm. storage (/home) gives the users
a scratch area for throw-away files that need not clutter up backups.
This saves you the cost of 'wasted' backup media and backup time.

BL>
BL> I was just curious what others have done with this problem, and what
BL> works best.
BL>
BL> Blake LeBaron
BL>                                                  

--
                                     \/
Robert Heller                        ||InterNet:   hel...@cs.umass.edu
http://vis-www.cs.umass.edu/~heller  ||            hel...@deepsoft.com
http://www.deepsoft.com              /\FidoNet:    1:321/153



 Tue, 12 Nov 2002 03:00:00 GMT   
 Partitioning a hard disk (optimal configurations)
a couple of additional points here:
- you can also have a /boot partition of about 4 or 5 MB (right at the front).
- I believe you can make /usr read-only in fstab under Red Hat.  This is a good
security measure, but it means you have to change fstab and reboot to change it.

Actually, you could do that to /boot as well.

If you want to put vmlinuz in your /boot, look for the appropriate line in
/usr/src/linux/Makefile and uncomment it.  Then 'make lilo' works automatically.

--
Mielipiteet omiani - Opinions personal, facts suspect, especially on my
        http://home.germany.net/101-69082/samba.html
Simple Samba Solutions web page.                            ICQ 1722461



 Tue, 12 Nov 2002 03:00:00 GMT   
 Partitioning a hard disk (optimal configurations)

[ Long, for easy examples look by the end. ]

This is really getting to be a FAQ, and I already summed up my views on
that problem, but Deja hasn't put its old articles back online yet, and
the Partitioning-HOWTO hadn't really satisfied me.  In any case, you may
want to read the FHS (Filesystem Hierarchy Standard) for the rationale
behind this.

So, there are as many partitioning strategies as there are sysadmins,
and it doesn't really matter to the system's normal operation as long
as all partitions are mounted in the right places.  It does matter,
however, outside normal operations; as I understand it, there are three
basic issues related to partitioning: ease of backing up or upgrading
the system, crash-resiliency and vulnerability to denials of service.

The first one (backup/upgrade), is easier if you have a clear separation
between data which have different origins and lifespans.  For example,
the system (typically / and /usr) seldom changes and doesn't need to be
backed up as often as user data (/home or /users) which is constantly
updated, while system state information and logs (/var) may not even
need to be. Also, for system upgrades, it is safer not to have system
data (/, /usr) in the same partition as local data (/usr/local, /home)
if you want to keep the latter untouched.

The second relates to filesystem stability after a crash; yes, Linux and
UNIX in general are stable, but that won't do much in case of a power or
hardware failure.  Since the most likely way to damage a filesystem is
by writing to it, better isolate writable data from critical partitions
(not putting /tmp, /var and /home in the / partition, for instance), or
not allow it at all if possible (theoretically /usr could be mounted RO).

Thirdly, you don't want a normal user to create a denial of service by
filling up a writable partition such as /home, /tmp or /var/tmp, which
means that these are better outside partitions where the system needs
to write (/, /var).

Now, you don't necessarily have to fulfill all these requirements,
especially for a workstation, which doesn't provide critical services
and should be kept rather simple so that it is easy to administrate:
having many small partitions is less flexible and more wasteful of disk
space than a few large ones, and can probably hurt performance if they
are all on a single disk.

As an example, I installed my workstation with five partitions, which I
think is a good compromise: /, swap, /usr, /var and /local, with /tmp
symlinked into /var/tmp, and /home, /usr/local and /opt into /local.
Maybe I ought to have made /tmp its own partition with /var/tmp linked
to it (at the expense of one more partition), or put it in /local (but
it would have increased the number of writes there).  There's also
/usr/src which ought to be symlinked there. I also didn't consider the
possibility to improve security by mounting some partitions noexec/nosuid.

OTOH, on the server I am about to put in production (after the timing
race in the eepro100 initialization code is solved, that is) there are
two hard disks, so the /tmp and /usr/local partitions will be separate.
Probably also /var/mail and /var/spool, which could be on different
physical disks so that disk access is balanced among them.

                                                Hope this helps,
                                                Cedric.



 Tue, 12 Nov 2002 03:00:00 GMT   
 Partitioning a hard disk (optimal configurations)

I don't really understand how separating /home into a separate
partition makes backups any easier.  What's the difference between
backing up a partition or just backing up a directory and all its
contents?

--
Aaron J. Ginn

Opinions mine, not Motorola's



 Tue, 12 Nov 2002 03:00:00 GMT   
 
   [ 5 post ] 

Similar Threads

1. Q: optimal hard disk split for Win95/Linux

2. Partition/allocation strategy for optimal disk performance.

3. Seeking Advice on Optimal Disk Partitioning

4. Q: Optimal Disk Partition

5. Disk Druid , mount hard drive, partitioning hard drive


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software