Reiserfs file system to solve the problem of damage we are serious

A fault device information:
Server: X3850 server
hard disk type: the SAS, capacity: 146G 4 drives composition RAID5
file system: Reiserfs
two, Reiserfs file system fault analysis:
1. The analysis found that the previous hard disk data organization structures by a less than 100M boot partition, followed by a 271G LVM volume, followed by 2G swap partition. LVM volume divided a direct reiserfs file system, as the root partition.
2, the user during use, the system encounters an unknown reason paralyzed after collision system found after the entire RAID logical volume into a swap partition boot with the front 2G, 271G followed LVM volume, the LVM volume file the system has an empty location reiserfs superblock.
3, this time we want to restore the original data is 271G in the file system of all user data, which includes database, web application and web pages, the unit OA system in all office documents.
Reiserfs file system to solve the problem of damage we are serious
Three, Reiserfs file system solutions:
1, by correlation between the overall reiserfs tree nodes determined reiserfs partition the original location, the original data found before the 2G system for storing data files have been covered, the user should be determined at the installation system error initializing the partition structure, so the installed system can not import an LVM volume and done reiserfsck trying to fix.
2, because the reiserfs file system for all files in the system (including directory) linearized, then the file key to generate a B + tree, the tree increasing the nodes results in a tree structure of the overall deshirr make the entire disk data region smoothing migrate. As a top-level node does not usually on the front of the file system. KEY file number because the root is usually minimal, so, from the point of view of space, before 2G should be stored in the most recent start path from the root node key.
3, so that the user data due to deep directory hierarchy, there is the possibility of node high. Data before 2G coverage has been unable to recover, we can only hope it will not just cover the user data. The file-system-wide loss due to index the entire tree, plus a reiserfs tree design concept is very abstract, heavy build tree will be very difficult.
Reiserfs file system to solve the problem of damage we are serious
4, our key export all nodes and node scans through independent program in the entire original file system area. Then reordered by the autonomous procedure for all leaf nodes, filtered (to remove the deleted files before discarding the node), to regenerate the two, three, four and other leaf nodes. 2G selective front partition spatial region as the new tree structure, and generates the corresponding address information.
5, directory naming deal with issues such as encountered in the case of the original tree path of a node is lost, its name with a custom key node number can not be determined as the parent directory, temporarily adding up / down otherfiles. Based on the face, the spanning tree index information, writing a specific location, and then based on this information, generates the super block, setting flag clear. Under suse virtual machine, create a snapshot, mount the repaired volume, can already see the files. (Note: the purpose of the virtual machine and the snapshot operation to be added traceability data without affecting the result of the metadata bitmap like, without making the correction, it can not be done before loading reiserfsck).
6, in use suse repair a virtual machine, mount the target hard disk, mkfs will copy all the data cp data to the target disk. Users find command to sort the data needed to amend part of the directory the file location and name. Partial loss of scattered documents, according to the size of the file header flags look, move and rename the find.

Four, Reiserfs file system data recovery results:
After engineers for analysis, the data has been successfully restored, and can be used normally, thus data recovery end of the work.

Guess you like

Origin blog.51cto.com/sun510/2459547