Hello everyone, I'm managing a low-multi-petabyte Scale filesystem with hundreds of millions of inodes, and I'm looking for the best way to locate archivable directories. For example, these might be directories where whose contents were greater than 5 or 10TB, and whose contents had atimes greater than two years. Has anyone found a great way to do this with a policy engine run? If not, is there another good way that anyone would recommend? Thanks in advance, Jim Kavitsky
Hi Jim, If you never worked with policy rules before, you may want to start by building your nerves to it. In the /usr/lpp/mmfs/samples/ilm path you will find several examples of templates that you can use to play around. I would start with the 'list' rules first. Some of those templates are a bit complex, so here is one script that I use on a regular basis to detect files larger than 1MB (you can even exclude specific filesets): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dss-mgt1:/scratch/r/root/mmpolicyRules # cat mmpolicyRules-list-large /* A macro to abbreviate VARCHAR */ define([vc],[VARCHAR($1)]) /* Define three external lists */ RULE EXTERNAL LIST 'largefiles' EXEC '/gpfs/fs0/scratch/r/root/mmpolicyRules/mmpolicyExec-list' /* Generate a list of all files that have more than 1MB of space allocated. */ RULE 'r2' LIST 'largefiles' SHOW('-u' vc(USER_ID) || ' -s' || vc(FILE_SIZE)) /*FROM POOL 'system'*/ FROM POOL 'data' /*FOR FILESET('root')*/ WEIGHT(FILE_SIZE) WHERE KB_ALLOCATED > 1024 /* Files in special filesets, such as mmpolicyRules, are never moved or deleted */ RULE 'ExcSpecialFile' EXCLUDE FOR FILESET('mmpolicyRules','todelete','tapenode-stuff','toarchive') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And here is another to detect files not looked at for more than 6 months. I found more effective to use atime and ctime. You could combine this with the one above to detect file size as well. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dss-mgt1:/scratch/r/root/mmpolicyRules # cat mmpolicyRules-list-atime-ctime-gt-6months /* A macro to abbreviate VARCHAR */ define([vc],[VARCHAR($1)]) /* Define three external lists */ RULE EXTERNAL LIST 'accessedfiles' EXEC '/gpfs/fs0/scratch/r/root/mmpolicyRules/mmpolicyExec-list' /* Generate a list of all files, directories, plus all other file system objects, like symlinks, named pipes, etc, accessed prior to a certain date AND that are not owned by root. Include the owner's id with each object and sort them by the owner's id */ /* Files in special filesets, such as mmpolicyRules, are never moved or deleted */ RULE 'ExcSpecialFile' EXCLUDE FOR FILESET ('scratch-root','todelete','root') RULE 'r5' LIST 'accessedfiles' DIRECTORIES_PLUS FROM POOL 'data' SHOW('-u' vc(USER_ID) || ' -a' || vc(ACCESS_TIME) || ' -c' || vc(CREATION_TIME) || ' -s ' || vc(FILE_SIZE)) WHERE (DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME) > 183) AND (DAYS(CURRENT_TIMESTAMP) - DAYS(CREATION_TIME) > 183) AND NOT USER_ID = 0 AND NOT (PATH_NAME LIKE '/gpfs/fs0/scratch/r/root/%') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that both these scripts work on a system wide (or root fileset) basis, and will not give you specific directories, unless you run them several times on specific directories (not very efficient). To produce general lists per directory you would need to do some post processing on the lists, with 'awk' or some other scripting language. If you need some samples I can send you. And finally, you need to be more specific by what you mean by 'archivable'. Once you produce the list you can do several things with them or leverage the rules to actually execute things, such as move, delete, or hsm stuff. The /usr/lpp/mmfs/samples/ilm path has some samples as well. On 4/3/2020 18:25:33, Jim Kavitsky wrote:
Hello everyone, I'm managing a low-multi-petabyte Scale filesystem with hundreds of millions of inodes, and I'm looking for the best way to locate archivable directories. For example, these might be directories where whose contents were greater than 5 or 10TB, and whose contents had atimes greater than two years.
Has anyone found a great way to do this with a policy engine run? If not, is there another good way that anyone would recommend? Thanks in advance,
yes, there is another way, the 'mmfind' utility, also in the same sample path. You have to compile it for you OS (mmfind.README). This is a very powerful canned procedure that lets you run the "-exec" option just as in the normal linux version of 'find'. I use it very often, and it's just as efficient as the other policy rules based alternative. Good luck. Keep safe and confined. Jaime
Jim Kavitsky
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
. . . ************************************ TELL US ABOUT YOUR SUCCESS STORIES http://www.scinethpc.ca/testimonials ************************************ --- Jaime Pinto - Storage Analyst SciNet HPC Consortium - Compute/Calcul Canada www.scinet.utoronto.ca - www.computecanada.ca University of Toronto 661 University Ave. (MaRS), Suite 1140 Toronto, ON, M5G1M1 P: 416-978-2755 C: 416-505-1477
Hi Jim, The common non-GPFS-specific way is to use a tool that dumps all of your filesystem metadata into an SQL database and then you can have a webapp that makes nice graphs/reports from the SQL database, or do your own queries. The Free Software example is "Robinhood" (use the POSIX scanner, not the lustre-specific one) and one proprietary example is Starfish. In both cases, you need a pretty beefy machine for the DB and the scanning of your filesystem may take a long time, depending on your filesystem performance. And then without any filesystem-specific hooks like a transaction log, you'll need to rescan the entire filesystem to update your db. Regards, Alex On Fri, Apr 3, 2020 at 3:25 PM Jim Kavitsky <jkavitsky@23andme.com> wrote:
Hello everyone, I'm managing a low-multi-petabyte Scale filesystem with hundreds of millions of inodes, and I'm looking for the best way to locate archivable directories. For example, these might be directories where whose contents were greater than 5 or 10TB, and whose contents had atimes greater than two years.
Has anyone found a great way to do this with a policy engine run? If not, is there another good way that anyone would recommend? Thanks in advance,
Jim Kavitsky _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
As Alex mentioned, there are tools that will keep filesystem metadata in a database and provide query tools. NYGC uses Starfish and we’ve had good experience with it. At first the only feature we used is “sfdu” which is a quick replacement for recursive du. Using this we can script csv reports for selections of dirs. As we use starfish more, we’ve started opening the web interface to people to look at selected areas of our filesystems where they can sort directories by size, mtime, atime, and run other reports and queries. We’ve also started using tagging functionality so we can quickly get an aggregate total (and growth over time) by tag across multiple directories. We tried Robinhood years ago but found it was taking too much work to get it to scale to 100s of millions of files and 10s of PiB on gpfs. It might be better now. IBM has a metadata product called Spectrum Discover that has the benefit of using gpfs-specific interfaces to be always up to date. Many of the other tools require scheduling scans to update the db. Igneous has a commercial tool called DataDiscover which also looked promising. ClarityNow and MediaFlux are other similar tools. I expect all of these tools at the very least have nice replacements for du and find as well as some sort of web directory tree view. We had run Starfish for a while and did a re-evaluation of a few options in 2019 and ultimately decided to stay with Starfish for now. Best, Chris From: <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Alex Chekholko <alex@calicolabs.com> Reply-To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: Friday, April 3, 2020 at 7:51 PM To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] fast search for archivable data sets Hi Jim, The common non-GPFS-specific way is to use a tool that dumps all of your filesystem metadata into an SQL database and then you can have a webapp that makes nice graphs/reports from the SQL database, or do your own queries. The Free Software example is "Robinhood" (use the POSIX scanner, not the lustre-specific one) and one proprietary example is Starfish. In both cases, you need a pretty beefy machine for the DB and the scanning of your filesystem may take a long time, depending on your filesystem performance. And then without any filesystem-specific hooks like a transaction log, you'll need to rescan the entire filesystem to update your db. Regards, Alex On Fri, Apr 3, 2020 at 3:25 PM Jim Kavitsky <jkavitsky@23andme.com<mailto:jkavitsky@23andme.com>> wrote: Hello everyone, I'm managing a low-multi-petabyte Scale filesystem with hundreds of millions of inodes, and I'm looking for the best way to locate archivable directories. For example, these might be directories where whose contents were greater than 5 or 10TB, and whose contents had atimes greater than two years. Has anyone found a great way to do this with a policy engine run? If not, is there another good way that anyone would recommend? Thanks in advance, Jim Kavitsky _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<https://urldefense.com/v3/__http:/spectrumscale.org__;!!C6sPl7C9qQ!Cs4pKCeiQ...> http://gpfsug.org/mailman/listinfo/gpfsug-discuss<https://urldefense.com/v3/__http:/gpfsug.org/mailman/listinfo/gpfsug-discuss__;!!C6sPl7C9qQ!Cs4pKCeiQY8iPQeiCnSUIUHDC9FHjx7C64p_WVNeQsaF4ODzO9o7NkBoUWuphbie$> ________________________________ This message is for the recipient’s use only, and may contain confidential, privileged or protected information. Any unauthorized use or dissemination of this communication is prohibited. If you received this message in error, please immediately notify the sender and destroy all copies of this message. The recipient should check this email and any attachments for the presence of viruses, as we accept no liability for any damage caused by any virus transmitted by this email.
participants (4)
-
Alex Chekholko -
Christopher Black -
Jaime Pinto -
Jim Kavitsky
