<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67485#M78505</link>
    <description>&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There was a snapshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 21 May 2018 14:21:32 GMT</pubDate>
    <dc:creator>ScottChris</dc:creator>
    <dc:date>2018-05-21T14:21:32Z</dc:date>
    <item>
      <title>after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67438#M78503</link>
      <description>&lt;P&gt;CDH 5.13.1&lt;BR /&gt;Redhat 6.9&lt;BR /&gt;&lt;BR /&gt;We wish to change the number of replications from the default of 3 copies to 2 on one particular folder in hdfs.&lt;BR /&gt;&lt;BR /&gt;After running this on one cluster:&lt;BR /&gt;&lt;BR /&gt;$ hdfs dfs -setrep -R 2 /backups&lt;BR /&gt;&lt;BR /&gt;and then doing a&lt;BR /&gt;&lt;BR /&gt;$ hdfs dfs -du /&lt;BR /&gt;&lt;BR /&gt;we saw that it freed the blocks very quickly and the output of fsck shows no "Over-replicated blocks":&lt;BR /&gt;&lt;BR /&gt;Status: HEALTHY&lt;BR /&gt;&amp;nbsp;Total size:&amp;nbsp;&amp;nbsp; &amp;nbsp;149514016589 B&lt;BR /&gt;&amp;nbsp;Total dirs:&amp;nbsp;&amp;nbsp; &amp;nbsp;27440&lt;BR /&gt;&amp;nbsp;Total files:&amp;nbsp;&amp;nbsp; &amp;nbsp;128746&lt;BR /&gt;&amp;nbsp;Total symlinks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&lt;BR /&gt;&amp;nbsp;Total blocks (validated):&amp;nbsp;&amp;nbsp; &amp;nbsp;126355 (avg. block size 1183285 B)&lt;BR /&gt;&amp;nbsp;Minimally replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;126355 (100.0 %)&lt;BR /&gt;&amp;nbsp;Over-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Under-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Mis-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Default replication factor:&amp;nbsp;&amp;nbsp; &amp;nbsp;3&lt;BR /&gt;&amp;nbsp;Average block replication:&amp;nbsp;&amp;nbsp; &amp;nbsp;2.3367577&lt;BR /&gt;&amp;nbsp;Corrupt blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&lt;BR /&gt;&amp;nbsp;Missing replicas:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Number of data-nodes:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;3&lt;BR /&gt;&amp;nbsp;Number of racks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However on a bigger test system did the same command and even a day later still no change.&lt;BR /&gt;&lt;BR /&gt;$ hdfs fsck /&lt;BR /&gt;&lt;BR /&gt;shows "Over-replicated blocks"&lt;BR /&gt;&lt;BR /&gt;Status: HEALTHY&lt;BR /&gt;&amp;nbsp;Total size:&amp;nbsp;&amp;nbsp; &amp;nbsp;56614841380 B&lt;BR /&gt;&amp;nbsp;Total dirs:&amp;nbsp;&amp;nbsp; &amp;nbsp;7222&lt;BR /&gt;&amp;nbsp;Total files:&amp;nbsp;&amp;nbsp; &amp;nbsp;113731&lt;BR /&gt;&amp;nbsp;Total symlinks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&lt;BR /&gt;&amp;nbsp;Total blocks (validated):&amp;nbsp;&amp;nbsp; &amp;nbsp;110143 (avg. block size 514012 B)&lt;BR /&gt;&amp;nbsp;Minimally replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;110143 (100.0 %)&lt;BR /&gt;&amp;nbsp;Over-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;37439 (33.991264 %)&lt;BR /&gt;&amp;nbsp;Under-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Mis-replicated blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Default replication factor:&amp;nbsp;&amp;nbsp; &amp;nbsp;3&lt;BR /&gt;&amp;nbsp;Average block replication:&amp;nbsp;&amp;nbsp; &amp;nbsp;2.9921465&lt;BR /&gt;&amp;nbsp;Corrupt blocks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0&lt;BR /&gt;&amp;nbsp;Missing replicas:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0 (0.0 %)&lt;BR /&gt;&amp;nbsp;Number of data-nodes:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;8&lt;BR /&gt;&amp;nbsp;Number of racks:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1&lt;BR /&gt;&lt;BR /&gt;The number of Over-replicated blocks has reduced slightly and seems stuck at 37439.&lt;BR /&gt;&lt;BR /&gt;I've manually restarted each datanode service, and later restarted the entire cluster.&lt;BR /&gt;&lt;BR /&gt;Still stuck at 37439.&lt;BR /&gt;&lt;BR /&gt;I found this comment from Jarsh J:&lt;BR /&gt;&lt;BR /&gt;|Then monitor the over-replicated blocks in Cloudera Manager via the below chart tsquery:&lt;BR /&gt;|&lt;BR /&gt;|SELECT excess_blocks WHERE roleType = NAMENODE&lt;BR /&gt;|&lt;BR /&gt;|This should show a spike and then begin a slow but steady drop back to zero over time, which you can monitor.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but when I run this query it reports "excess_blocks" is 0.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ hdfs dfs -du /&lt;BR /&gt;22987202359&amp;nbsp; 69376013863&amp;nbsp; /backups&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;shows 3 copies still.&lt;BR /&gt;&lt;BR /&gt;How to get this data space cleared?&lt;BR /&gt;&lt;BR /&gt;Rebalance did nothing.&lt;BR /&gt;&lt;BR /&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 22:12:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67438#M78503</guid>
      <dc:creator>ScottChris</dc:creator>
      <dc:date>2018-05-18T22:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67461#M78504</link>
      <description>Do you perchance have any snapshots held from before the 'hdfs dfs -setrep 2' command was executed, under the target path (/backups)?&lt;BR /&gt;&lt;BR /&gt;If you do have a snapshot, and the over replicated count is still stuck, this behaviour can be explained, because replication factor is a file based attribute and the older snapshot references the higher replication factor, disallowing the deletion of the now-excess block.&lt;BR /&gt;&lt;BR /&gt;You can run the below to discover existing snapshots, as the 'hdfs' user (or equivalent superuser):&lt;BR /&gt;&lt;BR /&gt;~&amp;gt; hdfs lsSnapshottableDir&lt;BR /&gt;~&amp;gt; # For every directory printed above as $DIR:&lt;BR /&gt;~&amp;gt; hdfs dfs -ls $DIR/.snapshot/</description>
      <pubDate>Mon, 21 May 2018 02:42:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67461#M78504</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2018-05-21T02:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67485#M78505</link>
      <description>&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There was a snapshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 14:21:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/67485#M78505</guid>
      <dc:creator>ScottChris</dc:creator>
      <dc:date>2018-05-21T14:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77011#M78506</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/213"&gt;@Harsh J&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/15840"&gt;@ScottChris&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you kindly explain this in a bit detail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can run the below to discover existing snapshots, as the 'hdfs' user (or equivalent superuser):&lt;BR /&gt;&lt;BR /&gt;~&amp;gt; hdfs lsSnapshottableDir&lt;BR /&gt;~&amp;gt; # For every directory printed above as $DIR:&lt;BR /&gt;~&amp;gt; hdfs dfs -ls $DIR/.snapshot/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After this step what we need to do. Do we need to delete older snapshot (which was created when rep is 3) and create a new snapshot at this time when rep is 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 02:56:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77011#M78506</guid>
      <dc:creator>prabhat10</dc:creator>
      <dc:date>2018-07-17T02:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77012#M78507</link>
      <description>&amp;gt; Do we need to delete older snapshot (which was created when rep is 3) and&lt;BR /&gt;create a new snapshot at this time when rep is 2.&lt;BR /&gt;&lt;BR /&gt;Yes, that is correct.&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Jul 2018 03:00:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77012#M78507</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2018-07-17T03:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: after -setrep from 3 to 2, Over-replicated blocks are not being freed after 24 hours</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77014#M78508</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/213"&gt;@Harsh J&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 03:19:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/after-setrep-from-3-to-2-Over-replicated-blocks-are-not/m-p/77014#M78508</guid>
      <dc:creator>prabhat10</dc:creator>
      <dc:date>2018-07-17T03:19:15Z</dc:date>
    </item>
  </channel>
</rss>

