Monday, February 07, 2005

Solaris mirror resyncs

Most of our servers have mirrored root disks, and so when I install them (which I've been doing a lot of this last week) I need to resync the mirrors (set up during jumpstart). The default settings in Solaris Volume Manager can lead to pretty long resync times, and the way to speed it up [taken straight out of the metasync(1M) manpage] is to add the following

* speed up mirror resync
set md_mirror:md_resync_bufsz = 2048

to your /etc/system file (I do this in my jumpstart finish script). This works for Solaris 10 (which is of course what I'm installing eeverything with now!).

This speeds up the resync quite nicely. In fact, the data rate during resync seems to be almost the same in megabytes/s as the disk size in gigabytes (this might just be a coincidence and valid only for the restricted range of hardware I've tested). But this leads to the resync time being pretty well constant.

With the default SVM settings, I almost always saw 8 megabytes/s, which is pathetic for modern disks, and the resync could take hours. Now it's nice and quick.



fishzle said...

I'm curious as what the side effects are. metasync(1m) doesn't say anything about it. And neither does the performance tuning blueprint (

Peter Tribble said...

I'm not sure there are any negative side-effects. The load on the disks was the same before, really - it was just very inefficient. Reducing the resync time dramatically reduces the time out of service, and correspondingly reduces the risk of a multiple failure.