<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:12pt" ><div dir="ltr" >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.</div>
<div dir="ltr" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" ><br><font size="2" face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" ><span style="font-size:1.143em;" >Fred<br>_______________________________________________________<br>Fred Stock | Spectrum Scale Development Advocacy | 720-430-8821<br>stockf@us.ibm.com</span></font></div></div></div></div>
<div dir="ltr" > </div>
<div dir="ltr" > </div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: "Oesterlin, Robert" <Robert.Oesterlin@nuance.com><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>Cc:<br>Subject: [EXTERNAL] Re: [gpfsug-discuss] Policy scan of symbolic links with contents?<br>Date: Mon, Mar 8, 2021 10:35 AM<br> <br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >--> <!--[if !mso]><style></style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit" >
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div><p style="margin: 0px;" >Well - the case here is that the file system has, let’s say, 100M files. Some percentage of these are sym-links to a location that’s not in this file system. I want a report of all these off file system links. However, not all of the sym-links off file system are of interest, just some of them.<o:p></o:p></p>
<p style="margin: 0px;" ><o:p> </o:p></p>
<p style="margin: 0px;" >I can’t say for sure where in the file system they are (and I don’t care).<o:p></o:p></p>
<p style="margin: 0px;" ><o:p> </o:p></p>
<div><p style="margin: 0px;" ><o:p> </o:p></p>
<p style="margin: 0px;" ><span style="font-size:12.0pt" >Bob Oesterlin<o:p></o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:12.0pt" >Sr Principal Storage Engineer, Nuance<o:p></o:p></span></p></div>
<p style="margin: 0px;" ><o:p> </o:p></p>
<p style="margin: 0px;" ><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in" ><p style="margin: 0px;" ><b><span style="font-size:12.0pt;color:black" >From: </span></b><span style="font-size:12.0pt;color:black" ><gpfsug-discuss-bounces@spectrumscale.org> on behalf of Frederick Stock <stockf@us.ibm.com><br><b>Reply-To: </b>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br><b>Date: </b>Monday, March 8, 2021 at 9:29 AM<br><b>To: </b>"gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org><br><b>Cc: </b>"gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org><br><b>Subject: </b>[EXTERNAL] Re: [gpfsug-discuss] Policy scan of symbolic links with contents?<o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><o:p> </o:p></p></div>
<div align="center" ><table cellspacing="0" cellpadding="0" border="1" >        <tbody>                <tr>                        <td style="width:100.0%;background:#FFEB9C;padding:0in 0in 0in 0in" width="100%" >                        <p style="text-align: center; margin: 0px;" align="center" ><b><span style="font-size:10.0pt;color:red" >CAUTION: </span></b><span style="font-size:10.0pt;color:black" >This Email is from an EXTERNAL source. Ensure you trust this sender before clicking on any links or attachments.</span><o:p></o:p></p>                        </td>                </tr>        </tbody></table></div>
<div style="text-align: center; margin: 0px;" align="center" ><hr width="100%" size="0" align="center" ></div>
<div><div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" >Could you use the PATHNAME LIKE statement to limit the location to the files of interest?<o:p></o:p></span></p></div>
<div><div><div><div><p style="margin: 0px;" ><br><span style="font-size:11.5pt;font-family:"Verdana",sans-serif" >Fred<br>_______________________________________________________<br>Fred Stock | Spectrum Scale Development Advocacy | 720-430-8821<br>stockf@us.ibm.com</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p></div></div></div></div>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" > <o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" > <o:p></o:p></span></p></div>
<blockquote style="border:none;border-left:solid #AAAAAA 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt" ><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" >----- Original message -----<br>From: "Oesterlin, Robert" <Robert.Oesterlin@nuance.com><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>Cc:<br>Subject: [EXTERNAL] [gpfsug-discuss] Policy scan of symbolic links with contents?<br>Date: Mon, Mar 8, 2021 10:12 AM<br> <br><br><o:p></o:p></span></p>
<div><p style="margin:0in" ><span style="font-family:"Arial",sans-serif" >Looking to craft a policy scan that pulls out symbolic links to a particular destination. For instance:</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" > </span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" >file1.py -> /fs1/patha/pathb/file1.py (I want to include these)</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" >file2.py -> /fs2/patha/pathb/file2.py (exclude these)</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" > </span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" >The easy way would be to pull out all sym-links and just grep for the ones I want but was hoping for a more elegant solution…</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" > </span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:"Arial",sans-serif" > </span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" >Bob Oesterlin<o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" >Sr Principal Storage Engineer, Nuance<o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" > <o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><span style="font-size:10.0pt;font-family:"Courier New"" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=i6m1zVXf4peZo0yo02IiRaQ_pUX95MN3wU53M0NiWcI&s=z-ibh2kAPHbehAsrGavNIg2AJdXmHkpUwy5YhZfUbpc&e=" target="_blank" >https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=i6m1zVXf4peZo0yo02IiRaQ_pUX95MN3wU53M0NiWcI&s=z-ibh2kAPHbehAsrGavNIg2AJdXmHkpUwy5YhZfUbpc&e=</a> </span><span style="font-size:12.0pt;font-family:"Arial",sans-serif" ><o:p></o:p></span></p></div></blockquote>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:"Arial",sans-serif" > <o:p></o:p></span></p></div></div>
<p style="margin: 0px;" ><br><br><o:p></o:p></p></div>
<div><font size="2" face="Default Monospace,Courier New,Courier,monospace" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=oRbtYApZcD6DP-VZN9gW7dTGSZU6I4r9b_Q-nb9Xc7k&s=SvdmxtC5aLPE7HL4nkPNlImv4pzfOCwcTkVBQsrAo-Q&e=" target="_blank" >https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=oRbtYApZcD6DP-VZN9gW7dTGSZU6I4r9b_Q-nb9Xc7k&s=SvdmxtC5aLPE7HL4nkPNlImv4pzfOCwcTkVBQsrAo-Q&e=</a> </font></div></blockquote>
<div dir="ltr" > </div></div><BR>