Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Dec 2020 21:51:44 +0100
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        "FreeBSD CURRENT" <freebsd-current@freebsd.org>, "Dustin Marquess" <dmarquess@gmail.com>
Subject:   Re: How to clear the 'remove:' line from 'zpool status'
Message-ID:  <op.0u71kikbkndu52@sjakie>
In-Reply-To: <CAJpsHY63gZdLnUF%2BZ2w0ENvyJGqokGOj8EVOF3EU9m-B7Sxyqg@mail.gmail.com>
References:  <CAJpsHY63gZdLnUF%2BZ2w0ENvyJGqokGOj8EVOF3EU9m-B7Sxyqg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Sat, 05 Dec 2020 07:07:02 +0100, Dustin Marquess <dmarquess@gmail.com>  
wrote:

> So I stupidly did a 'zpool add' instead of a 'zpool attach'.  Luckily
> I was able to 'zpool remove' the device thanks to the remove work done
> a while back.
>
> However, now I can't for the life of me get this part of the 'zpool
> status' output to go away:
>
>   pool: zroot
>  state: ONLINE
>   scan: scrub repaired 0B in 00:01:06 with 0 errors on Fri Dec  4  
> 18:18:31 2020
> remove: Removal of vdev 1 copied 104K in 0h0m, completed on Fri Dec  4
> 18:10:08 2020
>     72 memory used for removed device mappings
> config:
>
> I've tried 'zppol clear', 'zpool scrub', and rebooted.  Is there some
> way to clear that 'remove' line? It's irritating my OCD :(.
>
> Thanks!
> -Dustin


Apply attached diff and rebuild world, Untested. Might have unwanted  
effects.

Regards,
Ronald.
[-- Attachment #2 --]
--- sys/contrib/openzfs/cmd/zpool/zpool_main.c.orig	2020-12-06 21:43:51.875360000 +0100
+++ sys/contrib/openzfs/cmd/zpool/zpool_main.c	2020-12-06 21:50:26.401983000 +0100
@@ -8211,13 +8211,8 @@
 		nvlist_t **spares, **l2cache;
 		uint_t nspares, nl2cache;
 		pool_checkpoint_stat_t *pcs = NULL;
-		pool_removal_stat_t *prs = NULL;
 
 		print_scan_status(zhp, nvroot);
-
-		(void) nvlist_lookup_uint64_array(nvroot,
-		    ZPOOL_CONFIG_REMOVAL_STATS, (uint64_t **)&prs, &c);
-		print_removal_status(zhp, prs);
 
 		(void) nvlist_lookup_uint64_array(nvroot,
 		    ZPOOL_CONFIG_CHECKPOINT_STATS, (uint64_t **)&pcs, &c);

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