Superblock mount Time is on the Future (reprint)

Source: Internet
Author: User

I'm using centOS6.3, and I'm using the virtual machine to reboot with the following error message.

/dev/mapper/root:superblock Last Mount Time (Mon Mar 5 17:40:11 2012,
now = Sat Mar 5 18:46:53
/dev/mapper/root:unexpected inconsistency; RUN fsck manually.
(i.e., without-a or-p options)
[FAILED]
An error occurred during the file system check.
dropping to a shell; The system would reboot
When you leave the shell.
Given Root password for maintenance
(or type control-d to continue):

The solution was later found:

Enter the password directly in the "(or type control-d to continue):", go to repair mode, run the fix in the form of fsck <partition name>, and your run Fsck/dev/mapper/root, Then reboot, reboot may also prompt other disks to appear the same error, according to the form of fsck <partition name> run again, and then reboot, on the virtual machine test can be started

Let's take a look at the role of the fsck command.

Check the fix Linux file System command fsck

Usage rights: Super User

Usage: fsck [-SACVRP] [-t fstype] [--] [fsck-options] file sys [...]

description: In Linux systems, in order to increase system performance, usually the system defaults to some data written in memory and does not directly write data to the hard disk, because the memory speed is several times faster than the hard disk. But there is a problem, in case of "power off" or other unknown reasons, causing the system to panic, what to do? The system crashes. So, we need to get the data back to the hard drive at a specific time. Here are a few common commands, where the fsck command is the most important. When a file system error occurs, the FSCK command can be used to try to fix it. Use a partition number (such as/DEV/HAD3) directly, or specify a file system using mount points (mount point, such as/,/usr, and so on).  If you specify multiple file systems at one time, and those systems are on separate physical disks, fsck will try to check them in a synchronized way to save time.

Parameter:

Filesys:device name (eg./dev/sda1), mount point (eg.///usr)
-t: The type of the given file system, if it is already in/etc/fstab The definition or kernel itself is supported without this parameter
-S: Execute the fsck command one by one to check
-A: Check for all columns in/etc/fstab partition
-C: Shows the complete check progress br>-D: Print e2fsck debug Result
-P: While there is a-a condition, there are multiple fsck checks performed together
-V: Verbose display mode

-A: If there is an error, automatically fix
-r: If the check is wrong, the user answers whether to fix

Additional notes:
  
Example:
Check whether the/dev/hda5 of the Msdos file system is normal and fix it automatically if there is an exception:
Fsck-t msdos-a/dev/hda5
  
Attention:
  
This instruction can be understood with/etc/fstab mutual reference operation.

Example: Checking/dev/sda3
[Email protected] ~]# fsck-c-T ext3/dev/sda3fsck 1.39 (29-may-2006) e2fsck 1.39 (29-may-2006)/dev/sda3 is Moun Ted.
WARNING!!! Running e2fsck on a mounted filesystem may causesevere filesystem damage.
Do you really want to continue (y/n)? Yes
/home:recovering Journal/home:clean, 11/524288 files, 25399/524120 blocks# All normal will appear above information
#主意通常只有ROOT且系统有问题的时候才用这个命令, otherwise using this command in a normal state may damage the file.

Related knowledge:

Introduction to the disaster contingency plan for Linux fsck data error

[Applies To]

1. File system: ext2 ext3 reiserfs XFS, etc.

2. Scope: When the file system requires fsck, no execution or fsck execution is complete

Symptoms

1, unable to mount the partition;

2, a large number of files, directories lost, root directory generated/lost+found folder, there are a large number of #xxxxxx class files and directories;

3, fsck quickly error completion;

4, fsck execution, there are a lot of hints, such as modify nodes, clear 0 nodes and other operations

[Contingency plan]

1. Please be careful when you are prompted to fsck. If possible, disconnect the system as soon as possible, umount all partitions.

2, must perform fsck, first do the preparation work, method one: You can use the dd command to output the partition involved in the other storage (preferably do not make DD on the wrong memory itself) command approximate structure can be as follows: DD if=/dev/sda0 of=/dev/ Sdb0 .....

3, must perform fsck, first do the preparation work, method two: Mount the entire Linux storage to the virtual machine environment, the Linux storage body is set to Nonpersisten mode, then execute, after execution, if the data is intact, should be copied out as soon as possible through FTP.

4. When you must perform fsck, do the preparation, method three: Attach the entire Linux storage to other systems (such as Windows), and then do fsck after mirroring.

5, such as the above several methods due to conditions and other reasons can not be implemented, must be executed, you can watch the execution of Fsck carefully (turn off-a) if you find a hint node error needs to correct or clear 0, the node description file size is incorrect information, should stop the execution of fsck.

6, because the recovery needs to refer to a lot of information, as far as possible to maintain the system is not working, at least not to mount the partition again (even if you do not do any read and write operation, the system will continue to reduce the possibility of data recovery, increase the difficulty of data recovery)

7, seek professional data recovery company help.

Scenarios for mirroring a disk:

1, can be the same or larger than the source disk capacity of the hard disk as the target disk, the source disk all sectors clone to the target disk.

2, the source disk can be completely sector-wide output file to a large capacity storage space (such as high-capacity hard disk, NAS, SAN, Das, etc.)

Enter root password after login: fsck-t ext3-r/usr/local Repair

Http://www.linuxso.com/command/fsck.html

Superblock mount Time is on the Future (reprint)

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.