summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-08-14 19:37:06 +0000
committerJeremy Katz <katzj@redhat.com>2001-08-14 19:37:06 +0000
commited5305f2765d6f33e0f3ed16221ef312038889ee (patch)
tree9a98b6faf9d65917908b5868723aa3847f93cea2 /fsset.py
parenta20eabfa4cbdd672f82f25b107f6934e429b28b2 (diff)
downloadanaconda-ed5305f2765d6f33e0f3ed16221ef312038889ee.tar.gz
anaconda-ed5305f2765d6f33e0f3ed16221ef312038889ee.tar.xz
anaconda-ed5305f2765d6f33e0f3ed16221ef312038889ee.zip
per sct's request, turn off forced fscks for ext3 filesystems after the fs has been created/migrated and ensuring that there actually is a journal on the fs
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index b2e0e2bb6..5f6be0e60 100644
--- a/fsset.py
+++ b/fsset.py
@@ -316,7 +316,20 @@ class extFileSystem(FileSystemType):
entry.mountpoint)
if rc:
raise SystemError
-
+
+ # this is only for ext3 filesystems, but migration is a method
+ # of the ext2 fstype
+ def removeForcedFsck(self, entry, message, chroot='/'):
+ devicePath = entry.device.setupDevice(chroot)
+
+ # if no journal, don't turn off the fsck
+ if not isys.ext2HasJournal(devicePath, makeDevNode = 0):
+ return
+
+ rc = iutil.execWithRedirect("/usr/sbin/tune2fs",
+ ["tunefs", "-c0", "-i0", devicePath],
+ stdout = "/dev/tty5",
+ stderr = "/dev/tty5")
class ext2FileSystem(extFileSystem):
def __init__(self):
@@ -325,7 +338,6 @@ class ext2FileSystem(extFileSystem):
self.partedFileSystemType = parted.file_system_type_get("ext2")
self.migratetofs = ['ext3']
-
def migrateFileSystem(self, entry, message, chroot='/'):
devicePath = entry.device.setupDevice(chroot)
@@ -365,6 +377,8 @@ class ext2FileSystem(extFileSystem):
if rc == 0:
sys.exit(0)
entry.fsystem = entry.origfsystem
+ else:
+ extFileSystem.removeForcedFsck(self, entry, message, chroot)
fileSystemTypeRegister(ext2FileSystem())
@@ -389,6 +403,10 @@ class ext3FileSystem(extFileSystem):
isys.mount(device, mountpoint, fstype = "ext3",
readOnly = readOnly)
+ def formatDevice(self, entry, progress, chroot='/'):
+ extFileSystem.formatDevice(self, entry, progress, chroot)
+ extFileSystem.removeForcedFsck(self, entry, progress, chroot)
+
fileSystemTypeRegister(ext3FileSystem())
class raidMemberDummyFileSystem(FileSystemType):