Introduction to disaster emergency solutions for LinuxFSCK data errors

Source: Internet
Author: User
Article Title: Introduction to the disaster emergency solution for LinuxFSCK data errors. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. [Applicable]
 
1. File System: ext2 ext3 reiserfs xfs, etc.
 
2. Range: indicates that FSCK is not executed or FSCK is completed when the file system needs FSCK.
 
[Symptoms]
 
1. partitions cannot be mounted;
 
2. A large number of files and directories are LOST. The/LOST + FOUND folder is generated under the root directory, which contains a large number of # XXXXXX files and directories;
 
3. FSCK quickly reports an error;
 
4. A large number of prompts are prompted when FSCK is executed, such as modifying nodes and clearing 0 nodes.
 
   [Emergency plan]
 
1. Be careful when FSCK is prompted. If possible, disconnect the system as soon as possible and all UMOUNT partitions.
 
2. When you need to execute FSCK, first prepare for the job. Method 1: you can use the dd command in advance to output the involved partitions to another storage body (it is best not to make dd on the wrong storage body itself). The command structure is as follows: dd if =/dev/sda0 of =/dev/sdb0 ......
 
3. Prepare for FSCK execution. Method 2: mount the entire LINUX storage body to the virtual machine environment, set the LINUX storage body to the Nonpersisten mode, and then run the command, if the data is intact, it should be copied out through FTP and other methods as soon as possible.
 
4. Prepare for FSCK execution. Method 3: mount the entire LINUX storage body to another system (such as WINDOWS), prepare the image, and then run FSCK.
 
5. If the above methods are unable to be implemented due to conditions or other reasons, you can carefully observe the FSCK execution prompt (turn off-a) when you must execute them) if any information such as a prompt node error needing to be corrected or cleared, or the node description file size is incorrect, stop executing FSCK.
 
6. for recovery, You need to refer to a lot of information. As far as possible, you should not MOUNT the partition again (even if you do not perform any read/write operations, it will also reduce the possibility of data recovery and increase the difficulty of data recovery due to the working principle of the system)
 
7. seek help from professional data recovery companies.
 
   Disk Mirroring solution:
 
1. You can use a hard disk of the same or greater than the source disk capacity as the target disk, and CLONE all sectors of the source disk to the target disk.
 
2. The source disk can be output to a large storage space (such as large-capacity hard disk, NAS, SAN, and DAS) in full sector mode)
 
Enter the Root password and use fsck-t ext3-r/usr/local to fix the issue.
 
How to Use the fsck command
 
Command: fsck
 
Permission: Super User
 
Usage: fsck [-sACVRP] [-t fstype] [?] [Fsck-options] filesys […]
 
Note: Check and repair the Linux File System. You can check one or more Linux file systems at the same time.
 
Parameters:
 
Filesys: device Name (eg./dev/sda1), mount point (eg./or/usr)
 
-T: specifies the type of the file system. This parameter is not required if a definition is already defined in/etc/fstab or is supported by the kernel.
 
-S: Execute The fsck command one by one in sequence to check
 
-A: Check the partition of all columns in/etc/fstab.
 
-C: displays the complete check progress.
 
-D: print the debug result of e2fsck.
 
-P: When both-A conditions exist, multiple fsck checks are executed together.
 
-R: if both-A conditions are available, this parameter is omitted/not checked.
 
-V: Detailed Display Mode
 
-A: If the check is incorrect, it will be automatically repaired.
 
-R: if the check is incorrect, the user will answer whether the problem is fixed.
 
Example:
 
Check whether/dev/hda5 of the msdos file system is normal. If an exception exists, it is automatically repaired: fsck-t msdos-a/dev/hda5
 
Note:
 
This command can be used with/etc/fstab for reference operations.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.