From owner-freebsd-fs@FreeBSD.ORG Wed Aug 13 13:41:01 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38738A07 for ; Wed, 13 Aug 2014 13:41:01 +0000 (UTC) Received: from rack.patpro.net (rack.patpro.net [193.30.227.216]) by mx1.freebsd.org (Postfix) with ESMTP id F2B1F28F8 for ; Wed, 13 Aug 2014 13:41:00 +0000 (UTC) Received: from [192.168.0.2] (boleskine.patpro.net [82.230.142.222]) by rack.patpro.net (Postfix) with ESMTPSA id B4FBB1F7F; Wed, 13 Aug 2014 15:40:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=patpro.net; s=patpro; t=1407937257; bh=f6FWXEI05Bj2Qi4v8bQ6diPdirYRTTG4fs/NurBGrLg=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Vl2yg/Z0WB3iRoAhR3Un9G+8DmSsF0dJ2DmmhOdsOkf+KWLLKLysD5G5zp5Ev/o6q B+V4fFIlv9/zPVgxoKNaKeOLFHdlhfiC5TB2uTPyhng0dm/ywqrqEHOfDWX/DGpxYE 9+sAiVovpebeY3ssnMrAneorpF1gx++eKwz5YtlM= Subject: Re: zdb -R question Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 From: Patrick Proniewski In-Reply-To: <201408131020.s7DAKeCl017621@higson.cam.lispworks.com> Date: Wed, 13 Aug 2014 15:40:57 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <64CCA262-71E9-4688-A725-376DFA681548@patpro.net> References: <201408131020.s7DAKeCl017621@higson.cam.lispworks.com> To: Martin Simmons X-Mailer: Apple Mail (2.1085) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 13:41:01 -0000 On 13 ao=FBt 2014, at 12:20, Martin Simmons wrote: >> devices ada2 and ada3 are in ZRAID1 mirror.=20 >=20 > I think you mean just "mirror"? here. ZRAID1 is not a term used by = ZFS -- it > has RAIDZ1, but that requires at least 3 drives. Yes, you are right, it's just mirror even though I was thinking about = raidz1 >> zpool scrub won't show any error. >=20 > If scrub shows no errors then the blocks are not currently used. thanks for this confirmation. > For a start, you probably have partitions on the disk so that LBA = (from the > start of the disk) will not be the offset into the ZFS vdev. = Secondly, the > offset passed to zdb -R should be in bytes, whereas the LBA is in = sectors. Before writing to the list I've tried both bytes and sectors/blocks = without any positive result.=20 If I'm not mistaken, 460087328 sectors with a 512 byte size yields to = 235564705792 byte offset. So this command should not return "offset must = be a multiple of sector size" error: zdb -R zdata /dev/ada3:235564705792:512 I've used gpart to prepare the drive, so its layout is the following: # gpart show ada3 =3D> 34 3907029101 ada3 GPT (1.8T) 34 3907029101 1 freebsd-zfs (1.8T) I'm quite lost here, with zdb. > Try using dd on the whole disk, something like >=20 > dd if=3D/dev/ada3 of=3D/dev/null bs=3D512 count=3D1 skip=3D460087328 >=20 > Use bs=3D4096 if your drive has 4096 byte sectors. dd confirms that the first faulty sector is unreadable: - faulty sector - # dd if=3D/dev/ada3 of=3D/dev/null bs=3D512 count=3D1 skip=3D460087328 dd: /dev/ada3: Input/output error 0+0 records in 0+0 records out 0 bytes transferred in 9.761358 secs (0 bytes/sec) - previous sector - # dd if=3D/dev/ada3 of=3D/dev/null bs=3D512 count=3D1 skip=3D460087327 1+0 records in 1+0 records out 512 bytes transferred in 0.035261 secs (14520 bytes/sec) - next sector -=20 # dd if=3D/dev/ada3 of=3D/dev/null bs=3D512 count=3D1 skip=3D460087329 1+0 records in 1+0 records out 512 bytes transferred in 0.032987 secs (15521 bytes/sec) thanks, Pat