Windows.  Viruses.  Notebooks.  Internet.  office.  Utilities.  Drivers

Today we will learn interesting information about what is RAID array and what role these arrays play in the life of hard drives, yes, yes, in them.

The hard drives themselves play a rather important role in the computer, since, with the help of them, we start the system and store a lot of information on them.

Time passes and any hard drive can fail, it can be any that we are not talking about today.

I hope that many have heard of the so-called raid arrays, which allow not only to speed up the work of hard drives, but also, in which case, save important data from disappearing, perhaps forever.

Also, these arrays have ordinal numbers, which is how they differ. Each performs a different function. For example, there is RAID 0, 1, 2, 3, 4, 5 etc. These are the same arrays we will talk about today, and then I will write an article on how to use some of them.

What is a RAID array?

RAID- this is a technology that allows you to combine several devices, namely, hard drives, in our case there is something like a bunch of them. Thus, we increase the reliability of data storage and read / write speed. Perhaps one of these functions.

So, if you want to either speed up your disk or just secure your information, it's up to you. More precisely, it depends on the choice of the desired Raid configuration, these configurations are marked with serial numbers 1, 2, 3 ...

Raids are very useful feature and I recommend it to everyone. For example, if you use 0th configuration, you will experience an increase in speed hard drive, after all, a hard drive is almost the lowest speed device.

If you ask why, then here, I think, everything is clear. every year they become more powerful, they are equipped with a higher frequency, a larger number of cores, and much more. The same with and . And hard drives are growing so far only in volume, and the turnover rate has remained the same as it was 7200. Of course, there are also rarer models. So far, the situation is being saved by the so-called, which speed up the system several times.

Let's say you went to build RAID 1, in this case you will receive a high guarantee of protecting your data, since they will be duplicated on another device (disk) and, if one hard drive fails, all information will remain on the other.

As you can see from the examples, raids are very important and useful, they should be used.

So, a RAID array is physically a bundle of two hard drives connected to system board maybe three or four. By the way, it should also support the creation of RAID arrays. Connecting hard drives is carried out according to the standard, and the creation of raids takes place at the software level.

When we created the raid programmatically, nothing much changed by eye, you just work in the BIOS, and everything else will remain the same, that is, looking into My Computer, you will see all the same connected drives.

It doesn't take much to create an array: a motherboard with RAID support, two identical hard drives ( it is important). They should be the same not only in volume, but also in terms of cache, interface, etc. It is desirable that the manufacturer be the same. Now we turn on the computer and, there we look for the parameter SATA Configuration and put on RAID. After restarting the computer, a window should appear in which we will see information about disks and raids. There we must press CTRL+I to start setting up the raid, that is, adding or removing disks from it. Then the setup will begin.

How many of these raids are there? There are several of them, namely RAID 1, RAID 2, RAID 3, RAID 4, RAID 5, RAID 6. In more detail, I will talk about only two of them.

  1. RAID 0- allows you to create a disk array in order to increase the speed of reading / writing.
  2. RAID 1– allows you to create mirrored disk arrays for data protection.

RAID 0, what is it?

array RAID 0, which is also called stripping uses 2 to 4 hard drives, rarely more. Working together, they increase productivity. Thus, the data with such an array is divided into data blocks, and then written to several disks at once.

Performance increases due to the fact that one block of data is written to one disk, to another disk, another block, etc. I think it is clear that 4 disks will increase performance more than two. If we talk about security, then it suffers on the entire array. If one of the disks fails, then in most cases, all information will be lost forever.

The fact is that in a RAID 0 array, information is located on all disks, that is, the bytes of a file are located on several disks. Therefore, if one disk fails, a certain amount of data will also be lost, and recovery is impossible.

From this it follows that it is necessary to make permanent on external media.

RAID 1, what is it?

array RAID 1, it is also called Mirroring- mirror. If we talk about the disadvantage, then in RAID 1 the volume of one of the hard drives is somehow "inaccessible" to you, because it is used to duplicate the first drive. In RAID 0 this space is available.

The benefits, as you might have guessed, are that the array provides high data reliability, meaning that if one drive fails, all the data remains on the other. Failure of two disks at once is unlikely. Such an array is often used on servers, but this does not prevent it from being used on ordinary computers.

If you choose RAID 1, then be aware that performance will drop, but if data is important to you, then use this approach.

RAID 2-6, what is it?

Now I will briefly describe the remaining arrays, so to speak, for general development, and all because they are not as popular as the first two.

RAID 2- needed for arrays that use the Hamming code (I was not interested in what kind of code). The principle of operation is approximately the same as in RAID 0, that is, information is also divided into blocks and written one by one to disks. The remaining disks are used to store error correction codes, with the help of which, in the event of a failure of one of the disks, data can be restored.

True, for given array it is better to use 4 disks, which is quite expensive, and as it turned out, when using so many disks, the performance gain is rather controversial.

RAID 3, 4, 5, 6- I will not write about these arrays here, since the necessary information is already on Wikipedia, if you want to learn about these arrays, then read.

Which RAID array to choose?

Let's say that you often install various programs, games and copy a lot of music or movies, then you are recommended to use RAID 0. When choosing hard drives, be careful, they must be very reliable so as not to lose information. Be sure to do backups data.

Eat important information, which should be safe and sound? Then RAID 1 comes to the rescue. When choosing hard drives, their characteristics should also be identical.

Conclusion

So we sorted out for someone new, and for someone old information on RAID arrays. I hope that the information will be useful for you. Soon I will write about how to create these arrays.

If you want to double the performance of your operating system, then our article is for you!

No matter how powerful your computer is, it still has one weak link, it is a hard drive, the only device in the system unit that has mechanics inside. All the power of your processor and 16 GB random access memory will be nullified by the outdated principle of operation of a conventional HDD. It is not for nothing that a computer is compared to a bottle, and a hard drive to its neck. No matter how much water there is in the bottle, it will pour out through a narrow neck.

There are two ways to speed up your computer, the first is to buy an expensive solid state drive SSD, and the second, to make the most of the capabilities of your motherboard, namely, set up a RAID 0 array of two hard drives. By the way, who is stopping us from creating RAID 0 array of two SSDs!

How to set up a RAID 0 array and install Windows 10 on it. Or how to double the speed of the disk system

As you guessed, today's article is about creating and configuring a disk array RAID 0 consisting from two hard drives. I conceived it several years ago and specially purchased two new SATA III (6 Gb / s) 250 GB hard drives, but due to the complexity of this topic for novice users, I had to postpone it then. Today, when the capabilities of modern motherboards have reached such a level of functionality that even a beginner can create a RAID 0 array, I return to this topic with great pleasure.

Note : For RAID creation 0 array, you can take disks of any size, for example, 1 TB. In the article, for a simple example, two 250 GB disks are taken, since there were no free disks of a different volume at hand.

It is important for all computer enthusiasts to know that RAID 0 ("striping" or "striping") is a disk array of two or more hard drives with no redundancy. You can translate this phrase into ordinary Russian like this: when installed in system unit two or more hard disks (preferably of the same size and one manufacturer) and combining them into a RAID 0 disk array, information is written / read to these disks simultaneously, which doubles the performance of disk operations. The only condition is that your motherboard must support RAID 0 technology (in our time, almost all motherboards support the creation of raid arrays).

The attentive reader may ask: “What is the absence of redundancy?”

Answer. RAID data virtualization technology was developed primarily for data security and begins with, which provides double reliability (data is written to two hard drives in parallel and if one hard drive fails, all information remains safe on the other HDD). So, RAID 0 technology does not write data in parallel to two hard drives, RAID 0 splits information into data blocks when writing and writes it to several hard drives at the same time, due to this, the performance of disk operations doubles, but if any hard drive fails, disk, all information on the second HDD is lost.

That's why the creators of RAID virtualization technology - Randy Katz and David Patterson, did not consider RAID 0 to be any kind of RAID level and called it "0", since it is not safe due to the lack of redundancy.

Friends, but you must admit that hard drives do not break down every day, and secondly, with two HDDs combined in a RAID 0 array, you can work like a simple hard drive, that is, if you periodically make an operating system, then you will insure yourself from possible problems by 100%.

So, before creating a RAID 0 array, I suggest installing one of our two new hard drivesSATA III (6 Gb / s) to the system unit and check it for read write speed with utilitiesCrystalDiskMark and ATTO Disk Benchmark. Already after the creationWe will check the RAID 0 array and install Windows 10 on it againthe speed of reading the record with the same utilities and see if it really this technology increase the speed of our operating system.

For the experiment, we will take a far from new motherboard ASUS P8Z77-V PRO built on Intel chipset Z77 Express. The advantages of motherboards built on Intel Z77, Z87 and newer H87, B87 chipsets are advanced Intel technologies Rapid Storage Technology (RST), which is specially designed for RAID 0 arrays even from SSDs.

Looking ahead, I’ll say that the test results are quite normal for an ordinary HDD of the most modern interface. SATA III.

CrystalDiskMark

Is oldest program to test the performance of hard drives, you can download on my cloud storage, link https://cloud.mail.ru/public/6kHF/edWWJwfxa

The program performs a test of random and sequential read / write to the hard drive in blocks of 512 and 4 kb.

Choose desired drive, for example, our HDD with you under the letter C: and click All.

Final result. The maximum speed of writing information to the hard disk reached 104 Mb / s, the reading speed - 125 Mb / s.

ATTO Disk Benchmark

Final result. The maximum speed of writing information to a hard disk reached 119 Mb / s, read speed - 121 Mb / s.

Well, now we are setting up our RAID 0 array in BIOS and installing the operating system on it. Windows system 10.

Setting up a RAID 0 array

We connect two identical (250 GB) SATA III hard drives to our motherboard: WDC WD2500AAKX-00ERMA0 and WDC WD2500AAKX-001CA0.

Our motherboard has 4 ports SATA III (6 Gb / s), we will use No. 5 and No. 6


We turn on the computer and enter the BIOS by pressing the DEL key at boot.

Go to the Advanced tab, SATA Configuration option.

Set SATA Mode Selection to RAID

To save the changes, press F10 and select Yes. A reboot is in progress.

If you have enabled RAID technology in the BIOS, then at the next boot, a prompt will appear on the monitor screen to press the keyboard shortcut ( CTRL-I) to enter the RAID configuration control panel.

This window also displays our WDC hard drives connected to ports 4 and 5, which are not yet in a RAID array (Non-RAID Disk). Press CTRL-I and enter the settings panel.


In the initial window of the panel, we need the first tab Create a RAID Volume (Create a RAID volume), to enter it press Enter.

Here we make the basic settings of our future RAID 0 array.

Name : (RAID name).

Press the spacebar and enter a name.

Let it be "RAID 0 new" and press Enter. Scroll down with the Tab key.

RAID Level : (RAID level).

We create RAID 0 (stripe) - a disk array of two hard drives with no redundancy. Select this level with the arrows on your keyboard and press Enter.

Scroll down using the Tab key.

Strip Size :

We leave it as is.

Capacity : (volume)

Displayed automatically. The volume of our two hard drives is 500 GB, since we use the RAID 0 level (stripe) and our two hard drives work as one. F meme Enter.

We don’t change anything else and move to the last item Create Volume and press Enter.

A warning appears:

WARNING: ALL DATA ON SELECTED DISKS WILL BE LOST.

Are you sure you want to create this volume? (Y/N):

WARNING: ALL DATA on the selected drives will be lost.

Are you sure you want to create this volume? (Y/N):

Press Y (Yes) on the keyboard.

The RAID 0 array has been created and is already functioning, and is in the Normal status. To exit the settings panel, press the Esc key on the keyboard.

Are you sure you want to exit (Are you sure you want to exit? Press Y (Yes). A reboot occurs.

Now, every time the computer is booted, information about the state of our RAID 0 array will appear on the monitor screen for a few seconds and a prompt to press the key combination (CTRL-I) to enter the RAID configuration control panel.

Installing Windows 10 on a RAID 0 array

We connect to our system unit, restart the computer, enter the BIOS and change the boot priority to the USB flash drive. Or you can simply enter the computer's boot menu and select boot from the installation Windows flash drives 10 (in our case Kingston). In the boot menu, you can see the RAID 0 array we created called "RAID 0 new".

And stuff, stuff, stuff, stuff. So, today we'll talk about RAID arrays based on them.

As you know, these same hard drives also have a certain margin of safety after which they fail, as well as characteristics that affect performance.

As a result, for sure, many of you, one way or another, once heard about some raid arrays that can be made from ordinary hard drives in order to speed up the operation of these very drives and the computer as a whole or provide increased data storage reliability.

You probably also know (and if you don’t know, it doesn’t matter) that these arrays have different serial numbers (0, 1, 2, 3, 4, etc.), and also perform quite different functions. This phenomenon really takes place in nature and, as you might have guessed, I want to tell you about these very RAID arrays in this article. I'm already talking about it ;)

Go.

What is RAID and why is it needed?

RAID is a disk array (that is, a complex or, if you like, a bunch) of several devices - hard drives. As I said above, this array serves to increase the reliability of data storage and / or to increase the speed of reading / writing information (or both).

Actually, what exactly this bundle of disks does, that is, speeding up work or increasing data security, depends on you, or rather, on the choice of the current configuration of the raid(s). Different types of these configurations are just noted different numbers: 1, 2, 3, 4 and, accordingly, perform different functions.

Simply, for example, in the case of building the 0th version (description of variations 0, 1, 2, 3, etc. - read below), you will get a noticeable performance boost. And in general, the hard drive today is just the same narrow channel in system performance.

Why did it happen in general

Hard drives, on the other hand, grow only in volume, because the speed of rotation of the head of these (with the exception of rare models like Raptor's) has froze for quite a long time at around 7200, the cache is also not really growing, the architecture remains almost the same.

In general, in terms of performance, disks stand still (only developing ones can save the situation), but they play a significant role in the operation of the system and, in some places, full-fledged applications.

In the case of building a single (in the sense of number 1) raid, you will lose a bit in performance, but you will get some tangible guarantee of the security of your data, because they will be completely duplicated and, in fact, even in the event of a failure of one disk, the whole thing and will be completely on the second without any loss.

In general, I repeat, raids will be useful to everyone. I would even say that they are required :)

What is RAID in the physical sense

Physically, a RAID array is from two to n-th number of hard drives connected to a RAID-enabled one (or to an appropriate controller, which is less common because these are expensive for the average user (controllers are usually used on servers due to increased reliability and performance)), i.e. .e. nothing changes inside the system unit by eye, there are simply no extra connections or connections between disks or with something else.

In general, in the hardware, everything is almost the same as always, but only changes programmatic approach, which, in fact, sets, by choosing the type of raid, how exactly the connected disks should work.

Programmatically, in the system, after the creation of the raid, there are no special quirks either. In fact, the whole difference in working with a raid lies only in a small setting that actually organizes the raid (see below) and in the use of a driver. Otherwise, EVERYTHING is exactly the same - in "My Computer" the same C, D and other drives, all the same folders, files .. In general, and programmatically, by eye, complete identity.

Installing an array is nothing complicated: just take a motherboard that supports RAID technology, take two completely identical ones - this is important! , - both in terms of characteristics (size, cache, interface, etc.) and the manufacturer and model of the disk and connect them to this motherboard. Next, just turn on the computer, go into the BIOS and set the parameter SATA Configuration: RAID.

After that, during the computer boot process (usually before Windows boot) a panel appears displaying information about the disk in the raid and outside it, where, in fact, you need to press CTR-I to configure the raid (add disks to it, delete it, etc., etc.). Actually, that's all. Then there are other joys of life, that is, again, everything is as always.

Important note to remember

When creating or deleting a raid (this does not seem to affect the 1st raid, but not a fact), all information from the disks is inevitably deleted, and therefore it is clearly not worth just experimenting by creating and deleting various configurations. Therefore, before creating a raid, first save all the necessary information (if any), and then experiment.

As for the configurations .. As I said, there are several types of RAID arrays (at least from the main basis, this is RAID 1, RAID 2, RAID 3, RAID 4, RAID 5, RAID 6). To begin with, I will talk about two, the most understandable and popular among ordinary users:

  • RAID 0 - disk array to increase the speed\record.
  • RAID 1 is a mirror disk array.

And at the end of the article I will quickly go over the others.

RAID 0 - what is it and what is it eaten with?

And so .. RAID 0 (aka, stripe ("Striping") - used from two to four (more - less often) hard drives that jointly process information, which increases performance. To make it clear, it is longer and more difficult for one person to carry bags than four (although the bags remain the same in their physical properties, only the powers interacting with them change). Programmatically, the information on this type of raid is divided into data blocks and written to both / several disks in turn.

One block of data on one disk, another block of data on another, and so on. Thus, performance is significantly increased (the multiplicity of performance increases depends on the number of disks, i.e. 4th disks will run faster than two), but data security on the entire array suffers. If any of the hard drives (i.e. hard disks) included in such a RAID fails, all information is almost completely and irretrievably lost.

Why? The fact is that each file consists of a certain number of bytes .. each of which carries information. But in a RAID 0 array, the bytes of one file can be located on several disks. Accordingly, if one of the disks "dies", an arbitrary number of bytes of the file will be lost and it will simply be impossible to restore it. But the file is not alone.

In general, when using such a raid array, it is strongly recommended to make permanent valuable information on external media. The raid really provides tangible speed - I tell you this from my own experience, because such happiness has been installed in my house for years.

RAID 1 - what is it and what is it eaten with?

As for RAID 1 (Mirroring - "mirror").. Actually, I'll start with a drawback. Unlike RAID 0, it turns out that you seem to "lose" the volume second hard disk (it is used to write a full (byte for byte) copy of the first hard disk to it, while in RAID 0 this place is completely available).

The advantage, as you already understood, is that it has high reliability, i.e. everything works (and all data exists in nature, and does not disappear with the failure of one of the devices) as long as at least one disk is functioning , i.e. even if one disk is rudely disabled, you will not lose a single byte of information, because the second is a clean copy of the first and replaces it when it fails. Such a raid is often used in servers due to the insane vitality of the data, which is important.

With this approach, performance is sacrificed and, according to personal feelings, it is even less than when using one disk without any raids there. However, for some, reliability is much more important than performance.

RAID 2, 3, 4, 5, 6 - what is it and what do they eat with?

The description of these arrays is here as much as, i.e. purely for reference, and even then in a compressed (in fact, only the second is described) form. Why is that? At least due to the low popularity of these arrays among the average (and, in general, any other) user and, as a result, little experience of using them by me.

RAID 2 is reserved for arrays that use some kind of Hamming code (I was not interested in what it is, therefore I will not tell). The principle of operation is approximately the following: data is written to the corresponding devices in the same way as in RAID 0, i.e. they are divided into small blocks across all disks that are involved in storing information.

The remaining (specially allocated for it) disks store error correction codes, according to which, in the event of a hard drive failure, information can be restored. Tobish in arrays of this type, disks are divided into two groups - for data and for error correction codes

For example, you have two disks that are a place for the system and files, and two more will be completely reserved for correction data in case the first two disks fail. In fact, this is something like a zero raid, only with the ability to somehow save information in the event of a failure of one of the hard drives. Rarely expensive - four disks instead of two with a very controversial increase in security.

RAID 3, 4, 5, 6 .. No matter how strange it may sound on the pages of this site, try to read about them on Wikipedia. The fact is that in my life I came across these arrays extremely rarely (except that the fifth one came to hand more often than others) and I can’t describe the principles of their work in accessible words, but I strongly don’t want to reprint the article from the resource proposed above, at least in the strength of the presence in these furious formulations, which even I understand with a creak.

Which RAID should you choose?

If you play games, often copy music, movies, install capacious resource-consuming programs, then RAID 0 will certainly come in handy for you. But be careful when choosing hard drives - in this case, their quality is especially important - or be sure to make backups to external media.

If you work with valuable information that is tantamount to death to lose, then you definitely need RAID 1 - it is extremely difficult to lose information with it.

I repeat that it is highly desirable that the disks installed in the RAID array be identical. Size, company, series, cache size - everything should preferably be the same.

Afterword

Here are the things.

By the way, I wrote in the article how to assemble this miracle: " How to create a RAID array using regular methods", but about a couple of parameters in the material " RAID 0 of two SSDs - practical tests with Read Ahead and Read Cache". Use the search.

I sincerely hope that this article will be useful to you and you will definitely make yourself a raid of one type or another. Believe me, it's worth it.

For questions about creating and configuring them, in general, you can contact me in the comments - I'll try to help (if there are instructions for your motherboard on the network). I will also be glad to any additions, wishes, thoughts and everything else.

There are a lot of articles on the Internet describing RAID. For example, this one describes everything in great detail. But as usual, there is not enough time to read everything, so you need something short to understand - is it necessary or not, and what is better to use in relation to working with a DBMS (InterBase, Firebird or something else - it really doesn’t matter). Before your eyes - just such a material.

In the first approximation, RAID is the combination of disks into one array. SATA, SAS, SCSI, SSD - it doesn't matter. Moreover, almost every normal motherboard now supports the ability to organize SATA RAID. Let's go through the list of what RAIDs are and why they are. (I would like to note right away that you need to combine identical disks in RAID. Combining disks from different manufacturers, from one but different types, or different sizes - this is pampering for a person sitting at a home computer).

RAID 0 (Stripe)

Roughly speaking, this is a sequential combination of two (or more) physical disks into one "physical" disk. Suitable only for organizing huge storage spaces, for example, for those who work with video editing. It makes no sense to keep databases on such disks - in fact, even if your database has a size of 50 gigabytes, why did you buy two disks of 40 gigabytes each, and not 1 x 80 gigabytes? Worst of all, in RAID 0, any failure of one of the disks leads to the complete inoperability of such a RAID, because data is written alternately to both disks, and accordingly, RAID 0 does not have the means to recover in case of failures.

Of course, RAID 0 provides a performance boost due to read/write striping.

RAID 0 is often used to store temporary files.

RAID 1 (Mirror)

Disk mirroring. If Shadow in IB/FB is software mirroring (see Operations Guide.pdf), then RAID 1 is hardware mirroring and nothing else. Save yourself from using software mirroring by means of the OS or third-party software. It is necessary or "iron" RAID 1, or shadow.

In the event of a failure, carefully check which drive has failed. The most common case of data loss on RAID 1 is incorrect actions during recovery (the wrong disk is specified as "whole").

As for performance - by writing the gain is 0, by reading it is possible up to 1.5 times, since reading can be done "in parallel" (in turn from different disks). For databases, the acceleration is small, while with parallel access to different (!) Parts (files) of the disk, the acceleration will be absolutely accurate.

RAID 1+0

By RAID 1+0 they mean the variant of RAID 10, when two RAID 1s are combined into RAID 0. The variant when two RAID 0s are combined into RAID 1 is called RAID 0+1, and "outside" is the same RAID 10.

RAID 2-3-4

These RAIDs are rare as they use Hamming codes or byte blocking + checksums etc. but the general summary is that these RAIDs only give reliability, with 0 performance gains, and sometimes even her deterioration.

RAID 5

It requires at least 3 disks. Parity data is distributed across all drives in the array

It is commonly said that "RAID5 uses independent disk access so that requests to different disks can be executed in parallel". It should be borne in mind that we are talking, of course, about concurrent I/O requests. If such requests are sent sequentially (in SuperServer), then, of course, you will not get the effect of access parallelization on RAID 5. Of course, RAID5 will give a performance boost if the array is worked with operating system and other applications (for example, it will contain virtual memory, TEMP, etc.).

In general, RAID 5 used to be the most commonly used disk array for working with DBMS. Now such an array can be organized on SATA drive x, and it will turn out to be significantly cheaper than on SCSI. You can see the prices and controllers in the articles
Moreover, you should pay attention to the volume of purchased disks - for example, in one of the articles mentioned, RAID5 is assembled from 4 disks with a volume of 34 gigabytes, while the volume of the "disk" is 103 gigabytes.

Testing five SATA RAID controllers - http://www.thg.ru/storage/20051102/index.html.

Adaptec SATA RAID 21610SA in RAID 5 - http://www.ixbt.com/storage/adaptec21610raid5.shtml.

Why RAID 5 is bad - https://geektimes.ru/post/78311/

Attention! When buying disks for RAID5, they usually take 3 disks, at a minimum (rather because of the price). If suddenly one of the disks fails after a while, then a situation may arise when it is not possible to purchase a disk similar to the ones used (they are no longer produced, temporarily out of stock, etc.). Therefore, a more interesting idea seems to be buying 4 disks, organizing a RAID5 of three, and connecting the 4th disk as a backup (for backups, other files, and other needs).

The size of a RAID5 disk array is calculated using the formula (n-1)*hddsize, where n is the number of disks in the array, and hddsize is the size of one disk. For example, for an array of 4 disks of 80 gigabytes, the total volume will be 240 gigabytes.

Is concerning "unsuitability" RAID5 for databases. At a minimum, it can be viewed from the point of view that in order to get good RAID5 performance, you need to use a specialized controller, and not what is on the motherboard by default.

Article RAID-5 must die. And more about data loss on RAID5.

Note. As of September 05, 2005, the cost of a Hitachi 80Gb SATA drive is $60.

RAID 10, 50

Further there are already combinations of the listed options. For example, RAID 10 is RAID 0 + RAID 1. RAID 50 is RAID 5 + RAID 0.

Interestingly, the combination of RAID 0 + 1 in terms of reliability is worse than RAID5. In the database repair service, there is a case of one disk failure in a RAID0 (3 disks) + RAID1 (3 more such disks) system. At the same time, RAID1 could not "raise" the spare drive. The base was damaged beyond repair.

RAID 0+1 requires 4 disks and RAID 5 requires 3. Think about it.

RAID 6

Unlike RAID 5, which uses parity to protect data from single faults, RAID 6 uses the same parity to protect against double faults. Accordingly, the processor is more powerful than in RAID 5, and not 3, but at least 5 disks are required (three data disks and 2 parity disks). Moreover, the number of disks in raid6 does not have the same flexibility as in raid 5, and must be equal to a prime number (5, 7, 11, 13, etc.)

Let's say two disks fail at the same time, although this case is very rare.

I didn’t see data on RAID 6 performance (didn’t look), but it may well be that due to excessive control, performance can be at the RAID 5 level.

Rebuild time

For any RAID array that remains healthy when one drive fails, there is such a thing as rebuild time. Of course, when you replace a dead disk with a new one, the controller must organize the functioning of the new disk in the array, and this will take some time.

During the "connection" of a new disk, for example, for RAID 5, the controller may allow work with the array. But the speed of the array in this case will be very low, at least because even with a "linear" filling of a new disk with information, writing to it will "distract" the controller and disk heads for synchronization operations with the rest of the disks in the array.

The recovery time of the array functioning in normal mode directly depends on the volume of disks. For example, Sun StorEdge 3510 FC Array with an array size of 2 terabytes in exclusive mode makes a rebuild within 4.5 hours (at a hardware price of about $40,000). Therefore, when organizing an array and planning for failover, it is first of all necessary to think about rebuild time. If your database and backups take up no more than 50 gigabytes, and the growth per year is 1-2 gigabytes, then it hardly makes sense to build an array of 500 gigabyte disks. 250 gigabytes will be enough, and even for raid5 it will be at least 500 gigabytes of space to accommodate not only the database, but also movies. But the rebuild time for 250 GB disks will be about 2 times less than for 500 GB disks.

Summary

It turns out that the most meaningful is to use either RAID 1 or RAID 5. However, the most common mistake that almost everyone makes is to use RAID "for everything". That is, they install RAID, pile everything on it, and ... they get reliability at best, but no performance improvement.

Write cache is also often not enabled, as a result of which writing to the raid is slower than to a regular single disk. The fact is that for most controllers this option is disabled by default, because. it is believed that to enable it, it is desirable to have at least a battery on the raid controller, as well as the presence of a UPS.

Text
The old article hddspeed.htmLINK (and doc_calford_1.htmLINK) shows how you can get a significant performance boost by using multiple physical disks, even for an IDE. Accordingly, if you organize a RAID, put a base on it, and do the rest (temp, OS, virtual machine) on other hard drives. After all, all the same, RAID itself is one "disk", even if it is more reliable and faster.
declared obsolete. All of the above has a right to exist on RAID 5. However, before such placement, you need to find out how you can backup / restore the operating system, and how long it will take, how long it will take to restore a "dead" disk, is there (will there be ) at hand is a disk to replace the "dead" one, and so on, i.e., it will be necessary to know in advance the answers to the most elementary questions in case of a system failure.

I still advise you to keep the operating system on a separate SATA drive, or if you prefer, on two SATA drives connected in RAID 1. In any case, when placing the operating system on RAID, you should plan your actions if the motherboard suddenly stops working. board - sometimes it is not possible to transfer the disks of a raid array to another motherboard (chipset, raid controller) due to incompatibility of the default raid parameters.

Base placement, shadow and backup

Despite all the advantages of RAID, it is categorically not recommended, for example, to make a backup to the same logical drive. Not only does this have a bad effect on performance, but it can also lead to problems with lack of free space (on large databases) - after all, depending on the data, the backup file can be equivalent to the size of the database, and even more. Making a backup on the same physical disk is still all right, although the most best option- backup to a separate hard drive.

The explanation is very simple. Backup is reading data from a database file and writing to a backup file. If all of this physically happens on the same disk (even RAID 0 or RAID 1), then performance will be worse than if reading is done from one disk and writing to another. Even more benefit from such separation is when backup is done while users are working with the database.

The same applies to shadow - there is no point in putting shadow, for example, on RAID 1, in the same place as the base, even on different logical drives. In the presence of shadow, the server writes data pages both to the database file and to the shadow file. That is, instead of one write operation, two are performed. By separating base and shadow across different physical drives, write performance will be determined by the slowest drive.

Today we will talk about RAID arrays. Let's figure out what it is, why we need it, what it happens and how to use all this splendor in practice.

So, in order: what is RAID array or simply RAID? This abbreviation stands for "Redundant Array of Independent Disks" or "redundant (redundant) array of independent disks". To put it simply, RAID array this is a collection of physical disks combined into one logical disk.

It usually happens the other way around - one physical disk is installed in the system unit, which we divide into several logical ones. Here the situation is reversed - several hard drives are first combined into one, and then the operating system is perceived as one. Those. The OS is firmly convinced that it physically has only one disk.

RAID arrays are hardware and software.

Hardware RAID arrays are created before the OS is loaded by means of special utilities sewn into RAID controller- something like BIOS. As a result of creating such RAID array already at the OS installation stage, the distribution kit "sees" one disk.

Software RAID arrays created by the OS. Those. during boot, the operating system "understands" that it has several physical disks, and only after the OS starts, by means of software disks are combined into arrays. Naturally, the operating system itself is not located on RAID array, because it is set before it is created.

"Why is all this necessary?" - you ask? The answer is: to increase the speed of reading / writing data and / or improve fault tolerance and security.

"How RAID array can increase speed or secure data?" - to answer this question, consider the main types RAID arrays how they are formed and what it gives as a result.

RAID 0. Also called "Stripe" or "Tape". Two or more hard drives are combined into one by sequential merging and summing up volumes. Those. if we take two 500 GB disks and create from them RAID 0, the operating system will treat it as a single terabyte disk. At the same time, the read / write speed of this array will be twice that of a single disk, because, for example, if the database is physically located on two disks in this way, one user can read data from one disk, and the other user can write to another disk at the same time. While in the case of the location of the database on one disk, the hard disk itself will perform read / write tasks for different users sequentially. RAID 0 will allow reading/writing in parallel. As a result, the more disks in the array RAID 0, the faster the array itself works. The dependence is directly proportional - the speed increases by N times, where N is the number of disks in the array.
At the array RAID 0 there is only one drawback that overrides all the advantages of using it - the complete lack of fault tolerance. If one of the array's physical disks dies, the entire array dies. There is an old joke on this topic: "What does the "0" mean in the title RAID 0? - the amount of information to be restored after the death of the array!"

RAID-1. Also called "Mirror" or "Mirror". Two or more hard drives are combined into one by parallel merging. Those. if we take two 500 GB disks and create from them RAID-1, the operating system will treat it as a single 500GB disk. At the same time, the read / write speed of this array will be the same as that of a single disk, since information is read / written to both disks simultaneously. RAID-1 does not give a speed gain, but provides greater fault tolerance, since in the event of the death of one of the hard drives, there is always a complete duplicate of the information located on the second drive. At the same time, it must be remembered that fault tolerance is provided only from the death of one of the disks in the array. If the data was deleted purposefully, then they are deleted from all disks of the array at the same time!

RAID-5. A more secure version of RAID-0. The volume of the array is calculated by the formula (N - 1) * DiskSize RAID-5 from three disks of 500 GB each, we will get an array of 1 terabyte. The essence of the array RAID-5 in that several disks will be combined into RAID-0, and the so-called "checksum" is stored on the last disk - service information designed to restore one of the disks in the array in case of its death. Array write speed RAID-5 somewhat lower, since it takes time to calculate and write the checksum to a separate disk, but the read speed is the same as in RAID-0.
If one of the disks in the array RAID-5 dies, the read / write speed drops sharply, since all operations are accompanied by additional manipulations. Actually RAID-5 turns into RAID-0 and if you do not take care of recovery in a timely manner RAID array there is a significant risk of losing data completely.
With an array RAID-5 you can use the so-called Spare-disk, ie. spare. During stable operation RAID array this disk is idle and not in use. However, in the event of a critical situation, recovery RAID array starts automatically - information from the damaged one is restored to the spare disk using checksums located on a separate disk.
RAID-5 is created from at least three disks and saves from single errors. In case of simultaneous occurrence of different errors on different disks RAID-5 does not save.

RAID-6- is an improved version of RAID-5. The essence is the same, only for checksums, not one, but two disks are used, and checksums are calculated using different algorithms, which significantly increases the fault tolerance of everything RAID array generally. RAID-6 is assembled from at least four disks. The formula for calculating the volume of an array looks like (N - 2) * DiskSize, where N is the number of disks in the array and DiskSize is the size of each disk. Those. while creating RAID-6 from five disks of 500 GB each, we will get an array of 1.5 terabytes.
Recording speed RAID-6 lower than that of RAID-5 by about 10-15%, which is due to additional time spent on calculating and writing checksums.

RAID-10- also sometimes called RAID 0+1 or RAID 1+0. It is a symbiosis of RAID-0 and RAID-1. The array is built of at least four disks: on the first channel RAID-0, on the second RAID-0 to increase the read / write speed, and among themselves they are in a RAID-1 mirror to increase fault tolerance. Thus, RAID-10 combines the plus of the first two options - fast and fault-tolerant.

RAID-50- similarly, RAID-10 is a symbiosis of RAID-0 and RAID-5 - in fact, RAID-5 is being built, only its constituent elements are not independent hard drives, but RAID-0 arrays. Thus, RAID-50 gives very good speed read / write and contains the stability and reliability of RAID-5.

RAID-60- the same idea: in fact, we have a RAID-6 assembled from several RAID-0 arrays.

There are also other combined arrays RAID 5+1 And RAID 6+1- they look like RAID-50 And RAID-60 with the only difference that the basic elements of the array are not RAID-0 tapes, but RAID-1 mirrors.

How do you understand combined RAID arrays: RAID-10, RAID-50, RAID-60 and options RAID X+1 are direct descendants of the base array types RAID 0, RAID-1, RAID-5 And RAID-6 and serve only to increase either read / write speed, or increase fault tolerance, while carrying the functionality of basic, parent types RAID arrays.

If we turn to practice and talk about the application of certain RAID arrays in real life, the logic is quite simple:

RAID 0 in its pure form we do not use at all;

RAID-1 we use it where read / write speed is not particularly important, but fault tolerance is important - for example, on RAID-1 it is good to put operating systems. In this case, no one except the OS accesses the disks, the speed of the hard disks themselves is quite enough for work, fault tolerance is ensured;

RAID-5 we put it where speed and fault tolerance are needed, but there is not enough money to buy more hard drives or there is a need to restore arrays in case of damage without stopping work - spare Spare drives will help us here. Common use RAID-5- data storage;

RAID-6 it is used where it is simply scary or there is a real threat of death of several disks in the array at once. In practice, it is quite rare, mainly among paranoids;

RAID-10- used where you need to work quickly and reliably. Also the main direction for use RAID-10 are file servers and database servers.

Again, if we simplify it further, we come to the conclusion that where there is no large and voluminous work with files, it is quite enough RAID-1- operating system, AD, TS, mail, proxy, etc. In the same place where serious work with files is required: RAID-5 or RAID-10.

The ideal solution for a database server is a machine with six physical disks, two of which are mirrored RAID-1 and the OS is installed on it, and the remaining four are combined into RAID-10 for fast and reliable data handling.

If, after reading all of the above, you decide to install on your servers RAID arrays, but do not know how to do it and where to start - contact us! - we will help you choose the necessary equipment, as well as carry out installation work on the implementation RAID arrays.

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE: