Filesystem/Partitions for new Linux system

Fraser Campbell fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Tue Apr 26 01:10:40 UTC 2005


On April 25, 2005 04:15 pm, Anthony Alex wrote:

> I may be using Debian.

Distro doesn't make a big difference to partitioning ... partitioning like 
distros often comes down to personal taste.

> What are the recommended partitions one would use ?  and what size ?

There are no concrete recommendations, it depends on many things but here's 
what I've done ...

Two disks, 4 total partitions:

     Device Boot     Start       End      Blocks   Id  System
  /dev/hda1   *         1         16      128488+  fd  Linux raid autodetect
  /dev/hda2            17      14593   117089752+  fd  Linux raid autodetect
  /dev/hdc1   *         1         16      128488+  fd  Linux raid autodetect
  /dev/hdc2            17      14593   117089752+  fd  Linux raid autodetect

Two software raid devices made from above partitions:

  md0 : active raid1 hda1[0] hdc1[1]
        128384 blocks [2/2] [UU]

  md1 : active raid1 hda2[0] hdc2[1]
        117089664 blocks [2/2] [UU]

/dev/md0 is mounted as /boot, /dev/md1 is the physical volume used for volume 
group vg0, all partitions other than /boot are logical volumes on vg0:

  Filesystem                        Size    Used   Avail Use% Mounted on
  /dev/md0                       118M    30M     82M  27% /boot
  /dev/mapper/vg0-root   960M  220M  689M  25% /
  /dev/mapper/vg0-home   20G    16G    5.0G  76% /home
  /dev/mapper/vg0-tmp   960M  135M  775M  15% /tmp
  /dev/mapper/vg0-usr      5.0G   4.3G   522M  90% /usr
  /dev/mapper/vg0-var       30G    25G    4.0G  86% /var
  /dev/mapper/vg0-backups 30G  26G    2.4G  92% /var/backups
  /dev/mapper/vg0-opt    496M  280M  192M  60% /opt

When I migrated my data to MD+LVM grub didn't support /boot on LVM so that's 
why I don't have just one big md device and everything on LVM ... not sure if 
grub now supports booting off LVM or not.

When I first installed this system /home was only 5GB, /usr was only 4GB 
and /var was only 10G ... /var/backups and /opt did not even exist.  I was 
able to resize all of the mentioned partitions and create the new ones 
without any downtime.  (at least xfs and reiserfs support online resizing of 
filesystems) ... having everything on LVM is nice!

If you're using LVM don't make the mistake of assigning all leftover space 
to /home, /data or whatever ... make the volumes whatever you consider to be 
a reasonable size and leave the additional space in your volume group(s) 
free.   I still have 20GB of free space waiting in the wings that I'll add 
here and there as partitions fill.  If you assign it all space right away 
then you'll have to start shrinking volumes when you hit the wall somewhere 
or want to create a new partitions ... shrinking filesystems is harder than 
growing them (for example you must unmount a reiserfs fs to shrink it).

I'm pretty anal about creating a lot of mountpoints since a few years ago when 
a crap mysql database crashed and filled /tmp (which was on /) and then a 
crap password management utility came along and zeroed the password file 
(couldn't complete the write to /etc/passwd).

> I know  in the past (few years ago) I have ran into issues with LBA,  do I
> need to worry about this anymore ?

Likely not, it's been a long time since I recall having issues with it.

-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list