9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] fossil file system corrupts after a power cut
@ 2011-07-25 16:15 kin loo
  2011-07-26  7:53 ` David du Colombier
  2011-07-27  8:39 ` kin loo
  0 siblings, 2 replies; 5+ messages in thread
From: kin loo @ 2011-07-25 16:15 UTC (permalink / raw)
  To: 9fans

Hello everyone. I have two PCs, one of which installs Plan 9 system
functioning as a backup server by Venti; the other one installs Debian
6, using qemu to run a virtual Plan 9 fossil+cpu/auth server (because
Plan 9 can't recognize hard disk for this machine). Both the backup
and virtual servers run well lasting for a week. Today a power cut
occurs, I turn on the back server first in turn the virtual server.
The back server runs as usual, but the virtual server corrupts (the
Debian host and qemu are normal). So  I boot the virtual server from a
Plan 9 CD, typing some commands in order to restore the last archive
of the system. The commands are:

    term% fossil/last /dev/sdC0/fossil
    vac:da39a3ee5e6b4b0d3255bfef95601890afd80709
    term% ip/ipconfig -g 192.168.1.1 ether /net/ether0 192.168.1.233
255.255.255.0
    term% ndb/dns -r
    term% venti=192.168.1.160
    term% fossil/flfmt -v da39a3ee5e6b4b0d3255bfef95601890afd80709 /
dev/sdC0/fossil
    fs header block already exists; are you sure? [y/n]: y
    fatal error: corrupted root: vtRootUnpack

I don't know what's going wrong. So I boot the virtual server from
qemu disk in Debian as normal:

    kin@debian: ~$ sudo qemu -hda plan9.qcow2.img -net
nic,model=rtl8139 -net \
    > tap,ifname=tap0,script=qemu-ifup

but the virtual server still prompts errors at boot time. The error
messages are:

    root is from (tcp, local)[local!#S/sdC0/fossil]:
    time...
    fossil/(#S/sdC0/fossil)...fsys: dialing venti at tcp!192.168.1.160!
17034
    /boot/fossil: cacheLocalData: addr=1 type got 0 exp 8: tag got 0
exp 1
    /boot/fossil: fsOpen error
    fsOpen: block label mismatch
    fsys main open -AWP: fsOpen: block label mismatch
    fsys: 'main' not open
    fsys main: fsys: 'main' not open
    version...bot: mount /: fsys: 'main' not open
    panic: boot process died: unknown
    panic: boot process died: unknown
   dumpstack disabled
   cpu0: exiting



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil file system corrupts after a power cut
  2011-07-25 16:15 [9fans] fossil file system corrupts after a power cut kin loo
@ 2011-07-26  7:53 ` David du Colombier
  2011-07-27  8:39 ` kin loo
  1 sibling, 0 replies; 5+ messages in thread
From: David du Colombier @ 2011-07-26  7:53 UTC (permalink / raw)
  To: 9fans

> fossil/flfmt -v da39a3ee5e6b4b0d3255bfef95601890afd80709 /dev/sdC0/fossil
> fatal error: corrupted root: vtRootUnpack

This Venti score is wrong. This is the Venti score returned by an empty
Fossil file system. That's why it cannot be found in Venti.

> /boot/fossil: cacheLocalData: addr=1 type got 0 exp 8: tag got 0 exp 1
> /boot/fossil: fsOpen error fsOpen: block label mismatch fsys main

The type VtDataType was returned instead of VtDirType and the tag
BadTag was returned instead of RootTag. Obviously, something got wrong.

It looks like your virtual hard disk image was corrupted
because of the the power outage. Especially since you used
the dynamically-growing qcow2 image format.

You should make another hard disk image and rebuild
Fossil from your last Venti score.

Since this score cannot be found in your Fossil super block, you
should extract a list of your Vac scores from your Venti server
with the script /sys/src/cmd/venti/words/dumpvacroots.

--
David du Colombier



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil file system corrupts after a power cut
  2011-07-25 16:15 [9fans] fossil file system corrupts after a power cut kin loo
  2011-07-26  7:53 ` David du Colombier
@ 2011-07-27  8:39 ` kin loo
  2011-07-27 13:48   ` Nicolas Bercher
  2011-07-27 14:14   ` Iruatã Souza
  1 sibling, 2 replies; 5+ messages in thread
From: kin loo @ 2011-07-27  8:39 UTC (permalink / raw)
  To: 9fans

On Jul 26, 3:55 pm, 0in...@gmail.com (David du Colombier) wrote:
> > fossil/flfmt -v da39a3ee5e6b4b0d3255bfef95601890afd80709 /dev/sdC0/fossil
> > fatal error: corrupted root: vtRootUnpack
>
> This Venti score is wrong. This is the Venti score returned by an empty
> Fossil file system. That's why it cannot be found in Venti.
>
> > /boot/fossil: cacheLocalData: addr=1 type got 0 exp 8: tag got 0 exp 1
> > /boot/fossil: fsOpen error fsOpen: block label mismatch fsys main
>
> The type VtDataType was returned instead of VtDirType and the tag
> BadTag was returned instead of RootTag. Obviously, something got wrong.
>
> It looks like your virtual hard disk image was corrupted
> because of the the power outage. Especially since you used
> the dynamically-growing qcow2 image format.
>
> You should make another hard disk image and rebuild
> Fossil from your last Venti score.
>
> Since this score cannot be found in your Fossil super block, you
> should extract a list of your Vac scores from your Venti server
> with the script /sys/src/cmd/venti/words/dumpvacroots.
>
> --
> David du Colombier

Thank you David du Colombier, it works. I can now use the most recent
score produced by dumpvacroots to restore  the active and archive data
in a new qemu image. But the original 9fat partition still keeps in
the old qcow2 image.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil file system corrupts after a power cut
  2011-07-27  8:39 ` kin loo
@ 2011-07-27 13:48   ` Nicolas Bercher
  2011-07-27 14:14   ` Iruatã Souza
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Bercher @ 2011-07-27 13:48 UTC (permalink / raw)
  To: 9fans

On 27/07/2011 10:39, kin loo wrote:
> Thank you David du Colombier, it works. I can now use the most recent
> score produced by dumpvacroots to restore  the active and archive data
> in a new qemu image. But the original 9fat partition still keeps in
> the old qcow2 image.
>
Maybe you can copy this qcow2 image and then play on the copy to reformat the fossil
partition.

Nicolas



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] fossil file system corrupts after a power cut
  2011-07-27  8:39 ` kin loo
  2011-07-27 13:48   ` Nicolas Bercher
@ 2011-07-27 14:14   ` Iruatã Souza
  1 sibling, 0 replies; 5+ messages in thread
From: Iruatã Souza @ 2011-07-27 14:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Jul 27, 2011 at 5:39 AM, kin loo <kinloo88@gmail.com> wrote:
> On Jul 26, 3:55 pm, 0in...@gmail.com (David du Colombier) wrote:
>> > fossil/flfmt -v da39a3ee5e6b4b0d3255bfef95601890afd80709 /dev/sdC0/fossil
>> > fatal error: corrupted root: vtRootUnpack
>>
>> This Venti score is wrong. This is the Venti score returned by an empty
>> Fossil file system. That's why it cannot be found in Venti.
>>
>> > /boot/fossil: cacheLocalData: addr=1 type got 0 exp 8: tag got 0 exp 1
>> > /boot/fossil: fsOpen error fsOpen: block label mismatch fsys main
>>
>> The type VtDataType was returned instead of VtDirType and the tag
>> BadTag was returned instead of RootTag. Obviously, something got wrong.
>>
>> It looks like your virtual hard disk image was corrupted
>> because of the the power outage. Especially since you used
>> the dynamically-growing qcow2 image format.
>>
>> You should make another hard disk image and rebuild
>> Fossil from your last Venti score.
>>
>> Since this score cannot be found in your Fossil super block, you
>> should extract a list of your Vac scores from your Venti server
>> with the script /sys/src/cmd/venti/words/dumpvacroots.
>>
>> --
>> David du Colombier
>
> Thank you David du Colombier, it works. I can now use the most recent
> score produced by dumpvacroots to restore  the active and archive data
> in a new qemu image. But the original 9fat partition still keeps in
> the old qcow2 image.
>

If you want the old 9fat, you can try converting the qcow2 to raw
format and mounting new image as fat in the host operating system.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-27 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 16:15 [9fans] fossil file system corrupts after a power cut kin loo
2011-07-26  7:53 ` David du Colombier
2011-07-27  8:39 ` kin loo
2011-07-27 13:48   ` Nicolas Bercher
2011-07-27 14:14   ` Iruatã Souza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).