DragonFly users List (threaded) for 2009-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: hammer mirror shows differrent results from differrent terminals
:Now in xterm1 I create a test file in the master pfs
:
:# touch test
:# ls -l
:total 0
:...
:# hammer mirror-copy /Backup1/Data /Backup2/Data
:Mirror-read: Mirror from 00000001000204b1 to 00000001000204f0
:Mirror-read /Backup1/Data succeeded
:#
:Now I check the slave in xterm2
:
:# pwd
:/Backup2/pfs/@@0x00000001000204b0:00001
:# ls
:#
:it shows nothing.
:but if I check it with the full path ( in xterm2 ) it shows the file
:is mirrored.
:# ls -l /Backup2/Data/
:total 0
:-rw-r--r-- 1 root wheel 0 Jul 7 13:44 test
:
:Why is this so?
Take a look at the transaction id's in the path. When you CD into
the slave you are CD'ing into a snapshot on the slave. That is what
that softlink is. It is dynamically generated by HAMMER but once you
CD into it you are locked into a transaction id.
So to see the changes you have to re-CD into the slave via the original
softlink.
All slave accesses are snapshot accesses, always. Accesses to master PFSs
use a transaction id of -1 (0xFFFFFFFFFFFFFFFFULL) and are thus always
'current' accesses, requiring no re-cd.
It is not a good idea to CD into a slave using a transaction id of -1
because you may catch ongoing mirroring operations as they are running,
instead of after they've completed.
:# rm test
:# hammer mirror-copy /Backup1/Data /Backup2/Data
:Mirror-read: Mirror from 0000000100020371 to 0000000100020370
:Mirror-read: No work to do
:Mirror-read /Backup1/Data succeeded
:
:It says no work to do!
:and the file is left in the slave.
:...
:thanks
:
:--Siju
That work is still in kernel memory. It hasn't been flushed to the
media yet. Mirroring operations only work on data flushed to the media.
This will occur automatically every 30-60 seconds or when you sync.
sync runs asynchronously though so it is best to use 'hammer synctid <fs>'.
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]