Hi Michael,
See advices inline.
On 12/09/13 16:41, Michael Ruepp wrote:
>
> Filesets {
> FileClass scratchFolderMonthOld {
> Definition {
> tree == "/fhgfs/scratch"
> and
> creation > 30d
> }
> }
> }
Fileclass definition is expected to be based on "almost" static
attributes, like the path (tree in your case),
Other conditions should be tested in policies.
Fileclass is matched when scanning the entry, so an entry that gets
older than 30d won't enter in the policy scope
unless you rescan your filesystem.
Policy conditions are tested at purge time, which is what you want
(purging entries whose creation age is > 30d at the time of purging).
In your case, I'd suggest you define 2 fileclasses : one with scratch,
one as the negation of scratch (see filesets operations in the manual):
FileClass scratch { Definition { tree == "/fhgfs/scratch" } }
FileClass other { Definition { not scratch } }
And define the following purge policies:
Purge_policies {
ignore_fileclass = other;
policy purge_scratch_1month {
target_fileclass = scratch;
condition { creation > 30d and ... other conditions ... }
}
}
In this case, any entry is expected to match "other" or "scratch".
Entry in scratch will be purged when they match the policy condition (creation
> 30d).
Robinhood will only display a warning for entries that fall in the (missing)
default case,
which is indeed to be interpreted as a real warning, as it should not happen!
However, I agree that the "no default policy" warning is troubling,
should be suppressed in next versions,
and this case should be simply interpreted as "ignore".
>
> rmdir_policy {
> recursive_rmdir {
> tree == "/fhgfs/scratch"
> and last_mod > 30d
> }
> }
Be aware that last_mod is the mtime of the directory itself (as shown by
ls -l), it is not the max mtime of its whole contents (entries in
subdirectories...)
This looks dangerous if top levels of /fhgfs/scratch are quite static
(e.g. a tree with project/group/user).
In this case, the first level of /fhgfs/scratch will not change and its
mtime won't be updated, so the policy may result in "rm -f /fhgfs/scratch"
Regards,
-Thomas
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
robinhood-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support