In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to recover the Linux file system mistakenly mounted to the Ocfs2 file system data volume. Many people may not know much about it. In order to let everyone know more, Xiaobian summarizes the following contents for everyone. I hope you can gain something according to this article.
What is Linux File System?
Files in Linux file system are collections of data. File system contains not only the data in files but also the structure of file system. All files, directories, soft links and file protection information seen by Linux users and programs are stored in it. Linux is an operating system with stable performance, powerful functions and high efficiency. It is similar to Unix system in functional characteristics, but also has several characteristics such as multitasking, multi-user, multi-platform and so on.
II. Fault Description
Due to user misoperation, the Linux file system is mistakenly mounted on the data volume of Ocfs2 file system, resulting in the original Ocfs2 file system being newly formatted Ext4 file system. According to the understanding of the two file system formatting methods, Ext4 file system will write the original information of the file system every few hundred megabytes, and the user's data may be damaged to a certain extent.
III. Backup data
1. Map storage to backup servers in read-only mode.
2. Use dd, Winhex and other professional backup tools to mirror all the data mapped to the backup server.
3. After all mirroring, restore all storage configurations and links to the initial state. After that, the data recovery operation will not do anything to the original hard disk.
Figure 1:
IV. Fault analysis
1. Analyze the ocfs file system structure
Find the super block of ocfs2 file system, obtain some basic structure information of the file system by analyzing the super block, and then find the directory entry of the virtual disk file according to the virtual disk file name given by the customer, and then find all the corresponding primary index entries and secondary index entries, and use the file system parsing program developed by ourselves to parse the backed up data. The index entry structure for the ocfs2 file system is as follows.
Figure 2:
2. Repair file system
Repair corrupted file systems, perform consistency checks on the original Ocfs2 file system, and manually repair corrupted areas.
V. Data recovery
1. Generating data
Parse the repaired Ocfs2 file system using a self-developed parsing tool for the Ocfs2 incomplete file system. According to the result of file system analysis, write corresponding data extraction program, recover each virtual disk file to the greatest extent by using program, and check the consistency of each recovered virtual disk file.
2. File detection and repair
Parse the recovered virtual disk file, verify that the virtual disk file has errors, and attempt to repair it. Recover user files, perform consistency checks on recovered user files, and attempt to repair damaged files.
VI. Validation data
1. Verify the virtual machine
For users more important virtual machines to do verification, found that most virtual machines can be booted, can go to the login interface. Some virtual machines boot blue screen or boot detection disk, but after entering the CD repair can be started.
In addition, after a disk file of a virtual machine is recovered, it is found that there is no data in the virtual machine through analysis, and the analysis of the virtual disk file is continued. It is found that the index items of the file exist, but the index structure is not much, and the data amount is also very small. It is possible that there are cases where it is considered to be cleared or modified, or there is not much data in the virtual machine.
2. Verification database
Verify the databases in the key virtual machines and find that the databases are normal. Some databases may have certain problems with the application interface. After the user contacts the staff of the original application, after repair, the database can be used normally.
VII. Transfer of data
Due to time constraints, first use the professional tool "UFS" to export the virtual machines in ocfs2 in turn. Then arrange for engineers to bring the virtual disk data from the R510 server to the user site.
Connect the R510 server to the user's internal network using a network cable on site, then upload the virtual machine disk files to the user's server through NFS sharing, and mount the virtual machine through ovm virtual machine management tool. Since the number of virtual machines is not many and the size is not very large, the data handover is completed relatively quickly.
During the entire data recovery process, the analysis of the ocfs2 file structure takes up a lot of time. According to the formatting characteristics of the ext4 file system, the Ext4 file system will write the original information of the file system every few hundred megabytes, causing little damage to the user's data. After the data recovery is completed, the user agrees with our recovery results.
After reading the above, do you have any further information on how to recover data volumes that Linux file systems mistakenly mount to Ocfs2 file systems? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.
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.