From d2a68fb4fb96b6f0546a82a36c5a99374a96fd0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Wed, 28 Jul 2010 00:31:47 -0400 Subject: [PATCH] disable time/count based filesystems checks --- source/steps/InstallPartitionDisks.py | 4 ++++ source/steps/ValidateNodeInstall.py | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index 1c3f947..6eb6f93 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -160,6 +160,10 @@ def Run( vars, log ): log.write("formatting %s partition (%s)%s.\n" % (fs,devname,txt)) utils.sysexec( "mkfs.ext2 -q %s -m %d -j %s" % (option,rbp,devname), log ) + # disable time/count based filesystems checks + for filesystem in ("root","vservers"): + utils.sysexec_noerr( "tune2fs -c -1 -i 0 %s" PARTITIONS[filesystem], log) + # save the list of block devices in the log log.write( "Block devices used (in lvm): %s\n" % repr(used_devices)) diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index 5f97847..ae32475 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -91,7 +91,16 @@ def Run( vars, log ): except BootManagerException, e: log.write( "BootManagerException during fsck of %s (%s) filesystem : %s\n" % (filesystem, PARTITIONS[filesystem], str(e)) ) - return -1 + try: + log.write( "Trying to recover filesystem errors on %s\n" % filesystem ) + utils.sysexec("e2fsck -v -y %s" % (PARTITIONS[filesystem]),log) + except BootManagerException, e: + log.write( "BootManagerException during trying to recover filesystem errors on %s (%s) filesystem : %s\n" % + (filesystem, PARTITIONS[filesystem], str(e)) ) + return -1 + else: + # disable time/count based filesystems checks + utils.sysexec_noerr( "tune2fs -c -1 -i 0 %s" PARTITIONS[filesystem], log) try: # then attempt to mount them -- 2.43.0