<font size=2 face="sans-serif">Kevin, Wow. &nbsp;Never underestimate the
power of ...</font><br><br><font size=2 face="sans-serif">Anyhow try this as a fix. &nbsp;</font><br><br><font size=2 face="sans-serif">Add the clause &nbsp;SIZE(KB_ALLOCATED/NLINK)
to your MIGRATE rules.</font><br><br><font size=2 face="sans-serif">This spreads the total actual size over
each hardlink...<br></font><br><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">&quot;Buterbaugh, Kevin
L&quot; &lt;Kevin.Buterbaugh@Vanderbilt.Edu&gt;</font><br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">gpfsug main discussion
list &lt;gpfsug-discuss@spectrumscale.org&gt;</font><br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">04/18/2017 12:33 PM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [gpfsug-discuss]
mmapplypolicy didn't migrate everything it should &nbsp; &nbsp; &nbsp;
&nbsp;have - why not?</font><br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr noshade><br><br><br><font size=3>Hi Marc, </font><br><br><font size=3>Two things:</font><br><br><font size=3>1. &nbsp;I have a PMR open now.</font><br><br><font size=3>2. &nbsp;You *may* have identified the problem \u2026 I\u2019m
still checking \u2026 but files with hard links may be our problem. &nbsp;I
wrote a simple Perl script to interate over the log file I had mmapplypolicy
create. &nbsp;Here\u2019s the code (don\u2019t laugh, I\u2019m a SysAdmin, not a programmer,
and I whipped this out in &lt; 5 minutes \u2026 and yes, I realize the fact
that I used Perl instead of Python shows my age as well &lt;grin&gt;):</font><br><br><font size=3>#!/usr/bin/perl</font><br><font size=3>#</font><br><font size=3>use strict;</font><br><font size=3>use warnings;</font><br><font size=3>my $InputFile = &quot;/tmp/mmapplypolicy.gpfs23.log&quot;;</font><br><font size=3>my $TotalFiles = 0;</font><br><font size=3>my $TotalLinks = 0;</font><br><font size=3>my $TotalSize = 0;</font><br><font size=3>open INPUT, $InputFile or die &quot;Couldn\'t open $InputFile
for read: &nbsp;$!\n&quot;;</font><br><font size=3>while (&lt;INPUT&gt;) {</font><br><font size=3>&nbsp; next unless /MIGRATED/;</font><br><font size=3>&nbsp; $TotalFiles++;</font><br><font size=3>&nbsp; my $FileName = (split / /)[3];</font><br><font size=3>&nbsp; if ( -f $FileName ) { &nbsp;# some files may have
been deleted since mmapplypolicy ran</font><br><font size=3>&nbsp; &nbsp; my ($NumLinks, $FileSize) = (stat($FileName))[3,7];</font><br><font size=3>&nbsp; &nbsp; $TotalLinks += $NumLinks;</font><br><font size=3>&nbsp; &nbsp; $TotalSize += $FileSize;</font><br><font size=3>&nbsp; }</font><br><font size=3>}</font><br><font size=3>close INPUT;</font><br><font size=3>print &quot;Number of files / links = $TotalFiles / $TotalLinks,
Total size = $TotalSize\n&quot;;</font><br><font size=3>exit 0;</font><br><br><font size=3>And here\u2019s what it kicked out:</font><br><br><font size=3>Number of files / links = 1620263 / 80818483, Total size
= 53966202814094</font><br><br><font size=3>1.6 million files but 80 million hard links!!!</font><br><br><font size=3>I\u2019m doing some checking right now, but it appears that
it is one particular group - and therefore one particular fileset - that
is responsible for this \u2026 they\u2019ve got thousands of files with 50 or more
hard links each \u2026 and they\u2019re not inconsequential in size.</font><br><br><font size=3>IIRC (and keep in mind I\u2019m far from a GPFS policy guru),
there is a way to say something to the effect of \u201cand the path does not
contain /gpfs23/fileset/path\u201d \u2026 may need a little help getting that right.</font><br><br><font size=3>I\u2019ll post this information to the ticket as well but
wanted to update the list. &nbsp;This wouldn\u2019t be the first time we were
an \u201cedge case\u201d for something in GPFS\u2026 ;-)</font><br><br><font size=3>Thanks...</font><br><br><font size=3>Kevin</font><br><br><br><font size=3>On Apr 18, 2017, at 10:11 AM, Marc A Kaplan &lt;</font><a href=mailto:makaplan@us.ibm.com><font size=3 color=blue><u>makaplan@us.ibm.com</u></font></a><font size=3>&gt;
wrote:</font><br><br><font size=2 face="sans-serif">ANYONE else reading this saga? &nbsp;Who
uses mmapplypolicy to migrate files within multi-TB file systems? &nbsp;Problems?
Or all working as expected?</font><font size=3><br></font><font size=2 face="sans-serif"><br>------</font><font size=3><br></font><font size=2 face="sans-serif"><br>Well, again mmapplypolicy &quot;thinks&quot; it has &quot;chosen&quot;
1.6 million files whose total size is 61 Terabytes and migrating those
will bring the occupancy of gpfs23capacity pool to 98% and then we're done.</font><font size=3><br></font><font size=2 face="sans-serif"><br>So now I'm wondering where this is going wrong. &nbsp;Is there some bug
in the reckoning inside of mmapplypolicy or somewhere else in GPFS?</font><font size=3><br></font><font size=2 face="sans-serif"><br>Sure you can put in an PMR, and probably should. &nbsp;I'm guessing whoever
picks up the PMR will end up calling or emailing me ... but maybe she can
do some of the clerical work for us... &nbsp;</font><font size=3><br></font><font size=2 face="sans-serif"><br>While we're waiting for that... Here's what I suggest next.</font><font size=3><br></font><font size=2 face="sans-serif"><br>Add &nbsp;a clause ...</font><font size=3><br></font><font size=2 face="sans-serif"><br>SHOW(varchar(KB_ALLOCATED) || ' n=' || varchar(NLINK))</font><font size=3><br></font><font size=2 face="sans-serif"><br>before the WHERE clause to each of your rules.</font><font size=3><br></font><font size=2 face="sans-serif"><br>Re-run the command with options &nbsp;'-I test -L 2' &nbsp;and collect
the output. &nbsp;</font><font size=3><br></font><font size=2 face="sans-serif"><br>We're not actually going to move any data, but we're going to look at the
files and file sizes that are &quot;chosen&quot;...</font><font size=3><br></font><font size=2 face="sans-serif"><br>You should see 1.6 million lines that look kind of like this:</font><font size=3><br></font><font size=2 face="sans-serif"><br>/yy/dat/bigC &nbsp; &nbsp; RULE 'msx' MIGRATE FROM POOL 'system' TO POOL
'xtra' WEIGHT(inf) SHOW( 1024 n=1)</font><font size=3><br></font><font size=2 face="sans-serif"><br>Run a script over the output to add up all the SHOW() values in the lines
that contain TO POOL 'gpfs23capacity' and verify that they do indeed<br>add up to 61TB... &nbsp;(The show is in KB so the SHOW numbers should add
up to 61 billion).</font><font size=3><br></font><font size=2 face="sans-serif"><br>That sanity checks the policy arithmetic. &nbsp;Let's assume that's okay.
</font><font size=3><br></font><font size=2 face="sans-serif"><br>Then the next question is whether the individual numbers are correct...
Zach Giles made a suggestion... which I'll interpret as <br>find some of the biggest of those files and check that they really are
that big....</font><font size=3><br></font><font size=2 face="sans-serif"><br>At this point, I really don't know, but I'm guessing there's some discrepances
in the reported KB_ALLOCATED numbers for many of the files...<br>and/or they are &quot;illplaced&quot; &nbsp;- the data blocks aren't all
in the pool FROM POOL ...</font><font size=3><br></font><font size=2 face="sans-serif"><br>HMMMM.... &nbsp;I just thought about this some more and added the NLINK
statistic. &nbsp;It would be unusual for this to be a big problem, but
files that are hard linked are<br>not recognized by mmapplypolicy as sharing storage... <br>This has not come to my attention as a significant problem -- does the
file system in question have significant GBs of hard linked files?</font><font size=3><br></font><font size=2 face="sans-serif"><br>The truth is that you're the first customer/user/admin in a long time to
question/examine how mmapplypolicy does its space reckoning ... <br>Optimistically that means it works fine for most customers... &nbsp;</font><font size=3><br></font><font size=2 face="sans-serif"><br>So sorry, something unusual about your installation or usage...</font><font size=3><br></font><font size=2 face="sans-serif"><br></font><font size=3><br><br><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at </font><a href=http://spectrumscale.org/><font size=3 color=blue><u>spectrumscale.org</u></font></a><font size=3 color=blue><u><br></u></font><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><font size=3 color=blue><u>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</u></font></a><br><tt><font size=2>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br></font></tt><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><tt><font size=2>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</font></tt></a><tt><font size=2><br></font></tt><br><br><BR>