[rhel5-branch] [PATCH] Change limit for ext[34] to 16T and use mkfs.ext3 when formating ext3

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

 



Running 'mke2fs -j' directly with a size bigger than 8T fails because
8T is the maximum size for the ext2 filesystem. Running 'mke2fs -j'
indirectly via mkfs.ext3 succeeds even with a size bigger than 8T.

Resolves: rhbz#769287
---
 fsset.py |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/fsset.py b/fsset.py
index 2e6d390..e157519 100644
--- a/fsset.py
+++ b/fsset.py
@@ -683,11 +683,26 @@ class ext3FileSystem(extFileSystem):
     def __init__(self):
         extFileSystem.__init__(self)
         self.name = "ext3"
+        self.maxSizeMB = 16 * 1024 * 1024
         self.extraFormatArgs = [ "-j" ]
         self.partedFileSystemType = parted.file_system_type_get("ext3")
 
     def formatDevice(self, entry, progress, chroot='/'):
-        extFileSystem.formatDevice(self, entry, progress, chroot)
+        devicePath = entry.device.setupDevice(chroot)
+        devArgs = self.getDeviceArgs(entry.device)
+        args = [ "/usr/sbin/mkfs.ext3", devicePath, "-i", str(entry.bytesPerInode) ]
+
+        args.extend(devArgs)
+        args.extend(self.extraFormatArgs)
+
+        log.info("Format command:  %s\n" % str(args))
+
+        rc = ext2FormatFilesystem(args, "/dev/tty5",
+                                  progress,
+                                  entry.mountpoint)
+        if rc:
+            raise SystemError
+
         extFileSystem.setExt3Options(self, entry, progress, chroot)
 
 fileSystemTypeRegister(ext3FileSystem())
@@ -732,6 +747,7 @@ class ext4FileSystem(extFileSystem):
     def __init__(self):
         extFileSystem.__init__(self)
         self.name = "ext4"
+        self.maxSizeMB = 16 * 1024 * 1024
         # options are set in mke4fs.conf
         #self.extraFormatArgs = [ "-j", "-I", "256"]
         self.partedFileSystemType = parted.file_system_type_get("ext3")
-- 
1.7.4.4

_______________________________________________
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