Re: zpool query

From: Steve O'Hara-Smith <steve_at_sohara.org>
Date: Sun, 24 Jul 2022 15:06:08 UTC
On Sun, 24 Jul 2022 13:35:29 +0000
void <void@f-m.fm> wrote:

> Hi,
> 
> I'd like to convert a zpool made of two striped disks and make it so that
> they are a mirror.

	The problem you may face is that the pool you have is twice the
capacity of the pool you want, as long as the usage is less than 50% you
should be OK.

> Aside from removing the data from that zpool, destroying it, then making
> a mirror in the usual way, is there a way of doing this in-place without
> having to move the data off?

	One thing to think about, if the drives are not identical then you
should check to see which one is the larger and remove that one because you
won't be able to mirror a larger drive onto a smaller one - even one block
smaller!

	Provided there is not too much data then you can use zpool remove
to remove one drive from the stripe - this will take time because all the
data has to be copied and it will fail if there isn't room for it all.

	Once the drive is removed you can use zpool attach to add it as a
mirror of the other drive.

	Full disclosure - this is as documented I've never needed to do it.

-- 
Steve O'Hara-Smith <steve@sohara.org>