This is to enable client to indicate options when mounting persistent directories on statelite(nfs/ramdisk) CNs, if not, "nolock,rsize=32768,tcp,timeo=14" will be used as default options. This implementation aims for RHEL6. SUSE to be implemented later.

client can revise the statelite table to benefit from this, like:

#node,image,statemnt,mntopts,comments,disable
"935n02",,"192.168.0.244:/tmp","soft,timeo=200",,


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9753 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
angli-xcat 2011-06-07 08:59:53 +00:00
parent 076c9aaabc
commit c28d4a87f1
3 changed files with 28 additions and 2 deletions

View File

@ -733,6 +733,22 @@ sub mknetboot
$initrdstr = "xcat/netboot/$osver/$arch/$profile/initrd-stateless.gz";
}
}
if($statelite)
{
my $statelitetb = xCAT::Table->new('statelite');
my $mntopts = $statelitetb->getAttribs({node => $node}, 'mntopts');
my $mntoptions = $mntopts->{'mntopts'};
unless (defined($mntoptions))
{
$kcmdline .= " MNTOPTS=";
}
else
{
$kcmdline .= " MNTOPTS=$mntoptions";
}
}
$bptab->setNodeAttribs(
$node,
{

View File

@ -46,7 +46,12 @@ if [ ! -z $SNAPSHOTSERVER ]; then
mkdir -p $NEWROOT/$RWDIR/persistent
MAXTRIES=5
ITER=0
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tcp,nfsvers=3,timeo=14; do
if [ -z $MNTOPTS ]; then
MNT_OPTIONS="nolock,rsize=32768,tcp,timeo=14"
else
MNT_OPTIONS=$MNTOPTS
fi
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."

View File

@ -98,7 +98,12 @@ elif [ -r /rootimg-statelite.gz ]; then
mkdir -p $NEWROOT/$RWDIR/persistent
MAXTRIES=5
ITER=0
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tcp,timeo=14; do
if [ -z $MNTOPTS ]; then
MNT_OPTIONS="nolock,rsize=32768,tcp,timeo=14"
else
MNT_OPTIONS=$MNTOPTS
fi
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "You are dead, rpower $ME boot to play again."