Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2014 15:05:47 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Karl Pielorz <kpielorz_lst@tdx.co.uk>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: GELI created on a GPT labelled partition doesn't work 2nd time around...
Message-ID:  <20140928130547.GD1620@garage.freebsd.pl>
In-Reply-To: <FB80B30D52FBD7A0500EF984@study64.tdx.co.uk>
References:  <FB80B30D52FBD7A0500EF984@study64.tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140928130547.GD1620>