Most of us are familiar with SVM (a.k.a. Solaris Volume Manager, Disksuite, Onlne Disksuite, ODS, Solstice Disksuite, SDS, etc)
Under SVM we build "metadevices" from one or more disks. We can then mirror equal sized metadevices to create a "metamirror".
In this example we have two 30GB metadevices, one happens to be a concatenation of dissimilar disks, the other is a striped over equal sized disks.
The two metadevices are mirrored together to create a 30GB metamirror.
If any disk fails, the entire submirror will go offline but the metamirror will remain online.
-------------------------------------------------------------------------------|
|30GB metamirror |
| ----------------------------------------------------------- |
| |30GB submirror built from concatenation of two disks | |
| | ------------- ------------ | |
| | | 10G | | 20G | | |
| | | disk | + | disk | | |
| | ------------- ------------ | |
| ----------------------------------------------------------- |
| |
| ----------------------------------------------------------- |
| |30G submirror striped over three 10GB disks | |
| | ------------- ----------- ------------ | |
| | | 10G | | 10 | | 10G | | |
| | | disk | : | disk | : | disk | | |
| | ------------- ------------ ------------ | |
| ----------------------------------------------------------- |
| |
--------------------------------------------------------------------------------
In a ZFS pool we mirror inside the vdevs.
In the example below, we have a 45GB ZFS pool. Data in the pool is spread dynamically over three independent vdevs.
Two of the vdevs are mirrored, the third is unmirrored.
There is no requirement for the vdevs to be the same size.
The disks (or partitions) within a single vdev should be the same size or some disk space will go to waste.
If a disk in one of the mirrored vdevs fails, the vdev will enter an unmirrored state but there will be no loss of data.
If the disk in the unmirrored vdev fails, the entire vdev will fail and this will cause the entire pool to fail.
----------------------------------------------------------------------------------------------
|45GB ZFS pool |
| ---------------------- ---------------------- ----------------------- |
| | 10G mirrored vdev | | 20G mirrored vdev | | 15G unmirrored vdev | |
| | ------------- | | ------------- | | | |
| | | 10G | | | | 20G | | | ------------ | |
| | | disk | | | | disk | | | | 15G | | |
| | ------------- | : | ------------- | : | | disk | | |
| | ------------- | | ------------- | | ------------ | |
| | | 10G | | | | 20G | | | | |
| | | disk | | | | disk | | | | |
| | ------------- | | ------------- | | | |
| ---------------------- ---------------------- ----------------------- |
| |
----------------------------------------------------------------------------------------------
Notes:
In the real world we would probably not create a pool where some vdevs are mirrored and some are not.
If we have more than three disks in a vdev we have a choice of a "three-way mirror" or we could use RAIDZ. RAIDZ is an improvement over RAID-5.
If we are using LUNs from the SAN which are already built in a RAID array, there may be little value in using mirroring or RAIDZ within a vdev.
Saturday, August 1, 2009
ZFS Tip: Comparison of SVM mirroring and ZFS mirroring
Labels:
UNIX
Subscribe to:
Post Comments (Atom)
1 comments:
Correction/Addition: ODS/SDS/SVM implements "mirrored stripes" as "striped mirrors" internally, so when one stripe-segment underlying such a mirrored device fails, *only that segment* of the effected submirror is taken offline, the
surviving pieces of the submirror remain online and in-use.
ie: when a separate piece of a submirror fails, the whole submirror is *not* taken offline, rather only the failed piece is tagged as unusable.
Post a Comment