Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the solution for storing raid crashes

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you what the solution to the storage raid crash is. The content is concise and easy to understand. It will definitely make your eyes shine. I hope you can learn something from the detailed introduction of this article.

A company uses raid5 disk array. Due to unknown reasons, the storage suddenly crashes and cannot be started. All virtual machines in raid5 array are lost. Among them, 3 virtual machines are important data. Data recovery needs to be carried out mainly for these 3 virtual machines.

First, analyze the storage hierarchy and formulate a data recovery plan.

Through communication with customers and analysis of raid array, it is concluded that the underlying structure of failed storage is composed of several physical disks forming a storage pool, divided into multiple luns, and lun1 needs data recovery, including 3 virtual machines with key recovery. As shown below:

storage structure

Second, try to reassemble the raid to recover the raid array data.

During the analysis and reorganization of the array, it was found that the raid5 array in the user's original storage was missing 2 hard disks in total, and the hot spare disk had been enabled. (The process of restoring the fault is: after the first hard disk is disconnected, the system starts the hot spare disk to replace it; when the second hard disk is disconnected, raid 5 is in a degraded state; when the third hard disk is disconnected, raid array crashes.) In this case, it is usually impossible to obtain the data of the lost disk directly through verification, so it can only be reorganized by using an all-zero mirror of the same disk size (because the raid file system structure composed of relying on empty mirrors will be severely damaged, equivalent to two blocks of data missing per stripe, so this is not recommended unless it is common).

rebuild the raid

Third, extract LUNs through a reorganized raid array.

Through further analysis of the storage structure, we can obtain the MAP blocks of the storage partition, and then parse the data block pointers of each LUN, and extract LUN fragments by writing data extraction programs (also with the help of North Asia data recovery tools). After extraction, fragment stitching is performed to form a complete LUN.

Extract LUN

Fourth, export all virtual machines in the LUN and try to start.

Because the VM name involves customer privacy and the export process is relatively simple, it is not repeated here. After exporting the virtual machine, try to start it, as expected, the operating system is destroyed and the virtual machine cannot be started.

5. Extract files from the virtual machine.

Since the virtual machine could not be started, only the files in the virtual machine could be extracted, but most of the files were severely damaged and only a few files were available, so other data recovery schemes had to be continued.

VI. Extract data by analyzing database pages.

The virtual machine of this data recovery has mysql database, which can scan data pages and extract data by taking advantage of the particularity of the underlying storage of database. (Note: Snapshots are enabled for virtual machines. If both parent disks and snapshot files are damaged, the normal merge operation cannot be completed. Use the VMFS snapshot merge program independently developed by our company to merge snapshots.) Data recovery process screenshot below

7. Obtain mysql data page and analyze it.

Scan and export data pages according to mysql data page characteristics (innodb engine can use this scheme, myisam is unavailable because there is no concept of "data page"), analyze system table to obtain information of each user table, and divide data pages according to id of each table. Because the table content involves user privacy, there is no picture here.

VIII. Extract table structure and extract records.

Because the database has been used for a long time, the table structure has been changed many times, and some data is lost after the storage of the system table is damaged, the record extraction process encounters great resistance. First, obtain the table structure of each table in the initial version of the database: because the parent disk before merging snapshot was written earlier, use the first dropped disk to verify and obtain the complete data of this file, and then extract the table structure of each table in the database, and then the client provides the latest version of the database table creation script.

Extract data records by using two different sets of table structures and import them into mysql database in recovery environment, then eliminate garbled data caused by table structure change in each table, and finally export the two sets of data as.sql files respectively.

9. Data verification, raid data recovery successful.

Because the two versions of the database table structure is different, so contact the customer's application engineer for debugging. After debugging, import the platform. The platform debugging is successful. The data recovery is successful.

What is the solution to the storage raid crash? Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report