On Wed, Apr 28, 2010 at 11:40 PM, Matthew Dillon <[email protected]> wrote > > You don't need to cron the mirror-stream. The hammer mirror-stream > will automatically restart if the connection is lost so you only need > to start it up once at boot. You can do this with an @reboot entry > in the crontab. e.g.: > > �...@reboot command >
I have put @reboot /usr/bin/lockf -k -t 0 /root/adm/.lockHM1 /sbin/hammer mirror-stream /Backup1/Data /Backup2/Data & @reboot /usr/bin/lockf -k -t 0 /root/adm/.lockHM2 /sbin/hammer mirror-stream /Backup1/VersionControl /Backup2/VersionControl & in cron. and have dfly-bkpsrv# cat /etc/rc.conf.local |grep local local_enable="YES" and put the following in /etc/rc.shutdown.local #Kill all hammer mirror-stream processes. # pkill -f hammer mirror-stream /Backup1/Data /Backup2/Data pkill -f hammer mirror-stream /Backup1/VersionControl /Backup2/VersionControl #Sync Hammer Master pfs and Slave pfs # /usr/bin/lockf -k -t 0 /root/adm/.lockHM1 /sbin/hammer mirror-copy /Backup1/Data /Backup2/Data && echo "finished mirror-copy on `date`" >> /var/log/HM1.log /usr/bin/lockf -k -t 0 /root/adm/.lockHM2 /sbin/hammer mirror-stream /Backup1/VersionControl /Backup2/VersionControl && echo "finished mirror-copy on `date`" >> /var/log/HM2.log to make sure that the PFSes are in Sync before shutdown. but the files HM1.log and HM2.log are not created in /var/log so I dont know if this is working at all. Well do I need this extra caution? Will the mirrors automatically sync during a shutdown? Is there any way to force this? Thanks -Siju
