Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Mirroring Moodle.

Mirroring Moodle

From MoodleDocs

Disc Mirroring

A technique in which data is written to two duplicate disks simultaneously. This way if one of the disk drives fails, the system can instantly switch to the other disk without any loss of data or service. Disk mirroring is used commonly in on-line database systems where it's critical that the data be accessible at all times.

Using RAID to Mirror Moodle

There are a number of different methods of mirroring your hard drive, and perhaps the easiest is just to copy it. Programs like Acronis True Image are imaging tools that make a perfect image of your hard drive and allow you to save it anywhere. This is, more or less, a simple and complete backup of your hard drive. There are many such tools, Norton's Ghost is another, and they all do credible jobs. However, they depend upon you either scheduling backups appropriately and none of them will get the current data if something goes wrong. This is not a true mirroring methodology, just an advanced backup, which actually suits a lot of people. While this can be a time consuming strategy, many experts prefer it because you can choose what to save.

Perhaps the most readily available method of mirroring is using the RAID method. RAID stands for Redundant Array of Independent Disks, and requires the installation of two or more hard disks of the same size and type. These hard drives are used to make a perfect mirror image of the active hard drive, which will always be up to date by the second. There are many different levels to RAID, each level having its own advantages and disadvantages. Below is a brief explanation of four different raid levels, these are not necessarily the best, but they would probably be the more useful in operations and least expensive options.

RAID Level 0

RAID Level 0 requires a minimum of 2 drives to implement. RAID 0 offers a "striped" disk array, that is the data is subdivided or broken down into blocks and each block is written to a separate disk drive. This means that the I/O performance is greatly improved by spreading the I/O load across many channels and drives. It is of simple design and easy to implement and the best performance can be gained when data is striped across multiple controllers with only one drive per controller as there is no parity calculation overhead. On the down side, RAID 0 is not fault tolerant and the failure of just one drive will result in the loss of all data. Thinking about it, it is obvious, if it is sharing data between two drives and one dies then the surviving data will exist in semi-isolation, it will not make sense to any program trying to read it. So be wary of using RAID 0.

RAID Level 1

RAID level 1 needs at least 2 drives to implement. For best results, the controller must be able to perform two separate Reads per mirrored pair or two duplicate Writes per mirrored pair concurrently. That is, it has twice the Read and Write tasks of a single drive so performance must be reduced even though the transfer rate per data block is the same as a single disk. It has a data redundancy of 100% which means in case of a disk failure, you only need to image the replacement disk from the surviving disk.It is the simplest of the RAID storage designs. The main drawback is that it has the highest disk overhead of all RAID types, that is, it is inefficient. The RAID function is often done with system software, which can load the server's CPU thereby degrading throughputs when a lot of users are online. Also, hot swapping of a failed disk is not always supported in system software, which results in you having to spend time imaging new drives.

RAID Level 3

RAID level 3 requires a minimum of 3 drives to implement. Data blocks are striped and written on the data disks. Stripe parity is generated on Writes, recorded on the parity disk and checked on Reads. RAID Level 3 has very high Read and Write data transfer rates and a disk failure has little impact on throughput. RAID Level 3 gains a high level of efficiency as it has a low ratio of parity checking between data disks. Unfortunately, it also means that the transaction rate is only equal to that of a single disk drive at best. Also, the Controller design is fairly complex which can make it as resource intensive to do as a "software" RAID. RAID Level 3 is mostly used for applications that require high throughput, video editing or other intense graphic work.

RAID Level 5

RAID Level 5 uses a minimum of 3 hard drives to successfully implement. Each entire data block is written onto a data disk and parity for blocks in the same rank is generated on Writes, recorded in a distributed location and checked on Reads.This implies it hasd the highest Read data transaction rate, but only a medium Write data transaction rate. Like RAID Level 3, RAID Level 5 too has a low ratio of ECC (Parity) disks to data disks which means high efficiency but has a better aggregate transfer rate. Disk failure has a higher impact on throughput, but most data is protected. Compared to RAID Level 1, RAID Level 5 is a little more difficult to rebuild in the event of a disk failure. This RAID type is perhaps the most versatile of the different RAID levels and is best used for File, Application, Database, Intranet and Web servers.

To mirror your Moodle, all you need to is construct your RAID, then install your Moodle, and it will be done for you.


See also

See Also

Moodle Clusters

Beginning Administration FAQ