From owner-freebsd-geom@FreeBSD.ORG Mon Oct 12 07:44:45 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F0A0106566B for ; Mon, 12 Oct 2009 07:44:45 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2F38FC17 for ; Mon, 12 Oct 2009 07:44:44 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1MxFaE-0001cA-5K for freebsd-geom@freebsd.org; Mon, 12 Oct 2009 09:44:42 +0200 Received: from 93-141-86-189.adsl.net.t-com.hr ([93.141.86.189]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2009 09:44:42 +0200 Received: from ivoras by 93-141-86-189.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2009 09:44:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Mon, 12 Oct 2009 09:44:04 +0200 Lines: 61 Message-ID: References: <469001.5449.qm@web28202.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD92C6DEDD556D736A1389FD6" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-141-86-189.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <469001.5449.qm@web28202.mail.ukl.yahoo.com> X-Enigmail-Version: 0.96.0 Sender: news Subject: Re: Virstor provider lost metadata. Rescue possible? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2009 07:44:45 -0000 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--