Friday, May 26, 2017

Re: bioctl crypto size limitation ?

On 05/26/17 15:49, sharon s. wrote:
>
>
> On 05/26/17 11:43, Ted Unangst wrote:
>> sharon s. wrote:
>>>>> softraid0: invalid metadata format
>>>> You filled the disk with random data, which is not a valid metadata
>>>> format...
>>> I followed the FAQ,
>>> http://www.openbsd.org/faq/faq14.html#softraidCrypto .
>> Sorry, I was hasty. You can also try creating smaller partitions.
>> 16TB, 8TB,
>> etc. to see what works. That would be helpful information to have.
>>
>
> 8Tb seems to be fine, 16 not so much. Ran into a weird issue where I
> couldn't try with 12Tb.
>
> # dd if=/dev/random of=/dev/rsd0c bs=1m
> ^C4310+0 records in
> 4309+0 records out
> 4518313984 bytes transferred in 90.924 secs (49692799 bytes/sec)
> 20170526-1539: tbisch@store:/root:# fdisk -iy -g sd0
> Writing MBR at offset 0.
> Writing GPT.
>
> # disklabel -E sd0
> Label editor (enter '?' for help at any prompt)
> > a a
> offset: [64]
> size: [70319603585] 16T
> Rounding size to cylinder (16065 sectors): 34359741611
> FS type: [4.2BSD] RAID
> > w
> > q
> No label changes.
>
> # bioctl -v -c C -l sd0a softraid0
> New passphrase:
> Re-type passphrase:
> Deriving key using bcrypt PBKDF with 16 rounds...
> bioctl: unknown error
>
>
> # dd if=/dev/random of=/dev/rsd0c bs=1m
> ^C2465+0 records in
> 2464+0 records out
> 2583691264 bytes transferred in 51.839 secs (49840098 bytes/sec)
>
> # fdisk -iy -g sd0
> Writing MBR at offset 0.
> Writing GPT.
>
> # disklabel -E sd0
> Label editor (enter '?' for help at any prompt)
> > a a
> offset: [64]
> size: [70319603585] 8T
> Rounding size to cylinder (16065 sectors): 17179878806
> FS type: [4.2BSD] RAID
> > w
> > q
> No label changes.
>
> # bioctl -v -c C -l sd0a softraid0
> New passphrase:
> Re-type passphrase:
> Deriving key using bcrypt PBKDF with 16 rounds...
> softraid0: CRYPTO volume attached as sd4
>
>
> # dd if=/dev/random of=/dev/rsd0c bs=1m
> ^C2914+0 records in
> 2913+0 records out
> 3054501888 bytes transferred in 61.213 secs (49899553 bytes/sec)
> 20170526-1544: tbisch@store:/root:# fdisk -iy -g sd0
> Writing MBR at offset 0.
> Writing GPT.
>
> # disklabel -E sd0
> Label editor (enter '?' for help at any prompt)
> > a a
> offset: [64]
> size: [70319603585] 12T
> Rounding size to cylinder (16065 sectors): 25769818241
> FS type: [4.2BSD] RAID
> > w
> disklabel: ioctl DIOCWDINFO: Open partition would move or shrink
> disklabel: unable to write label
>
Stupid me, I forgot that the softraid device was still attached.

12Tb, 14Tb and 15Tb works as well, 16 seems to be where it breaks.

# dd if=/dev/random of=/dev/rsd0c bs=1m
^C526+0 records in
525+0 records out
550502400 bytes transferred in 11.298 secs (48724516 bytes/sec)
20170526-1551: tbisch@store:/root:# fdisk -iy -g sd0
Writing MBR at offset 0.
Writing GPT.

# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
> a a
offset: [64]
size: [70319603585] 12T
Rounding size to cylinder (16065 sectors): 25769818241
FS type: [4.2BSD] RAID
> w
> q
No label changes.

# bioctl -v -c C -l sd0a softraid0
New passphrase:
Re-type passphrase:
Deriving key using bcrypt PBKDF with 16 rounds...
softraid0: CRYPTO volume attached as sd4


# dd if=/dev/random of=/dev/rsd0c bs=1m
^C1526+0 records in
1525+0 records out
1599078400 bytes transferred in 32.276 secs (49543440 bytes/sec)

# fdisk -iy -g sd0
Writing MBR at offset 0.
Writing GPT.

# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
> a a
offset: [64]
size: [70319603585] 15T
Rounding size to cylinder (16065 sectors): 32212268801
FS type: [4.2BSD] RAID
> w
> q
No label changes.

# bioctl -v -c C -l sd0a softraid0
New passphrase:
Re-type passphrase:
Deriving key using bcrypt PBKDF with 16 rounds...
softraid0: CRYPTO volume attached as sd4

No comments:

Post a Comment