AIX LVM Mirroring enhancement for Flash Preferred ReadAs 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
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 LV IDENTIFIER: 00f6 VG STATE: acti TYPE: jfs2 MAX LPs: 512 COPIES: 2 LPs: 10 STALE PPs: 0 INTER-POLICY: minimum INTRA-POLICY: midd MOUNT POINT: N/A DEVICE UID: 0 DEVICE PERMISSIONS: 432 MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO INFINITE RETRY: no 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 LV IDENTIFIER: 00f6 VG STATE: acti TYPE: jfs2 MAX LPs: 512 COPIES: 2 LPs: 10 STALE PPs: 0 INTER-POLICY: mini INTRA-POLICY: midd MOUNT POINT: N DEVICE UID: 0 DEVICE PERMISSIONS: 432 MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO INFINITE RETRY: no 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
http
http
|
In an
actual problem situation, we have to migrate data from NetApp to DS8K to
reduce I/O load but at first cannot separate the mirrors.
So I found your blog and set the preferred read parameter in my LVs to prioritize the DS8K mirror site for read operations.
To
my surprise, I don't see stopping read I/O on the NetApp site but a
read ratio of 1:5-10 in nmon (1 KB/s read from NetApp, 5-10 KB/s read
from DS8K) after applying the -R option to my LVs.
First, I
thought of -R not being dynamically, then I read the comment of Andi -
although I see nearly no disk BUSY in nmon. But this would be an
explanation for the distribution of I/O despite the -R option.
Thanks.
Hi,
we
tried to set preferred read (due to other reasons) - but it turned out
that the implementation is not doing what the documentation would
suggest:
If the "preferred read" copy is busy the read might end up
on another copy .. even if the preferred one is available .. A PMR
confirmed that discrepancy:
Cust: if the documentation says
"available" but instead means "available and not busy" why does it not
say "available and not busy" in the first place?
IBM: Concerning
the documentation there is already a request for that in the hands of
developers.However there is no specific time delay until it will be
updated.
Interestingly the documentation will be changed .. not
the implementation (which would make more sense to me ?!?) Just to let
you know ..
/Andi