Error "Superblock last mount time is in the future" from fsck when booting a Linux VM

Error "Superblock last mount time is in the future" from fsck when booting a Linux VM

book

Article ID: CTX221120

calendar_today

Updated On:

Description

In only one host, restarting a Linux VM will encounter the warning:

/dev/mapper/rootvg-lv_root: Superblock last mount time (Mon Feb 27 16:19:54 2017, now = Fri Feb 17 16:37:49 2017) is in the future.
/dev/mapper/rootvg-lv_root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)
/dev/mapper/rootvg-lv_root: UNEXPECTED INCONSISTENCY

Resolution

Correct the XenServer host time.
Change the time via command date -s and synchronize to hardware clock via hwclock --systohc

Problem Cause

The error messages indicated the cause.
The last mount time Feb 27 16:19:54 2017 was from the VM running with the current time.
The incorrect date, Feb 17 2017, was taken by the VM from the XenServer host at boot time.

Issue/Introduction

When a Linux VM is booted on one specific host, fsck of the root device gives an error "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY"