In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Faulty equipment information:
Server: X3850 server
Hard disk type: SAS, capacity: 146g 4 hard drives constitute RAID5
File system: Reiserfs
2. Fault analysis of Reiserfs file system:
1. After analysis, it is found that the previous hard disk data organization structure is made up of a boot partition of less than 100m, followed by a 271g LVM volume, followed by a 2G swap partition. A reiserfs file system is directly divided into the LVM volume as the root partition.
2. In the process of use, the system was paralyzed for unknown reasons. After the collision of the system, it was found that the entire RAID logical volume became the boot and swap partition of the previous 2G, followed by the 271g LVM volume, and there was an empty reiserfs super block in the file system location of the LVM volume.
3. The data we want to recover this time is all the user data in the original 271g file system, which includes the database, website programs and web pages, and all the office documents in the unit OA system.
3. Reiserfs file system solution:
1. First, the original reiserfs partition location is determined through the association between the overall reiserfs tree nodes, and it is found that the first 2G data of the original file system where the data is stored has been overwritten, and it is judged that the user initialized the partition structure wrongly when installing the system, so the installed system can not import LVM volumes and tried to repair it with reiserfsck.
2. Because the reiserfs file system linearizes all the files (including directories) in the file system, and then generates a B + tree with file key, the continuous increase of nodes in the tree will cause the overall structure of the tree to stretch and migrate smoothly to the data area of the entire disk. As a result, the top-level node is not usually placed at the front of the file system. Because the file KEY number of the root directory is usually the lowest, from a spatial point of view, the most stored in the first 2G should be the key node closest from the root start path.
3. In this way, due to the deep level of the directory, the possibility of the existence of nodes is very high. The data covered by the first 2G can no longer be recovered, so we can only hope that the user data will not be overwritten exactly. Because the index of the whole tree in front of the file system is lost, and the tree concept of reiserfs is very abstract, it will be difficult to rebuild the tree.
4. We scan the key nodes in the whole area of the original file system and export all the nodes through the autonomous program. Then all the leaf nodes are reordered and filtered by the autonomous program (get rid of the nodes that were previously deleted), and the secondary, tertiary and fourth-level leaf nodes are regenerated. The 2G space in front of the partition is selected as the structure area of the new tree, and the corresponding address information is generated.
5. Deal with the directory naming problem. If a node in the original tree path is lost, name it with a custom key node number. If you cannot determine its parent directory, temporarily add it to / otherfiles. According to the above face, spanning tree index information is written to a specific location, and then according to this information, super blocks are generated and the clear flag is set. Under the suse virtual machine, create a snapshot, mount the repaired volume, and you can already see the file. (note: virtual machines and snapshots can be traced back for the purpose of operation, and because metadata such as bitmap does not affect the data, no correction has been made, so you cannot do reiserfsck before mounting).
6. Mount the target hard disk for copy data under the suse virtual machine for repair, and then cp all the data to the target disk after mkfs. The user collates the required data through the find command and modifies the location and name of some directory files. Part of the missing loose files, according to the size and file header flag to find, find and move and rename.
4. Data recovery results of Reiserfs file system:
After the engineer's processing and analysis, the data has been successfully recovered and can be used normally, so the data recovery work is over.
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.