gvinum start volume returns EBUSY

Rick C. Petty rick-freebsd at kiwi-computer.com
Mon May 1 20:27:16 UTC 2006


When rebuilding a degraded plex with "gvinum start volume" on a mounted
filesystem, gvinum reports "errno: 16" (EBUSY).  In the CVS:

src/sys/geom/vinum/geom_vinum_init.c, lines 363-364 (of MAIN, added
2005-Oct-09, rev 1.10.2.1) has the check:

	if (gv_is_open(p->geom))
		return (EBUSY);

Why is this the case?  The log for that change suggests this is to prevent
sync operations from starting when they are already in progress, but that
really refers to lines 366-367:

	if (p->flags & GV_PLEX_SYNCING)
		return (EINPROGRESS);

It seems to me that lines 363-364 should be deleted.  If you have a
degraded volume but need to keep it mounted (such as /usr or /home, etc.),
I can't see any reason why you should be forced to unmount the volume
before rebuilding (if the volume is RAID5).  Maybe this restriction is
useful for non-RAID5 configurations, but gv_rebuild_plex is only called
in the context of GV_PLEX_RAID5 on degraded plexes.

Maybe I'm misunderstanding something.  Feel free to enlighten me!  :-)

-- Rick C. Petty


More information about the freebsd-hackers mailing list