Superblock Mount time is in the future

Source: Internet
Author: User

I am using centos6.3. the following error message is displayed when I restart a VM:

/Dev/mapper/root: superblock last Mount time (Mon Mar 5 17:40:11 2012,
Now = SAT Mar 5 18:46:53 2011) is in the future.
/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 you to a shell; the system will reboot
*** When you leave the shell.
Given root password for maintenance
(Or type control-D to continue ):

Then I found a solution:

In "(or type control-D to continue):", enter the password to enter the repair mode and run the fix in The fsck <partition Name> format, run fsck/dev/mapper/root and reboot. After restart, the system may prompt that the same error occurs on other disks. Run the command again in The fsck <partition Name> format, then reboot, the test can be started on the Virtual Machine

 

Next, let's take a look at the role of The fsck command.

Check and fix Linux File System Command fsck

permission: Super User
usage: fsck [-sacvrp] [-T fstype] [--] [fsck-options] file sys [...]
note: in Linux, to increase system performance, some data is usually written in the memory by default, data is not directly written to the hard disk because the memory speed is several times faster than the hard disk speed. But there is a problem. What if the system crashes due to "power failure" or other unknown reasons? The system crashes. Therefore, we need to store data directly back to the hard disk at a specific time. Several Common commands are provided here. Among them, The fsck command is the most important. when a file system error occurs, use the fsck command to try to fix it. you can specify the file system by using the Partition Number (such as/dev/had3) or mount point (such as/,/usr. If multiple file systems are specified at a time and these systems are located on different physical disks, fsck will try to check them in synchronous mode to save operation time.
parameter:
filesys: Device Name (eg. /dev/sda1), mount point (eg. // or/usr)
-T: specifies the type of the file system, if a definition already exists in/etc/fstab or the kernel itself supports this parameter,
-S: run the fsck command one by one in sequence.
-A: Check all the partitions listed in/etc/fstab.
-C: display the complete check progress
-D: print the debug results of e2fsck
-P: when both-A conditions exist, multiple fsck checks are executed together.
-R: if both-A conditions exist, the check 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 to fix it

Note:

Example:
Check whether/dev/hda5 of the msdos file system is normal. If there is an exception, it will be automatically repaired:
Fsck-T msdos-A/dev/hda5

Note:

This command can be used with/etc/fstab for reference operations.

Example: Check/dev/sda3
[Root @ localhost ~] # Fsck-c-tExT3/dev/sda3fsck 1.39 (29-may-2006) e2fsck 1.39 (29-may-2006)/dev/sda3 is mounted.
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 # the above information will appear if everything is normal.
# This command is usually used only when the root user has a problem with the system. Otherwise, using this command normally may corrupt the file.

Related Knowledge:
 

  Introduction to disaster emergency solutions for Linux fsck data errors

[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, make preparations First. Method 1: You can use it in advance.DdThe command outputs the involved partitions to another storage body (it is better not to make dd on the wrong storage body itself). The command has the following structure: 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.

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

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.