Re: Unable to replace drive in raidz1

From: Alan Somers <asomers_at_freebsd.org>
Date: Fri, 06 Sep 2024 22:28:31 UTC
On Fri, Sep 6, 2024 at 4:22 PM Chris Ross <cross+freebsd@distal.com> wrote:
>
>
>
> > On Sep 6, 2024, at 18:02, Alan Somers <asomers@freebsd.org> wrote:
> > Another user reports the same error message.  In their case, it's an
> > inappropriate error message from /sbin/zpool.  Can you try a "zpool
> > status -v" and "diskinfo -f /dev/da10"?  That will show you if you
> > have the same problem.  If your pool has a 512B block size but the new
> > disk is 4kn, then you cannot use it as a replacement.
> >
> > https://github.com/openzfs/zfs/issues/14730
>
> Yeah, I came across that in my searching.  Although, I thought people
> had found success adding “-o ashift=9” to the replace command.
> I can confirm that this raidz1 is ashift=9, and the disks in it 512
> byte sectorsize.  The other two raidz’s are ashift=12.
>
> diskinfo shows 512 as sectorsize for one of the older disks
> (matching model to the removed da3), and 4096 sectorsize
> for the new disk.
>
> Is this totally impossible?  I know I have replaced smaller disks with
> much larger ones in the past, though it’s been a few years and
> I don’t remember the details.  Is there really no way to put a 4k
> block disk in a set with 512 byte blocks?  I thought they were still
> able to “act” like 512-byte block disks?  (512e)
>
>                - Chris

If it's a 4kn disk, then what you ask for is impossible.  If it's
512e, then it should've already worked.  With diskinfo, a 512e disk
will have 512 sectorsize and 4096 stripesize.  A 4kn disk will show
4096 sectorsize.  If you cannot obtain a 512n or 512e disk, then I'm
afraid that you'll have to recreate your whole pool.

-Alan