diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-08-23 21:25:52 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-08-23 21:25:52 +0000 |
commit | 4fcc0f58700d3d4229f477998fb572774fcd0867 (patch) | |
tree | 15f19ab15631ee2c812fa95f698438a2e5019f1c /fsset.py | |
parent | 00b96265652164d87166666f44155f03b3aecee2 (diff) | |
download | anaconda-4fcc0f58700d3d4229f477998fb572774fcd0867.tar.gz anaconda-4fcc0f58700d3d4229f477998fb572774fcd0867.tar.xz anaconda-4fcc0f58700d3d4229f477998fb572774fcd0867.zip |
some hacks to work around the lvm tools being stupid
* wipe md superblocks if we successfully create a pv (#130713)
* disable filtering for all of our creates. I know better than the
tools (#130706)
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1907,6 +1907,7 @@ class VolumeGroupDevice(Device): # now make the device into a real physical volume # XXX I don't really belong here. should # there be a PhysicalVolumeDevice(PartitionDevice) ? + lvm.writeForceConf() rc = iutil.execWithRedirect("lvm", ["lvm", "pvcreate", "-ff", "-y", "-v", node], @@ -1915,11 +1916,15 @@ class VolumeGroupDevice(Device): searchPath = 1) if rc: raise SystemError, "pvcreate failed for %s" % (volume,) + lvm.unlinkConf() + + lvm.wipeOtherMetadataFromPV(node) nodes.append(node) if not self.isSetup: # rescan now that we've recreated pvs. ugh. + lvm.writeForceConf() lvm.vgscan() args = [ "lvm", "vgcreate", "-v", "-An", @@ -1934,6 +1939,7 @@ class VolumeGroupDevice(Device): if rc: raise SystemError, "vgcreate failed for %s" %(self.name,) + lvm.unlinkConf() self.isSetup = 1 else: lvm.vgscan() @@ -1964,6 +1970,7 @@ class LogicalVolumeDevice(Device): def setupDevice(self, chroot="/", devPrefix='/tmp'): if not self.isSetup: + lvm.writeForceConf() rc = iutil.execWithRedirect("lvm", ["lvm", "lvcreate", "-L", "%dM" % (self.size,), @@ -1974,7 +1981,7 @@ class LogicalVolumeDevice(Device): searchPath = 1) if rc: raise SystemError, "lvcreate failed for %s" %(self.name,) - + lvm.unlinkConf() self.isSetup = 1 return "/dev/%s" % (self.getDevice(),) |