Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 2009 09:44:04 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-geom@freebsd.org
Subject:   Re: Virstor provider lost metadata. Rescue possible?
Message-ID:  <haumoj$fnh$1@ger.gmane.org>
In-Reply-To: <469001.5449.qm@web28202.mail.ukl.yahoo.com>
References:  <469001.5449.qm@web28202.mail.ukl.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigD92C6DEDD556D736A1389FD6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Frank Beckmann wrote:
> Hello,
>=20
> one of my virstor providers lost its metadata. It looks like the sector=
 got filled with random data. it is the second last filled sector in that=
 virstor. Executing the command "gvirstor list", "gvirstor status" or "sy=
sctl -a" resulted in a kernel panic.
>=20
> I handcrafted the destroyed sector assuming that all chunks of that pro=
vider were used and setting the flags to 0. Now the kernel doesn't panic =
anymore but I get the error message:
>=20
> GEOM_VIRSTOR[1]: virstor_check_and_run: Invalid entry 100542 in map for=
 vs3
> GEOM_VIRSTOR[1]: virstor_check_and_run: provider_no: 25, n_components: =
33 provider_chunk: 512, chunk_count 512
>=20
> Provider 25 is the one which lost its metadata.
>=20
> The version of FreeBSD is: 7.2-RC1
>=20
> Is it possible to revive that virstor to rescue some of its data?

This is a serious problem, but as long as the first component of the
virstor is alive and, as you say, only the metadata is damaged on
component 25 (of 33), there is a chance.

It looks like chunk_count is wrong for provider 25 - it holds the number
of chunks (of default 4 MiB) on the device. You could calculate
device_size/4194304 and write it in the chunk_count field of the
reconstructed metadata - see if that helps (reference
/sys/geom/virstor/g_virstor_md.h).

You should make a backup of the first couple of chunks on the first
components (the actual number depends on your virstor virtual size - 16
MiB should be enough for most) and the metadata of all other components
before experimenting like this.

Do you have any idea how the metadata got damaged?


--------------enigD92C6DEDD556D736A1389FD6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrS3kQACgkQldnAQVacBcizZgCgmxn0cEDlkW8063rIqCCj+bP6
ZDoAoOTCPrkb6HVHi5a7oZlFNedlMBay
=mG1A
-----END PGP SIGNATURE-----

--------------enigD92C6DEDD556D736A1389FD6--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?haumoj$fnh$1>