domU Time Went Backward

July 25th, 2011

I’ve earlier encountered this bug at my Debian OS domU. You can see the bug with 2 possibility by executing date and issuing a ping. Executing date command constantly will show the date/time is inaccurately and dint follow what it had been set to. May see the ping average is far beyond the normal what it should be and it actually affect your domU connection.

The bug is written at http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1098 .

But, I am going to solve it by

  1. applying pygrub to domU
  2. run dpkg-reconfigure tzdata and select the appropriate time & zone

The point is switching domU to pygrub to let it load it own kernel will solve the problem.

 

fsck domU

January 20th, 2011
INIT: version 2.86 booting
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557062 in dir #1556708
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
Welcome to  CentOS release 5.5 (Final)
Press ‘I’ to enter interactive startup.
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
Setting clock : Mon Jan 17 10:21:37 EST 2011 [  OK  ]
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
Starting udev: EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
MAKEDEV: no such user: root
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
[  OK  ]
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557062 in dir #1556708
Setting hostname vps.cutemobi4u.com:  [  OK  ]
No devices found
Setting up Logical Volume Management: [  OK  ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/sda1
/dev/sda1 contains a file system with errors, check forced.
/dev/sda1: Inodes that were part of a corrupted orphan linked list found.
/dev/sda1: 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.
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557074 in dir #1556481
sulogin: cannot open password database!
Unmounting file systems
umount: none: not found
umount: /proc/sys/fs/binfmt_misc: not mounted
umount: tmpfs: not found
umount: /dev/shm: not mounted
EXT3-fs error (device sda1): ext3_lookup: unlinked inode 1557062 in dir #1556708
Automatic reboot in progress.

A few days ago, one of my domU felt into infinite loop of reboot and was unable to boot properly. Upon checking, its file system was corrupted. As this happened, the best is shut down this domU and fsck its lvm logical volume.
Lets check the logical volume name with following command,
lvdisplay | grep domU name

then, run below fsck command
e2fsck -f -y /full/path/to/domU/logical/volume

You will see the repairing process. Once it is done, just start up the domU and you shall be able to powering it up.
Note : During this fsck, some file system / partition might be corrupted and cant recover. Be prepared to build a new domU and perform migration.