On Thu, Jun 15, 2017 at 7:04 AM, LEVAI Daniel <l...@ecentrum.hu> wrote:
> Thanks Karel for pointing this out, you are in fact right, and nothing is 
> wrong with the logging, I just forgot that I'm decrypting that device 
> 'automatically' in rc.local. And the kernel log was from before this, hence 
> the similar device names.
> I still think that nonetheless I should've gotten a degraded array that I can 
> work with (eg. rebuild).
>
> As a matter of fact I removed everything from the machine, and left just the 
> four drives of the array, then booted into bsd.rd from a thumb drive.
>
> Strangest thing is, if I boot with the 'bad' (=failing) drive as part of the 
> array, softraid brings the volume online (albeit degraded) and I can even 
> decrypt/mount the volume and use it (only one drive being bad in the array of 
> RAID5).
> If I remove/replace said failing drive, I'm not getting a degraded volume, 
> just the error about the missing chunk and that it refuses to bring it online.
>
> Either I completely misunderstood the whole idea about softraid and the RAID5 
> setup (I mean, removing a device - failed or not - shouldn't hinder the 
> assembly of the array, right?), or I'm missing something really obvious 8-/

I'm not sure, but I think that there is somewhat blury line in between
the array creation and array attach. In fact OpenBSD is using the same
command for this bioctl -c <x>. So I see you do have two possibilities
probably:

1) IMHO more safe. If you do have enough SATA ports, then attach both
your failing drive and your new drive to the system. Boot. OpenBSD
should detect and attach RAID5 in degraded state and then you will be
able to perform your rebuild (if your failing drive is not offline,
you can use bioctl to offline it)
or
2) less safe (read completely untested and unverified by reading the
code on my side). Use bioctl -c 5 -l <your drives including a new one>
<etc> to attach the RAID5 array including the new drive. Please do
*NOT* force this. See if bioctl complains for example about missing
metadata or if it automatically detects new drive and start rebuild.

Generally speaking I'd use (1) since I used this in the past and had
no issue with it.

Reply via email to