Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the data volumes mistakenly mounted to the Ocfs2 file system by the Linux file system?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

What about the data volumes mistakenly mounted to the Ocfs2 file system by the Linux file system? I believe that many novice rookies can do nothing about this. Through the summary of this article, I hope you can find a solution.

What is the Linux file system

The file in the Linux file system is a collection of data. The file system contains not only the data in the file, but also the structure of the file system. All the files, directories, soft connections and file protection information seen by Linux users and programs are stored in it. Linux is an operating system with stable performance, powerful function and high efficiency. It is similar to Unix system in functional characteristics, but also has several characteristics, such as multi-task, multi-user, multi-platform and so on.

Second, fault description

Due to the misoperation of the user, the Linux file system is mistakenly mounted on the data volume of the 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, the Ext4 file system will write the original information of the file system every few hundred megabytes, and the user's data may be destroyed to a certain extent.

3. Backup data

1. Map storage to the backup server in read-only mode.

2. Use professional backup tools such as dd,Winhex to mirror all the data mapped to the backup server.

3. After all mirroring is done, restore all storage configurations and links to the initial state, and then the data recovery operation does not do anything to the original hard disk.

Figure 1:

IV. Fault analysis

1. Analyze the structure of ocfs file system

Find the super block of the ocfs2 file system, get some basic structure information of the file system by analyzing the super block, and then find the directory entry of the virtual disk file through the name of the virtual disk file given by the customer, then find all the corresponding first-level index items and second-level index entries, and use the self-developed file system parser to parse the backed-up data. The index entry structure of the ocfs2 file system is as follows.

Figure 2:

2. Repair the file system

Repair the damaged file system, check the consistency of the original Ocfs2 file system, and repair the damaged area manually.

5. Restore data

1. Generate data

Use the self-developed parsing tool for Ocfs2 incomplete file system to parse the repaired Ocfs2 file system. And according to the results of file system analysis, write the corresponding data extraction program, use the program to recover each virtual disk file to the maximum extent, and check the consistency of each virtual disk file recovered.

2. File detection and repair

Parse the recovered virtual disk file, verify that there is any error in the virtual disk file, and try to fix it. Restore the user files, check the consistency of the recovered user files, and try to repair the damaged files.

VI. Verify the data

1. Verify the virtual machine

According to the verification of the more important virtual machines of the users, it is found that most of the virtual machines can be turned on and can go to the login interface. Some virtual machines boot blue screen or boot test disk, but can be started after CD repair.

In addition, after the disk file of a virtual machine is recovered, it is found that there is no data in the virtual machine through parsing. We continue to analyze the virtual disk file and find that the index item of the file exists, but the index structure is not much and the amount of data is very small. It is possible that zero is cleared or modified, or that the virtual machine does not have much data in the first place.

2. Verify the database

After verifying the database in the key virtual machine, it is found that the database is normal. Some of the databases may have some problems with the application. After users contact the staff of the original factory of the application, after repair, the database can be used normally.

VII. Handing over data

Due to the shortage of time, first use the professional tool "UFS" to export the virtual machines in ocfs2 in turn. Then arrange for the engineer to bring the virtual disk data from the R510 server to the user site.

Use the network cable to connect the R510 server to the user's internal network in the field, then upload the virtual machine disk file to the user's server through NFS sharing, and then mount the virtual machine through the ovm virtual machine management tool. As the number of virtual machines is not very large and the size is not very large, the data transfer is completed quickly.

VIII. Summary of data recovery

In the whole process of data recovery, the analysis of ocfs2 file structure takes up a lot of time. According to the formatting characteristics of ext4 file system, Ext4 file system will write the original information of file system every few hundred megabytes, causing little damage to users' data. After the completion of data recovery, users agree with our recovery results.

After reading the above, do you know how to solve the problem that the Linux file system is mismounted to the data volume of the Ocfs2 file system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report