diff options
-rw-r--r-- | fsset.py | 4 | ||||
-rw-r--r-- | packages.py | 12 | ||||
-rw-r--r-- | partitioning.py | 1 |
3 files changed, 14 insertions, 3 deletions
@@ -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) |