From owner-freebsd-fs@FreeBSD.ORG Fri Sep 9 05:14:02 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80F23106566B; Fri, 9 Sep 2011 05:14:02 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail27.syd.optusnet.com.au (mail27.syd.optusnet.com.au [211.29.133.168]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE288FC12; Fri, 9 Sep 2011 05:14:01 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail27.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p895DxkM030018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Sep 2011 15:14:00 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id p895DvSC060002; Fri, 9 Sep 2011 15:13:57 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id p895DvXX060001; Fri, 9 Sep 2011 15:13:57 +1000 (EST) (envelope-from peter) Date: Fri, 9 Sep 2011 15:13:57 +1000 From: Peter Jeremy To: Andriy Gapon Message-ID: <20110909051357.GA58043@server.vk2pj.dyndns.org> References: <20110901223646.14b8aae8@o2.pl> <4E60DBBD.1040703@FreeBSD.org> <4E679D3D.1000007@FreeBSD.org> <20110908055016.GB28874@server.vk2pj.dyndns.org> <4E685B8A.604@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PmA2V3Z32TCmWXqI" Content-Disposition: inline In-Reply-To: <4E685B8A.604@FreeBSD.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS: i/o error - all block copies unavailable after upgrading to r225312 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 05:14:02 -0000 --PmA2V3Z32TCmWXqI Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Sep-08 09:07:06 +0300, Andriy Gapon wrote: >on 08/09/2011 08:50 Peter Jeremy said the following: >> Since the problem isn't consistent (it can appear on some files but not= =20 >> others), I modified zfstest to take a pathname, rather than have the=20 >> pathname hard-coded. > >I would appreciate your sharing back this enhancement. >Thanks for testing! See attached. The first argument is a pathname to open and the remaining arguments specify the pool as before. Note that I commented out the spa_all_status() so I could easily cmp(1) the output with the file read via the filesystem. On 2011-Sep-08 15:50:16 +1000, Peter Jeremy = wrote: >This was tested on an 8-STABLE system at r225392. I've built new >bootblocks but not tested them yet - I will do that tomorrow. Unfortunately, the resultant gptzfsboot causes a "BTX Halted" problem (see http://i.imgur.com/CuTut.jpg - apologies for the quality). Based on cs:eip and ss:esp, it looks like it just goes off into the weeds. I've tried building it on two different systems (including a full buildworld in case just running "make clean && make" in /usr/src/sys/boot was insufficient) and get the same binary. An unpatched gptzfsboot from r225392 works. I rather exceeded the time I should have invested in the problem and so have gone ahead with a zpool rebuild to get rid of the problematic gang-blocks. --=20 Peter Jeremy --ZGiS0Q5IWpPtfppv Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="zfstest.diff" Content-Transfer-Encoding: quoted-printable Index: zfstest.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/sys/boot/zfs/zfstest.c,v retrieving revision 1.1 diff -u -r1.1 zfstest.c --- zfstest.c 30 Jul 2010 13:54:15 -0000 1.1 +++ zfstest.c 7 Sep 2011 22:01:54 -0000 @@ -95,26 +95,35 @@ argc =3D 4; argv =3D av; } - for (i =3D 1; i < argc; i++) { - fd[i] =3D open(argv[i], O_RDONLY); + for (i =3D 0; i < argc-2; i++) { + fd[i] =3D open(argv[i+2], O_RDONLY); if (fd[i] < 0) continue; if (vdev_probe(vdev_read, &fd[i], NULL) !=3D 0) close(fd[i]); } - spa_all_status(); + //spa_all_status(); =20 spa =3D STAILQ_FIRST(&zfs_pools); - if (!spa || zfs_mount_pool(spa)) + if (spa =3D=3D NULL) { + printf("no pools\n"); exit(1); + } =20 - if (zfs_lookup(spa, "zfs.c", &dn)) + if (zfs_mount_pool(spa)) { + printf("can't mount pool\n"); exit(1); + } =20 + if (zfs_lookup(spa, argv[1], &dn)) { + printf("can't lookup\n"); + exit(1); + } off =3D 0; do { n =3D zfs_read(spa, &dn, buf, 512, off); write(1, buf, n); off +=3D n; } while (n =3D=3D 512); + return(0); } --ZGiS0Q5IWpPtfppv-- --PmA2V3Z32TCmWXqI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk5poJUACgkQ/opHv/APuIdXWwCgkPIrzeeaSfOMTL/EN2WNM8C5 3ZUAmwZc/eWDt32VKdipUbopwNbf3eB8 =xYSy -----END PGP SIGNATURE----- --PmA2V3Z32TCmWXqI--