Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Dec 2006 15:18:43 +0100
From:      Christian Laursen <xi@borderworlds.dk>
To:        freebsd-geom@freebsd.org
Subject:   geom_mirror delayed synchronizing question
Message-ID:  <ygfwt4dwhfg.fsf@dominion.borderworlds.dk>

next in thread | raw e-mail | index | archive | help
I am trying to add functionality to geom_mirror to prevent it from
synchronizing mirrors until a given time even if the mirrors are
configured for autosynchronization. The purpose of this is to be able
to postpone the synchronization until fsck is done after an unclean
shutdown.

So far I have been succesful in doing part of this.

I have added a tunable "kern.geom.mirror.sync" that tells geom_mirror
whether sync is allowed. It is also available as a read-only sysctl.
When this tunable is set to 0, mirrors are not synced.

I have added a "gmirror allowsync" command that changes this variable
to allow synchronization to happen.

What is missing is automatic synchronization after running this
command. If I manualle run "gmirror rebuild name prov" on the stale
arrays, synchronization starts, but I need this to happen
automatically.

The small changes I have made so far: 
http://borderworlds.dk/~xi/gmirror.diff

Any hints on how to write the code to find the relevant mirrors and
initiate the rebuild would be much appreciated.

Thanks.

-- 
Christian Laursen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygfwt4dwhfg.fsf>