I have tried this, but is does not work. I can override the hsm action so 
it rsyncs the file, but then the lhsm_status is set to 'achiving' and is 
never updated to synchro.
You have to actually use a hsmtool that updates the hsm status of the file 
in lustre so this policy updates the db correctly.
I have similar problems when using the backup plugin (also, {fullpath} for 
backup is different than for lhsm, confusing...)

I have found multiple ways to copy/rsync the files, but I cannot figure 
out how to handle deletions.
I can for instance use the basic status manager to trigger a copy of a 
file, but when I delete the file from lustre I also need to delete the 
file from the backend location.
As soon as the changelog is read, the entry gets deleted from the database 
without the possibility to perform some action on the file first..

Were is what I came up with so far to copy to a dir:

define_policy rsync {
    status_manager = basic;
    scope { type == file and (status != 'ok' or status == '')}
    default_action = cmd("rsync -aR {fullpath} /mnt/raid6/test");
    default_lru_sort_attr = none;
}

rsync_rules {
    rule rsync_test {
        target_fileclass = test;
        condition { last_mod > 1m }
    }
}

rsync_trigger {
    trigger_on = scheduled;
    check_interval = 5min;
}




From:   Colin Faber <cfa...@gmail.com>
To:     Martin BALVERS <martin.balv...@nutricia.com>
Cc:     "robinhood-support@lists.sourceforge.net" 
<robinhood-support@lists.sourceforge.net>
Date:   03-07-2017 01:44
Subject:        Re: [robinhood-support] Policy to rsync files



You could use the HSM rules to do this, and have the HSM action be the 
rsync command

On Fri, Jun 30, 2017 at 4:14 AM, Martin BALVERS <
martin.balv...@nutricia.com> wrote:
Hi,

Would it be possible to create a policy that rsyncs/copies to a specific 
location when a file in lustre is added/modified/deleted.
What I want to achieve is to have one specific dir on my lustre fs 
replicate to some other location. I know I can just use rsync to do this, 
but I want to avoid having to scan the whole lustre dir every time I 
update..
I can't use lustre_rsync because afaik that only works on the whole file 
system and not sub dirs.
I also can't use the robinhood hsm or backup policies for this because I 
need to have identical folder structure and filenames at the replicated 
location.

Martin

Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à 
laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci 
de le retourner à son émetteur. Les idées et opinions présentées dans ce 
message sont celles de son auteur, et ne représentent pas nécessairement 
celles de DANONE ou d'une quelconque de ses filiales. La publication, 
l'usage, la distribution, l'impression ou la copie non autorisée de ce 
message et des attachements qu'il contient sont strictement interdits. 

This e-mail and any files transmitted with it are confidential and 
intended solely for the use of the individual to whom it is addressed. If 
you have received this email in error please send it back to the person 
that sent it to you. Any views or opinions presented are solely those of 
its author and do not necessarily represent those of DANONE or any of its 
subsidiary companies. Unauthorized publication, use, dissemination, 
forwarding, printing or copying of this email and its associated 
attachments is strictly prohibited.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support





Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de DANONE ou d'une 
quelconque de ses filiales. La publication, l'usage, la distribution, 
l'impression ou la copie non autorisée de ce message et des attachements qu'il 
contient sont strictement interdits. 

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual to whom it is addressed. If you have 
received this email in error please send it back to the person that sent it to 
you. Any views or opinions presented are solely those of its author and do not 
necessarily represent those of DANONE or any of its subsidiary companies. 
Unauthorized publication, use, dissemination, forwarding, printing or copying 
of this email and its associated attachments is strictly prohibited.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to