Solved

Clock-related (!) disk-errors in Linux/Ubuntu running on a VMWare VM

Posted on 2011-09-23
5
742 Views
Last Modified: 2012-05-12
I have a very unusual date-related problem that has arisen on one of our Linux VMs.

We're using a VMWare VM as a desktop appliance in developing countries where there is no internet access - ie our master VM is copied onto each computer as an appliance, and after starting up the VM, users simply click a button to launch a browser with the application.

In one installation, however, the computer's clock was accidentally set to 2012 prior to installation of the VM.  Once the error was noticed, the clock was corrected, but the VM then stopped working, giving the following error:
"Errors were found while checking the disk drive for /
F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual..."

If 'F' is chosen, the VM launches, but the error then reappears next time the VM is started.  When the clock is changed back to 2012, this error disappears and the VM launches fine, but when the clock is returned to 2011, the VM returns the error message again!

I can't figure out how a clock setting could be affecting the VM's virtual hard disk integrity...  Has anybody come across this bug before, or (even more importantly) figured out how to resolve it?  (Our team had to drive out for half a day to install a new VM and migrate their data - we want to avoid that next time!)

Cheers, Sam.
0
Comment
Question by:samueldjohnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 36585980
Did you just change the clock on the Host and not inside the Guest? I'd expect the issue you had if you changed the time on the host but not inside the guest. Normally Linux distro's are set to run a file-system check on their file-system after a certain number of mounts, and if the time is changed or not correct I'd expect it to check that file-system. You can turn off this automatic checking within fstab, see the link below:

http://www.debianhelp.co.uk/fstab.htm

For example:

# <device> <mountpoint> <filesystemtype><options> <dump> <fsckorder>

/dev/hdb2        /home                  ext2               defaults       1             2
/dev/hda1     /mnt/dos/c              msdos              defaults        0             0

The "2" in the fsckorder section for hdb2 means that the system will check that partition, while if there is a "0" like for hda1 it won't be checked.

0
 
LVL 121
ID: 36586044
Have you got VMware Tools installed, and Checked it's The VM is Syncing with the Host?
0
 
LVL 3

Expert Comment

by:RitBit
ID: 36592923
For all time/clock related issues see this VMware knowledge base :

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

It comes down to this: make sure your Host runs on NTP and the vm's absolutely do NOT use ntp but use the time-sync via vmware tools. On some linux kernels you need an extra line like "clocksource=pit" but all those details are in the knowledgebase i pointed you to.

Good luck.
0
 
LVL 3

Accepted Solution

by:
RitBit earned 500 total points
ID: 36592950
Oh, forgot to explain why time issues mess up your system:

Since a virtual machine is scheduled by the hypervisor the internal clock of a VM is untrustfull as it has to skip steps based on how much time it got from the hypervisor-scheduler. As most processes within a OS are dependent on correct timing it's important to correct the clock within the VM with the exact time as kept within the hypervisor. The only way to do so is to use the vmware-tools timesync option.

As the file-system administration is depending on a correct clock it makes sense your file system got messed up. For databases this is much worse and a vm-clock that does not skip correctly can destroy your whole database.

Please take good care of the clock-source settings as mentioned in the knowlegdebase article to prevent such issues.
0
 

Author Comment

by:samueldjohnson
ID: 36594875
Many thanks for all of your input - it definitely sounds like the file system has become confused by this clock setting.  I'll have a remote look at this VM tomorrow (Monday), and feed back how it went.

We're actually in the process of developing a new application that will also run on a VM, and to get around these potential time errors (particularly with database time-stamping!), we're asking the user to input the current data and time before they even enter the application - if this differs by more than 10 mins from the VM clock, then the application will shut down...

Many thanks,

Sam.
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question