Lack of gmirror features

Does anybody know, are there plans to add following features in the gmirror?
  1. Pause/stop syncronization (like it does zpool scrub with "-s" option). It's really disappointing when you couldn't stop or even delay started syncronization.
  2. Check (maybe controlled via sysctl?) is it already runned synchronizaton and allow only one at a time. Simple example: when I have gmirror per partitions on one disk and server forcibly rebooted, gmirror starts autosyncronization on the all mirrors simultaneously, that is, of course, very hard for any HDD.
# gmirror label -v -b round-robin test1 /dev/ad0s3 && \
gmirror label -v -b round-robin test2 /dev/ad0s4 && \
gmirror status

Code:
Metadata value stored on /dev/ad0s3.
Done.
Metadata value stored on /dev/ad0s4.
Done.
           Name    Status  Components
   mirror/test1  COMPLETE  ad0s3
   mirror/test2  COMPLETE  ad0s4
# gmirror insert test1 /dev/ad2s3 && \
gmirror insert test2 /dev/ad2s4 && \
gmirror status && sleep 1 && \
gmirror status && sleep 1 && \
gmirror status

Code:
           Name    Status  Components
   mirror/test1  DEGRADED  ad0s3
                           ad2s3 (0%)
   mirror/test2  DEGRADED  ad0s4
                           ad2s4 (0%)
           Name    Status  Components
   mirror/test1  DEGRADED  ad0s3
                           ad2s3 (5%)
   mirror/test2  DEGRADED  ad0s4
                           ad2s4 (4%)
           Name    Status  Components
   mirror/test1  DEGRADED  ad0s3
                           ad2s3 (9%)
   mirror/test2  DEGRADED  ad0s4
                           ad2s4 (9%)
 
There has been mention of the second item on the mailing lists. Don't recall off-hand if anyone is actively working on them, though. You could script it, though, as a stop-gap, along the lines of:
  1. disable autosync on test2
  2. check status of test1
  3. if test1 shows COMPLETE, check status of test2
  4. if test2 shows degraded, turn on autosync
  5. once test2 shows COMPLETE, turn off autosync
Autosync is managed via the configure argument to gmirror(8):
# gmirror configure -n test2
# gmirror configure -a test2

You could probably also do it using the activate and deactivate arguments to online/offline parts of test2.
 
I think that gmirror is so heavy on rebuild because it uses MAXPHYS-sized (128K) requests in a batch of two. So if something distracts head from it's position, performance drops too much for both sync and payload. From that perspective I've made graid to use bigger (1MB and configurable) requests and slowdown when some payload I/O is in progress. As result, I haven't noticed significant performance drop on my tests to make it controllable.

Point with several rebuilds running on physical disks is right, but if you use mirroring on partition basis, it is not trivial for gmirror instances to cooperate.
 
But it would be nice to see user-configurable sysctl option that will allow only one sync operation at the moment. Isn't it easy to make? Please!
 
Back
Top