As you are probably aware, in a lot of cases, customers have chosen to include IBM flash system storage as the preferred read LVM mirror on AIX. This gives them enhanced I/O read performance and resiliency. An AIX administrator can add the hdisks to the VG, mirror the data and set the LV scheduling policy to parallel/sequential indicating writes will be done to both copies in parallel and reads will come from the first LVM copy which should be on flash. This is discussed at length in section 5.5.2 Implementing preferred read, Preferred read with AIX, of the following Redbook.
http://www.redbooks.ibm.com/abstracts/sg248189.html?Open
I discovered today that both the mklv and chlv commands have recently been enhanced to support this configuration. Both now have an option for setting the preferred read to the required copy of a logical volume (usually on the flash disk).
From the man page for mklv and chlv, I found the following new information.
# man mklv
-R PreferredRead
Sets read preference to the copy of the logical volume. If the -R flag is specified and if the preferred copy is available, the read operation occurs from the preferred copy. If the preferred copy is not available, the read operations follow the scheduling policy of the logical volume. The PreferredRead variable can be set to a value in the range 0 -3. The default value is 0.
# man chlv
-R PreferredRead
Changes preferred read copy of the logical volume. Always reads from the preferred copy if the preferred copy is available. If the preferred copy is not in available then the reads follows the scheduling policy of the logical volume. The PreferredRead variable can be set to a value ranging from 0 to 3. Setting the PreferredRead variable to 0 disables the preferred read copy of the logical volume.
To my surprise, this is available in AIX 7.1 TL3 SP5.
# oslevel -s
7100-03-05-1524
Now I can specify the preferred copy during creation of the logical volume. And lslv will now show me the preferred read copy.
# mklv -tjfs2 -y lv1 -c 2 -R 2 cgvg 10
lv1
# lslv lv1
LOGICAL VOLUME: lv1 VOLUME GROUP: cgvg
LV IDENTIFIER: 00f603cd00004c000000014a0515f597.2 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 32 megabyte(s)
COPIES: 2 SCHED POLICY: parallel
LPs: 10 PPs: 20
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1024
MOUNT POINT: N/A LABEL: None
DEVICE UID: 0 DEVICE GID: 0
DEVICE PERMISSIONS: 432
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no PREFERRED READ: 2
DEVICESUBTYPE: DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
If I need to change the preferred read copy later, I can use chlv -R. This is a dynamic change.
# chlv -R 1 lv1
# lslv lv1
LOGICAL VOLUME: lv1 VOLUME GROUP: cgvg
LV IDENTIFIER: 00f603cd00004c000000014a0515f597.2 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 32 megabyte(s)
COPIES: 2 SCHED POLICY: parallel
LPs: 10 PPs: 20
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1024
MOUNT POINT: N/A LABEL: None
DEVICE UID: 0 DEVICE GID: 0
DEVICE PERMISSIONS: 432
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no PREFERRED READ: 1
DEVICESUBTYPE: DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
Previously, to set the preferred read to the flash storage, it would often require you to mirror a volume group to the flash disks, then un-mirror the volume group to make the flash disk the primary LV copy, then mirror the volume group again to make the non-flash disks the secondary LV copy. This is no longer necessary with the new –R option to the chlv command and can be changed as and when necessary.
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds3/mklv.htm?lang=en
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/chlv.htm?lang=en
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds3/lslv.htm?lang=en