<html><body><p><font size="2">Hi </font><font size="2">Billich</font><font size="2">,</font><br><br><font size="2">I think the problem is that you are specifying </font><tt><font size="2">--choice-algorithm fast</font></tt><font size="2"> and as per documentation "The </font><b><font size="2">fast</font></b><font size="2"> choice method does not completely sort the candidates by weight."</font><br><font size="2">To sort the list you can try specifying </font><tt><font size="2">--choice-algorithm exact </font></tt><font size="2">which is also the default.</font><br><br><br><font size="2">Regards, The Spectrum Scale (GPFS) team<br><br>------------------------------------------------------------------------------------------------------------------<br>If you feel that your question can benefit other users of  Spectrum Scale (GPFS), then please post it to the public IBM developerWroks Forum at <a href="https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000479">https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000479</a>. <br><br>If your query concerns a potential software error in Spectrum Scale (GPFS) and you have an IBM software maintenance contract please contact  1-800-237-5511 in the United States or your local IBM Service Center in other countries. <br><br>The forum is informally monitored as time permits and should not be used for priority messages to the Spectrum Scale (GPFS) team.</font><br><br><img width="16" height="16" src="cid:1__=0ABB0CE4DFA80D6A8f9e8a93df938690918c0AB@" border="0" alt="Inactive hide details for "Billich  Heinrich Rainer (ID SD)" ---09-02-2021 03.13.01 AM---Hello, I want to migrate data with mma"><font size="2" color="#424282">"Billich  Heinrich Rainer (ID SD)" ---09-02-2021 03.13.01 AM---Hello, I want to migrate data with mmapplypolicy to a different pool:</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">"Billich  Heinrich Rainer (ID SD)" <heinrich.billich@id.ethz.ch></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">gpfsug main discussion list <gpfsug-discuss@spectrumscale.org></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">09-02-2021 03.13 AM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">[EXTERNAL] [gpfsug-discuss] Mmapplypolicy with -I defer doesn't sort resulting list? Is this by intention?</font><br><font size="2" color="#5F5F5F">Sent by:        </font><font size="2">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">Hello,<br><br>I want to migrate data with mmapplypolicy to a different pool:<br><br>1. create a file list with "-I defer -f /some/path" <br>2. execute with "-I yes -r /some/path"<br><br>I noted that the file list created in 1. Is not sorted. I asked to sort by kb_allocated, the ideas is to migrate the largest files first and to stop once we freed enough space. Is this intended, or should the file list created in 1. be sorted? I want to be able to review the list before I start the migration.<br><br>The list holds size/kb_allocated  in hex numbers, I didn't manage to sort it with 'sort'. Hence I would prefer to get a sorted list from mmapplypolicy instead of writing some code to do this.<br><br>The list holds files with sizes between 32K and 250G and 4.5M lines, hence it makes sense to sort to move the largest files on the top.<br><br>Thank you and best regards,<br><br>Heiner<br><br><br><br>The policy is<br><br>RULE 'migrate'<br> MIGRATE<br>   FROM POOL 'data'<br>   THRESHOLD (50,50)<br>   WEIGHT (kb_allocated)<br> TO POOL 'capacity'<br>   LIMIT (98)<br> WHERE kb_allocated > 0 AND (DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME)) > 90<br><br>And the command line<br><br>mmapplypolicy $1 -A 600 \<br>              -a 10 \<br>              -P $base/policy.txt \<br>              -I prepare \<br>              -f $base/candidates \<br>              -L 1 \<br>              -N some_nodes \<br>              --choice-algorithm fast \<br>              --max-sort-bytes 1G \<br>              --split-margin 2.0<br><br>The filesystem holds about 1.2G inodes. I tried to speed-up sorting with the last three arguments.<br>-- <br>=======================<br>Heinrich Billich<br>ETH Zürich<br>Informatikdienste<br>Tel.: +41 44 632 72 56<br>heinrich.billich@id.ethz.ch<br>========================<br><br><br><br>[attachment "smime.p7s" deleted by Huzefa H Pancha/India/IBM] _______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br></font></tt><tt><font size="2"><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a></font></tt><tt><font size="2"><br></font></tt><br><br><BR>
</body></html>