diff options
author | Mike Fulbright <msf@redhat.com> | 2002-06-27 07:20:36 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-06-27 07:20:36 +0000 |
commit | 574f813b90527b45d293460a833116c19790f954 (patch) | |
tree | 641586b657c95da19ed30a5562f04d7c7c533abd /partitions.py | |
parent | 87eb95ea46fc8d4d1163dc970b2229f42d6affa0 (diff) | |
download | anaconda-574f813b90527b45d293460a833116c19790f954.tar.gz anaconda-574f813b90527b45d293460a833116c19790f954.tar.xz anaconda-574f813b90527b45d293460a833116c19790f954.zip |
Start of RAID clone tool
Diffstat (limited to 'partitions.py')
-rw-r--r-- | partitions.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/partitions.py b/partitions.py index a25feeb04..5ef9e43bc 100644 --- a/partitions.py +++ b/partitions.py @@ -324,6 +324,32 @@ class Partitions: return request return None + + def getRequestsByDevice(self, diskset, device): + """Find and return the requests on a given device (like 'hda').""" + if device is None: + return None + + drives = diskset.disks.keys() + if device not in drives: + return None + + rc = [] + disk = diskset.disks[device] + part = disk.next_partition() + while part: + dev = partedUtils.get_partition_name(part) + request = self.getRequestByDeviceName(dev) + + if request: + rc.append(request) + part = disk.next_partition(part) + + if len(rc) > 0: + return rc + else: + return None + def getRequestByVolumeGroupName(self, volname): """Find and return the request with the given volume group name.""" if volname is None: @@ -989,6 +1015,9 @@ class Partitions: if self.isRaidMember(request): return _("a partition which is a member of a RAID array.") + if self.isLVMVolumeGroupMember(request): + return _("a partition which is a member of a LVM Volume Group.") + part = disk.next_partition(part) return None |