DragonFly users List (threaded) for 2009-02
DragonFly BSD
DragonFly users List (threaded) for 2009-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: off-box mirror-stream and friends


From: Bill Hacker <wbh@xxxxxxxxxxxxx>
Date: Mon, 16 Feb 2009 14:40:58 +0800

Matthew Dillon wrote:
:I have what appears to be a 'Catch 22', wherein:
:
:hammer mirror-stream /master <user>@<remote_IP>:/new_slave
:
:returns:
:
:PFS slave /new-slave does not exist.
:Do you want to create a new slave PFS? (yes|no) No terminal for response
:Aborting operation
:validate_mrec_header: short read
:
:'No terminal for response' .was ass u me ed to be a byproduct of comign :in off an Xfce4-terminal (Xorg & Xfce4 are quite happy on 2.3.0, BTW)
:
:Dropped back out to the raw tty0 console and tried it from there.
:
:No joy.


Definitely a bug in the hammer utility, I'm not sure there is anything I can do about it though because the remote ssh connection
has no channel to accept a Y or N answer... stdin and stdout are used
for the protocol stream and I think stderr is output only.

Found and am working on a fix.


in /usr/src/sbin/hammer/cmd_hammer.c

the plan is to remove the request for a [yes|no] response and replace it with the countdown-timer that pfs-destroy returns.

Not having coded C since 386-16 was brand new doesn't help, but, 'Hacker' has been the family name since some time prior to 1400 AD.

;-)


In anycase, I think what this means is that this feature currently only works if the slave is local (non-ssh connection). So you would be able to do it with <remote_master> <local_slave>.


Had done. Still no joy. likewise form a 'disinterested third party' wherein both ends (appeared to be) remote.


No difference if on the console or via Xorg, either.

:Command *appear* to succeed if/as/when I *manually* create 'new_slave' :in advance with a matching shared_uuid. A local mirror-copy to it :suceeds, with new_slave showing the files mirrored.
:
:However, while the -vvv flag gives 5-sec updates, they all show a newer :starting point that pfs-status has for the target, and the contents of :the slave never change.


    You must access the slave via its softlink to get the latest version
    synced from the master.  If you try to access the slave via a null-mount
    you will be accessing a snapshot of the slave, not the current state of
    the slave.  The null mount locks in the transaction id of the slave.


Thanks - that will help...


:By way of contrast, mirror-stream between on-box master and on-box slave : - same command otherwise - works fine. No chdir needed to see the :updates, just a 'View, Reload' in thunar and sputniks.

    You are probably accessing it via the softlink, yes?  The gui is
    probably using an absolute path.  If you were to CD into a sub-directory
    (even through the softlink), you would be accessing a snapshot as-of
    when you did the CD, not the latest synced copy.


'Yes but'. Will have to reconfirm, but I can see the softlink, its target, and the mount.


Thunar reports the softlin as a 'broken softlink'

Thunar rads the nullfs mount in a 5-sec-lag state

Thunar sees the @@<string>25 pfs as frozen at time of creation.

AFAIK, this means the mirror-stream is updating what *started as* a snapshot.

'll -F' at the CLI is, if anything, less helpful....

hammer pfs-status helps.

:Query: Can the loop that seeks a 'yes' be changed to a 5-second :countdown-timer with a message such as:
:
:Creating <new_slave> Hit Ctrl-c to abort
:
:.absent which it JFDI.
:
:Thanks,
:
:Bill Hacker


That won't work, the target over an ssh link has no tty channel.

    Adding an option to create the slave automatically and passing it to
    the target hammer utility when it is run via the ssh, so it never has
    to ask at all, would work.  If someone would like to do that and submit
    a patch, I don't think it would take more then 20 minutes of
    programming.


-Matt
Matthew Dillon <dillon@backplane.com>

Beavering away. Perhaps under five minutes of programming for whomever wrote it (Michael? Thomas?).


2 days of researching what and how 'C' does with return variables, and how to sort what was in the mind of the original author when he asked for them where he did.. (why 'tty'' and-not stdin - which accepts the password OK).

And should the ssh session have been called with different flags, or least the calling code made to pop-out at internediate points for interactive response, or ....

Not even sure if I should be using 'make', 'bmake' or just 'cc', as my binaries so far have *way* diffent sizes from stock. They all run, oddly enough.. just not yet as wanted.

but I'll deal with that... just installed 'heme' as all I *really* need to do is change the one byte in the binary returned by the (failed) tty query to fake success, ELSE a JMP past the query routine altogether.

Bill




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]