From owner-freebsd-geom@FreeBSD.ORG Sun Sep 28 13:04:01 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D31B996 for ; Sun, 28 Sep 2014 13:04:01 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 17440F1F for ; Sun, 28 Sep 2014 13:04:00 +0000 (UTC) Received: from localhost (unknown [195.24.50.132]) by mail.dawidek.net (Postfix) with ESMTPSA id 028443AA; Sun, 28 Sep 2014 15:03:59 +0200 (CEST) Date: Sun, 28 Sep 2014 15:05:47 +0200 From: Pawel Jakub Dawidek To: Karl Pielorz Subject: Re: GELI created on a GPT labelled partition doesn't work 2nd time around... Message-ID: <20140928130547.GD1620@garage.freebsd.pl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-geom@freebsd.org 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: Sun, 28 Sep 2014 13:04:01 -0000 On Mon, Sep 15, 2014 at 09:50:49PM +0100, Karl Pielorz wrote: > > 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) Could you provide the output of: # diskinfo -v /dev/gpt/abcdef.eli > 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!) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com