[gpfsug-discuss] Policy rule to list files based on access time

Alex Chekholko alex at calicolabs.com
Fri Dec 1 17:18:57 GMT 2017


Hi Richard,

Either add something like "-L 2" to your mmapplypolicy command or add an
'EXEC ...' to your policy file to have it print out the actual files that
matched. There is an example exec script somewhere in the samples folder

I have found that in the past when I doubted the policy results, there was
something I misunderstood. So just go ahead and examine the metadata on the
actual files that match.

Perhaps at some point in the past, you had some kind of application scan
through the filesystem and thus all the access times got updated to newer
than you expect.

For the file count/size numbers, I don't find that unusual; there are all
kinds of user applications that have pathological patterns like 450k files
totaling 11MB.  But worth double-checking.  You can run some example
policies like the one you ran, but list only >10TB files or list only files
of 0 size; you never know what you might find.

Regards,
Alex


On Fri, Dec 1, 2017 at 8:57 AM, Sobey, Richard A <r.sobey at imperial.ac.uk>
wrote:

> Hi all,
>
>
>
> I’m getting some strange results using a policy to list all the files
> (well, I’m only interested in the total size that GPFS chooses) that have
> not been accessed for more than 1/2/3 etc years.
>
>
>
> The policy rule I’m using is:
>
>
>
> RULE 'list_old' LIST 'atime_gt_730'
>
> WHERE DAYS(CURRENT_TIMESTAMP) -DAYS(ACCESS_TIME) > 730
>
>
>
> ..for anything over 2 years. My filesystem is 3.5 years old and we first
> started migrating to it about three years ago, yet although GPFS is
> choosing ~400000 files that match, the total size is just north of 11000KB:
>
>
>
> [I] Summary of Rule Applicability and File Choices:
>
> Rule#      Hit_Cnt          KB_Hit          Chosen
> KB_Chosen          KB_Ill     Rule
>
>      0       453765           11776          453765
> 11776               0     RULE 'list_old' LIST 'atime_gt_730' WHERE(.)
>
>
>
> I’m having a hard time believing half a million files total 11MB
> especially given the very random spread of usage the system sees.
>
>
>
> The mmapplypolicy command I’m running is:
>
>
>
> /usr/lpp/mmfs/bin/mmapplypolicy /gpfs/path -f /gpfs/policies/ -I defer
> --scope filesystem -P ./list_old_allfs.txt
>
>
>
> The directory ‘path’ above is the root of the main CES share which
> encompasses all my filesets.
>
>
>
> This is my first real foray into using the policy engine so I might be
> doing something silly, or misinterpreting the results, or there is simply a
> far easier way to achieve my goal.
>
>
>
> Can anyone help?
>
>
>
> Thanks
>
> Richard
>
> _______________________________________________
> gpfsug-discuss mailing list
> gpfsug-discuss at spectrumscale.org
> http://gpfsug.org/mailman/listinfo/gpfsug-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20171201/1395f933/attachment-0002.htm>


More information about the gpfsug-discuss mailing list