A method and apparatus for mirroring data stored in a storage device
within a mass storage system by copying data stored in a first storage
device to a second storage device, while simultaneously flushing the
write cache. After the two storage devices are synchronized, the
applications running on the server that is coupled to the storage devices
are temporarily halted to insure that the data is coherent. To obtain
coherency, residual data in the write cache may have to be written to
both the first and second storage devices. Thereafter, the mirror is
broken and the first storage device can begin to be used to store data
and the second storage device can be used for other purposes such as
facilitating a backup of the data. In this embodiment, since most, if not
all, of the data in the write cache is flushed during the time that the
first storage device is copied, execution of the applications is only
halted for a very short time period.