summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-17 22:03:55 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-17 22:03:55 +0000
commitf18b341b39a6cf684c0f886fc48f27269b86e485 (patch)
tree17a27a552232183c01c00ab6fb5e49ea9bd04fda
parent05cd9363a4ff45e8377dc2390a4f960c7000aa38 (diff)
downloadanaconda-f18b341b39a6cf684c0f886fc48f27269b86e485.tar.gz
anaconda-f18b341b39a6cf684c0f886fc48f27269b86e485.tar.xz
anaconda-f18b341b39a6cf684c0f886fc48f27269b86e485.zip
keep track of if we've created logical volumes so that we can handle
early swap on lvm (#103190)
-rw-r--r--fsset.py4
-rw-r--r--packages.py12
-rw-r--r--partitioning.py1
3 files changed, 14 insertions, 3 deletions
diff --git a/fsset.py b/fsset.py
index d0b9fd58f..752b722e5 100644
--- a/fsset.py
+++ b/fsset.py
@@ -889,6 +889,7 @@ class FileSystemSet:
self.mountcount = 0
self.migratedfs = 0
self.reset()
+ self.volumesCreated = 0
def isActive(self):
return self.mountcount != 0
@@ -1294,8 +1295,7 @@ class FileSystemSet:
for entry in self.entries:
if isinstance(entry.device, LogicalVolumeDevice):
entry.device.setupDevice(chroot)
-
-
+ self.volumesCreated = 1
def makeFilesystems (self, chroot='/'):
diff --git a/packages.py b/packages.py
index 5aa2da7cb..68a0bbe5d 100644
--- a/packages.py
+++ b/packages.py
@@ -523,12 +523,22 @@ def turnOnFilesystems(dir, thefsset, diskset, partitions, upgrade, instPath):
if not upgrade.get():
partitions.doMetaDeletes(diskset)
thefsset.setActive(diskset)
+ log("going to save")
if not thefsset.isActive():
diskset.savePartitions ()
+ log("bad blocks")
thefsset.checkBadblocks(instPath)
- thefsset.createLogicalVolumes(instPath)
+ log("create lvm")
+ if not thefsset.volumesCreated:
+ log("creating")
+ thefsset.createLogicalVolumes(instPath)
+ else:
+ log("already made")
+ log("swap")
thefsset.formatSwap(instPath)
+ log("turn on")
thefsset.turnOnSwap(instPath)
+ log("mkfs")
thefsset.makeFilesystems (instPath)
log("mounting filesystems")
thefsset.mountFilesystems (instPath)
diff --git a/partitioning.py b/partitioning.py
index 06efec103..47e934e86 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -116,6 +116,7 @@ def partitioningComplete(bl, fsset, diskSet, partitions, intf, instPath, dir):
if rc:
fsset.setActive(diskSet)
diskSet.savePartitions ()
+ fsset.createLogicalVolumes(instPath)
fsset.formatSwap(instPath)
fsset.turnOnSwap(instPath)