In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Storage done RAID-5, SCSI hard disk, operating system FreeBSD, file system zfs.
There are 12 hard disks in this case, 11 hard disks have data, and 1 hard disk is a hot spare disk. Among them, the sixth data hard disk has a failure, which needs to be removed when reorganizing.
Physical disk:
Physical disks refer to each individual physical hard disk used to create RAID. After RAID is formed, they are called RAID member disks.
DeRAID:
After a failure occurs, the physical disk is removed from the slot of the server for detection and analysis. Leaving the server slot, leaving the RAID controller, these hard disks are said to be "de-RAID."
1 Analysis steps
Main content:
·Preliminary determination RAID-5 start sector
·Block size (stripe size) analysis
·RAID-5 member order
·Check direction
·Data trends
1.1 Initial determination RAID-5 start sector
RAID start sector refers to the beginning of data within RAID on each physical disk (each individual physical hard disk used to create RAID). The starting sector exists only on a physical disk, and in most cases it is sector 0. Finding the starting sector is the first step. This example is RAID-5 composed of 12 hard disks, and the sixth hard disk fails. In the recovery example, we used WinHex to RAID 11 hard disks with data. As shown in Figure 1.
Fig. 1
Use WinHex synchronization function to position 11 disks in sector 0, you can see that only 3 disks in sector 0 of 11 disks have "55AA" mark, which are hard disks 1, 2 and 6 respectively, as shown in Figure 2. This flag indicates the MBR disk structure.
Fig. 2
Next, analyze which hard disk is the starting sector. Let's start with hard drive number six. The end of the 6th hard drive shows that this is a GPT header backup and is only 128MB in size. as shown in figure 3.
Fig. 3
The remaining disks 1 and 2 have a starting sector or parity in sector 0. This is the initial sector.
1.2 Block size (stripe size) analysis
Stripe, also known as block, is the basic unit of RAID processing data, and different RAID stripes vary in size. There are many ways to analyze stripe size. The size of a parity area is the size of a stripe. Based on this, we analyze this RAID-5 instance. This example uses the zfs file system, WinHex synchronous display 11 physical disk sectors, such as sector 53654656, found that this sector only disk 1 and other disk display is different, this is located in disk 1 verification area. Follow disk 1 up and down sector 53654656 and find 128 consecutive sectors. These 128 sectors are the stripe size of RAID-5. This band size positioning ends.
1.3 RAID-5 Member Disk Order
Disk No. 1 mentioned above does not refer to the first disk of RAID, that is to say, the order of physical disks does not necessarily mean the order of RAID, and manual verification is required. WinHex synchronously locates sector 53654656 of 11 hard drives. It is found that disk 1 is different from other disks. This is the verification area of disk 1. The next stripe of disk 1, i.e., 53654656+128=53654784 sectors, is analyzed, and disk 2 is different from the other disks, so the stripe of disk 2 starting from 53654784 sectors is the check area. Continuing in this way, the check area of disk 3 follows, the check area of disk 4... The resulting check area is shown in Figure 4, and the letter "P" indicates the check area. According to the position of the verification area, we can get the disk order, and the disk order of this example is exactly increasing from disk 1. We have already found that sector 0 of disk No. 1 and disk No. 2 is the starting sector or the check area due to analysis step 1. For the left structure, the physical disk with sector 0 as the starting sector must be RAID-5 disk 1, and for the right structure, the physical disk with sector 0 as the starting sector must be RAID-5 disk 2.
Fig. 4
1.4 check direction
RAID-5's basic structure has left synchronous, left asynchronous, right synchronous, right asynchronous. Left and right are for calibration direction, the difference is shown in Table 1 and Table 2. The RAID-5 instance we did was clearly right-sided.
table 1
We derive the parity direction of the entire RAID-5 from the direction of the parity area above, that is, the right direction, as shown in Figure 4. Check blocks in left synchronous and left asynchronous structures start from the last physical disk, and check blocks in right synchronous and right asynchronous structures start from the first physical disk.
There are two ways to judge the direction of verification, one is to analyze the starting sector first, then analyze the size of the band, and then the disk sequence, and the direction of verification is easy to see after the disk sequence analysis. Another way, if the disk order is not determined, only the starting sector and stripe size are determined, and the reverse method can be used. Using backstepping analysis, if the disk sequence has not been determined, the number of bands in the first check area of a disk can be calculated with this check area. The specific method is as follows: Find a certain check area, such as sector 53654912 of disk No. 3, and use this sector to calculate the remainder of the product of the stripe size and the number of disks. 53654912MOD(128*12)=256. The result of the calculation is equal to 256, indicating that sector 256 is a check. Disk No. 3 located in this sector is in the third stripe and is the beginning sector of the third stripe, and the following 128 sectors including sector No. 256 are the first check area of disk No. 3. Then judge the next strip of disk 1, and the next strip of disk 1 shows that disk 3 is the verification area. Then judge the next strip of disk 3, and the next strip of disk 3 shows that disk 3 is the verification area. From this, the direction of verification can also be obtained.
1.5 data trend
Synchronous asynchronous refers to the direction of data. In asynchronous structure, the data blocks in each band group are written sequentially from the lower disk to the higher disk. In the synchronization structure, the first data block in each stripe group is written on the physical disk next to the physical disk where the check block is located. If there is any physical disk behind the physical disk where the check block is located, the first data block is written sequentially from the physical disk in front of the physical disk where the check block is located to the high disk.
table 2
The following is the RAID-5 instance analysis process (it has been determined that this RAID-5 is the right fabric).
·Start with Block A. as shown in figure 5.
Fig. 5
First look at the data in the end sector of Block A, then look at the data in the beginning sectors of Block B and Block C. RAID-5 is asynchronous if the data in the last sector of Block A can be concatenated with the data in the beginning sector of Block B. RAID-5 is a synchronous structure if the data in the last sector of Block A is contiguous with the data in the beginning sector of Block C.
·Start with Block A. as shown in figure 6.
Fig. 6
First look at the data in the end sector of Block A, then look at the data in the beginning sectors of Block B and Block C. RAID-5 is asynchronous if the data in the last sector of Block A can be concatenated with the data in the beginning sector of Block B. RAID-5 is a synchronous structure if the data in the last sector of Block A is contiguous with the data in the beginning sector of Block C.
·Start with Block A. as shown in figure 7.
Fig. 7
First look at the data in the end sector of Block A, then look at the data in the beginning sectors of Block B and Block C. RAID-5 is a synchronous structure if the data in the last sector of Block A is contiguous with the data in the beginning sector of Block B. RAID-5 is asynchronous if the data in the last sector of Block A can be concatenated with the data in the first sector of Block C.
·Start with Block A. This is shown in Figure 8.
Fig. 8
First look at the data in the end sector of Block A, then look at the data in the beginning sectors of Block B and Block C. RAID-5 is asynchronous if the data in the last sector of Block A can be concatenated with the data in the beginning sector of Block B. RAID-5 is a synchronous structure if the data in the last sector of Block A is contiguous with the data in the beginning sector of Block C.
2 Reorganization RAID-5
Above we have parsed some important information about RAID-5, according to this information, we can reorganize RAID-5. Next we use the UFS Explorer tool to open and add these 11 hard disks. as shown in figure 9.
Fig. 9
Add 1.dsk to Connected stores on the left, as shown in Figure 10.
Fig. 10
Add all 10 RAID-5 disks. Click the Build RAID option and add all 10 disks in RAID-5 order to start building RAID-5, as shown in Figure 11.
FIG. 11
The sixth disk because of failure, all to be removed, and in its position to add a vacancy, and continue to add the order of other hard disks. As shown in Figure 12, click on the button at the red box to add a vacant hard drive.
FIG. 12
Then select the check direction and data trend, the stripe size of this example is 28 sectors, that is, 65KB, right asynchronous structure. So the setup is as shown in Figure 13.
FIG. 13
Then click the Build button, which appears as shown in Figure 14. Click find and select the zfs file system.
FIG. 14
RAID-5 is being built as shown in Figure 15.
FIG. 15
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.