Originally posted by: SystemAdmin
I actually encounter this problem quite frequently, in which there are there are two different types of DASD that a single LV is mirrored across. However, keep in mind that I personally think that this is not necessarily a good thing for performance, because you will be at the speed of the slower DASD device, especially during write operations on mirrored and synced LVs. But here is an example of how I do this and how I expand LVs that use IBM and other vendor drives in the same volume group.
let's say hdisk1 is IBM and hdisk2 is another vendor disk. In order to get 100% control over how the LPs are distributed across the disks I use map files.
1. Create the LV
mercury:/> mklv -c 2 -m lv_map.txt -t'raw' -y'test_lv' appvg 4
test_lv
The map file for the operation above looks like this
mercury:/> cat lv_map.txt
hdisk3:1
hdisk3:2
hdisk3:3
hdisk3:4
hdisk2:1
hdisk2:2
hdisk2:3
hdisk2:4
mercury:/> lslv -m test_lv
test_lv:N/A
LP PP1 PV1 v PP2 PV2 PP3 PV3
0001 0001 hdisk3 0001 hdisk2
0002 0002 hdisk3 0002 hdisk2
0003 0003 hdisk3 0003 hdisk2
0004 0004 hdisk3 0004 hdisk2
You see that I specified every hdisk for each LP. So, now if I want to extend the LV and make sure that I keep my distribution accross the DASD correct. Let me show you how this would be extended
without a map file.
mercury:/> lslv -m test_lv
test_lv:N/A
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0001 hdisk2 0001 hdisk3
0002 0002 hdisk2 0002 hdisk3
0003 0003 hdisk2 0003 hdisk3
0004 0004 hdisk2 0004 hdisk3
0005 0005 hdisk3 0005 hdisk2
0006 0006 hdisk3 0006 hdisk2
The primary copy of the 2 LP extendlv is suddnely on the wrong disk. So in order to assure that the secondary copy remains on the other vendor disk, I again extend the LV with a a specific map file.
mercury:/> cat lv_map_add.txt
hdisk2:5
hdisk2:6
hdisk3:5
hdisk3:6
mercury:/> extendlv -m lv_map_add.txt test_lv 2
mercury:/> lslv -m test_lv
test_lv:N/A
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0001 hdisk2 0001 hdisk3
0002 0002 hdisk2 0002 hdisk3
0003 0003 hdisk2 0003 hdisk3
0004 0004 hdisk2 0004 hdisk3
0005 0005 hdisk2 0005 hdisk3
0006 0006 hdisk2 0006 hdisk3
I normally use a little shell script I wrote to create the map files with. Of course this will also work with an LV that has 3 copies.