This will be documented by a "script" so it can be cut-n-pasted for some of the items. ================================================================================ MOVE ================================================================================ ***************** BEGIN: EXAMPLE VALUES ************************* SRCHOST=host1 SRCHOSTG=${SRCHOST}g0 NEWHOST=host2 NEWHOSTG=${NEWHOST}g0 FS=/ft/napsfintest ***************** END: EXAMPLE VALUES ************************* ########################## # BEGIN "Day Before" # Get a 0 level so that when you do the change # the next day, it is a short incremental rsync ########################## # # sync up FS on NEWHOST # # on $NEWHOST # [[ $(hostname) != $NEWHOST ]] && echo "STOP!!! wrong server!!!" mkdir -p /tmpmount/$FS mount $SRCHOSTG:$FS /tmpmount$FS rsync -av --delete /tmpmount$FS $FS umount /tmpmount$FS ########################## # END "Day Before" ########################## # # check to make sure MTPT exists on new host # # on $NEWHOST # df -k $FS | grep -v : #should be local - no SRVR:/path but /dev/xxx #if no output, then it is NFS - BAD!!!!! # # sync up FS on NEWHOST # # on $NEWHOST # [[ $(hostname) != $NEWHOST ]] && echo "STOP!!! wrong server!!!" mkdir -p /tmpmount/$FS mount $SRCHOSTG:$FS /tmpmount$FS rsync -av /tmpmount$FS $FS umount /tmpmount$FS rmdir /tmpmount$FS ## *** if we had rsync on both sides - don't (4.3.3) ## must give the root password ## PULLING w/ rsync as old 4.3.3 servers do not have rsync ## assumes that FS is same on both systems #rsync -ave ssh $SRCHOSTG:$FS $FS # # HARD PART, remove NFS client mounts # # see who has it mounted - keep track of it for future step # showmount -e | grep $FS | tee /tmp/showmount.$(date +%Y%m%d%H%M) #log into each client and do a "umount $FS" or "umount something" #then umount $FS #*** OR **** umount -f $FS mparch /etc/filesystems vi /etc/filesystems #change SRCHOST to NEWSHOST for FS # either nfsmp1g0 or nfsmp2g0 # # serve FS on NEWHOST # # on $NEWHOST # vi /etc/exports #add new exported FS exportfs -a # # get rid of NFS on $SRCHOST # # on $SRCHOST # mparch /etc/exports vi /etc/exports #remove exported FS exportfs -a umount $FS vi /etc/filesystems #change from local FS to NFS FS mount $FS #so it comes from $NEWHOST # # On all clients that mounted FS # mount $FS #or whatever the FS was ================================================================================ BACKOUT ================================================================================ Reverse steps. for THISFS in $FS on client(s) unmount $FS on $SRCHOST vi /etc/exports #uncomment mount END exportfs -a on client(s) vi /etc/filesystems #change from $NEWHOST to $SRCHOST mount $THISFS done ================================================================================