Bug 542644
Summary: | guestfish sets filesystem mount time in the "future", guest reports inconsistency at next boot | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Praveen Arimbrathodiyil <parimbra> | ||||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | unspecified | CC: | cpanceac, esandeen, llim, mbooth, virt-maint | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2010-04-20 09:00:58 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Created attachment 374743 [details]
fsck inside guest vm
only last mount time needs to be corrected.
(In reply to comment #0) > 1. mount any disk image > 2. mount a partition, download some files > 3. exit from shell (umount before exiting does not make any difference) This is in guestfish or guestmount? Can you show the exact sequence of commands that you used? Did you use the --ro option? Also, was the guest running at the time? It's unsafe to use libguestfs commands on a running guest, unless you use the --ro option. the guest was not running - j4v4m4n guestfish -a debian-gnu-linux.img mount /dev/sda1 / download /home/pravi/Desktop/some-file.png some-file.png umount / exit boot guest vm qemu-system-x86_64 debian-gnu-linux.img I get the message like in the screenshot I'm inclined to think this is an edge case in util-linux-ng or e2fsprogs. See this recent Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543375 The problem in the ^^ report is that the timezone wasn't being set before the fsck starts. Our case is slightly different: the appliance clock will always be on UTC, and so in most cases it will always be different from the guest's clock when it next boots, so for one whole hemisphere of the earth they'll always get this problem after booting. I'm wondering what the purpose of the error is anyway. Why does it matter if the superblock last mount/write time is in the future? (CC to Eric Sandeen). Here's another bug that seems related: bug 522969. As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543375#275 cat >> /etc/e2fsck.conf [options] buggy_init_scripts=1 ^D in guest/debian ignores the last mount time in future error. Yeah, TBH I don't know why it drops to a full fsck for this; for what it's worth, upstream now accepts up to a 24h discrepancy w/o causing this: http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=commitdiff;h=ba5131f6d48eded504e84c2a8ffc8131df8a512e Just to be sure I'm not confused; this is e2fsprogs within the debian image that's finding this error? I guess if so it's not a Red Hat e2fsprogs bug, right? The workaround in comment #9 should be reasonable in that case. -Eric Eric, Yes. The guest is debian gnu/linux and this error is caused by its e2fsprogs. It is not a Red Hat e2fsprogs bug. As mentioned in comment #9, it goes away after adding this option (buggy_init_scripts=1). But it would be ideal for libguestfs not to update last mount time. It can cause problems with other guest os. - Praveen other guest os = windows/non-gnu-linux i was hitted by this bug on (real) fedora 12, after setting the wrong date in bios: 05/02/2010 instead of 02/05/2010. imho it should just get over it and boot normally. We think the following patch should fix this: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=508f1ee87e816bf6b6fc8e629ccbb2d61a971169 Fixed in version 1.2.2. thank you very much. |
Created attachment 374741 [details] guest vm booting into maintenance mode Description of problem: vm boots into maintenance shell after accessing files from guest disk image (debian gnu/linux sid). It is very much possible that it be an issue with time zones. Verified date -u is same in both guest and host. Version-Release number of selected component (if applicable): How reproducible: always (reproduced twice). Steps to Reproduce: 1. mount any disk image 2. mount a partition, download some files 3. exit from shell (umount before exiting does not make any difference) Actual results: guest vm boots into maintenance mode because the disk is corrupted (only superblock last mount time is in future) Expected results: vm runs normally Additional info: