From owner-freebsd-stable@FreeBSD.ORG Mon Mar 29 21:31:48 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B96B16A4CE; Mon, 29 Mar 2004 21:31:48 -0800 (PST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id D507A43D45; Mon, 29 Mar 2004 21:31:47 -0800 (PST) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 7CC2E2BD53; Tue, 30 Mar 2004 15:31:45 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 946B251225; Tue, 30 Mar 2004 15:01:43 +0930 (CST) Date: Tue, 30 Mar 2004 15:01:43 +0930 From: Greg 'groggy' Lehey To: =?iso-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= Message-ID: <20040330053143.GN15929@wantadilla.lemis.com> References: <4068EA56.3060600@jonny.eng.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EqVOK5mkaJAMmtSx" Content-Disposition: inline In-Reply-To: <4068EA56.3060600@jonny.eng.br> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: stable@freebsd.org cc: hackers@freebsd.org Subject: Re: Serious bug in vinum? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 05:31:48 -0000 --EqVOK5mkaJAMmtSx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 30 March 2004 at 0:32:38 -0300, Joo Carlos Mendes Lus wrote: > Sorry for the cross-posting, but nor the Author nor freebsd-bugs did > acknowledge my message, and I think this is a very serious bug in vinum, > leading to loss of data... > > If these are not the correct foruns for this, please forgive me and > tell me which is the correct one. > > PS: Please CC: me, since I'm not currently subscribed to these > lists. Sorry for the lack of response. Yes, I saw it, and so did Lukas Ertl, and we've been discussing it. This list is probably not the best. > > ==================================================== > Hi Greg, > > I've been a big fan of vinum since it's beggining. I use it for RAID0 > and RAID1 solution for lots of servers. > > In some RAID0 (stripe) configurations, though, I've had some serious > problems. If an underlying disk fails, the respective plex and volume do > not fail, as they should. This leads to full corruption of data, but worst > of that, leads to a system which believes the data is safe. In one ocasion, > for example, the backup ran and overwrote good data with bad data, full of > zeros. > > I am not fully aware of vinum programming details, but a quick look at > 4.9-STABLE, in file vinumstate.c, dated Jul, 7, 2000, at line 588, function > update_volume_state() sets volume state to up if plex state is corrupt or > better for at least one plex: > > for (plexno = 0; plexno < vol->plexes; plexno++) { > struct plex *plex = &PLEX[vol->plex[plexno]]; /* point to the plex */ > if (plex->state >= plex_corrupt) { /* something accessible, */ > vol->state = volume_up; > break; > } > } > > I think this should be like: > > if (plex->state > plex_corrupt) { /* something accessible, */ Basically, this is a feature and not a bug. A plex that is corrupt is still partially accessible, so we should allow access to it. If you have two striped plexes both striped between two disks, with the same stripe size, and one plex starts on the first drive, and the other on the second, and one drive dies, then each plex will lose half of its data, every second stripe. But the volume will be completely accessible. I think that the real issue here is that Vinum should have returned an I/O error for accesses to the defective parts. How did you perform the backup? Greg -- Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --EqVOK5mkaJAMmtSx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFAaQY/IubykFB6QiMRApoxAJ9HcP2Jv4MmuxYVHE/o/P8CKmsFEgCghhjC jnuy11huIEnohJx+94TO2K4= =sQYX -----END PGP SIGNATURE----- --EqVOK5mkaJAMmtSx--