Index: vinum/geom_vinum_subr.c =================================================================== --- vinum/geom_vinum_subr.c (revision 204884) +++ vinum/geom_vinum_subr.c (working copy) @@ -536,8 +536,13 @@ else if (p->org == GV_PLEX_RAID5 && p->flags & GV_PLEX_NEWBORN) { LIST_FOREACH(s, &p->subdisks, in_plex) gv_set_sd_state(s, GV_SD_UP, GV_SETSTATE_FORCE); - /* If added to a volume, we want the plex to be down. */ - state = (p->flags & GV_PLEX_ADDED) ? GV_PLEX_DOWN : GV_PLEX_UP; + + if ((p->flags & GV_PLEX_INITNEW) || + (p->flags & GV_PLEX_ADDED)) + state = GV_PLEX_DOWN; + else + state = GV_PLEX_UP; + gv_set_plex_state(p, state, GV_SETSTATE_FORCE); p->flags &= ~GV_PLEX_ADDED; } else if (p->flags & GV_PLEX_ADDED) { Index: vinum/geom_vinum_state.c =================================================================== --- vinum/geom_vinum_state.c (revision 204884) +++ vinum/geom_vinum_state.c (working copy) @@ -436,7 +436,8 @@ p->state = GV_PLEX_DOWN; /* Some of our subdisks are initializing. */ - } else if (sdstates & GV_SD_INITSTATE) { + } else if ((p->flags & GV_PLEX_INITNEW) || + (sdstates & GV_SD_INITSTATE)) { if (p->flags & GV_PLEX_SYNCING || p->flags & GV_PLEX_REBUILDING) Index: vinum/geom_vinum_var.h =================================================================== --- vinum/geom_vinum_var.h (revision 204884) +++ vinum/geom_vinum_var.h (working copy) @@ -335,7 +335,7 @@ int flags; #define GV_PLEX_ADDED 0x01 /* Added to an existing volume. */ #define GV_PLEX_SYNCING 0x02 /* Plex is syncing from another plex. */ -#define GV_PLEX_THREAD_ACTIVE 0x04 /* Plex has an active RAID5 thread. */ +#define GV_PLEX_INITNEW 0x04 /* Plex needs to be initialized. */ #define GV_PLEX_THREAD_DIE 0x08 /* Signal the RAID5 thread to die. */ #define GV_PLEX_THREAD_DEAD 0x10 /* The RAID5 thread has died. */ #define GV_PLEX_NEWBORN 0x20 /* The plex was just created. */ Index: vinum/geom_vinum_create.c =================================================================== --- vinum/geom_vinum_create.c (revision 204884) +++ vinum/geom_vinum_create.c (working copy) @@ -213,6 +213,8 @@ p->vinumconf = sc; p->synced = 0; p->flags |= GV_PLEX_NEWBORN; + if (p->org == GV_PLEX_RAID5) + p->flags |= GV_PLEX_INITNEW; LIST_INSERT_HEAD(&v->plexes, p, in_volume); LIST_INIT(&p->subdisks); TAILQ_INIT(&p->packets);