From 021457531b5180a077861b82726f757c9229def3 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Tue, 17 Aug 2010 02:57:52 +0000 Subject: [PATCH] from now on, the entries in "litetree" table are no longer restricted to use different mnt point name; for example, The "litetree" table has the following entries: "1","ALL","192.168.11.107:/test/$node",, "2","ALL","192.168.11.108:/test/$node",, before the code is checked in, if you run "litetree ", you should get one message like this: : 192.168.11.107:/test/ # 192.168.11.107 and 192.168.11.108 both mount /test. This not supported. After the code is checked in, there will be no any error/warning message about the entries in litetree table. Accordingly, the naming of mount points on the compute nodes are updated to "/.statelite/mnt///" from "/.statelite/mnt//". git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7105 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/litetree.pm | 9 --------- .../share/xcat/netboot/add-on/statelite/rc.statelite | 9 +++++---- .../netboot/add-on/statelite/rc.statelite.ppc.redhat | 9 +++++---- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/litetree.pm b/xCAT-server/lib/xcat/plugins/litetree.pm index f42129d9b..4fcf7a9fc 100644 --- a/xCAT-server/lib/xcat/plugins/litetree.pm +++ b/xCAT-server/lib/xcat/plugins/litetree.pm @@ -205,15 +205,6 @@ sub showSync { # we have a server and need to make sure we can mount them under unique names if($mnts->{$first} eq '' ){ # if the first mount point doesn't have a server then leave it. $mnts->{$first} = $server; - }else{ - # they may just have the name in twice: - unless($server eq $mnts->{$first}){ - my $msg = "# " . $mnts->{$first} . " and $server both mount /$first. This not supported."; - $callback->({info => $msg}); - return; - }else{ - $mntpnt = ""; # only mount it once, so get rid of the directory - } } } $mntpnt .= $dir; diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index 12dd026b2..4034f1d67 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -150,10 +150,10 @@ MountTrees () { do SERV=`echo $i | awk -F: '{print $1}'` # SERV is (SERV):/blah/blah/blah MNT=`echo $i | awk -F: '{print $2}'` # MNT is server:(/blah/blah/blah) - mkdir -p ${TREEMOUNT}${MNT} + mkdir -p ${TREEMOUNT}/${SERV}/${MNT} MAX=15 TRIES=1 - while ! mount $SERV:$MNT ${TREEMOUNT}${MNT} -r -n -o nolock,tcp + while ! mount $SERV:$MNT ${TREEMOUNT}/${SERV}/${MNT} -r -n -o nolock,tcp do if [ "$TRIES" = "$MAX" ]; then echo "Can't mount $i. I give up.. ">/dev/console @@ -382,8 +382,9 @@ FindFile () { type=$2 isChild=$3 FOUND=0 - for DIR in `cat ${SYNCTREE} | sed 's/[^\/]*//'` + for DIR in `cat ${SYNCTREE}` do + DIR=${DIR/:/} if [ -e ${TREEMOUNT}/${DIR}${path} ]; then FOUND=1 # we found it! if [ -d ${TREEMOUNT}/${DIR}${path} ] && [ "0" -eq `ls -A ${TREEMOUNT}/${DIR}${path} |wc -l` ]; then @@ -391,7 +392,7 @@ FindFile () { else ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} if [ "${2}" = "con" ]; then - 1 + continue else break fi diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat index 3db4ce1ae..6b3fb0ede 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat @@ -150,10 +150,10 @@ MountTrees () { do SERV=`echo $i | awk -F: '{print $1}'` # SERV is (SERV):/blah/blah/blah MNT=`echo $i | awk -F: '{print $2}'` # MNT is server:(/blah/blah/blah) - mkdir -p ${TREEMOUNT}${MNT} + mkdir -p ${TREEMOUNT}/${SERV}/${MNT} MAX=15 TRIES=1 - while ! mount $SERV:$MNT ${TREEMOUNT}${MNT} -r -n -o nolock,tcp + while ! mount $SERV:$MNT ${TREEMOUNT}/${SERV}/${MNT} -r -n -o nolock,tcp do if [ "$TRIES" = "$MAX" ]; then echo "Can't mount $i. I give up.. ">/dev/console @@ -382,8 +382,9 @@ FindFile () { type=$2 isChild=$3 FOUND=0 - for DIR in `cat ${SYNCTREE} | sed 's/[^\/]*//'` + for DIR in `cat ${SYNCTREE}` do + DIR=${DIR/:/} if [ -e ${TREEMOUNT}/${DIR}${path} ]; then FOUND=1 # we found it! if [ -d ${TREEMOUNT}/${DIR}${path} ] && [ "0" -eq `ls -A ${TREEMOUNT}/${DIR}${path} |wc -l` ]; then @@ -391,7 +392,7 @@ FindFile () { else ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} if [ "${2}" = "con" ]; then - 1 + continue else break fi