[Wylug-discuss] maintenance

Alan J. Wylie jlyht at wylie.me.uk
Mon Aug 20 18:05:36 BST 2007


On Sun, 19 Aug 2007 13:19:24 +0100, Scott Hodgson <linux at sh2515.plus.com> said:

> I was looking on how to defragment the hard drive of Ubuntu - have
> always tried to do routine maintenance - when I saw an article
> saying Linux doesn't have this problem of fragmenting, could anyone
> explain this please on how Linux deals with this?

Linux filesystems tend not to suffer from fragmentation problems to
the same extent that ones with an ancient DOS ancestry do.

However Linux provides facilities for using many different
partitions/volumes, rather than dumping everything on a single
partition in the way that Microsoft have traditionally done.

Linux provides mechanisms (md) for RAIDing multiple discs or disc
partitions together, and then for dynamically adding space to existing
file systems (lvm2).

A quick google turns up this HOWTO:
http://www.howtoforge.com/linux_lvm

Some tips:
Keep your boot partition small and the first partition on the disc.

Keep your root partition small and separate - if you get bad blocks it
is less likely to hit this, and you will be able to boot and recover
your system.

Keep partitions that are frequently written to separate from ones
that are mostly read-only - e.g. /usr should be separate from 
ones that are used for e.g. NNTP news spools or Squid caches.

Indeed, the Squid documentation recommends against RAIDing its cache
and if your Squid partitions get fragmented, just stop Squid, reformat
them and start again.

-- 
Alan J. Wylie                                          http://www.wylie.me.uk/
"Perfection [in design] is achieved not when there is nothing left to add,
but rather when there is nothing left to take away."
  -- Antoine de Saint-Exupery



More information about the Wylug-discuss mailing list