[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH rhel 5.4] Do not include removed physical volumes in pvlist (#502438).



Looks ok,

Regards,

Hans


On 05/25/2009 12:47 PM, Radek Vykydal wrote:
Port of patch 75686e14147a0f37700eade5f9441c75796d916a from rhel 4.9.
---
  lvm.py |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lvm.py b/lvm.py
index 83e19b4..c0608ee 100644
--- a/lvm.py
+++ b/lvm.py
@@ -263,6 +263,9 @@ def pvlist():
          except:
              continue
          log.info("pv is %s in vg %s, size is %s" %(dev, vg, size))
+        # We only append if the device is valid
+        if dev.strip().lower() == "unknown device":
+            continue
          pvs.append( (dev, vg, size) )

      return pvs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]