Bookmark and Share
RSS

Recent Posts

Using lvmo to Migrate LVM Performance Tuning Values

November 28, 2017

If you use the lvmo command to tune Logical Volume Manager (LVM) pbufs, this information may be useful:

The lvmo command sets or displays pbuf tuning parameters. The equal sign can be used to set a particular tunable to a given value. Otherwise, if no equal sign is used, the value of the tunable will be displayed.

Of course the warning is also very helpful:

Misuse of the lvmo command can cause performance degradation or operating-system failure.

Yes, lvmo requires the utmost care, but when used properly, it can provide valuable function. For instance, via Twitter I found this IBM developerWorks post from May. It explains how to use lvmo for migrating LVM performance tuning values.

These tunables are stored outside of the on disk volume group in ODM, and aren't preserved when the volume group is moved to a new LPAR. The exportvg and importvg of the volume group will set the LVM performance tunables to the default values.

A way around this is to backup lvmo tunables before exporting the volume group, and then restore them after importing.

developerWorks provides a downloadable sample script, lvmo_tool, to demonstrate this:

    # lvmo_tool -?
    getopt: Not a recognized flag: ?
    Usage: lvmo_tool -b lvmo_tool -r


To back up lvmo tunables:

    # lvmo_tool -b testvg
    lvmo tunables are saved in /tmp/lvmo00f6f42a00004c000000015b827ff33f.

Run “lvmo_tool -r /tmp/lvmo00f6f42a00004c000000015b827ff33f testvg” to restore lvmo tunables after importing the volume group.

To restore lvmo tunables, import the volume group with no varyon option:

    # importvg -y testvg -n hdisk1 testvg

restore lvm tunables

    # lvmo_tool -r tmp/lvmo00f6f42a00004c000000015b827ff33f testvg

varyon the volume group:

    # varyonvg testvg

developerWorks adds this note:

Restoring lvm tunables on already varied volume group requires a varyoff and varyon the volume group if:

  • New values of the tunables are less than the volume group's current values.
  • Changing max_vg_pbufs of the volume group.
Do you think you'd find this tool helpful?

Posted November 28, 2017 | Permalink

Post a Comment

Note: Comments are moderated and will not appear until approved

comments powered by Disqus