diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-08-14 19:37:06 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-08-14 19:37:06 +0000 |
commit | ed5305f2765d6f33e0f3ed16221ef312038889ee (patch) | |
tree | 9a98b6faf9d65917908b5868723aa3847f93cea2 /fsset.py | |
parent | a20eabfa4cbdd672f82f25b107f6934e429b28b2 (diff) | |
download | anaconda-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.py | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -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): |