hanfs setup on service nodes, needs to restart nfs after chnfs -R on

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11384 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc
2012-01-16 09:20:53 +00:00
parent cc452b7485
commit 024023acc3

View File

@@ -10353,15 +10353,55 @@ sub mkdsklsnode
xCAT::MsgUtils->message("I", $rsp, $callback);
}
my $scmd = "chnfs -R on";
my $scmd = "exportfs -ua";
my $output = xCAT::Utils->runcmd("$scmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not un-exportfs on $Sname.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
$error++;
}
$scmd = "chnfs -R on";
$output = xCAT::Utils->runcmd("$scmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not enable NFSv4 replication on $Sname.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
$error++;
}
$scmd = "stopsrc -g nfs";
$output = xCAT::Utils->runcmd("$scmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not stop nfs group on $Sname.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
$error++;
}
$scmd = "startsrc -g nfs";
$output = xCAT::Utils->runcmd("$scmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not stop nfs group on $Sname.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
$error++;
}
my $scmd = "exportfs -a";
my $output = xCAT::Utils->runcmd("$scmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not exportfs on $Sname.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
$error++;
}
my $install_dir = xCAT::Utils->getInstallDir();
$scmd = "lsnfsexp -c";
my @output = xCAT::Utils->runcmd("$scmd", -1);