Chapter 1. Components of the logical volume manager
3.3 The mirror and stripe function
3.3.1 Super strict allocation policy
AIX Version 4.3.3 introduces this new allocation policy type, super strict. This option is specified to the mklv command as the s flag for the -s option. Here are the possible flags for the strict option:
-s Strict Determines the strict allocation policy. Copies of a logical volume can be allocated to share or not to share the same physical volume. The strict parameter is represented by one of the following:
y Sets a strict allocation, so copies for a logical partition cannot share the same physical volume. This is the default for allocation policy.
n Does not set a strict allocation policy. So copies for a logical partition cannot share the same physical volume. s Sets a super strict allocation policy, so that the partitions
allocated for one mirror copy cannot share a physical volume with the partitions from another mirror copy. 3.3.1.1 Create the poor man’s stripe first, then mirror
Let us go back to the poor man’s stripe (3.1.2.2, “The poor man’s stripe” on page 143). If you create the poor man’s striped logical volume (which scatters over two physical volumes), then create a mirror copy, you will have the following allocation for the physical partitions (see Figure 58 on page 164). root@lorraine:/ [159] # mklv -y pmstripelv -e x pmstripevg 300 hdisk1 hdisk2
pmstripelv
root@lorraine:/ [163] # mklvcopy pmstripelv 2 hdisk4 hdisk5 root@lorraine:/ [164] # lslv -m pmstripelv pmstripelv:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0109 hdisk1 0109 hdisk4 0002 0109 hdisk2 0109 hdisk5 0003 0110 hdisk1 0110 hdisk4 0004 0110 hdisk2 0110 hdisk5 (many lines are snipped off)
0297 0257 hdisk1 0257 hdisk4 0298 0257 hdisk2 0257 hdisk5 0299 0258 hdisk1 0258 hdisk4
The super strict policies and the mirroring and striping function are not supported on AIX releases prior to AIX Version 4.3.3. You cannot import volume groups to AIX Version 4.3.2 and lower if the volume group includes this function.
From a system management perspective, this configuration is not bad (actually, this allocation is the same as the one shown in Figure 62 on page 174). If either PV1 and PV2, or PV3 and PV4 fail, there is still a valid copy.
Figure 58. Create the poor man’s stripe with width 2, then mirror it
3.3.1.2 Create poor man’s stripe with mirror upon initial creation However, if you create the poor man’s striped logical volume (which scatters over two physical volumes) with mirror during the initial creation, then you will have the following allocation of the physical partitions (see Figure 59 on page 165).
root@lorraine:/ [170] # mklv -y mpmstripelv -e x -c 2 pmstripevg 4 hdisk1 hdisk2 hdisk4 hdisk5 root@lorraine:/ [172] # lslv -m mpmstripelv mpmstripelv:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0109 hdisk1 0110 hdisk2 0002 0109 hdisk2 0110 hdisk4 0003 0109 hdisk4 0110 hdisk5 0004 0109 hdisk5 0110 hdisk1 190 110 111 112 255 256 257 258 190 110 111 112 255 256 257 258 190 110 111 112 255 256 257 258
mirrored poor man'sstriped logical volume: pmstripelv
PP number LP number PV 1: hdisk1 PV 2: hdisk2 PV 3: hdisk3 1 2 3 4 297 298 299 300 190 110 111 112 255 256 257 258 PV 4: hdisk4
Figure 59. Create poor man’s stripe with width 2 with mirror upon initial creation
This is a very bad configuration. Any two disks failing will cause the loss of the entire logical volume. It is difficult to add or remove a mirror to or from this allocation, since each copy shares its physical volumes with another mirror (each mirror is represented with rectangles of different patterns in Figure 59). The reason for this allocation is very simple; you instructed the system to do so. Since you specified both the -e x option (inter-physical volume allocation set to maximum) and the -c 2 option (create two copy upon initial creation), then AIX LVM attempts to do its best. This bad configuration is not desirable, but it still conforms to the strict allocation policy (shown in the rectangle in the following example), since every copy of the specific logical partition exists on a separate physical volume.
mirrored poor man'slogical volume: mpmstripelv
PP number LP number
PV 1: hdisk1 PV 2: hdisk2 PV 3: hdisk4
190 110 PV 4: hdisk5 190 110 190 110 190 110 1 2 3 4 root@lorraine:/ [173] # lslv mpmstripelv
LOGICAL VOLUME: mpmstripelv VOLUME GROUP: pmstripevg LV IDENTIFIER: 00041631540cc083.1 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 8 megabyte(s) COPIES: 2 SCHED POLICY: parallel LPs: 4 PPs: 8
STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: maximum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: N/A LABEL: None MIRROR WRITE CONSISTENCY: on
In another words, the strict allocation policy cannot prohibit this bad
configuration. This is the reason why supporting the mirror and stripe function requires a super strict allocation policy.
3.3.1.3 Initial creation with mirror and super strict allocation policy If you specified the super strict allocation policy in the previous example, you will have the following allocation of the physical partitions (see Figure 60). You can force the super strict allocation policy with the -S s option on the command line.
root@lorraine:/ [180] # mklv -y ssmpmstripelv -e x -c 2 -s s pmstripevg 4 hdisk1 hdisk2 hdisk4 hdisk5 root@lorraine:/ [180] # lslv -m ssmpmstripelv smpmstripelv:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0109 hdisk1 0109 hdisk2 0002 0109 hdisk4 0109 hdisk5 0003 0110 hdisk1 0110 hdisk2 0004 0110 hdisk4 0110 hdisk5
To confirm the super strict allocation policy, you can use the lslv command:
root@lorraine:/ [281] # lslv ssmpmstripelv
LOGICAL VOLUME: ssmpmstripelv VOLUME GROUP: pmstripevg LV IDENTIFIER: 00041631540cc083.1 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 8 megabyte(s) COPIES: 2 SCHED POLICY: parallel LPs: 4 PPs: 8
STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: maximum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 2 MOUNT POINT: N/A LABEL: None MIRROR WRITE CONSISTENCY: on
Figure 60. Mirror with super strict allocation policy
This allocation is almost the same as the one shown in “Create the poor man’s stripe first, then mirror” on page 163, except for the allocated physical partition number. This allocation is not only desirable, but also necessary for a correct management of a mirror and stripe logical volume.
The only way to guarantee the allocation of the physical partition represented in Figure 60 is by adopting the super strict allocation policy for the mirrored and striped logical volumes. In fact, this is the default value for the newly created striped logical volume, and it forces the super strict style allocation. Using this facility, each mirror (shown with a different pattern of rectangles in Figure 61) does not share the physical volumes with other mirrors. It enables you to add or remove mirror(s) from the striped logical volumes.
190 110 190 110 190 110 190 110 PP number LP number PV 1: hdisk1 PV 2: hdisk2 PV 3: hdisk3 1 2 3 4 PV 4: hdisk4
Figure 61. Striped logical volume (mirrored with super strict)