For the test I'm going to use four 9G drives. I've already added them to a disk group (oradg) and I'm first going start by creating subdisks for each of the disks:
root@sun5:/root# vxmake -g oradg sd oradg02-01 oradg02,0,17678493 root@sun5:/root# vxmake -g oradg sd oradg03-01 oradg03,0,17678493 root@sun5:/root# vxmake -g oradg sd oradg04-01 oradg04,0,17678493 root@sun5:/root# vxmake -g oradg sd oradg05-01 oradg05,0,17678493 |
Now we'll create some plexes that the subdisk can be apart of, remember that each subdisk will be the only one in the plex (see above):
root@sun5:/root# vxmake -g oradg plex layer1-01 sd=oradg02-01 root@sun5:/root# vxmake -g oradg plex layer1-02 sd=oradg03-01 root@sun5:/root# vxmake -g oradg plex layer2-01 sd=oradg04-01 root@sun5:/root# vxmake -g oradg plex layer2-02 sd=oradg05-01 |
Now we'll create two volumes. We're looking to create a layered volume with two columns, which means the primary plex of the layered vol should only have 2 subdisks, each of thoughs are actually volumes (the layering part), so lets create the volumes:
root@sun5:/root# vxmake -g oradg -U fsgen vol layer1 plex=layer1-01,layer1-02 root@sun5:/root# vxmake -g oradg -U fsgen vol layer2 plex=layer2-01,layer2-02 |
Great! Now lets look at what we've got so far (vxprint -hrt):
v layer1 fsgen DISABLED EMPTY 17678493 ROUND - pl layer1-01 layer1 DISABLED EMPTY 17678493 CONCAT - RW sd oradg02-01 layer1-01 oradg02 0 17678493 0 c1t11d0 ENA pl layer1-02 layer1 DISABLED EMPTY 17678493 CONCAT - RW sd oradg03-01 layer1-02 oradg03 0 17678493 0 c1t10d0 ENA v layer2 fsgen DISABLED EMPTY 17678493 ROUND - pl layer2-01 layer2 DISABLED EMPTY 17678493 CONCAT - RW sd oradg04-01 layer2-01 oradg04 0 17678493 0 c1t5d0 ENA pl layer2-02 layer2 DISABLED EMPTY 17678493 CONCAT - RW sd oradg05-01 layer2-02 oradg05 0 17678493 0 c1t8d0 ENA |
So thoughs are going to be the "legs", if you will. Now, PAY ATTENTION! YOU MUST START THE VOLUMES BEFORE CONTINUING!!! If you don't start the volumes you'll keep building and building with everything looking fine, until you try to start the finished layered vol and find that you can't because the subvols aren't started, and you can't start subvols! So at this point lets:
root@sun5:/root# vxvol -g oradg start layer1 root@sun5:/root# vxvol -g oradg start layer2 |
Note that both this syncs take the normal amount of time (along time!). Make sure you have a book and some coffee for the syncing. Once their started you'll see this (vxprint -hrt):
v layer1 fsgen ENABLED ACTIVE 17678493 ROUND - pl layer1-01 layer1 ENABLED ACTIVE 17678493 CONCAT - RW sd oradg02-01 layer1-01 oradg02 0 17678493 0 c1t11d0 ENA pl layer1-02 layer1 ENABLED ACTIVE 17678493 CONCAT - RW sd oradg03-01 layer1-02 oradg03 0 17678493 0 c1t10d0 ENA v layer2 fsgen ENABLED ACTIVE 17678493 ROUND - pl layer2-01 layer2 ENABLED ACTIVE 17678493 CONCAT - RW sd oradg04-01 layer2-01 oradg04 0 17678493 0 c1t5d0 ENA pl layer2-02 layer2 ENABLED ACTIVE 17678493 CONCAT - RW sd oradg05-01 layer2-02 oradg05 0 17678493 0 c1t8d0 ENA |
Now here's the magic part, this is the key! Use vxedit to tell Veritas Volume Manager that the volumes you just started are actually subdisks!:
root@sun5:/root# vxedit -g oradg set layered=on layer1 root@sun5:/root# vxedit -g oradg set layered=on layer2 |
Now the kool part, use the volumes (now subvolumes) to create subdisks!:
root@sun5:/root# vxmake -g oradg sd test-subvol1 layer1,0,17678493 root@sun5:/root# vxmake -g oradg sd test-subvol2 layer2,0,17678493 |
And then create a plex for the subdisks:
root@sun5:/root# vxmake -g oradg plex plex1 sd=test-subvol1,test-subvol2 |
Notice that I didn't specify a layout in the "vxmake plex" statement, so this volumes is going to be a CONCAT-PRO volume. To create a STRIPE-PRO volume I could have used this:
vxmake -g oradg plex plex1 layout=stripe ncolumns=2 stwidth=128 sd=test-subvol1,test-subvol2 |
Now, we just need to create the volume object to wrap it all up:
root@sun5:/root# vxmake -g oradg -U fsgen vol cat-pro-vol plex=plex1 |
Presto! We're done! We just need to take a look at it, and then start the volume. Here's what it looks like now (vxprint -hrt):
v cat-pro-vol fsgen DISABLED EMPTY 35356986 ROUND - pl plex1 cat-pro-vol DISABLED EMPTY 35356986 CONCAT - RW sv test-subvol1 plex1 layer1 1 17678493 0 2/2 ENA v2 layer1 fsgen ENABLED ACTIVE 17678493 ROUND - p2 layer1-01 layer1 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg02-01 layer1-01 oradg02 0 17678493 0 c1t11d0 ENA p2 layer1-02 layer1 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg03-01 layer1-02 oradg03 0 17678493 0 c1t10d0 ENA sv test-subvol2 plex1 layer2 1 17678493 0 2/2 ENA v2 layer2 fsgen ENABLED ACTIVE 17678493 ROUND - p2 layer2-01 layer2 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg04-01 layer2-01 oradg04 0 17678493 0 c1t5d0 ENA p2 layer2-02 layer2 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg05-01 layer2-02 oradg05 0 17678493 0 c1t8d0 ENA |
Now we just need to start it and then take a final peek:
root@sun5:/root# vxvol -g oradg start cat-pro-vol (LONG time spend syncing) (vxprint -hrt:) v cat-pro-vol fsgen ENABLED ACTIVE 35356986 ROUND - pl plex1 cat-pro-vol ENABLED ACTIVE 35356986 CONCAT - RW sv test-subvol1 plex1 layer1 1 17678493 0 2/2 ENA v2 layer1 fsgen ENABLED ACTIVE 17678493 ROUND - p2 layer1-01 layer1 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg02-01 layer1-01 oradg02 0 17678493 0 c1t11d0 ENA p2 layer1-02 layer1 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg03-01 layer1-02 oradg03 0 17678493 0 c1t10d0 ENA sv test-subvol2 plex1 layer2 1 17678493 0 2/2 ENA v2 layer2 fsgen ENABLED ACTIVE 17678493 ROUND - p2 layer2-01 layer2 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg04-01 layer2-01 oradg04 0 17678493 0 c1t5d0 ENA p2 layer2-02 layer2 ENABLED ACTIVE 17678493 CONCAT - RW s2 oradg05-01 layer2-02 oradg05 0 17678493 0 c1t8d0 ENA |
Bingo! Done! Just create your file system and your ready to go! You can see from the step through that really your are just creating a bunch of volumes, telling Veritas Volume Manager to just think of the volumes as subdisk objects (via vxedit), and then building another volume with the subvolumes as subdisks. The only trick along the way is to make sure to start the subvolumes before you you convert them via vxedit and build the main volume.
Now, that process can be fraught with mistakes, so lets look at the far better and far easier way of doing things no that you've got a better idea of whats going on.