Paul LaMadeleine
2001-Aug-25 05:19 UTC
problems with rsync version 2.4.6 protocol version 24 on solaris 2.8
Greetings, I'm using rsync to keep multiple nfs filesystems on two emc nfs serves in sync. Here are the six file systems and their info: Filesystem kbytes used avail capacity Mounted on Number of files burd1p0:/nettmp 258120 37144 220976 15% /nfs/burd1p0/nettmp 2102 burd1p0:/user 29443776 16160480 13283296 55% /nfs/burd1p0/user 68171 burd2p0:/netutl 14721376 4515128 10206248 31% /nfs/burd2p0/netutl 13611 burd3p0:/netconfig 14721376 1010336 13711040 7% /nfs/burd3p0/netconfig 33198 burd2p0:/aqptmp 258120 10664 247456 5% /nfs/burd2p0/aqptmp 546 burd3p0:/reports 14721376 3868000 10853376 27% /nfs/burd3p0/reports 290481 What I'm seeing is that Rsync will freeze in the middle of the sync. I've attached the script that I use along with the config file for it. I know that there is a patch for this version, but I am unable the compile in this environment and do not have access to a compiler in the our other environments. I have done a truss -p pid on the three running processes and here are their outputs: root@lancelot:/opt/Rsync% ps -ef | grep rsync root 29191 29182 0 14:43:37 pts/2 2:51 /opt/Rsync/bin/rsync.7 --recursive --progress --stats --delete --one-file-syste root 1516 25536 0 15:16:35 pts/5 0:00 grep rsync root 29192 29191 0 14:43:37 pts/2 1:10 /opt/Rsync/bin/rsync.7 --recursive --progress --stats --delete --one-file-syste root@lancelot:/opt/Rsync% truss -p 29191 poll(0xFFBEF888, 0, 20) = 0 waitid(P_PID, 29192, 0xFFBEF898, WEXITED|WTRAPPED|WNOHANG) = 0 poll(0xFFBEF888, 0, 20) = 0 waitid(P_PID, 29192, 0xFFBEF898, WEXITED|WTRAPPED|WNOHANG) = 0 ^Croot@lancelot:/opt/Rsync% truss -p 29192 poll(0xFFBEDC58, 1, 60000) (sleeping...) ^Croot@lancelot:/opt/Rsync% -------------- next part -------------- # # # A list of file systems and where they are located # # filesystem FROM TO netconfig /nfs/burd3p1/netconfig /nfs/wald2p1/netconfig netutl /nfs/burd2p1/netutl /nfs/wald2p1/netutl reports /nfs/burd3p1/reports /nfs/wald3p1/reports user /nfs/burd1p1/user /nfs/wald1p1/user aqptmp /nfs/burd2p1/aqptmp /nfs/wald2p1/aqptmp nettmp /nfs/burd1p1/nettmp /nfs/wald2p1/nettmp -------------- next part -------------- #!/bin/ksh # # set -x # # # sync_nfs_filesystems # # This script was written to help keep the nfs file systems in sync between file systems. # It takes one argument - which file system to sync. It uses this argument to read from # a config file a FROM location and a TO location. It also set up the logging information # and determines which exclude file to use from this. # # EXIT STATUS: # 0 normal suggessful exit # -2 Usage has been displayed # -3 A Sync for this filesystem is already running # # V1.0 12/15/2000 PEL Initial Version # # #echo "$0 - Version 1.0 - last revised on 12/15/2000 by PEL" # # check number of args - must be exactly one or else give usage # if [ $# -eq 0 -o "$1" = "-h" ] then cat <<EOF USAGE: $0 filesystem Where filesystem is the file system that you want to sync EOF exit -2 fi FILESYSTEM=$1 # which file system to sync WORKPATH=/opt/Rsync # path to all needed files CONF_FILE=$WORKPATH/sync_nfs_filesystem.conf # config file of sync data FROMDIR=`grep ^$FILESYSTEM $CONF_FILE | awk '{print $2}'`/ # get's source data path TODIR=`grep ^$FILESYSTEM $CONF_FILE | awk '{print $3}'`/ # get's destination data path #NOTIFY_LIST="sysopsprod@lightbridge.com" # who to notify when done NOTIFY_LIST="plamadeleine@lightbridge.com,pel_pager@lightbridge.com" TIMELOG=$WORKPATH/times.log # log file of start and stop times OUTLOG=$WORKPATH/$FILESYSTEM.log # log file of work done ARCHIVELOG=$WORKPATH/logs/${FILESYSTEM}_`date +"%H%M_%m%d%Y"`.log # where/how to archive log files EXCLUDE=$WORKPATH/sync_${FILESYSTEM}.exclude # file of directories to exclude from sync STARTTIME=`date +"%H:%M:%S %m/%d/%Y"` # start time of sync LOCKFILE=/tmp/${FILESYSTEM}_sync.lock # used for program locking # # check to see if another sync job for this file system is already running # if [ -f $LOCKFILE ] then MESSAGE='tried to start syncing when there already was on running' printf "%6s %6s %10s %55s \n" $STARTTIME $FILESYSTEM "$MESSAGE" >> $TIMELOG exit -3 else MESSAGE='started sync' printf "%6s %6s %10s %35s \n" $STARTTIME $FILESYSTEM "$MESSAGE" >> $TIMELOG # records start time touch $LOCKFILE fi # # This line does the actually syncing of the two file systems # #$WORKPATH/bin/rsync.5 --recursive \ $WORKPATH/bin/rsync.7 --recursive \ --progress \ --stats \ --delete \ --one-file-system \ --times \ --group \ --owner \ --perms \ --archive \ --verbose \ --timeout=300 \ --exclude-from=$EXCLUDE \ $FROMDIR $TODIR >> $OUTLOG 2>&1 ENDTIME=`date +"%H:%M:%S %m/%d/%Y"` # gets ending time MESSAGE='done with sync' printf "%6s %6s %10s %35s \n" $ENDTIME $FILESYSTEM "$MESSAGE" >> $TIMELOG # records ending time # # archive log file # mv $OUTLOG $ARCHIVELOG # creates archive log file # # remove lock file # rm $LOCKFILE # # send out notification mail # #mailx -s "Done syncing $FILESYSTEM - $ENDTIME" $NOTIFY_LIST < /dev/null # mails notification list of job completion exit 0 # exits nicely