X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FValidateNodeInstall.py;h=1f106168f527d837619a78e7a275cee3f41b113a;hb=5a363068de193375fe2c629ceb7149c45773d8ca;hp=85dcf5efc2c4849dbe3921219eaf9d71fd5709f0;hpb=baf838cd5db93ecadd012d0e065ffbc8f3bcf113;p=bootmanager.git diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index 85dcf5e..1f10616 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -91,12 +91,21 @@ 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 log.write( "mounting root file system\n" ) - utils.sysexec("mount -t ext2 %s %s" % (PARTITIONS["root"],SYSIMG_PATH),log) + utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["root"],SYSIMG_PATH),log) except BootManagerException, e: log.write( "BootManagerException during mount of /root: %s\n" % str(e) ) return -2 @@ -114,7 +123,7 @@ def Run( vars, log ): VSERVERS_PATH = "%s/vservers" % SYSIMG_PATH utils.makedirs(VSERVERS_PATH) log.write( "mounting vserver partition in root file system\n" ) - utils.sysexec("mount -t ext2 %s %s" % (PARTITIONS["vservers"], VSERVERS_PATH), log) + utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["vservers"], VSERVERS_PATH), log) except BootManagerException, e: log.write( "BootManagerException during mount of /vservers: %s\n" % str(e) ) return -2