FScheck when mkdsklsnode

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7696 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2010-09-28 06:42:35 +00:00
parent 0afc3ecb55
commit f98871acc9

View File

@ -6823,6 +6823,28 @@ sub bkupNIMresources
}
}
# verify FS size before creating new backup
# get bkdir size
my $ducmd = qq~/usr/bin/du -sm $bkdir | /usr/bin/awk '{print \$1}'~;
my $bksize = xCAT::Utils->runcmd("$ducmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not run: \'$ducmd\'\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$bksize";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
# check FS space, add it if needed
if (&chkFSspace($bkdir, $bksize, $callback) != 0)
{
return undef;
}
# create a new backup file
my $bkcmd = "find $bkdir -print |backup -ivqf $bkfile";