[lvm-devel] [RFC PATCH 6/7] individual lvm command settings

Takahiro Yasui tyasui at redhat.com
Thu Apr 2 17:19:31 UTC 2009


Several lvm commands should not work based on metadata cache data. They
need to scan real metadata on devices. lvm commands with MCACHE_DISABLE
flag do not use metadata cache.

Currently the metadata cache feature is disabled in the following commands.

  * scan commands: vgscan and lvscan
      pvscan destroys lvmcache before its procedure, and MCACHE_DISABLE
      flag is not needed.

  * physical volume commands: pvdisplay, pvs
      Metadata cache files contain physical volume data which belong to
      a volume group, and orphan physical volumes can not be handled.
      To support these volumes, a kind of orphan physical volume cache
      need to be introduced.

As a next step, I'm planning to set MCACHE_CLEANUP flag to vgscan command
to refresh all metadata cache files in the cache directory.


Signed-off-by: Takahiro Yasui <tyasui at redhat.com>
---
 tools/commands.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: LVM2.02.46-cvs-20090324/tools/commands.h
===================================================================
--- LVM2.02.46-cvs-20090324.orig/tools/commands.h
+++ LVM2.02.46-cvs-20090324/tools/commands.h
@@ -390,7 +390,7 @@ xx(lvs,
 
 xx(lvscan,
    "List all logical volumes in all volume groups",
-   0,
+   MCACHE_DISABLE,
    "lvscan " "\n"
    "\t[-a|--all]\n"
    "\t[-b|--blockdevice] " "\n"
@@ -497,7 +497,7 @@ xx(pvdata,
 
 xx(pvdisplay,
    "Display various attributes of physical volume(s)",
-   0,
+   MCACHE_DISABLE,
    "pvdisplay\n"
    "\t[-c|--colon]\n"
    "\t[-d|--debug]\n"
@@ -571,7 +571,7 @@ xx(pvremove,
 
 xx(pvs,
    "Display information about physical volumes",
-   0,
+   MCACHE_DISABLE,
    "pvs" "\n"
    "\t[--aligned]\n"
    "\t[-a|--all]\n"
@@ -925,7 +925,7 @@ xx(vgs,
 
 xx(vgscan,
    "Search for all volume groups",
-   0,
+   MCACHE_DISABLE,
    "vgscan "
    "\t[-d|--debug]\n"
    "\t[-h|--help]\n"







More information about the lvm-devel mailing list