[ClusterLabs] copy file
kgaillot at redhat.com
Mon Mar 5 17:29:17 EST 2018
On Mon, 2018-03-05 at 15:09 +0100, Mevo Govo wrote:
> I am new in pacemaker. I think, I should use DRBD instead of copy
> file. But in this case, I would copy a file from a DRBD to an
> external device. Is there a builtin way to copy a file before a
> resource is started (and after the DRBD is promoted)? For example a
> "copy" resource? I did not find it.
> Thanks: lados.
There's no stock way of doing that, but you could easily write an agent
that simply copies a file. You could use ocf:pacemaker:Dummy as a
template, and add the copy to the start action. You can use standard
ordering and colocation constraints to make sure everything happens in
the right sequence.
I don't know what capabilities your external device has, but another
approach would be to an NFS server to share the DRBD file system, and
mount it from the device, if you want direct access to the original
file rather than a copy.
Ken Gaillot <kgaillot at redhat.com>
More information about the Users