DISTRO LINUX CentOS (Community Enterprise OS) is the result of a re-compile the most popular brand of Linux (sorry can not be mentioned here). This project emerged from a desire to have a community of enterprise-class Linux. This guide will take you to full install with RAID-1 (mirror) and LVM (Logical Volume Management).
Previously, a little 'history:
1.
Why use Centos? CentOS is a Linux compile it again from the very famous. This is a Linux distribution company for products that support stability and support is preferred. Therefore, it is suitable use as a server. 2.
What is RAID? RAID stands for Redundant Array of Independent Disks. The basic concept of RAID is to combine various hard drives in a device for stripping purposes (improve performance) or by reason of redundancy (data security). In ancient times, we need to setup RAID RAID card which is very expensive, and usually use SCSI hard drives are also very expensive. But now, with Linux you can use the 'Software RAID'. With software RAID, you can install RAID without using a RAID card and we can use a normal hard drive. There are various RAID levels, namely RAID 0, 1, 2, 3, 4, 5. Is a commonly used RAID-0 (stripping without redundancy), RAID-1 (redundancy without stripping) and RAID-5 (redundancy and stripping). 3.
What is LVM? LVM stands for Logical Volume Management. We certainly have experienced that one of our Linux partition after a while 'is almost fully occupied. Usually resolve this by reinstalling Linux and reorganize the partitions, or adding a new hard drive and then move the partition is almost full. These two things certainly time-consuming and cumbersome. Now, using LVM, so if one day one of our partition is almost full, you can add a hard drive, and then 'enlarge' the partition to a new hard drive. Amazing is not it?
Begin. This is a system configuration of the authors:
1.
This time we are using the latest version of CentOS 4.2. Please find the nearest store or download directly from Linux http://www.centos.org 2.
Two of the units. Better still use the same brand and type (size). But if not, does not look much like anything. The author uses two brands of fruit 80GB SATA Maxtor and Western Digital. Although both are mentioned 80GB, was certainly different sizes. Seagate has an area larger than about 1.6 GB Western Digital.
The main steps of our mind are:
1.
Install Centos, including RAID configuration and LVMnya. 2.
Test redundancy RAID-1 (mirroringnya).
CentOS installation, RAID and LVM
Centos installation process the same as most other distributions. You can see in the screenshot, the following screenshots. Only later there will be more detail on the measures making the partition.
Why screenshotnya a lot ', which will be shown here is associated with the RAID settings and LVMnya only. To complete the installation process can be seen in PDFnya which can be downloaded from the download menu. As you can see, the second condition is still a blank hard disk without partitioning. It shows that both drives were slightly different sizes. We click the New button to begin creating the partition. We will create two pieces partition, ie / boot and one for the Raid and LVMnya. Why create a partition / boot partition separate from the others? This is because / boot can not be LVM. Ok, select the type of file system is a software RAID, and select what we want to partition your hard drive. The size is 100 MB is actually enough, but just to be sure that we only 300MB. And let's not forget the option Force to be a primary partition. Then we also have the remaining partition. We use all disk space by selecting the Fill maximum size. You have to ask, because we partition sdb before? Because of the smaller sda sdb, so eventually we can know what we partition sda. This is a partition scheme after we finished the sdb partitions. Since there is a mountain pointnya. To do that later. Next we partition sda sdb same pitch well. Yet in both sda partition (sda2), do not select Fill to maximum allowable size, but we adjust the size sdb2. After completion of the two hard drives, as sda in the remaining space is still there. Okay. Then you configure a RAID devicenya. Click the RAID button. Select Create a RAID device. We provide a mount pointnya ie / boot, ext3 disposable housing a filesystem, default RAID devices let alone md0, Now, select the RAID Level 1 is mirroring. Choose a pair of partitions sda1 and sdb1. Just like when making md0, we select the pair partitions, ie sda2 and sdb2, but now we choose housing a filesystem LVM, and do not forget to keep select RAID level RAID 1. Once finished creating the RAID device, then will we see there has been md0 and md1. The difference between the two is md0 already have a mount point, while md1 yet. Well, the next step we create a partition on LVM and mount pointnya. We click the LVM. After we click the LVM, then we will see this screen. A little theory of LVM, LVM consists of Volume Group (VG), VG is composed of Physical Volume (PV), in PV can be made up Logical Volume (LV). VG name can be changed according to what we want. Seen that the PV that we use is md1. Then we can start making LVnya, click the Add button. We create a mount point for the root (/), housing a filesystem just choose ext3, Logical Volume Namenya for convenience we give LogVolRoot naman. Of approximately 5000 MB. Create also for / home Create also for swap Once completed LVM partitioning scheme will be seen, there are hard drives, RAID and LVM.
RAID-1 redundancy test
Well, we reached an interesting phase, ie if we mentesting RAID-1 that we set this can really work well.
Test: unplug a hard drive
Ok, after making sure that the raid was running. We turn off the computer, and then we remove a hard disk.
Turn on the computer .... and .... Linux continues to run! Hehe .. I do not like first, next step will be to rebuild the mirror 'broke' it.
When you turn on the hard drive with just a fruit, in dmesg we are able to see That Linux has found that a hard drive fails, there is a message: RAID 1: RAID set md1 active with 1 out of 2 mirrors.
sdb seen anything strange that the / dev / sda is deemed not fresh, but is disconnected. This is because we immediately removed and replace sdb, sdb which is still no information on the mirrors, wrongly detect it. But that's okay, because then he really is the real situation, will install the hard drive was completely empty.
CLOSING AND CONCLUSIONS
CentOS is a Linux distribution that is very stable and suitable for server farms. Coupled with the use of software RAID with Linux, we can build a Linux server that can protect from damage hard drive data using their own PCs and hard disk assemblies usual. Even with the use of LVM, we can accommodate hard disk space for the future with relative ease.
|