Hi I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ? Many thanks Kevin Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk<mailto:Kevin.Doyle@manchester.ac.uk> [/Users/kdoyle/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1799188038]
Hi U can create list of diretories in output file which were not modify in the last 30 days, and than second script will move this directories to the new location that u want. Regards Yaron Daniel 94 Em Ha'Moshavot Rd Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 13:45 Subject: [EXTERNAL] [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ? Many thanks Kevin Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Hi Thanks for your reply, once I have a set of files that are older than 30 days would I then use the migration rule to move them ? Looking at the migration Rule syntax implies a “From” pool and a “To” pool, I only have a single pool so would I use the same pool name for From and To ? if it is the same pool How do I specify the folder to move it to which needs to be different from the current location. Thanks Kevin RULE ['RuleName'] [WHEN TimeBooleanExpression] MIGRATE [COMPRESS ({'yes' | 'no' | 'lz4' | 'z'})] [FROM POOL 'FromPoolName'] [THRESHOLD (HighPercentage[,LowPercentage[,PremigratePercentage]])] [WEIGHT (WeightExpression)] TO POOL 'ToPoolName' [LIMIT (OccupancyPercentage)] [REPLICATE (DataReplication)] [FOR FILESET ('FilesetName'[,'FilesetName']...)] [SHOW (['String'] SqlExpression)] [SIZE (numeric-sql-expression)] [ACTION (SqlExpression)] [WHERE SqlExpression] Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk<mailto:Kevin.Doyle@manchester.ac.uk> [/Users/kdoyle/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1131538866] From: <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Yaron Daniel <YARD@il.ibm.com> Reply-To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: Friday, 27 December 2019 at 12:55 To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] Question about Policies Hi U can create list of diretories in output file which were not modify in the last 30 days, and than second script will move this directories to the new location that u want. Regards ________________________________ Yaron Daniel 94 Em Ha'Moshavot Rd [cid:_1_10392F3C103929880046F589C22584DD] Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard<Webex:%20%20%20%20%20%20%20%20%20%20%20%20%20https://ibm.webex.com/meet/yard%0dIBM%20Israel> IBM Israel<Webex:%20%20%20%20%20%20%20%20%20%20%20%20%20https://ibm.webex.com/meet/yard%0dIBM%20Israel> [cid:_2_103C9B0C103C96FC0046F589C22584DD] [cid:_2_103C9D14103C96FC0046F589C22584DD] [cid:_2_103C9F1C103C96FC0046F589C22584DD] [cid:_2_103CA124103C96FC0046F589C22584DD] [cid:_2_103CA32C103C96FC0046F589C22584DD] [cid:_2_103CA534103C96FC0046F589C22584DD] [cid:_2_103CA73C103C96FC0046F589C22584DD] [cid:_2_103CA944103C96FC0046F589C22584DD] From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 13:45 Subject: [EXTERNAL] [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org ________________________________ Hi I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ? Many thanks Kevin Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk<mailto:Kevin.Doyle@manchester.ac.uk> [/Users/kdoyle/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1799188038] _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Hi As you said it migrate between different pools (ILM/External - Tape) - so in case you need to move directory to different location - you will have to use the OS mv command. From what i remember there is no directory policy for the same pool. Regards Yaron Daniel 94 Em Ha'Moshavot Rd Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 15:57 Subject: [EXTERNAL] Re: [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi Thanks for your reply, once I have a set of files that are older than 30 days would I then use the migration rule to move them ? Looking at the migration Rule syntax implies a “From” pool and a “To” pool, I only have a single pool so would I use the same pool name for From and To ? if it is the same pool How do I specify the folder to move it to which needs to be different from the current location. Thanks Kevin RULE ['RuleName'] [WHEN TimeBooleanExpression] MIGRATE [COMPRESS ({'yes' | 'no' | 'lz4' | 'z'})] [FROM POOL 'FromPoolName'] [THRESHOLD (HighPercentage[,LowPercentage[,PremigratePercentage]])] [WEIGHT (WeightExpression)] TO POOL 'ToPoolName' [LIMIT (OccupancyPercentage)] [REPLICATE (DataReplication)] [FOR FILESET ('FilesetName'[,'FilesetName']...)] [SHOW (['String'] SqlExpression)] [SIZE (numeric-sql-expression)] [ACTION (SqlExpression)] [WHERE SqlExpression] Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk From: <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Yaron Daniel <YARD@il.ibm.com> Reply-To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: Friday, 27 December 2019 at 12:55 To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] Question about Policies Hi U can create list of diretories in output file which were not modify in the last 30 days, and than second script will move this directories to the new location that u want. Regards Yaron Daniel 94 Em Ha'Moshavot Rd Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 13:45 Subject: [EXTERNAL] [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ? Many thanks Kevin Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
You would want to look for examples of external scripts that work on the result of running the policy engine in listing mode. The one issue that might need some attention is the way that gpfs quotes unprintable characters in the pathname. So the policy engine generates the list and your external script does the moving. -- ddj Dave Johnson
On Dec 27, 2019, at 9:11 AM, Yaron Daniel <YARD@il.ibm.com> wrote:
Hi
As you said it migrate between different pools (ILM/External - Tape) - so in case you need to move directory to different location - you will have to use the OS mv command. From what i remember there is no directory policy for the same pool.
Regards
Yaron Daniel 94 Em Ha'Moshavot Rd <mime-attachment.gif> Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel
Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel
<mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg>
From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 15:57 Subject: [EXTERNAL] Re: [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org
Hi
Thanks for your reply, once I have a set of files that are older than 30 days would I then use the migration rule to move them ?
Looking at the migration Rule syntax implies a “From” pool and a “To” pool, I only have a single pool so would I use the same pool name for From and To ? if it is the same pool How do I specify the folder to move it to which needs to be different from the current location.
Thanks Kevin
RULE['RuleName'] [WHENTimeBooleanExpression] MIGRATE [COMPRESS({'yes' | 'no' | 'lz4' | 'z'})] [FROM POOL'FromPoolName'] [THRESHOLD(HighPercentage[,LowPercentage[,PremigratePercentage]])] [WEIGHT(WeightExpression)] TO POOL'ToPoolName' [LIMIT(OccupancyPercentage)] [REPLICATE(DataReplication)] [FOR FILESET('FilesetName'[,'FilesetName']...)] [SHOW(['String'] SqlExpression)] [SIZE(numeric-sql-expression)] [ACTION(SqlExpression)] [WHERESqlExpression]
Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk
<mime-attachment.png>
From: <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Yaron Daniel <YARD@il.ibm.com> Reply-To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: Friday, 27 December 2019 at 12:55 To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] Question about Policies
Hi
U can create list of diretories in output file which were not modify in the last 30 days, and than second script will move this directories to the new location that u want.
Regards
Yaron Daniel 94 Em Ha'Moshavot Rd <mime-attachment.gif> Storage Architect – IL Lab Services (Storage) Petach Tiqva, 49527 IBM Global Markets, Systems HW Sales Israel
Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel
<mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg> <mime-attachment.jpg>
From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 13:45 Subject: [EXTERNAL] [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org
Hi
I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ?
Many thanks Kevin
Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk
<mime-attachment.png>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On 27/12/2019 14:20, david_johnson@brown.edu wrote:
You would want to look for examples of external scripts that work on the result of running the policy engine in listing mode. The one issue that might need some attention is the way that gpfs quotes unprintable characters in the pathname. So the policy engine generates the list and your external script does the moving.
In my experience a good starting point would be to scan the list of files from the policy engine and separate the files out into "normal"; that is files using basic ASCII and no special characters and the rest also known as the "wacky pile". Given that you are UK based it is not unreasonable to expect all path and file names to be in English. There might (and if not probably should) be an institutional policy mandating it. Not much use if a researcher saves everything in Greek then gets knocked over by a bus and person picking up the work is Spanish for example. Hopefully the "wacky pile" is small, however expect to find all sorts of bizarre file and path names in it. We are talking wildcards, back ticks, even newline characters to name but a few. Depending on the amount of data in the "wacky" pile you might just want to forget about moving them, as they are orders of magnitude more difficult to deal with than files with "sane" path and file names and can rapidly soak up large chunks of time trying to deal with them in scripts. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
If you needed to preserve the "wackiness" of the original file and pathnames (and I'm assuming you need to preserve the pathnames in order to avoid collisions between migrated files from different directories which have the same basename, and to allow the files to found/recovered again later, etc) then you can use Marc's `mmfind` suggestion, coupled with the -print0 argument to produce a null-delimited file list which could be coupled with an "xargs -0" pipeline or "rsync -0" to do most of the work. Test everything with a "dry-run" mode which reported what it would do, but without doing it, and one which copied without deleting, to help expose bugs in the process before destroying your data. If the migration doesn't cross between independent filesets, then file migrations could be performed using "mv" without any actual data copying. (For that matter, it could also be done in two stages by hard-linking, then unlinking.) But I think that there are other potential problems involved, even before considering things like path escaping or fileset boundaries... If everything is predicated on the age of a file, you will need to create the missing directory hierarchy in the target dir structure for files which need to be "migrated". If files in a directory vary in age, you may move some files but leave others alone (until they become old enough to migrate) creating incomplete and probably unusable versions at both the source and target. What if a user recreates the missing files as they disappear? As they later age, do you overwrite the files on the target? What if a directory name is later changed to a filename or vice-versa? Will you ever need to "restore" these structures? If so, will you merge these back in to the original source if both non-empty source and target dirs exist? Should we wait for an entire dir hierarchy to age out and then archive it atomically? (We would want a way to know where project dir boundaries are.) I would urge you to think about how complex this might actually get before start performing surgery within data sets. I would be inclined to challenge the original requirements to ensure that what you are able to accomplish matches up with the real goals without creating a raft of new operational problems or loss of work product. Depending on the original goal, it may be possible to do this (more safely) with snapshots or tarballs. -Paul -----Original Message----- From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> On Behalf Of Jonathan Buzzard Sent: Saturday, December 28, 2019 10:17 AM To: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] Question about Policies This message was sent by an external party. On 27/12/2019 14:20, david_johnson@brown.edu wrote:
You would want to look for examples of external scripts that work on the result of running the policy engine in listing mode. The one issue that might need some attention is the way that gpfs quotes unprintable characters in the pathname. So the policy engine generates the list and your external script does the moving.
In my experience a good starting point would be to scan the list of files from the policy engine and separate the files out into "normal"; that is files using basic ASCII and no special characters and the rest also known as the "wacky pile". Given that you are UK based it is not unreasonable to expect all path and file names to be in English. There might (and if not probably should) be an institutional policy mandating it. Not much use if a researcher saves everything in Greek then gets knocked over by a bus and person picking up the work is Spanish for example. Hopefully the "wacky pile" is small, however expect to find all sorts of bizarre file and path names in it. We are talking wildcards, back ticks, even newline characters to name but a few. Depending on the amount of data in the "wacky" pile you might just want to forget about moving them, as they are orders of magnitude more difficult to deal with than files with "sane" path and file names and can rapidly soak up large chunks of time trying to deal with them in scripts. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Now apart from the mechanics of handling and manipulating pathnames ... the idea to manage storage by "mv"ing instead of MIGRATEing (GPFS-wise) may be ill-advised. I suspect this is a hold-over or leftover from the old days -- when a filesystem was comprised of just a few storage devices (disk drives) and the only way available to manage space was to mv files to another filesystem or archive to tape or whatnot.. That is not the GPFS-way (Spectrum-Scale-way).... Well at least not for more than a dozen or more years! Modern Spectrum Scale has storage POOLs and also integrates with HSM systems. These separate the concept of name space (pathnames) from storage devices. Read about it, discuss it with your colleagues, clients, managers -- and use it! -- marc of GPFS.
On 30/12/2019 16:20, Marc A Kaplan wrote:
Now apart from the mechanics of handling and manipulating pathnames ...
the idea to manage storage by "mv"ing instead of MIGRATEing (GPFS-wise) may be ill-advised.
I suspect this is a hold-over or leftover from the old days -- when a filesystem was comprised of just a few storage devices (disk drives) and the only way available to manage space was to mv files to another filesystem or archive to tape or whatnot..
I suspect based on the OP is from (a cancer research institute which is basically life sciences) that this is an incorrect assumption. I would guess this is about "archiving" results coming off experimental equipment. I use the term "archiving" in the same way that various email programs try and "archive" my old emails. That is to prevent the output directory of the equipment filling up with many thousands of files and/or directories I want to automate the placement in a directory hierarchy of old results. Imagine a piece of equipment that does 50 different analysis's a day every working day. That's a 1000 a month or ~50,000 a year. It's about logically moving stuff to keep ones working directory manageable but making finding an old analysis easy to find. I would also note that some experimental equipment would do many more than 50 different analysis's a day. It's a common requirement in any sort of research facility, especially when they have central facilities for doing analysis on equipment that would be too expensive for an individual group or where it makes sense to "outsource" repetitive basics analysis to lower paid staff. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Yes, that is entirely true, if not then basic Posix calls like open(2) are broken. https://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filen...
On 30/12/2019 23:35, Marc A Kaplan wrote:
Yes, that is entirely true, if not then basic Posix calls like open(2) are broken.
_https://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filen...
That's for Linux and possibly Posix. Like I said on the certified *Unix* that is macOS it's perfectly fine. I have bumped into it more times that I care to recall. Try moving a MacOS AFP server to a different OS and then get back to me... JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
As I said :"MAY be ill-advised". If you have a good reason to use "mv" then certainly, use it! But there are plenty of good naming conventions for the scenario you give... Like, start a new directory of results every day, week or month... /fs/experiments/y2019/m12/d30/fileX.ZZZ ... OF course, if you want or need to mv, or cp and/or rm the metadata out of the filesystem, then eventually you do so!
On 30/12/2019 23:40, Marc A Kaplan wrote:
As I said :"MAY be ill-advised".
If you have a good reason to use "mv" then certainly, use it!
But there are plenty of good naming conventions for the scenario you give... Like, start a new directory of results every day, week or month...
/fs/experiments/y2019/m12/d30/fileX.ZZZ ...
OF course, if you want or need to mv, or cp and/or rm the metadata out of the filesystem, then eventually you do so!
Possibly, but often (in fact sensibly) the results are saved in the first instance to the local machine because any network issue and boom your results are gone as doing the analysis destroys the sample. That in life sciences can easily mean several days and $1000. The results are then uploaded automatically to the file server. That gets a whole bunch more complicated. Honest you simply don't want to go there getting it to be done different. It would be less painful to have a tooth extracted without anesthetic. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
The script in mmfs/bin/mmxargs handles mmapplypolicy EXTERNAL LIST file lists perfectly. No need to worry about whitespaces and so forth. Give it a look-see and a try -- marc of GPFS - From: Jonathan Buzzard <jonathan.buzzard@strath.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 12/28/2019 10:17 AM Subject: [EXTERNAL] Re: [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org On 27/12/2019 14:20, david_johnson@brown.edu wrote:
You would want to look for examples of external scripts that work on the result of running the policy engine in listing mode. The one issue that might need some attention is the way that gpfs quotes unprintable characters in the pathname. So the policy engine generates the list and your external script does the moving.
In my experience a good starting point would be to scan the list of files from the policy engine and separate the files out into "normal"; that is files using basic ASCII and no special characters and the rest also known as the "wacky pile". Given that you are UK based it is not unreasonable to expect all path and file names to be in English. There might (and if not probably should) be an institutional policy mandating it. Not much use if a researcher saves everything in Greek then gets knocked over by a bus and person picking up the work is Spanish for example. Hopefully the "wacky pile" is small, however expect to find all sorts of bizarre file and path names in it. We are talking wildcards, back ticks, even newline characters to name but a few. Depending on the amount of data in the "wacky" pile you might just want to forget about moving them, as they are orders of magnitude more difficult to deal with than files with "sane" path and file names and can rapidly soak up large chunks of time trying to deal with them in scripts. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
On 28/12/2019 19:49, Marc A Kaplan wrote:
The script in mmfs/bin/mmxargs handles mmapplypolicy EXTERNAL LIST file lists perfectly. No need to worry about whitespaces and so forth. Give it a look-see and a try
Indeed, but I get the feeling from the original post that you will need to mung the path/file names to produce a new directory path that the files is to be moved to. At this point the whole issue of "wacky" directory and file names will rear it's ugly head. So for example /gpfs/users/joeblogs/experiment`1234?/results *-12-2019.txt would need moving to something like /gpfs/users/joeblogs/experiment`1234?/old_data/results *-12-2019.txt That is a pit of woe unless you are confident that users are being sensible, or you just forget about wacky named files. In a similar vein, in the past I have for results coming of a piece of experimental equipment ziped up every 30 days. Each run on the equipment and the results go in a different directory/ So for example the directory /gpfs/users/joeblogs/nmr_spectroscopy/2019/results-1229-01/ would be zipped up to /gpfs/users/joeblogs/nmr_spectroscopy/2019/results-1229-01.zip and the original directory removed. This works well because both widows explorer and finder will allow you to click into the zip files to see the contents. However the script that did this worked in the principle of a very strict naming convention that if was not adhered to would mean the folders where not zipped up. Given the original posters institution, a good guess is that something like this is what is wanting to be achieved. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Correct, you may need to use similar parsing/quoting techniques in your renaming scripts. 0 Just remember, in Unix/Posix/Linux the only 2 special characters/codes in path names are '/' and \0. The former delimits directories and the latter marks the end of the string. And technically the latter isn't ever in a path name, it's only used by system APIs to mark the end of a string that is the pathname argument. Happy New Year, From: Jonathan Buzzard <jonathan.buzzard@strath.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 12/29/2019 05:01 AM Subject: [EXTERNAL] Re: [gpfsug-discuss] Question about Policies - using mmapplypolicy/EXTERNAL LIST/mmxargs Sent by: gpfsug-discuss-bounces@spectrumscale.org On 28/12/2019 19:49, Marc A Kaplan wrote:
The script in mmfs/bin/mmxargs handles mmapplypolicy EXTERNAL LIST file lists perfectly. No need to worry about whitespaces and so forth. Give it a look-see and a try
Indeed, but I get the feeling from the original post that you will need to mung the path/file names to produce a new directory path that the files is to be moved to. At this point the whole issue of "wacky" directory and file names will rear it's ugly head. So for example /gpfs/users/joeblogs/experiment`1234?/results *-12-2019.txt would need moving to something like /gpfs/users/joeblogs/experiment`1234?/old_data/results *-12-2019.txt That is a pit of woe unless you are confident that users are being sensible, or you just forget about wacky named files. In a similar vein, in the past I have for results coming of a piece of experimental equipment ziped up every 30 days. Each run on the equipment and the results go in a different directory/ So for example the directory /gpfs/users/joeblogs/nmr_spectroscopy/2019/results-1229-01/ would be zipped up to /gpfs/users/joeblogs/nmr_spectroscopy/2019/results-1229-01.zip and the original directory removed. This works well because both widows explorer and finder will allow you to click into the zip files to see the contents. However the script that did this worked in the principle of a very strict naming convention that if was not adhered to would mean the folders where not zipped up. Given the original posters institution, a good guess is that something like this is what is wanting to be achieved. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
On 29/12/2019 14:24, Marc A Kaplan wrote:
Correct, you may need to use similar parsing/quoting techniques in your renaming scripts. 0 Just remember, in Unix/Posix/Linux the only 2 special characters/codes in path names are '/' and \0. The former delimits directories and the latter marks the end of the string. And technically the latter isn't ever in a path name, it's only used by system APIs to mark the end of a string that is the pathname argument. i
I am not sure even that is entirely true. Certainly MacOS X in the past would allow '/' in file names. You find this out when a MacOS user tries to migrate their files to a SMB based file server and the process trips up because they have named a whole bunch of files in the format "My Results 30/12/2019.txt" At this juncture I note that MacOS is certified Unix :-) I think it is more a file system limitation than anything else. I wonder what happens when you mount a HFS+ file system with such named files on Linux... I would at this point note that the vast majority of "wacky" file names originate from MacOS (both Classic and X) users. Also while you are otherwise technically correct about what is allowed in a file name just try creating a file name with a newline character in it using either a GUI tool or the command line. You have to be really determined to achieve it. I have also seen \007 in a file name, I mean really. Our training for new HPC users has a section covering file names which includes advising users not to use "wacky" characters in them as we don't guarantee their continued survival. That is if we do something on the file system and they get "lost" as a result it's your own fault. In my view restricting yourself to the following is entirely sensible https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referen... Also while Unix is generally case sensitive creating files that would clash if accessed case insensitive is really dumb and should be avoided. Again, if it causes you problems in future, it sucks to be you. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Also see if your distribution includes samples/ilm/mmxcp which, if you are determined to cp or mv from one path to another, shows a way to do that easily in perl, using code similar to the aforementions bin/mmxargs Here is the path changing part... ... $src =~ s/'/'\\''/g; # any ' within the name like x'y become x'\''y then we quote all names passed to commands my @src = split('/',$src); my $sra = join('/', @src[$strip+1..$#src-1]); $newtarg = "'" . $target . '/' . $sra . "'"; ...
The MIGRATE rule is for moving files from one pool to another, without changing the pathname or any attributes, except the storage devices holding the data blocks of the file. Also can be use for "external" pools to migrate to an HSM system. "moving" from one folder to another is a different concept. The mmapplypolicy LIST and EXTERNAL LIST rules can be used to find files older than 30 days and then do any operations you like on them, but you have to write a script to do those operations. See also -- the "Information Lifecycle Management" (ILM) chapter of the SS Admin Guide AND/OR for an easy to use parallel function equivalent to the classic Unix pipline `find ... | xargs ... ` Try the `mmfind ... -xargs ... ` from the samples/ilm directory. [root@~/.../samples/ilm]$./mmfind Usage: ./mmfind [mmfind args] { <find invocation> | -inputFileList f -policyFile f } mmfind args: [-polFlags 'flag 1 flag 2 ...'] [-logLvl {0|1|2}] [-logFile f] [-saveTmpFiles] [-fs fsName] [-mmapplypolicyOutputFile f] find invocation -- logic: ! ( ) -a -o /path1 [/path2 ...] [expression] -atime N -ctime N -mtime N -true -false -perm mode -iname PATTERN -name PATTERN -path PATTERN -ipath PATTERN -uid N -user NAME -gid N -group NAME -nouser -nogroup -newer FILE -older FILE -mindepth LEVEL -maxdepth LEVEL -links N -size N -empty -type [bcdpflsD] -inum N -exec COMMAND -execdir COMMAND -ea NAME -eaWithValue NAME===VALUE -setEA NAME[===VALUE] -deleteEA NAME -gpfsImmut -gpfsAppOnly -gpfsEnc -gpfsPool POOL_NAME -gpfsMigrate poolFrom,poolTo -gpfsSetPool poolTo -gpfsCompress -gpfsUncompress -gpfsSetRep m,r -gpfsWeight NumericExpr -ls -fls -print -fprint -print0 -fprint0 -exclude PATH -xargs [-L maxlines] [-I rplstr] COMMAND Give -h for a more verbose usage message From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 12/27/2019 08:57 AM Subject: [EXTERNAL] Re: [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi Thanks for your reply, once I have a set of files that are older than 30 days would I then use the migration rule to move them ? Looking at the migration Rule syntax implies a “From” pool and a “To” pool, I only have a single pool so would I use the same pool name for From and To ? if it is the same pool How do I specify the folder to move it to which needs to be different from the current location. Thanks Kevin RULE ['RuleName'] [WHEN TimeBooleanExpression] MIGRATE [COMPRESS ({'yes' | 'no' | 'lz4' | 'z'})] [FROM POOL 'FromPoolName'] [THRESHOLD (HighPercentage[,LowPercentage[,PremigratePercentage]])] [WEIGHT (WeightExpression)] TO POOL 'ToPoolName' [LIMIT (OccupancyPercentage)] [REPLICATE (DataReplication)] [FOR FILESET ('FilesetName'[,'FilesetName']...)] [SHOW (['String'] SqlExpression)] [SIZE (numeric-sql-expression)] [ACTION (SqlExpression)] [WHERE SqlExpression] Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk /Users/kdoyle/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1131538866 From: <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Yaron Daniel <YARD@il.ibm.com> Reply-To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: Friday, 27 December 2019 at 12:55 To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] Question about Policies Hi U can create list of diretories in output file which were not modify in the last 30 days, and than second script will move this directories to the new location that u want. Regards Yaron Daniel 94 Em Ha'Moshavot Rd cid:_1_10392F3C103929880046F589C22584DD Storage Architect – IL Lab Petach Tiqva, 49527 Services (Storage) IBM Global Markets, Systems HW Israel Sales Phone: +972-3-916-5672 Fax: +972-3-916-5672 Mobile: +972-52-8395593 e-mail: yard@il.ibm.com Webex: https://ibm.webex.com/meet/yard IBM Israel cid:_2_103C9B0C103C96FC0046F589C22584DD cid:_2_103C9D14103C96FC0046F589C22584DD cid:_2_103C9F1C103C96FC0046F589C22584DD cid:_2_103CA124103C96FC0046F589C22584DD cid:_2_103CA32C103C96FC0046F589C22584DD cid:_2_103CA534103C96FC0046F589C22584DD cid:_2_103CA73C103C96FC0046F589C22584DD cid:_2_103CA944103C96FC0046F589C22584DD From: Kevin Doyle <kevin.doyle@manchester.ac.uk> To: "gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org> Date: 27/12/2019 13:45 Subject: [EXTERNAL] [gpfsug-discuss] Question about Policies Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi I work for Cancer Research UK MI in Manchester UK. I am new to GPFS and have been tasked with creating a policy that will Move files older that 30 days to a new folder within the same pool. There are a lot of files so using a policy based move will be faster. I have read about the migration Rule but it states a source and destination pool, we only have one pool. Will it work if I define the same source and destination pool ? Many thanks Kevin Kevin Doyle | Linux Administrator, Scientific Computing Cancer Research UK, Manchester Institute The University of Manchester Room 13G40, Alderley Park, Macclesfield SK10 4TG Mobile: 07554 223480 Email: Kevin.Doyle@manchester.ac.uk /Users/kdoyle/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1799188038 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
participants (7)
-
Daniel Kidger -
david_johnson@brown.edu -
Jonathan Buzzard -
Kevin Doyle -
Marc A Kaplan -
Sanchez, Paul -
Yaron Daniel
