Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the repair method of xfs file system

Shulou Source: shulou.com Published: 2022-06-01 05:15:25 10月04日 Update

This article introduces the relevant knowledge of "what is the repair method of xfs file system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First try the mount and umount file systems to replay the logs and repair the file system, and if not, do the following.

1. Check the file system: make sure umount first

Xfs_check / dev/sdd (drive letter); echo $?

Return 0 to indicate normal

2. Execute xfs_repair-n to check if the file system is corrupted, and how to do so will list the actions to be performed.

If you are lucky, you will find that there is no problem, you can skip the follow-up operation.

This command will indicate what changes will be made, which is usually very fast, even if the amount of data is large, there is no reason to skip it.

3. Execute xfs_repair to repair the file system

Xfs_repair / dev/sdd (fsck for ext series tools)

4. the last method: the repair method of losing part of the data.

According to the print message, when the repair fails:

First execute xfs_repair-L / dev/sdd (clear the log, you will lose the files), then execute xfs_repair / dev/sdd, and then execute xfs_check / dev/sdd to check whether the file system has been repaired successfully.

Note:-L is the last resort to repair the xfs file system, choose carefully, it will empty the log, will lose user data and files.

Note:

Before performing a xfs_repair operation, it is best to use the xfs_metadump tool to save the metadata, and if the repair fails, you can at least return to the state before the repair.

Xfs_metadump is a debugging tool, which can be ignored or skipped.

This is the end of the content of "what is the xfs file system repair method". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Files systems methods data tools logs checks contents situations more knowledge no practical great lucky successful successful and then at the very least commands Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Apple Xiaomi OPPO Reno