print error msg when fsck failed

fix
This commit is contained in:
andyzhangx 2022-10-11 07:49:24 +00:00
parent ead1ef4450
commit 36b46ee010

View File

@ -463,6 +463,8 @@ func (mounter *SafeFormatAndMount) checkAndRepairFilesystem(source string) error
return NewMountError(HasFilesystemErrors, "'fsck' found errors on device %s but could not correct them: %s", source, string(out))
case isExitError && ee.ExitStatus() > fsckErrorsUncorrected:
klog.Infof("`fsck` error %s", string(out))
default:
klog.Warningf("fsck on device %s failed with error %v, output: %v", source, err, string(out))
}
}
return nil