The following will introduce the ideas and methods of data recovery when the three RAID forms of RAID 1, RAID 0, and RAID 5 in the server disk array fail.
RAID 1 is the simplest form of RAID array, in which two hard disks are mirrored to each other, and all data is exactly the same. If the RAID 1 disk array data cannot be accessed due to a RAID controller failure or RAID information error, you only need to remove one of the two hard disks from the server and attach it to the computer as a separate hard disk to read the data.
If one of the disks in RAID 1 fails, it will not affect the normal operation of the server, and you need to replace the faulty disks with normal disks. If one hard disk fails to be replaced in time when one hard disk fails and the other hard disk also fails, the RAID 1 disk array fails. In this case, if you want to recover data, you need to use the hard disk that failed after the data recovery.
RAID0 is the most fragile form of disk array among all disk arrays, RAID0 disk arrays do not have any redundant performance, as long as one hard disk in the array fails, server data will be lost, so it is a very risky form of array. As can be seen from the following figure, the data of raid0 is distributed to each disk, and if any hard disk in the server fails, the data of the server will be incomplete.
Data recovery for the RAID 0 disk array requires the data recovery engineer to reassemble all the data in the array, and because the RAID 0 array is no longer available, the hard disk can only be taken out of the RAID controller as a single hard disk for analysis and data recovery.
As shown in the figure above, for a single hard disk 1, the data in it is a e i m, and the data in hard disk 2 is b f j n, all of which are only partial data, and only all the hard disk data in the array are divided into a b c d e f g h··· Only by splicing this sequence can the data in the RAID0 array be truly recovered.
So how to stitch all the hard disk data in the raid0 array in order, here need to pay attention to two factors, one is the size of each data block in the raid0 disk array, that is, the number of sectors occupied by the data blocks of A or B; Another factor is the order in which the drives in the RAID 0 array are arranged, which means that you need to determine which drive is the first drive in the array, which is the second drive, which is the third...
The raid0 disk array in the above figure is an example, we assume that the size of the data block is 16 sectors, and the order of the hard disk is taken as an example in the figure, then we only need to extract the information of 0 15 sectors in hard disk 1, and then extract the information of 0 15 sectors in hard disk 2, and then extract the information of 0 15 sectors in hard disk 3, and then extract the information of 0 15 sectors in hard disk 4, and then return to hard disk 1 to extract the information of 16 31 sectors... And so on, you can extract all the data in this raid0 array.
The distribution of data in a RAID5 array is similar to that in a RAID0 array, except that there is always a check block in each parallel data block in RAID5, as shown in the figure below, P1 P2, P3, P4. RAID 5 supports normal access to data in the event of a hard disk being disconnected, but if two or more hard disks are offline at the same time, the array will fail, and the disk array needs to be reorganized. The data reorganization method of RAID 5 is the same as that of RAID 0, and the data in the hard disk only needs to be spliced in order.
Since there is check information in each hard disk in the RAID 5 array, the position and orientation of one more check block need to be analyzed when analyzing the RAID 5 array than the RAID 0 array. In other words, there are three factors in the RAID 5 array analysis, which are the order in which the disks are arranged, the number of sectors occupied by each data block, and the size of each data block in the array.
Original address: