diff --git a/sys/geom/vinum/geom_vinum.c b/sys/geom/vinum/geom_vinum.c index d4cdbaa20a4b..c4e96f4b768d 100644 --- a/sys/geom/vinum/geom_vinum.c +++ b/sys/geom/vinum/geom_vinum.c @@ -384,6 +384,7 @@ gv_create(struct g_geom *gp, struct gctl_req *req) } p->vinumconf = sc; + p->flags |= GV_PLEX_NEWBORN; LIST_INIT(&p->subdisks); LIST_INSERT_HEAD(&sc->plexes, p, plex); } diff --git a/sys/geom/vinum/geom_vinum_subr.c b/sys/geom/vinum/geom_vinum_subr.c index c1fe58030dfa..d5e185131e48 100644 --- a/sys/geom/vinum/geom_vinum_subr.c +++ b/sys/geom/vinum/geom_vinum_subr.c @@ -421,10 +421,12 @@ gv_update_plex_config(struct gv_plex *p) if (p->sdcount == 0) state = GV_PLEX_DOWN; - else if ((p->flags & GV_PLEX_ADDED) || (p->org == GV_PLEX_RAID5)) { + else if ((p->flags & GV_PLEX_ADDED) || + ((p->org == GV_PLEX_RAID5) && (p->flags & GV_PLEX_NEWBORN))) { LIST_FOREACH(s, &p->subdisks, in_plex) s->state = GV_SD_STALE; p->flags &= ~GV_PLEX_ADDED; + p->flags &= ~GV_PLEX_NEWBORN; p->state = GV_PLEX_DOWN; } }