Hi Jason,
I saw the same thing. Below is a script I've written to identify potential
automount mount points, by looking at local and NIS based auto.master files,
and master.include files. The output from this script is a set of
directories that can be used to exclude files from the getimage and
updateclient functions. I'm new to systemImager so I'm not sure of the
best way to include this in the Sisuite. Also, this hasn't been tested
outside of my environment, so BEWARE. This script needs to be run on the
client, but I think the exclude file needs to live on the server, as that's
where rsync is run from, so there's a bit of a hurdle there that the script
doesn't address. You'll need to tailor this for for your site. Hope it
helps.
Example output from this script is:
# si_getexclude
# The following directories are excluded based on the recommendation of
# the si_getexclude script, which identifies automount mount points.
/cit/*
/cssi/cbr/*
/cssi/cbrdb/*
/data/*
/dev/pts/*
/dev/shm/*
/grid/*
/home/*
/net/*
/proc/*
/sys/*
/tmp/*
/var/lib/nfs/rpc_pipefs/*
/var/lib/systemimager/images/*
/var/tmp/*
/Volumes/app/minigrid/*
/Volumes/app/pkpd/*
# end si_getexclude
Jason M. Sullivan wrote:
> I've had this problem twice, and in two different ways. System Imager
> sees an automounted NFS directory as a local directory.
>
> The first time, I was getting an image off of the golden client, and it
> started pulling the NFS directories over. I broke out of it, deleted the
> partial image, re-ran si_prepareclient, and the problem went away. I
should
>
> The second time. I was testing si_updateclient, and it started merrily
> deleting things in the NFS directory mounted on the client. I screamed
> "Not Cool!" and broke out of the process. I'm in the midst of recovering
> the files, and I'm putting a post-it with "Dry Run, stupid" on my
> monitor, but how can diagnose the problem here?
>
>
Additionally, I'm using RHEL 5 and SiS 4.0.2. Some other e-mails in the
archive have noted that automount might be the problem, but not how to
get around it (reliably).
#!/bin/ksh
# This script determines which directories should be included and excluded
from
# the backup list.
#
# This is necessary because SystemImager is not good at anticipating which
# automount points are active. This is only an issue if SI is used to
deliver
# incrimental OS updates to live nodes with NFS and automount active.
#
# Without this, incrimental updates that specify file deletion
# may attempt to delete files on automount file systems.
#
#-------------------------------------------------- Jan 23, 2009 -- g.pocina
MASTERS=/tmp/masters.$$ # all local and NIS auto.master and
master include files.
MOUNTS=/tmp/tmp.$$ # All possible current or automount
points
IMGFS=/tmp/sysfs.$$ # File systems we want backed up.
unset LAST
if [[ `uname -s` != Linux ]] ; then
echo "ERROR: OS=`uname -s`: `basename $0` is only qualified for use
on Linux" >&2
exit 2
fi
#-------------------------------------------
#
# Add ALL FSs you explicitly want imaged, HERE.
#
#-------------------------------------------
cat > $IMGFS <<!
/
/boot
/opt
/usr
/var
!
#-------------------------------------------
#
# All other file systems will be excluded.
# Add additional subdirectories to exclude, HERE.
#
#-------------------------------------------
cat > $MOUNTS <<!
/tmp
/var/lib/systemimager/images
/var/tmp
!
usage(){
cat >&2 <<!
usage: `basename $0` [directory to image [...]]
By default, the following directories are imaged:
`sed -e 's/^/ /' $IMGFS`
Additional file systems will be imaged, if specified as arguments.
Writes a list of mounts and potential automounts to explicitly
exclude from a snapshot of the current node.
!
exit 1
}
# Take Addtional file systems to back up from the command line
for i in $@ ; do
if [[ ! -d $i ]] ; then
echo "No such directory: $i" >&2
usage
fi
echo $@
done >> $IMGFS
# look in local and NIS automount maps for all automount mount points
{
cat /etc/auto.master | egrep '^\+' | cut -c2-
echo auto.master
if domainname > /dev/null 2>&1 ; then
# Build up a list of all local master automount include
files
ypcat -k auto.master | egrep '^\+' | cut -c2-
fi
} | sed -e 's/ //' | sort -fu > $MASTERS
# At this point, we've listed all possible NIS and local
auto_master
# files and include files. Next we'll check each of these
names first
# locally, then in NIS, because Pfizer uses: "automount:
files nis"
for file in `cat $MASTERS` ; do
if test -r /etc/$file ; then
egrep -v '^\+|auto_direct' /etc/$file
fi
if domainname >/dev/null 2>&1 && ypcat -k $file > /dev/null 2>&1 ;
then
ypcat -k $file | egrep -v '^\+|auto_direct'
fi
# Now we have a list of all automount top level mounts.
Clean up.
done | sed -e 's/#.*$//' | awk '{ print $1 }' | sed -e 's/ //g' | sort -u >>
$MOUNTS
# Next add all currently active mount points.
mount | awk '{ print $3 }' >> $MOUNTS
# At this point, $MOUNTS contains a list of all possible
automount
# and active mount points. Check through this list, and
echo out
# all the top level directories to be excluded. If /grid and
# /grid/gro/vol/14daytmp are both listed, then only "/grid"
is echoed.
cat <<!
# si_getexclude
# The following directories are excluded based on the recommendation of
# the si_getexclude script, which identifies automount mount points.
!
sort -fu < $MOUNTS | while read mount ; do
if egrep "^${mount}$" $IMGFS > /dev/null ; then
continue
fi
if [[ ! -z $LAST && \
`dirname $LAST` != `dirname $mount` && \
$LENLAST -eq `expr "$mount" : "$LAST"` ]] ; then
continue
else
echo $mount # Exclude this top level mount
LAST=$mount
LENLAST=`expr length "$LAST"`
fi
done | sed -e '/^$/d' -e 's/$/\/\*/'
rm $IMGFS $MOUNTS $MASTERS
cat <<!
# end si_getexclude
!
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users