[gpfsug-discuss] Policy scan of symbolic links with contents?

Jonathan Buzzard jonathan.buzzard at strath.ac.uk
Mon Mar 8 20:45:05 GMT 2021


On 08/03/2021 16:07, Frederick Stock wrote:
> CAUTION: This email originated outside the University. Check before 
> clicking links or attachments.
> Presumably the only feature that would help here is if policy could 
> determine that the end location pointed to by a symbolic link is within 
> the current file system.  I am not aware of any such feature or 
> attribute which policy could check so I think all you can do is run 
> policy to find the symbolic links and then check each link to see if it 
> points into the same file system.  You might find the mmfind command 
> useful for this purpose.  I expect it would eliminate the need to create 
> a policy to find the symbolic links.
> 

Unless you are using bind mounts if the symbolic link points outside the 
mount point of the file system it is not within the current file system.

So noting that you can write very SQL like statements something like the 
following should in theory do it

RULE finddangling LIST dangle WHERE MISC_ATTRIBUTES='L' AND 
SUBSTR(PATH_NAME,0,4)='/fs1/'

Note the above is not checked in any way shape or form for working. Even 
if you do have bind mounts of other GPFS file systems you just need a 
more complicated WHERE statement.

When doing policy engine stuff I find having that section of the GPFS 
manual printed out and bound, along with an SQL book for reference is 
very helpful.


JAB.

-- 
Jonathan A. Buzzard                         Tel: +44141-5483420
HPC System Administrator, ARCHIE-WeSt.
University of Strathclyde, John Anderson Building, Glasgow. G4 0NG



More information about the gpfsug-discuss mailing list