File placement rule for new files in directory
Hello, it is possible to create file placement policy for new files in one directory? I need something like this --> All new files created in directory "/gpfs/gpfs01/ABCD" will be stored in pool "fastdata". Thanks. Best regards, Michal
Is ABCD a fileset? If so, its easy with something like: RULE 'ABCD-rule-01' SET POOL 'fastdata' FOR FILESET ('ABCD-fileset-name') Simon On 12/07/2018, 07:56, "gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz" <gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz> wrote: Hello, it is possible to create file placement policy for new files in one directory? I need something like this --> All new files created in directory "/gpfs/gpfs01/ABCD" will be stored in pool "fastdata". Thanks. Best regards, Michal
If ABCD is not a fileset then below rule can be used- RULE 'ABCD-rule-01' SET POOL 'fastdata' WHERE PATH_NAME LIKE ' /gpfs/gpfs01/ABCD/%' Thanks, Smita From: Simon Thompson <S.J.Thompson@bham.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 07/12/2018 01:34 PM Subject: Re: [gpfsug-discuss] File placement rule for new files in directory Sent by: gpfsug-discuss-bounces@spectrumscale.org Is ABCD a fileset? If so, its easy with something like: RULE 'ABCD-rule-01' SET POOL 'fastdata' FOR FILESET ('ABCD-fileset-name') Simon On 12/07/2018, 07:56, "gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz" <gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz> wrote: Hello, it is possible to create file placement policy for new files in one directory? I need something like this --> All new files created in directory "/gpfs/gpfs01/ABCD" will be stored in pool "fastdata". Thanks. Best regards, Michal _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
That's perfect, thank you both. Best regards Michal Dne 12.7.2018 v 10:39 Smita J Raut napsal(a):
If ABCD is not a fileset then below rule can be used-
RULE 'ABCD-rule-01' SET POOL 'fastdata' WHERE PATH_NAME LIKE '/gpfs/gpfs01/ABCD/%'
Thanks, Smita
From: Simon Thompson <S.J.Thompson@bham.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 07/12/2018 01:34 PM Subject: Re: [gpfsug-discuss] File placement rule for new files in directory Sent by: gpfsug-discuss-bounces@spectrumscale.org ------------------------------------------------------------------------
Is ABCD a fileset? If so, its easy with something like:
RULE 'ABCD-rule-01' SET POOL 'fastdata' FOR FILESET ('ABCD-fileset-name')
Simon
On 12/07/2018, 07:56, "gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz" <gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz> wrote:
Hello,
it is possible to create file placement policy for new files in one directory? I need something like this --> All new files created in directory "/gpfs/gpfs01/ABCD" will be stored in pool "fastdata". Thanks.
Best regards, Michal
_______________________________________________ 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
If that has not changed, then: PATH_NAME is not usable for placement policies. Only the FILESET_NAME attribute is accepted. One might think, that PATH_NAME is as known on creating a new file as is FILESET_NAME, but for some reason the documentation says: "When file attributes are referenced in initial placement rules, only the following attributes are valid: FILESET_NAME, GROUP_ID, NAME, and USER_ID. " Mit freundlichen Grüßen / Kind regards Dr. Uwe Falke IT Specialist High Performance Computing Services / Integrated Technology Services / Data Center Services ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Rathausstr. 7 09111 Chemnitz Phone: +49 371 6978 2165 Mobile: +49 175 575 2877 E-Mail: uwefalke@de.ibm.com ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Business & Technology Services GmbH / Geschäftsführung: Thomas Wolter, Sven Schooß Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 17122 From: Michal Zacek <zacekm@img.cas.cz> To: gpfsug-discuss@spectrumscale.org Date: 12/07/2018 10:49 Subject: Re: [gpfsug-discuss] File placement rule for new files in directory Sent by: gpfsug-discuss-bounces@spectrumscale.org That's perfect, thank you both. Best regards Michal Dne 12.7.2018 v 10:39 Smita J Raut napsal(a): If ABCD is not a fileset then below rule can be used- RULE 'ABCD-rule-01' SET POOL 'fastdata' WHERE PATH_NAME LIKE '/gpfs/gpfs01/ABCD/%' Thanks, Smita From: Simon Thompson <S.J.Thompson@bham.ac.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 07/12/2018 01:34 PM Subject: Re: [gpfsug-discuss] File placement rule for new files in directory Sent by: gpfsug-discuss-bounces@spectrumscale.org Is ABCD a fileset? If so, its easy with something like: RULE 'ABCD-rule-01' SET POOL 'fastdata' FOR FILESET ('ABCD-fileset-name') Simon On 12/07/2018, 07:56, "gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz" <gpfsug-discuss-bounces@spectrumscale.org on behalf of zacekm@img.cas.cz> wrote: Hello, it is possible to create file placement policy for new files in one directory? I need something like this --> All new files created in directory "/gpfs/gpfs01/ABCD" will be stored in pool "fastdata". Thanks. Best regards, Michal _______________________________________________ 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 [attachment "smime.p7s" deleted by Uwe Falke/Germany/IBM] _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Why no path name in SET POOL rule? Maybe more than one reason, but consider, that in Unix, the API has the concept of "current directory" and "create a file in the current directory" AND another process or thread may at any time rename (mv!) any directory... So even it you "think" you know the name of the directory in which you are creating a file, you really don't know for sure! So, you may ask, how does the command /bin/pwd work? It follows the parent inode field of each inode, searches the parent for a matching inode, stashes the name in a buffer... When it reaches the root, it prints out the apparent path it found to the root... Which could be wrong by the time it reaches the root! For example: [root@~/gpfs-git]$mkdir -p /tmp/a/b/c/d [root@~/gpfs-git]$cd /tmp/a/b/c/d [root@.../c/d]$/bin/pwd /tmp/a/b/c/d [root@.../c/d]$pwd /tmp/a/b/c/d [root@.../c/d]$mv /tmp/a/b /tmp/a/b2 [root@.../c/d]$pwd /tmp/a/b/c/d # Bash still "thinks" it is in /tmp/a/b/c/d [root@.../c/d]$/bin/pwd /tmp/a/b2/c/d # But /bin/pwd knows better
participants (5)
-
Marc A Kaplan -
Michal Zacek -
Simon Thompson -
Smita J Raut -
Uwe Falke
