How to label a GELI device

Rolf G Nielsen rnmtw at lazlarlyricon.com
Wed Jan 26 00:37:57 UTC 2011


2011-01-25 19:37, J. Porter Clark skrev:
> On Tue, Jan 25, 2011 at 07:28:25PM +0100, Rolf Nielsen wrote:
>> X-Spam-Level:
>>
>> 2011-01-25 19:13, J. Porter Clark skrev:
>>> On Tue, Jan 25, 2011 at 03:29:37PM +0100, Rolf Nielsen wrote:
>>>>
>>>> Correct me if I'm wrong anyone.
>>>> You need to first label da0s1d
>>>>
>>>> e.g. like so
>>>>
>>>> glabel label data da0s1d
>>>>
>>>> then geli init the labeled device
>>>>
>>>> e.g. like so
>>>>
>>>> geli init -l 256 -s 4096 label/data
>>>
>>> Unfortunately, this step overwrites the label.
>>
>> It does not. I just tested it with a file backed md device, and
>> hexdumped it after each step (creating the file, mdconfig it, label the
>> md device and encrypting it).
>> After the first two steps, I got just zeros, after labeling it, I got
>> the last sector containing the label, and after encrypting it, I got the
>> second last sector (i.e. the last sector of the labeled device)
>> containing the eli data and the last secor still containing the label.
>>
>> If it does overwrite the label, you most likely specified the da0s1d to
>> the geli init command. You need to specify label/data (replace "data"
>> with the name you choose).
>
> Ah!  That is, in fact, exactly what I did.  I didn't realize
> that the glabeled device was actually shrunk by 1 sector.
>
> Thanks!
>

You're welcome. Hope you got it working in the end. :)


More information about the freebsd-questions mailing list