GELI created on a GPT labelled partition doesn't work 2nd time around...
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Sep 30 15:00:05 UTC 2014
On Tue, Sep 30, 2014 at 09:40:55AM +0100, Karl Pielorz wrote:
>
>
> --On 28 September 2014 15:05 +0200 Pawel Jakub Dawidek <pjd at FreeBSD.org>
> wrote:
>
> > Could you provide the output of:
> >
> > # diskinfo -v /dev/gpt/abcdef.eli
>
> Sure, after GPTing, geli init / geli attach - the running the above gives:
>
> "
> /dev/gpt/abcdef.eli
> 4096 # sectorsize
> 750155304960 # mediasize in bytes (699G)
> 183143385 # mediasize in sectors
> 0 # stripesize
> 0 # stripeoffset
> 11400 # Cylinders according to firmware.
> 255 # Heads according to firmware.
> 63 # Sectors according to firmware.
> WD-WCAPT0430257s0s0 # Disk ident.
> "
>
> In the interim - I wrote a script which matches the drives serial numbers,
> with keys - and does a 'geli attach' on the raw disk (e.g. /dev/da0) - this
> results in da0.eli, which can then be GPT partitioned etc.
>
> Trying to run anything 'against' /dev/gpt/abcdef.eli results in, e.g.
>
> # gpart create -s gpt /dev/gpt/abcdef.eli
> gpart: provider: Device not configured
>
> or,
>
> dd if=/dev/gpt/abcdef.eli of=/dev/null bs=1k count=1000
> dd: /dev/gpt/abcdef.eli: Invalid argument
This fails because your gpt/abcdef.eli is configured with 4k sectors.
Try:
dd if=/dev/gpt/abcdef.eli of=/dev/null bs=4k count=1000
> If I repeat the above steps without the initial GPT partition (i.e. against
> /dev/da0) - I end up with '/dev/da0.eli' - which I can then GPT fine etc.
Note sure if GPT problem is due to 4k sector or because as jmg@
mentioned it checks for GPT in GPT configuration - a check we may be
able to relax.
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://mobter.com
More information about the freebsd-geom
mailing list