Mounting root...
John Baldwin
jhb at FreeBSD.org
Tue Aug 24 13:33:09 PDT 2004
On Monday 23 August 2004 05:47 pm, Pawel Jakub Dawidek wrote:
> On Mon, Aug 23, 2004 at 05:16:31PM -0400, John Baldwin wrote:
> +> On Monday 23 August 2004 03:05 pm, Pawel Jakub Dawidek wrote:
> +> > On Mon, Aug 23, 2004 at 11:46:12AM -0400, John Baldwin wrote:
> +> > +> Why not have mirror create the provider instantly in an degraded
> state +> > as soon +> as one disk shows up and then change from degraded
> back to full +> > when the +> second disk finally arrives? Isn't this the
> same case as +> > someone jerking the +> disk out at run time and then
> shoving it (or a new +> > one) back in without +> rebooting?
> +> >
> +> > If it will be started in degraded mode, it can be mounted and modified
> +> > before next components arrive, so there will be a need to rebuild
> them. +>
> +> How is this different from jerking the disk out of a running system and
> then +> shoving it back in again?
>
> You don't want to rebuild a mirror on every boot after clean shutdown.
> In most cases one can set kern.geom.mirror.timeout to 0 and there will be
> no problem with this, because even after mirror start is degraded mode
> new components are not rebuilt if there were no writes, but it will be
> good to have more general solution...
The fact that a RAID can recover when a disk goes away and comes back is
already the "general solution" it seems. It works all the time, not just at
boot, so it seems to me like you are trying to solve a problem that is
already solved. I think at most you could maybe have a system wide delay
before that the user can tweak via a tunable (rather than a per-GEOM class
tunable like your mirror one) in order to optimize the boot code for these
rare cases but that is about it. I.e., if a user notices that one of the
disks always takes an extra second they can set the tunable to force the
kernel to wait 2 seconds before trying to mount root. Any such delay should
be centralized, however, and not per-class, since all the per-class delays
would end up being cumulative, so if MIRROR waits 2 seconds and STRIPE waits
3 seconds then the entire process actually waits 5 seconds as opposed to
letting the user tweak a single centralized timeout.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-arch
mailing list