Building a robust Linux Server

Linux is known to be robust but here are few things that you can do to enhance this feature.

  1. RAID
  2. LVM

RAID (Redundant Array of Independent Disks)

RAID is use to achieve greater levels of performance, availability and reliability. It works on the concept of storing duplicating data or information about data (Meta date) to rebuild or regenerate it again in case if a failure. There are 5 level of RAID each enhancing data reliability with each increased levels.

LVM (logical volume management)

With RAID we have achieved data reliability now with LVM we add flexibility to it. The flexibility is to have n number to different physical drives grouped as one and later can be divided into disks of different sizes not warring about the actual individual physical disks size.

Advantages of LVM are:-

  1. It’s a method of allocating space on mass storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that can be resized or moved, possibly while it is being used.
  2. And most important feature is Snapshot; Snapshots can be useful for backing up self-consistent versions of volatile data like table files from a busy database, or for rolling back large changes in one swoop, such as an operating system upgrade.

Here is an example how I have put both these technologies to use making my server robust.

I have two hard drives and system is detected it as sda and sdb

    • sda1 + sdb1 = 100MB as md0 file system of ext3
    • sda2 + sdb2 = 20 GB as md1 file system of ext3
    • sda3 + sdb3 = 2 GB as md2 file system of swap
    • sda4 + sdb4 = as extended partition
    • sda5 + sdb5 = rest of the space as md3 file system of LVM so we can take snapshots

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config.html

http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager