From owner-freebsd-geom@FreeBSD.ORG Fri Aug 17 22:10:14 2007 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C272E16A469 for ; Fri, 17 Aug 2007 22:10:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6D49013C4B7 for ; Fri, 17 Aug 2007 22:10:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7HMABKU059698 for ; Fri, 17 Aug 2007 22:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7HMABfI059697; Fri, 17 Aug 2007 22:10:11 GMT (envelope-from gnats) Date: Fri, 17 Aug 2007 22:10:11 GMT Message-Id: <200708172210.l7HMABfI059697@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: linimon@lonesome.com (Mark Linimon) Cc: Subject: Re: kern/115572: [gbde] gbde partitions fail at 28bit/48bit LBA addressing boundary X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mark Linimon List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2007 22:10:14 -0000 The following reply was made to PR kern/115572; it has been noted by GNATS. From: linimon@lonesome.com (Mark Linimon) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/115572: [gbde] gbde partitions fail at 28bit/48bit LBA addressing boundary Date: Fri, 17 Aug 2007 17:07:53 -0500 ----- Forwarded message from Graham ----- further to yesterday, I run this sequence... 1. init and attach a gbde volume, 2. write zeros from start of the volume, in 1GiB bursts, until dd hits an i/o error, 3. detach gbde volume this error came after 121GiB written. Then I have run a repeated sequence of... 1. init and attach a gbde volume, 2. write using dd 1GiB of zeros starting 121 GiB into the device 3. detach gbde volume like this..... #! /usr/local/bin/bash # trap 'gbde detach ad4;exit 9' 1 2 3 13 15 # while [ 0 -eq 0 ] do gbde init ad4 -P password gbde attach ad4 -p password START=1982464 COUNT=16384 dd if=/dev/zero of=/dev/ad4.bde bs=64k oseek=$START count=$COUNT gbde detach ad4 done exit 3 # (and then I checked smartctl for no errors on the drive.) which gives an i/o error at different block counts, always with an LBA at or more often just a few sectors below the LBA=268435455 The gbde-volume block offsets at error are much more varied, and a significant proportion of the tests do not show errors in this test. I have read the paper by Poul-Henning Kamp "GBDE-GEOM Disk Based Encryption" and it is clear that the gbde volume's sector addresses are mapped on the physical drive in a non-repeatable way each time "init" takes place. This explains the movable nature of the error, and the symptoms perceived by the user when a filesystem is written in geom can vary according to whether the tripwire LBA address gets mapped to data, inodes, or superblock. I am afraid this sounds much like a mapping consistency issue in GBDE, the mapping is quite complex, and I expect there are others better placed to know where to look for it. I am happy to help if you wish, there is a long-standing issue here needs fixing, but I would need a prompt towards finding the code which implements the mapping. regards Graham ----- End forwarded message -----