X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FValidateNodeInstall.py;h=0d1d16561473a6e5a334e1feda721e6167f92b04;hb=30cbd3c60178e01643ec5100a068ed82c8f38013;hp=ad74d089799795d6ee40c0ef95ffd37bfd5af700;hpb=fecd90d602104e522e4247e24a74954e5563e1cd;p=bootmanager.git diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index ad74d08..0d1d165 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -84,6 +84,18 @@ def Run( vars, log ): utils.makedirs( SYSIMG_PATH ) try: + # first run fsck to prevent fs corruption from hanging mount... + log.write( "fsck root file system\n" ) + utils.sysexec("e2fsck -v -p %s" % (PARTITIONS["root"]),log) + + log.write( "fsck vserver file system\n" ) + utils.sysexec("e2fsck -v -p %s" % (PARTITIONS["vservers"]),log) + except BootManagerException, e: + log.write( "BootManagerException during fsck of /root and /vservers : %s\n" % + str(e) ) + + try: + # then attempt to mount them log.write( "mounting root file system\n" ) utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["root"],SYSIMG_PATH),log)