On Saturday 24 September 2016 00:13:47 Karel Gardas wrote:
> Hello,
> 
> following patch fixes issue while attempting to attach SR RAID1 drive
> where not all chunks provide native metadata. I.e. one chunk is dd
> zeroed. The complain of SR is good one, but I'd think that force
> parameter should overcome it and really enforce SR to attach such
> drive.

I'll need to look more closely, but I'm pretty certain this is not correct - 
if there is no native metadata on the chunk, then it should not be considered 
to be part of the volume. In the case of an SR RAID1 volume, if you have a 
chunk that was zeroed, then you should be rebuilding on to it, rather than 
bringing it up as an existing part of the volume.
 
> Thanks,
> Karel
> 
> diff -u -p -u -r1.377 softraid.c
> --- softraid.c  20 Jul 2016 20:45:13 -0000      1.377
> +++ softraid.c  23 Sep 2016 22:06:55 -0000
> @@ -1658,7 +1661,7 @@ sr_meta_native_attach(struct sr_discipli
>                         not_sr++;
>         }
> 
> -       if (sr && not_sr) {
> +       if (sr && not_sr && !force) {
>                 sr_error(sc, "not all chunks are of the native metadata "
>                     "format");
>                 goto bad;

Reply via email to