My university has been giving me Fridays off during lock down so I
I have spent a bit of time and added modification of Posix ACL's through the standard library and tidied up the code a bit. Much of it is based on preexisting code which did speed things up.

The error checking is still rather basic, and there had better be no errors in the mapping file. I have some ideas on how to extend it to do ACL's either through libacl or the GPFS API at compile time that I will probably look at on Friday. There is however the issue of incomplete documentation on the gpfs_acl_t structure. It will also be a lot slower if only a subset of the files have an ACL because you are going to need to attempt to get the ACL on every file.

It uses the standard C library call nftw so can be pointed at a directory rather than a whole file system, which in the absence of a test GPFS file system that I could wreck would make testing difficult. Besides which the GPFS inode scan is lacking in features to make it suitable for this sort of application IMHO.

There is a test directory in the tarball that is mostly full of a version of the Linux source code where all the files have been truncated to zero bytes. There is also some files for symlink, and access/default ACL testing. Targets exist in the Makefile to setup the testing directory correctly and run the test. There is no automated testing that it works correctly however.

I have also included a script to generate a mapping file for all the users on the local system to AD ones based on the idmap_rid algorithm. Though in retrospect calling mmrepquota to find all the users and groups on the file system might have been a better idea.

It's all under GPL v3 and can be downloaded at

   http://www.buzzard.me.uk/jonathan/downloads/uidremap-0.2.tar.gz

Yeah I should probably use GitHub, but I am old school. Anyway take a look, the C code is very readable and if you take out the comments at the top only 300 lines.


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

Reply via email to