AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only

LVM Active Mirror write consistency Statistics

By Arun Nagaraj posted Wed January 22, 2025 12:31 AM

  

Introduction:

The LVM (Logical Volume Manager) always ensures data consistency among mirrored copies of a logical volume during normal I/O processing.

For every write to a logical volume, the LVM generates a write request for every mirror copy. A problem arises if the system crashes in the middle of processing a mirrored write (before all copies are written). If mirror write consistency recovery is enabled for a logical volume, the LVM keeps additional information to allow recovery of these inconsistent mirrors. Mirror write consistency recovery should be enabled for most mirrored logical volumes.

LVM provides two types of MWC (Mirror Write Consistency), Active and Passive. This blog is regarding the Active mirror write consistency.

Active MWC provides fast recovery at reboot time after a crash has occurred. However, under very heavy workloads, especially in the case of random writes write performance will degrade with Active MWC.

In production(customer) scenario, under heavy workloads, MWC cache may become bottleneck due to its limited size. The MWC cache size is fixed and cannot scale in proportion with the increasing workload. Hence may not be large enough to track all the active writes. So, this results in slowness in IO processing and appears as hang. At present, we do not have any method to detect and display such conditions.

Solution:

To help system administrators to detect such conditions and tune workload accordingly, LVM is enhanced to detect and display MWC cache full scenario.

lvmstat command is enhanced to display Active MWC statistics,

Column

Description

IO_CNT

Specifies the total number of requests.

FULL_CNT

Specifies the number of times the request was on hold because the cache was full.

INFLT_CNT

Specifies the number of times the request was on hold because the cache write operation was in progress.

Examples:

To enable the MWCC statistics for the volume group datavg, enter the following command:

lvmstat -v datavg -m -e

To disable the MWCC statistics for the volume group datavg, enter the following command:

lvmstat -v datavg -m -d

To clear the MWCC statistics for the volume group datavg, enter the following command:

lvmstat -v datavg -m -C

To display five MWCC statistics reports at a time for the volume group datavg at an interval of 10 seconds in comma-separated values (csv) file format, enter the following command:

lvmstat -v datavg -F -m -s 10 5

Pre-requisites

This feature is supported from AIX 7.3 TL3 release and above.

3 comments
19 views

Permalink

Comments

4 days ago

Thanks Chris. I corrected it.

4 days ago

Correct syntax is: lvmstat -v datavg -F -m -s 10 5

11 days ago

Running this command 'lvmstat -v rootvg -F m -s 10 5' produces a usage error.

# oslevel -s
7300-03-00-2446

# lvmstat -v rootvg -F m -s 10 5
Usage: lvmstat { -l|-v } <name> [ -e|-d ] [-F] [-C] [-c count] [-s] [interval [iterations]]
Reports input/output statistics for logical partitions and volumes.
        lvmstat -v <name> -r [ -L | -C ]
Reports space reclaim statistics for volumes.
        lvmstat -v <name> -m
Reports mirror write consistency cache statistics for volumes.

The AIX lvmstat man page (https://www.ibm.com/docs/en/aix/7.3.0?topic=l-lvmstat-command) also has the same command syntax example:

14. To display five MWCC statistics reports at a time for the volume group datavg at an interval of 10 seconds in comma-separated values (csv) file format, enter the following command:

lvmstat -v datavg -F m -s 10 5

Any idea why it doesn't work? Does the documentation need to be updated? 

Thanks!