<?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 HDFS Space not reclaimed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169752#M37255</link>
    <description>&lt;P&gt;HDP-2.4.2.0-258 installed using Ambari 2.2.2.0&lt;/P&gt;&lt;P&gt;I executed the TestDFSIO on the cluster but it failed midway. The HDFS then had loads of data, the HDFS utilization was/is shown 98% in Ambari.&lt;/P&gt;&lt;P&gt;I simply deleted the benchmark directory created during the TestDFSIO AND expunged :&lt;/P&gt;&lt;PRE&gt;[hdfs@l4377t root]$ hdfs dfs -ls /benchmarks
Found 1 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO
[hdfs@l4377t root]$
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -ls -h /benchmarks
Found 1 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -ls -h /benchmarks/TestDFSIO
Found 3 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO/io_control
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:58 /benchmarks/TestDFSIO/io_data
drwx--x--x   - hdfs hdfs          0 2016-08-08 13:02 /benchmarks/TestDFSIO/io_write
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -rmr /benchmarks/
rmr: DEPRECATED: Please use 'rm -r' instead.
16/08/09 09:15:33 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 360 minutes, Emptier interval = 0 minutes.
Moved: 'hdfs://l4283t.sss.com:8020/benchmarks' to trash at: hdfs://l4283t.sss.com:8020/user/hdfs/.Trash/Current
[hdfs@l4377t root]$
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -expunge
16/08/09 09:16:13 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 360 minutes, Emptier interval = 0 minutes.
16/08/09 09:16:13 INFO fs.TrashPolicyDefault: Created trash checkpoint: /user/hdfs/.Trash/160809091613&lt;/PRE&gt;&lt;P&gt;However, the disk and HDFS space is still not free, below is the df -h for the datanode directories:&lt;/P&gt;&lt;PRE&gt;/dev/vdc                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdc
/dev/vdk                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdk
/dev/vdl                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdl
/dev/vdh                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdh
/dev/vdg                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdg
/dev/vdj                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdj
/dev/vdi                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdi
/dev/vde                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vde
/dev/vdd                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdd
/dev/vdb                     10G  8.9G  1.1G  90% /opt/hdfsdisks/vdb
/dev/vdm                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdm
/dev/vdf                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdf&lt;/PRE&gt;&lt;P&gt;EDIT(@&lt;A href="https://community.hortonworks.com/users/168/bleonhardi.html"&gt;Benjamin Leonhardi&lt;/A&gt; can you check this ?): Output for those directories AFTER expunge&lt;/P&gt;&lt;P&gt;I tried expunge earlier as well as now, however, those TestDFSIO files keep on surfacing in trash !&lt;/P&gt;&lt;PRE&gt;-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_28
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_26
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_25
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_24
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/Te&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 Aug 2016 16:18:15 GMT</pubDate>
    <dc:creator>kaliyugantagoni</dc:creator>
    <dc:date>2016-08-09T16:18:15Z</dc:date>
    <item>
      <title>HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169752#M37255</link>
      <description>&lt;P&gt;HDP-2.4.2.0-258 installed using Ambari 2.2.2.0&lt;/P&gt;&lt;P&gt;I executed the TestDFSIO on the cluster but it failed midway. The HDFS then had loads of data, the HDFS utilization was/is shown 98% in Ambari.&lt;/P&gt;&lt;P&gt;I simply deleted the benchmark directory created during the TestDFSIO AND expunged :&lt;/P&gt;&lt;PRE&gt;[hdfs@l4377t root]$ hdfs dfs -ls /benchmarks
Found 1 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO
[hdfs@l4377t root]$
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -ls -h /benchmarks
Found 1 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -ls -h /benchmarks/TestDFSIO
Found 3 items
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:48 /benchmarks/TestDFSIO/io_control
drwxr-xr-x   - hdfs hdfs          0 2016-08-08 12:58 /benchmarks/TestDFSIO/io_data
drwx--x--x   - hdfs hdfs          0 2016-08-08 13:02 /benchmarks/TestDFSIO/io_write
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -rmr /benchmarks/
rmr: DEPRECATED: Please use 'rm -r' instead.
16/08/09 09:15:33 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 360 minutes, Emptier interval = 0 minutes.
Moved: 'hdfs://l4283t.sss.com:8020/benchmarks' to trash at: hdfs://l4283t.sss.com:8020/user/hdfs/.Trash/Current
[hdfs@l4377t root]$
[hdfs@l4377t root]$
[hdfs@l4377t root]$ hdfs dfs -expunge
16/08/09 09:16:13 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 360 minutes, Emptier interval = 0 minutes.
16/08/09 09:16:13 INFO fs.TrashPolicyDefault: Created trash checkpoint: /user/hdfs/.Trash/160809091613&lt;/PRE&gt;&lt;P&gt;However, the disk and HDFS space is still not free, below is the df -h for the datanode directories:&lt;/P&gt;&lt;PRE&gt;/dev/vdc                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdc
/dev/vdk                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdk
/dev/vdl                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdl
/dev/vdh                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdh
/dev/vdg                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdg
/dev/vdj                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdj
/dev/vdi                     10G  8.9G  1.2G  89% /opt/hdfsdisks/vdi
/dev/vde                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vde
/dev/vdd                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdd
/dev/vdb                     10G  8.9G  1.1G  90% /opt/hdfsdisks/vdb
/dev/vdm                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdm
/dev/vdf                     10G  9.0G  1.1G  90% /opt/hdfsdisks/vdf&lt;/PRE&gt;&lt;P&gt;EDIT(@&lt;A href="https://community.hortonworks.com/users/168/bleonhardi.html"&gt;Benjamin Leonhardi&lt;/A&gt; can you check this ?): Output for those directories AFTER expunge&lt;/P&gt;&lt;P&gt;I tried expunge earlier as well as now, however, those TestDFSIO files keep on surfacing in trash !&lt;/P&gt;&lt;PRE&gt;-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_28
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_26
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_25
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/TestDFSIO/io_data/test_io_24
-rw-------   3 hdfs      hdfs            0 2016-08-08 13:57 /user/hdfs/.Trash/160809091613/benchmarks/Te&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 16:18:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169752#M37255</guid>
      <dc:creator>kaliyugantagoni</dc:creator>
      <dc:date>2016-08-09T16:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169753#M37256</link>
      <description>&lt;P&gt;Yeah I expunged but does it mean that the space reclaim will start 360 min.(6h) after deletion of the file ?&lt;/P&gt;&lt;P&gt;/*EDIT added after the space was auto-reclaimed*/&lt;/P&gt;&lt;P&gt;It seems strange but the space was reclaimed when I checked it today, probably, the reclaim did start after 6h &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 16:24:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169753#M37256</guid>
      <dc:creator>kaliyugantagoni</dc:creator>
      <dc:date>2016-08-09T16:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169754#M37257</link>
      <description>&lt;DIV&gt;You see that line:&lt;/DIV&gt;&lt;OL&gt;
&lt;LI&gt;16/08/0909:16:13 INFO fs.TrashPolicyDefault:Namenode trash configuration:Deletion interval =360 minutes,Emptier interval =0 minutes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Per default HDFS uses a trash. You can bypass this with rm -skipTrash or just delete the trash with&lt;/P&gt;&lt;PRE&gt;hadoop fs -expunge&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 16:26:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169754#M37257</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-08-09T16:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169755#M37258</link>
      <description>&lt;P&gt;No the expunge should happen immediately, although HDFS may take a bit till the datanodes actually get around to delete the files but it shouldn't take long. So expunge doesn't help? Weird &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 17:39:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169755#M37258</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-08-09T17:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169756#M37259</link>
      <description>&lt;P&gt;If you want to delete files and have them not go in the trash, use:&lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -r -skipTrash &amp;lt;directory name&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 20:32:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169756#M37259</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-08-09T20:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169757#M37260</link>
      <description>&lt;P&gt;Yeah but what should I do about the files already in trash and expunge doesn't help ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 21:30:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169757#M37260</guid>
      <dc:creator>kaliyugantagoni</dc:creator>
      <dc:date>2016-08-09T21:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS Space not reclaimed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169758#M37261</link>
      <description>&lt;P&gt;You can always remove the files in .Trash as you would any other directory/file.&lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -r -skipTrash /user/hdfs/.Trash/*&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 23:10:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-Space-not-reclaimed/m-p/169758#M37261</guid>
      <dc:creator>myoung</dc:creator>
      <dc:date>2016-08-09T23:10:25Z</dc:date>
    </item>
  </channel>
</rss>

