From owner-freebsd-geom@FreeBSD.ORG Mon Sep 15 20:50:59 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62162206 for ; Mon, 15 Sep 2014 20:50:59 +0000 (UTC) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 0ADEBD50 for ; Mon, 15 Sep 2014 20:50:58 +0000 (UTC) Received: from study64.tdx.co.uk (study64.tdx.co.uk [62.13.130.231]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/) with ESMTP id s8FKonXJ001212 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Sep 2014 21:50:50 +0100 (BST) Date: Mon, 15 Sep 2014 21:50:49 +0100 From: Karl Pielorz To: freebsd-geom@freebsd.org Subject: GELI created on a GPT labelled partition doesn't work 2nd time around... Message-ID: X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 20:50:59 -0000 Hi, I just installed a FreeBSD 10.0-STABLE system where I: - Created a GPT partition on da0, with a label of, say 'abcdef' - Did a 'geli init / geli attach' on that GPT label, i.e. geli init -s 4096 -K abcdef.key -l 256 -P /dev/gpt/abcdef - Attached to that: geli attach -k abcdef.key -p /dev/gpt/abcdef This correctly gives me '/dev/gpt/abcdef.eli' The *first* time I did this I then did: gpart create -s gpt /dev/gpt/abcdef.eli Which worked - and then went on to create a partition and use it for ZFS. After a while I decided to re-do the disks (switching out '-l 256' to use the default key size). But now I'm stuck - I can: - Create a GPT partition with label on the underlying device, e.g. as before, create a GPT partition on da0 with a label of 'abcdef' - 'geli init' and 'geli attach' to that label - and I get a corresponding .eli device - e.g. '/dev/gpt/abcdef.eli' - but I can't do anything with that device now: gpart create -s gpt /dev/gpt/abcdef.eli gpart: provider: Device not configured I can't read, or write to it either: dd if=/dev/gpt/abcdef.eli | strings dd: /dev/gpt/abcdef.eli: Invalid argument 0+0 records in 0+0 records out 0 bytes transferred in 0.000059 secs (0 bytes/sec) No errors are output anywhere - and the geli 'attach' to the first label succeeds (and I get a corresponding .eli device) - but it doesn't "work". Any ideas? I know this worked once (when the disks were 'new') - as I still have it in my scroll back. I've tried all incantations of 'gpart destroy' and 'geli clean' - but no matter what I do (including rebooting), I can't get this to work again. If I use geli on the raw da0 device - I end up with 'da0.eli' - and I *can* access / GPT partition that, but it no longer works applying GELI to a label (but, like I said - I was able to do this once!) -Karl