当前位置:网站首页>Storage crash MySQL database recovery case
Storage crash MySQL database recovery case
2022-06-24 02:55:00 【North Asia data security and rescue】
RAID5 disk array , The storage suddenly crashes and cannot be started due to unknown reasons ,RAID5 All virtual machines in the array are lost , among 3 Virtual machines are important data , Need to focus on this 3 Virtual machines for data recovery .
The customer described the fault process as : After the first hard disk is disconnected, the system starts the hot spare disk for replacement , When the second hard disk is disconnected RAID5 In a degraded state , The third hard disk is disconnected, resulting in RAID Array crash . Let's take a look at how North Asia engineers operate !
One 、 Analyze the storage bottom hierarchy
Engineers communicate with customers and RAID The analysis of array shows that the underlying structure of fault storage is a storage pool composed of several physical disks , Divided into several LUN, Data recovery is required LUN1, It includes the key recovery 3 Virtual machines .
When the array is analyzed and reorganized, it is found that there are RAID5 Array common missing 2 Block hard disk , The hot spare has been enabled . In this case, the data of the lost disk cannot be directly obtained through verification , Therefore, you can only use full disks of the same size 0 Reorganize the image .
Two 、 Through reorganization RAID Array extraction LUN
Through the further analysis of the storage structure, we can get the storage partition MAP block , And then for each LUN The data block pointer of , By writing a data extraction program 、 extract LUN debris . After extraction, the fragments are spliced , Complete composition LUN.
3、 ... and 、 Extract the files in the virtual machine .
According to the present situation, the Engineer , This failure condition starts after exporting the virtual machine , The virtual machine should fail to start because the operating system is damaged . After exporting the virtual machine, try to start , Same as expected , The operating system is damaged and the virtual machine cannot be started . Because the virtual machine could not start , Only files in the virtual machine can be extracted , But most of the files are seriously damaged , Only a few files are available , We have to continue to work out other data recovery schemes .
Four 、 Extract data by analyzing database pages
The virtual machine for this data recovery contains mysql database , You can use the particularity of the underlying storage of the database to scan data pages , Extract the data .( There is an episode in this step , Virtual machine enable snapshot , When both the parent disk and the snapshot file are damaged, the normal merge operation cannot be completed , Use the company's independent research and development VMFS The snapshot merging program performs snapshot merging .)
5、 ... and 、 obtain mysql Data page and analyze
according to mysql Data page features scan and export data pages (innodb The engine can use this scheme ,myisam Because no “ Data pages ” The concept is therefore not available ), Analyze the system table to obtain the information of each user table , According to the... Of each table id Split the data page .
6、 ... and 、 Extract table structure 、 Extract record
Because the database has been used for a long time , The table structure has also changed many times , In addition, some data is lost after the system table is damaged , There is a lot of resistance in the record extraction process . First, get the table structure of each table in the original version of the database : The parent disk before the snapshot was merged because it was written earlier , Use the first drop disk for verification to obtain the complete data of this file , Then extract the table structure of each table in the database , After that, the client provided the latest version of the database table creation script .
Two groups of different table structures are used to extract data records and import them into the recovery environment mysql In the database , Then eliminate the garbled data caused by the change of table structure in each table , Finally, the two sets of data are exported as .sql file .
7、 ... and 、 data validation
Because the database table structures of the two versions are different , So I contacted the application engineer of the client for debugging . Import the platform after debugging , Platform debugging succeeded , This data recovery is successful .
边栏推荐
- South Korea's national network is disconnected. Who launched the network "attack"?
- What is the performance improvement after upgrading the 4800h to the 5800h?
- Implementing an ORM framework against SQL injection with builder mode
- 2022-2028 global cancer biopsy instrument and kit industry research and trend analysis report
- Start tcapulusdb process
- Pan micro reached cooperation with Tencent to help enterprises connect with banking services and support enterprise digital upgrading
- LeetCode 205. Isomorphic Strings
- How does easydss handle the problem that the sharing page cannot be opened due to cache problems?
- [51nod] 3395 n-bit gray code
- CPS November additional incentive rules
猜你喜欢

Permission maintenance topic: domain controller permission maintenance
Cloudpods golang practice
![[51nod] 2106 an odd number times](/img/af/59b441420aa4f12fd50f5062a83fae.jpg)
[51nod] 2106 an odd number times

2022-2028 global indoor pressure monitor and environmental monitor industry research and trend analysis report

IOS development - multithreading - thread safety (3)

2022-2028 global cell-based seafood industry research and trend analysis report

2022-2028 Global Industry Survey and trend analysis report on portable pressure monitors for wards

2022-2028 global marine clutch industry research and trend analysis report

2022-2028 global third-party data platform industry research and trend analysis report

2022-2028 global anti counterfeiting label industry research and trend analysis report
随机推荐
How does easynvr call the interface to modify a user-defined page?
The reason why SAS fortress cannot connect to the server
Mutual conversion between qstring and qdatetime
Wkwebview audio and video media playback processing
2022-2028 global cell-based seafood industry research and trend analysis report
LeetCode 724. Find the central subscript of the array
Coding -- the leader of R & D tools in the cloud native Era
LeetCode 599. Minimum index sum of two lists
AI intelligent analysis is innovated again. In the future, the technical reserve of the security industry will become the top priority
Go language core 36 lecture (go language advanced technology 8) -- learning notes
What are the benefits of rack servers for cloud desktops? What can cloud desktop do?
Flink practice tutorial: getting started 1- zero basic users realize simple Flink tasks
File access methods on Fortress server how to log in to the server
How to access easynvr management platform through web pages without data?
What is etcd and its application scenarios
[tcapulusdb knowledge base] manually view the online operation of tcapulusdb
Cloud call: one line of code is directly connected to wechat open interface capability
Where is the domain name filed? What materials are required for domain name filing?
Tidb HTAP Getting Started Guide - how to add a copy of tiflash
Official spoilers! Figure 1 understand Tencent security @2021 Tencent digital ecology Conference