[gpfsug-discuss] R: R: Question on changing mode on many files

Alec anacreo at gmail.com
Mon Dec 13 18:33:23 GMT 2021


I checked on my office network....

mmfind --help

mmfind -polFlags '-N node1,node2 -B 100 -m 24' /path/to/find -perm +o=w !
\( -type d -perm +o=t \) -xargs chmod o-w

I think that the -m 24 is the default (24 threads per node), but it's nice
to include on the command line so you remember you can increment/decrement
it as your needs require or your nodes can handle.

It's IMPORTANT to review in the mmfind --help output that some things are
'mmfind' args and go BEFORE the path... some are CRITERIA args and have no
impact on the files...  BUT SOME ARE ACTION args, and they will affect
files.

So -exec -xargs are obvious actions, however, -gpfsCompress doesn't find
compressed files, it will actually compress the objects... in our AIX
environment our compressed reads feel like they're essentially broken, we
only get about 5MB/s, however on Linux compress reads seem to work fairly
well.

So make sure to read the man page carefully before using some non-obvious
GPFS enhancements.  Also the nice thing is mmfind -xargs takes care of all
the strange file names, so you don't have to do anything complicated, but
you also can't pipe the output as it will run the xarg in the policy engine.

As a footnote this is my all time favorite find for troubleshooting...
find $(pwd) -mtime -1 | sed -e 's/.*/"&"/g' | xargs ls -latr

List all the files modified in the last day in reverse chronology...

Doesn't work :-(

Alec

On Mon, Dec 13, 2021 at 3:30 AM Dorigo Alvise (PSI) <alvise.dorigo at psi.ch>
wrote:

> Hi Alec ,
>
> mmfind doesn’t have a man page (does it have an online one ? I cannot find
> it). And according to mmfind -h it doesn’t exposes the “-N” neither  the
> “-B” flags. RPM is gpfs.base-5.1.1-2.x86_64.
>
>
>
> Do I have chance to download a newest version of that script from
> somewhere ?
>
>
>
> Thanks,
>
>
>
>    Alvise
>
>
>
> *Da:* gpfsug-discuss-bounces at spectrumscale.org <
> gpfsug-discuss-bounces at spectrumscale.org> *Per conto di *Dorigo Alvise
> (PSI)
> *Inviato:* lunedì 13 dicembre 2021 11:50
> *A:* gpfsug main discussion list <gpfsug-discuss at spectrumscale.org>
> *Oggetto:* [gpfsug-discuss] R: Question on changing mode on many files
>
>
>
> I am definitely going to try this solution with mmfind.
>
> Thank you also for the command line and several hints… I’ll be back with
> the outcome soon.
>
>
>
>    Alvise
>
>
>
> *Da:* gpfsug-discuss-bounces at spectrumscale.org <
> gpfsug-discuss-bounces at spectrumscale.org> *Per conto di *Alec
> *Inviato:* domenica 12 dicembre 2021 23:04
> *A:* gpfsug main discussion list <gpfsug-discuss at spectrumscale.org>
> *Oggetto:* Re: [gpfsug-discuss] Question on changing mode on many files
>
>
>
> How am I just learning about this right now, thank you!  Makes so much
> more sense now the odd behaviors I've seen over the years on GPFS vs POSIX
> chmod/ACL.  Will definitely go review those settings on my filesets now,
> wonder if the default has evolved from 3.x -> 4.x -> 5.x.
>
>
>
> IBM needs to find a way to pre-compile mmfind and make it supported, it
> really is essential and so beneficial, and so hard to get done in a
> production regulated environment.  Though a bigger warning that the
> compress option is an action not a criteria!
>
>
>
> Alec
>
>
>
> On Sun, Dec 12, 2021 at 9:01 AM Simon Thompson <s.j.thompson at bham.ac.uk>
> wrote:
>
> > I'm not sure if this happens on Spectrum Scale but on most FS's if you
> do a chmod 770 file you'll lose any ACLs assigned to the
> > file, so safest to bump the permissions with a subtractive or additive
> o-w or g+w type operation.
>
>
>
> This depends entirely on the fileset setting, see:
>
>
> https://www.ibm.com/docs/en/spectrum-scale/5.1.2?topic=reference-mmchfileset-command
>
>
>
> “*allow-permission-change*”
>
>
>
> We typically have file-sets set to chmodAndUpdateAcl, though not
> exclusively, I think it was some quirky software that tested the
> permissions after doing something and didn’t like the updatewithAcl thing …
>
>
>
> Simon
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20211213/75424321/attachment-0002.htm>


More information about the gpfsug-discuss mailing list