I think I have discovered my problem. Fileclasses do works as Thomas
described.
I am scanning a local filesystem mounted as "/apps". Since we are
testing, I do not want to delete any files. I set the default
purge_policy to ignore all files in my fs_path. I created this
Purge_Policies section:
> Purge_Policies {
> ignore_fileclass = large_files;
>
> Ignore {
> tree == "/apps"
> }
> } ##Purge_Policies
However, the "large_files" fileclass was not recognized. All files were
reported as part of "ignored" fileclass.
I had thought the *order* of entries in the purge_policies was
important. I thought this would match the ignore_fileclass first, then
everything else would be ignored.
However, it appears the "Ignore" definition has precedence over other
definitions, and the ignore_fileclass entry was not being applied.
To fix my problem, I had to remove the "Ignore" definition from
Purge_Policies eg)
> Purge_Policies {
>
> ignore_fileclass = large_files;
>
> } ##Purge_Policies
Now the "large_files" fileclass is reported by rbh-report command.
Hope that makes sense :/
Chris Hunter
[email protected]
On 01/12/2015 11:18 AM, Chris Hunter wrote:
> Hi Thomas,
>
> Thanks for the suggestion. I added ignore_fileclass in the purge_policy
> section:
>> Purge_Policies {
>>
>> ignore_fileclass = large_files;
>>
>> } ##Purge_Policies
>
> However the report output does not change, all files are matched
> to "ignored" class:
>> # rbh-report -f /etc/robinhood.d/tmpfs/fileclass.test --class-info
>> purge class , count, spc_used, volume,
>> min_size, max_size, avg_size
>> [ignored] , 4447, 3.43 GB, 3.42 GB,
>> 0, 1.03 GB, 805.86 KB
>>
>> Total: 4447 entries, 3669665045 bytes (3.42 GB)
>
> I also observe in the log all files are reported as "matches no policy" eg)
>> 2015/01/12 11:06:04 [23298/8] FS_Scan | Starting scan of /apps
>> 2015/01/12 11:06:04 [23298/8] FS_Scan | Notice: this is the first scan
>> (DB is empty)
>> 2015/01/12 11:06:04 [23298/4] Policy | Entry '/apps/openvpn/howto.odt'
>> matches no policy case: not applying purge to it.
>
> Any other suggestions ?
>
> regards,
> [email protected]
>
> On 01/12/2015 03:30 AM, LEIBOVICI Thomas wrote:
>> Hi Chris,
>>
>> To match a fileclass, it needs to be referenced in a policy. I agree
>> this is quite confusing, so this will change in upcoming robinhood v3.
>> If you only need to match classes withour applying policies, you can
>> just define a dummy purge policy like the following:
>>
>> Purge_Policies {
>> ignore_fileclass = your_class1;
>> ignore_fileclass = your_class2;
>> }
>>
>> Regards,
>> Thomas
>>
>>
>>
>> On 01/12/15 02:21, Chris Hunter wrote:
>>> I am using robinhood tmpfs without lustre support.
>>>> # robinhood --version
>>>>
>>>> Product: robinhood
>>>> Version: 2.5.3.2-1
>>>> Build: 2014-10-29 15:55:57
>>>>
>>>> Compilation switches:
>>>> Temporary filesystem manager
>>>> Address entries by path
>>>> MDT Changelogs disabled
>>>>
>>>> No Lustre support
>>>> Database binding: MySQL
>>> I am trying to create fileclasses for use in filesystem reporting.
>>> However my fileclass entries appear to be ignored by robinhood.
>>>
>>> I am testing against a small local ext4 filesystem. For each test, I
>>> delete the database via "rbh-config empty_db" command. Then I start a
>>> scan with command "robinhood --scan --once". When the scan is complete,
>>> I use command "rbh-report --class-info" to check results.
>>>
>>> My tmpfs config file has no purge_polices and no Purge_Trigger sections.
>>> I have defined this fileclass:
>>>> Filesets
>>>> {
>>>> FileClass large_files
>>>> {
>>>> Definition {
>>>> type == file
>>>> and
>>>> size > 10GB
>>>> }
>>>> }
>>>> }
>>> However rbh-report always matches against the "ignored" class eg)
>>>> # rbh-report --class-info
>>>> Using config file '/etc/robinhood.d/tmpfs/fileclass.conf'.
>>>> purge class , count, spc_used, volume,
>>>> min_size, max_size, avg_size
>>>> [ignored] , 4447, 3.43 GB, 3.42 GB,
>>>> 0, 1.03 GB, 805.86 KB
>>>>
>>>> Total: 4447 entries, 3669665045 bytes (3.42 GB)
>>> Not sure where I'm going wrong, any suggestions would be appreciated.
>>>
>>> chris hunter
>>> yale hpc group
>>> [email protected]
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>> GigeNET is offering a free month of service with a new server in
>>> Ashburn.
>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>> vanity: www.gigenet.com
>>> _______________________________________________
>>> robinhood-support mailing list
>>> [email protected]
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_robinhood-2Dsupport&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=d_G2h_sZYG4xtHMeKo8QgjDmOcMVdQvYgM-5Dri1AOY&m=XvcfBcD6u5mLbWLXHMJCj8-k1eutYpy1wB4NvrgVP8Q&s=EuMHuSHIOSIVdv-qoMsPR5UJcLFJyMBP-BfSRkr1Eug&e=
>>>
>>
>>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
www.gigenet.com
_______________________________________________
robinhood-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support