When we create a RAID0+1 volume, mirroring a stripe of subdisks against another stripe of subdisks, we represent each side of the mirror with a plex. The volume contains plexes which contain the subdisks. So if we look at where the data flows int the volume we see that (roughly) the data is written to the volume, which is passed to each of the plexes, which parses it among the subdisks. We don't think much about it, after working with VxVM for awhile, but isn't that kinda limiting? What if you could double the length of that chain? What if a volume itself could be assigned as a subdisk, so that we'd have a new data chain like this: the data is written to the volume, which is passed to each of the plexes, which parses it among the "subvolumes", which pass it to each of its plexes, which parses it among its subdisks?! That'd be nice. Well, that's what Layered Volumes are. We add a set of new objects to VxVM: the subvolume (sv/v2), the subplex(p2), and the sub-subdisk(s2). Because of Layered Volumes we can get down to the level needed to mirror individual disks against each other. Here's a quick overview of how we can use Layered Volumes to get us to the place we wanna be to work with RAID1+0:
1) Create your subdisks 2) Create a plex for each subdisk and attach the subdisk to the plex 3) Create a volume which contains two plexes (one plex mirroring the other) 4) Tell VxVM that the volume you just created is REALLY suppose to be a SubVolume (which is treated similarly to a subdisk) 5) Repeat this process till all the subdisks you are gonna use are mirrored. 6) Create a new plex, and attach each of the subvolumes to it. 7) Create a volume and assign the plex to it. 8) Done! Start it. |
Lets clarify on that a bit more, and do a rough sketch of that vxprint would show us, by basically repeating the previous which some new names:
v testvol pl testvolplex So here (v,pl) we have a normal volume and normal plex. sv testvol-sub1 This is our subvolume (treated as subdisk) which contains a "normal" volume, plexes and subdisks. v2 layter1 p2 layer1-plex1 s2 disk01-01 p2 layer1-plex2 s2 disk02-01 So here is what looks like a normal volume, except there are "2"s on each of the object names (v becomes v2, pl becomes p2, sd becomes s2) to represent the fact that they are part of a subvolume. sv testvol-sub2 This is our second subvolume v2 layer2 p2 layer2-plex1 s2 disk03-01 p2 layer2-plex2 s2 disk04-01 Just like above. sv testvol-sub3 Etc,etc. Just keep going all you like. |
See how that fits? Each of the p2's obviously are concats. Because we're mirroring one subdisk against another subdisk (not multiples) we don't/can't stripe. The striping is done at the plex (not subplex) level. So if we looked at the above example again with RAID type in mind, we'd see something like this:
v pl stripe sv v2 p2 concat s2 p2 concat s2 sv v2 ... |
And just in case those examples above are still hard to understand, just think of it like this (I'll use the wrong, but more familiar object names):
v testvol pl testplex (stripe) sv testvol-sub1: v layer1 pl layer1-plex1 (concat) sd disk01-01 pl layer1-plex2 (concat) sd disk02-01 sv testvol-sub2: v layer2 ..... |
At this point lets point out that you can do more than just RAID1+0 with VxVM, you can also do a hybrid "concat+0". "Concat+0" is just like RAID1+0, but instead of striping the primary plex (as seen above) you would concatenate it. Frankly, the only reason you might end up doing a contact over a stripe would be to compensate for a major design flaw (or lack of resources). In a stripe each column (and hence subvolume in our case) must be identical, concats don't have this problem, so you can "mix-n-match" disks into the volume you'd like. I'll demonstrate this later. Further, know that Veritas has a groovy marketing name for RAID1+0 and CONCAT+0, they are respectively: Stripe-Pro and Concat-Pro. Snazzy huh? You'll see this more in the walk throughs later.
The concepts should be starting to be clear now. This gives you the background to look at the building of an actual volume. So lets move onto actually working with layered volumes.