In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
How to recover data after a server ZFS file system failure? Many people do not quite understand, today, in order to let you know more about the process of data recovery, so let's sum up the following content, let's look down together.
1. Deployment introduction of server data recovery environment:
The server model of the successful data recovery case introduced to you today is ORACLE-SUN-ZFS7320. 32 hard disks are involved in the server, and the server is operated by Windows operating system.
II. Failure of server data recovery
The server suddenly crashes during normal operation, and there are no external factors such as power outage, water intake, abnormal operation, instability of the computer room and so on. After rebooting the device, the server administrator found that he could not enter the system and needed to recover the data in the server.
Analyze the underlying data of the server disk
The server administrator mirrors all the hard disks at the sector level and sends the mirror files to the data recovery center for data recovery. Server data recovery engineers analyze the underlying data of the customer's failed server and get the following information: the failed server uses zfs file system; all disks are divided into 4 groups with 8 hard disks in each group; hot spares are all enabled.
IV. Analysis of server failure
In the server ZFS file system, the pool is called ZPOOL. There can be many types of sub-devices for ZPOOL, including block devices, files, disks, and so on. In this case, one of them is used-three sets of RAIDZ as sub-devices.
After analysis, it is found that the number of hot spares in two of the three groups of RAIDZ is 1 and 3, respectively. After the hot spare is enabled, one offline disk still appears in the first group and two in the second group. In order to simulate the fault scene: the first and second groups in the three groups of RAIDZ appear offline disk respectively, and the hot spare disk is replaced in time; in the non-redundant state of hot spare disk, one offline disk appears in the first group, and two offline disks appear in the second group, and the ZPOOL enters a high load state (each time the data needs to be checked to get the correct data); the third offline disk appears in the second group, RAIDZ crashes, ZPOOL goes offline, and the server crashes.
5. Reorganize ZPOOL and track data entry
Unlike regular storage, ZFS manages storage pools where all disks are managed by ZFS. When storing data, a regular RAID only sets up pools according to specific rules and does not care about the location of files on child devices. ZFS allocates an appropriate amount of space for each write during data storage, and calculates the data pointer to the child device. This feature makes it impossible to check the data directly when the RAIDZ is missing, so the whole ZPOOL must be parsed as a whole.
Manually intercept transaction block data, write a program to obtain the maximum transaction number entry:
Get the file system entry
After obtaining the entry of the file system, write a data pointer parser for address resolution:
Parsing data pointer
After obtaining the file system entry point distribution of each disk, we begin to manually intercept and analyze the internal structure of the file system. The disk group in which the entry distribution is located has no missing disk, and the information can be extracted directly. According to the data storage structure of the ZFS file system, we can successfully find the customer-mapped LUN name, and then find its node.
Write a data extraction program and run it
After careful analysis, it is found that the ZFS version in this storage is quite different from the open source version, and can not be parsed using the parser originally developed by the company, so the data extraction program is rewritten.
Data extraction program
Due to the large number of missing disks in the disk group, each IO stream needs to be checked, and the extraction progress is very slow. After communicating with the customer, it is learned that this ZVOL volume is mapped to XenServer as a storage device, and the files required by the customer are in one of the vhd with a size of about 2T. The header information of ZVOL volume is extracted and analyzed according to the storage structure of XenStore volume. It is found that 2T vhd is at the end of the whole volume, and its starting position is calculated and the data is extracted from this position.
Verify the integrity of the data and restore the server data successfully
After the Vhd extraction is completed, the internal compression package and pictures, videos and other files can be verified, and can be opened normally.
Contact the customer to verify the data and make sure that the number of files is consistent with the number of files automatically recorded by the system. Verify the availability of the files, all the files can be opened normally, and the server data is restored successfully.
After reading the appeal, do you have a general idea of how to recover data after a failure of the server's ZFS file system? If you want to know more, welcome to follow the industry information channel!
As a senior professional cloud computing service provider and cloud security service provider in the industry, it is committed to providing cloud host rental services such as "cloud servers, bare metal servers, high defense servers, Hong Kong servers, American servers" and comprehensive solutions on cloud for the vast number of Internet enterprise users and enterprise users in traditional industries. It has the characteristics and advantages of "security and stability, easy to use, high service availability, high performance-to-price ratio". It is specially customized for enterprises on the cloud, and can meet the needs of rich and diversified application scenarios.
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.