Re: [PATCH 5/7] Make addUdevPartitionDevice add lvm filters for ignored partitions

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

 



Hi,

On 01/22/2010 05:14 PM, David Lehman wrote:
On Thu, 2010-01-21 at 21:32 +0100, Hans de Goede wrote:
When we ignore a partition because its disk cannot be found, or
des not have  a disklabel format, or is not partitionable, we should
lvm to ignore the partition too.
---
  storage/devicetree.py |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 514e37b..e32fd95 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1075,6 +1075,7 @@ class DeviceTree(object):
                  # if the current device is still not in
                  # the tree, something has gone wrong
                  log.error("failure scanning device %s" % disk_name)
+                lvm.lvm_cc_addFilterRejectRegexp(name)
                  return


This one's fine, but...

          # Check that the disk has partitions. If it does not, we must have
@@ -1084,6 +1085,11 @@ class DeviceTree(object):
          # of, like logical volumes.
          if not getattr(disk.format, "partitions", None) or \
             not disk.partitionable:
+            # When we got here because the disk does not have a disklabel
+            # format (ie a biosraid member), or because it is not
+            # partitionable we want LVM to ignore this partition too
+            if disk.format.type != "disklabel" or not disk.partitionable:
+                lvm.lvm_cc_addFilterRejectRegexp(name)
              log.debug("ignoring partition %s" % name)
              return


You've changed the meaning of this conditional to suit your purposes. It
no longer accounts for the possibility that the partition is/was on a
disk that we've just reinitialized.


No, note I added a sub if, the original if is still there. I added the sub
if especially to account "for the possibility that the partition is/was on a
disk that we've just reinitialized", because in this case we do not want
to add it to the lvm filter.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux