<?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: Free up HDFS disk space in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243213#M205011</link>
    <description>&lt;P&gt;Hi Geoffrey,&lt;/P&gt;&lt;P&gt;I had been using -skipTrash options when I deleting files and /user/hdfs/.Trash directory is empty. I had also used -expunge command 24 hours ago. I still did not see disk space being freed. Here is results from dfsadm command&lt;/P&gt;&lt;PRE&gt;hdfs@msl-dpe-perf88:/$ hdfs dfs -ls /user/hdfs/.Trash
hdfs@msl-dpe-perf88:/$ 

hdfs@msl-dpe-perf88:/$  hdfs dfsadmin -report 
Configured Capacity: 31048107810816 (28.24 TB)
Present Capacity: 29767722012672 (27.07 TB)
DFS Remaining: 0 (0 B)
DFS Used: 29767722012672 (27.07 TB)
DFS Used%: 100.00%
Under replicated blocks: 97449
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0


-------------------------------------------------


&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 02 Feb 2019 08:28:18 GMT</pubDate>
    <dc:creator>harry_li</dc:creator>
    <dc:date>2019-02-02T08:28:18Z</dc:date>
    <item>
      <title>Free up HDFS disk space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243211#M205009</link>
      <description>&lt;P&gt;My HDFS has total disk space of 28.2 TB, which I have 15.1TB useful data on it. After a while, Ambari reports the disk space is 75% full, so I started "Balance HDFS" from Ambari. Since then, the available disk space decrease slowly until they are all gone. Now I have no more useful disk space. How can I reclaim the unused disk space.&lt;/P&gt;&lt;PRE&gt;hdfs@msl-dpe-perf88:/$ hdfs dfs -du -h -s /
15.1 T  /
hdfs@msl-dpe-perf88:/$ hdfs dfs -df -h
Filesystem                            Size    Used  Available  Use%
hdfs://msl-dpe-perf88.msl.lab:8020  28.2 T  27.1 T          0   96%


&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Feb 2019 07:25:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243211#M205009</guid>
      <dc:creator>harry_li</dc:creator>
      <dc:date>2019-02-02T07:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Free up HDFS disk space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243212#M205010</link>
      <description>&lt;P&gt;&lt;A href="@Harry Li"&gt; &lt;EM&gt;@Harry Li&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When a file is deleted by a user or an application, it is not immediately removed from HDFS. Instead, HDFS first renames it to a file in the &lt;STRONG&gt;/trash&lt;/STRONG&gt; directory. The file can be restored quickly as long as it remains in &lt;STRONG&gt;/trash&lt;/STRONG&gt;.  The retention time in the /trash is configurable. After the expiry of its life in &lt;STRONG&gt;/trash&lt;/STRONG&gt;, the NameNode deletes the file from the HDFS namespace. The deletion of a file causes the blocks associated with the file to be freed. Note that there could be an appreciable time delay between the time a file is deleted by a user and the time of the corresponding increase in free space in HDFS. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If you want to change the default setting then it needs to be updated in the core-site properties, which you can find in the Ambari menu. Simply follow this path; from the Ambari Dashboard, click &lt;STRONG&gt;HDFS -&amp;gt; Configs -&amp;gt; Advanced -&amp;gt; Advanced core-site&lt;/STRONG&gt;. Then set the '&lt;STRONG&gt;fs.trash.interval'&lt;/STRONG&gt; to &lt;STRONG&gt;0&lt;/STRONG&gt; to disable. This will require a restart of the related components to pick up the changes. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Check the HDFS structure to see where the most data is held. This will give you the space on each data node &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfsadmin -report &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Breakdown of the HDFS across the cluster and each of the data nodes run the below command, you should give it some time to complete.&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -expunge &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;By default, HDFS uses trash. You can bypass this with rm -skipTrash or just delete the trash with The other option when cleaning up your data use the &lt;STRONG&gt;-skipTrash&lt;/STRONG&gt; flag: &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -rm -R -skipTrash /folder-path&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;HTH &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 08:12:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243212#M205010</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-02-02T08:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Free up HDFS disk space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243213#M205011</link>
      <description>&lt;P&gt;Hi Geoffrey,&lt;/P&gt;&lt;P&gt;I had been using -skipTrash options when I deleting files and /user/hdfs/.Trash directory is empty. I had also used -expunge command 24 hours ago. I still did not see disk space being freed. Here is results from dfsadm command&lt;/P&gt;&lt;PRE&gt;hdfs@msl-dpe-perf88:/$ hdfs dfs -ls /user/hdfs/.Trash
hdfs@msl-dpe-perf88:/$ 

hdfs@msl-dpe-perf88:/$  hdfs dfsadmin -report 
Configured Capacity: 31048107810816 (28.24 TB)
Present Capacity: 29767722012672 (27.07 TB)
DFS Remaining: 0 (0 B)
DFS Used: 29767722012672 (27.07 TB)
DFS Used%: 100.00%
Under replicated blocks: 97449
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0


-------------------------------------------------


&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Feb 2019 08:28:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243213#M205011</guid>
      <dc:creator>harry_li</dc:creator>
      <dc:date>2019-02-02T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Free up HDFS disk space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243214#M205012</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/235114/@Harry%20Li"&gt;@Harry Li&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How many data nodes do you have in your cluster? &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can you try to isolate the culprit &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -du -h / &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;If you enabled snapshots then that could be one reason can you check its existence?&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs lsSnapshottableDir &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;HTH &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 09:21:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243214#M205012</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-02-02T09:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Free up HDFS disk space</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243215#M205013</link>
      <description>&lt;P&gt;Hi Geoffrey,&lt;/P&gt;&lt;P&gt;I have 4 data nodes and no snapshots set. Here are the output from the commands&lt;/P&gt;&lt;PRE&gt;hdfs@msl-dpe-perf88:/$ hdfs dfs -df -h
Filesystem                            Size    Used  Available  Use%
hdfs://msl-dpe-perf88.msl.lab:8020  28.2 T  27.1 T          0   96%

hdfs@msl-dpe-perf88:/$ hdfs lsSnapshottableDir 


hdfs@msl-dpe-perf88:/$ 




&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Feb 2019 23:50:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Free-up-HDFS-disk-space/m-p/243215#M205013</guid>
      <dc:creator>harry_li</dc:creator>
      <dc:date>2019-02-04T23:50:48Z</dc:date>
    </item>
  </channel>
</rss>

