Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2022 00:15:15 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        "Kevin P. Neal" <kpn@neutralgood.org>
Cc:        questions@freebsd.org, void@f-m.fm
Subject:   Re: zpool query
Message-ID:  <20220725001515.7d33464df2bc271ea364bd8b@sohara.org>
In-Reply-To: <Yt3IFwXDz8bne2TH@neutralgood.org>
References:  <6baba52f-309a-4ebd-aef5-5b513470a48c@www.fastmail.com> <20220724160608.5e0a288a8c279b1f3348f890@sohara.org> <Yt3IFwXDz8bne2TH@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 24 Jul 2022 18:30:47 -0400
"Kevin P. Neal" <kpn@neutralgood.org> wrote:

> On Sun, Jul 24, 2022 at 04:06:08PM +0100, Steve O'Hara-Smith wrote:
> > 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.
> 
> > 	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.
> 
> When did this start to work? The man page zpool(8) doesn't say it works
> for striped vdevs. It seems quite useful for people who used the wrong
> verb and ended up with a striped vdev instead of a mirror, which has
> happened on this list before.
> 
> Would "void" by any chance verify that it works and let us know?

	From the manpage of zpool-remove on a 13.1 box:

-----------------------------------------
     zpool remove [-npw] pool deviceā€¦
             Removes the specified device from the pool.  This command
             supports removing hot spare, cache, log, and both mirrored and
             non-redundant primary top-level vdevs, including dedup and
             special vdevs.

             Top-level vdevs can only be removed if the primary pool storage
             does not contain a top-level raidz vdev, all top-level vdevs
have the same sector size, and the keys for all encrypted datasets are
             loaded.

             Removing a top-level vdev reduces the total amount of space in
             the storage pool.  The specified device will be evacuated by
             copying all allocated space from it to the other devices in the
             pool.  In this case, the zpool remove command initiates the
             removal and returns, while the evacuation continues in the
---------------------------------------------------

-- 
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220725001515.7d33464df2bc271ea364bd8b>