A mirror is a metadevice composed of one or more submirrors. A submirror is made of one or more striped or concatenated metadevices. Mirroring data provides you with maximum data availability by maintaining multiple copies of your data.
The system must contain at least three state database replicas before you can create mirrors.
Before creating a mirror, create the striped metadevices or concatenated metadevices that will make up the mirror.
Any file system including root (/), swap, and /usr, or any application such as a database, can use a mirror.
When creating a mirror for an existing file system, be sure that the initial submirror contains the data.
When creating a mirror, first create a one-way mirror, then attach a second submirror. This starts a resync operation and ensures that data is not corrupted.
To mirror an existing file system, use an additional slice of equal or greater size than the slice already used by the mirror. You can use a concatenated metadevice or striped metadevice of two or more slices that have adequate space to contain the mirror.
You can create a one-way mirror for a future two- or three-way mirror.
You can create up to a three-way mirror. However, two-way mirrors usually provide sufficient data redundancy for most applications, and are less expensive in terms of disk drive costs. A three-way mirror enables you to take a submirror offline and perform a backup while maintaining a two-way mirror for continued data redundancy.
Use the same size slices when creating submirrors. Using different size slices creates unused space in the mirror.
Avoid having slices of submirrors on the same disk. Also, when possible, use disks attached to different controllers to avoid single points-of-failure. For maximum protection and performance, place each submirror on a different physical disk and, when possible, on different disk controllers. For further data availability, use hot spares with mirrors.
Adding additional state database replicas before creating a mirror can increase the mirror's performance. As a general rule, add one additional replica for each mirror you add to the system.
If possible create mirrors from disks consisting of the same disk geometries. The historical reason is that UFS uses disk blocks based on disk geometries. Today, the issue is centered around performance: a mirror composed of disks with different geometries will only be as fast as its slowest disk.