[PATCH 3/3] Leave one free logical block before each logical partition.

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

 



---
 storage/partitioning.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index d093a2a..f7a51f6 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -653,6 +653,12 @@ def addPartition(disk, free, part_type, size):
     start = free.start
     if not _a.isAligned(free, start):
         start = _a.alignNearest(free, start)
+
+    if part_type == parted.PARTITION_LOGICAL:
+        # make room for logical partition's metadata
+        start += _a.grainSize
+
+    if start != free.start:
         log.debug("adjusted start sector from %d to %d" % (free.start, start))
 
     if part_type == parted.PARTITION_EXTENDED:
-- 
1.6.0.6

_______________________________________________
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