Good file system / Hdd layout for linux

Drake Diedrich dld at
Sun Feb 3 17:38:37 EST 2002

On Sat, Feb 02, 2002 at 10:30:15AM +1000, Mick Howe wrote:
> 8x read CDR, with two 4.3 SCSI HDDs, currently partitioned as below:-

On disks that small, I'd make at most four partitions (2-3 if I could get
away with it), a small /boot, swap, and / on the first disk along with the
token FAT filesystem, and /home on the second disk.  /var is variable in
size, as is /tmp, and as you upgrade you'd want to reorganize sizes all the
time.  Much easier if it's already one large filesystem ( / ), just don't
fill it up as either root or yourself.  If you're the only user (or the
other user is within meters) this works better than micromanaging disk
space.  If you have a FAT filesystem you're probably dual booting, and
unattended operation probably isn't what the system is required for anyway,
so you can probably count on being present when something (you) fills up
diskspace, and intelligently undo that.  :)
   For a large multi-user system I'd spread it out a bit more (at least a
separate FS for each of the major filesystems, and each excessively large
compared to current use), but I don't imagine that's what this is.  For
instance, the machine I'm typing from right now:

    Name        Flags      Part Type  FS Type          [Label]        Size
    hda1                    Primary   Linux ext2             49.36
    hda2                    Primary   Linux swap            131.61
    hda3                    Primary   Win95 FAT16 (LBA)     205.64
    hda4        Boot        Primary   Linux ext3          20127.27

Which serves two people, and is a fileserver for a few other machines
serving the same two (one of which runs vbackup and stores copies locally).
(For those interested, my RAID1 is gone, m/b failure.  :( This was it's
backup, and is now the primary.)

(hde3 isn't what it looks like, the main fileserver can't be a dual boot
obviously.  Was used for some filesystem testing or boot CDROM or something,
before becoming the main fileserver.)

   If you want to control runaway disk usage, you really need each user and
large daemon on either a separate filesystem or give them an individual
quota.  If you aren't willing to go to that level of micromanagement, you
might as well not suffer the inconvenience of separate /var, /tmp, /home,
/usr filesystems.

OTOH, the main school fileserver, which does require a lot of micromanagement:
/dev/sda1       /             ext2   defaults,errors=remount-ro 0      1
/dev/sda2       none          swap      sw                      0      0
/dev/sda3       /home           ext2    defaults                0       2
/dev/sda5       /usr            ext2    defaults                0       2
/dev/sda6       /var            ext2    defaults                0       2
## Seagate Baracudas
/dev/sdb1       /data1          ext2    usrquota,grpquota,rw    0       2
/dev/sdb2       /data2          ext2    usrquota,grpquota,rw    0       2
/dev/sdb5       /data3          ext2    usrquota,grpquota,rw    0       2
/dev/sdb6       /data4          ext2    usrquota,grpquota,rw    0       2
/dev/sdc1       /data5          ext2    usrquota,grpquota,rw    0       2
/dev/sdc2       /data6          ext2    usrquota,grpquota,rw    0       2
/dev/sdc5       /data7          ext2    usrquota,grpquota,rw    0       2
/dev/sdc6       /scratch1       ext2    usrquota,grpquota,rw    0       2

   Many daemons are running in various /data partitions, to segment them
from exhaustion in the other filesystems.  How you split it up depends
greatly on how it's being used.  For a group fileserver I had at one point
30 odd partitions, separate filesystems for each user (quotas over netatalk
weren't working), and it was important that one user exhasuting their
filespace not interfere with other users anywhere else in the cluster. 
/tmp, /var, /usr, /usr/local, and several partitions for backing up large
packages installed on other machines. were also separate.
   Note that only a few IT staff are even in /home, most users are in
subdirectories of /data?, grouped by department and research group, with
group quotas.

More information about the linux mailing list