diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index ebadccf19e09..cc6c18eed897 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -865,6 +865,10 @@ zpool_do_labelclear(int argc, char **argv) return (1); } + if (ioctl(fd, BLKFLSBUF) != 0) + (void) fprintf(stderr, gettext("failed to invalidate " + "cache for %s: %s\n"), vdev, strerror(errno)); + if (zpool_read_label(fd, &config, NULL) != 0 || config == NULL) { (void) fprintf(stderr, gettext("failed to check state for %s\n"), vdev);