<?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: How do I configure HDFS storage types and policies? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96022#M9431</link>
    <description>&lt;P&gt;Following steps working for me:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;1.Create mount points:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;#mkdir /hadoop/hdfs/data1 /hadoop/hdfs/data2
/hadoop/hdfs/data3&lt;/P&gt;&lt;P&gt;#chown hdfs:hadoop /hadoop/hdfs/data1 /hadoop/hdfs/data2
/hadoop/hdfs/data3&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(**We are using
the configuration for test purpose only, so no disks are mounted.)&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;2.Login to Ambari &amp;gt; HDFS&amp;gt;setting&lt;/LI&gt;&lt;LI&gt;3.Add datanode directories as shown
below:&lt;/LI&gt;&lt;LI&gt;Datanode&amp;gt;datanode
directories:&lt;/LI&gt;&lt;LI&gt;[DISK]/hadoop/hdfs/data,[SSD]/hadoop/hdfs/data1,[RAMDISK]/hadoop/hdfs/data2,[ARCHIVE]/hadoop/hdfs/data3&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5050-sp.png" style="width: 1010px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/24023i126F4B3BB77F9F34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5050-sp.png" alt="5050-sp.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Restart hdfs hdfs service.&lt;/P&gt;&lt;P&gt;Restart all other afftected services.&lt;/P&gt;&lt;P&gt;Create a directory
/cold&lt;/P&gt;&lt;P&gt;# su hdfs&lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hadoop fs -mkdir /cold&lt;/P&gt;&lt;P&gt;Set COLD storage policy
on /cold &lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hdfs storagepolicies -setStoragePolicy -path /cold -policy COLD&lt;/P&gt;&lt;P&gt;Set storage policy
COLD on /cold&lt;/P&gt;&lt;P&gt;5. Run get storage
policy:&lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hdfs storagepolicies -getStoragePolicy -path /cold&lt;/P&gt;&lt;P&gt;The storage policy of
/cold:&lt;/P&gt;BlockStoragePolicy{COLD:2,
storageTypes=[ARCHIVE], creationFallbacks=[], replicationFallbacks=[]}&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Mon, 19 Aug 2019 12:55:09 GMT</pubDate>
    <dc:creator>Kkalita</dc:creator>
    <dc:date>2019-08-19T12:55:09Z</dc:date>
    <item>
      <title>How do I configure HDFS storage types and policies?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96020#M9429</link>
      <description>&lt;P&gt;According to the Apache and our own documentation, I would use the hdfs dfsadmin -setStoragePolicy and -getStoragePolicy commands to configure and use HDFS storage types and policies. However, on my HDP 2.3.0 cluster, installed using Ambari 2.1.1, the hdfs dfsadmin command does not have the -getStoragePolicy and -setStoragPolicy commands. So I do I configure storage types and policies?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 00:24:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96020#M9429</guid>
      <dc:creator>sbradshaw</dc:creator>
      <dc:date>2015-10-27T00:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure HDFS storage types and policies?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96021#M9430</link>
      <description>&lt;P&gt;I think the command has changed, its not hdfs dfsadmin anymore &lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Set a storage policy to a file or a directory.&lt;/P&gt;&lt;PRE&gt;hdfs storagepolicies -setStoragePolicy -path &amp;lt;path&amp;gt; -policy &amp;lt;policy&amp;gt;&lt;/PRE&gt;&lt;P&gt;Get the storage policy of a file or a directory.&lt;/P&gt;&lt;PRE&gt;hdfs storagepolicies -getStoragePolicy -path &amp;lt;path&amp;gt;&lt;/PRE&gt;&lt;P&gt;Source: &lt;A target="_blank" href="https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html#Set_Storage_Policy"&gt;https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html#Set_Storage_Policy&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 00:28:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96021#M9430</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2015-10-27T00:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure HDFS storage types and policies?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96022#M9431</link>
      <description>&lt;P&gt;Following steps working for me:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;1.Create mount points:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;#mkdir /hadoop/hdfs/data1 /hadoop/hdfs/data2
/hadoop/hdfs/data3&lt;/P&gt;&lt;P&gt;#chown hdfs:hadoop /hadoop/hdfs/data1 /hadoop/hdfs/data2
/hadoop/hdfs/data3&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(**We are using
the configuration for test purpose only, so no disks are mounted.)&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;2.Login to Ambari &amp;gt; HDFS&amp;gt;setting&lt;/LI&gt;&lt;LI&gt;3.Add datanode directories as shown
below:&lt;/LI&gt;&lt;LI&gt;Datanode&amp;gt;datanode
directories:&lt;/LI&gt;&lt;LI&gt;[DISK]/hadoop/hdfs/data,[SSD]/hadoop/hdfs/data1,[RAMDISK]/hadoop/hdfs/data2,[ARCHIVE]/hadoop/hdfs/data3&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5050-sp.png" style="width: 1010px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/24023i126F4B3BB77F9F34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5050-sp.png" alt="5050-sp.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Restart hdfs hdfs service.&lt;/P&gt;&lt;P&gt;Restart all other afftected services.&lt;/P&gt;&lt;P&gt;Create a directory
/cold&lt;/P&gt;&lt;P&gt;# su hdfs&lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hadoop fs -mkdir /cold&lt;/P&gt;&lt;P&gt;Set COLD storage policy
on /cold &lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hdfs storagepolicies -setStoragePolicy -path /cold -policy COLD&lt;/P&gt;&lt;P&gt;Set storage policy
COLD on /cold&lt;/P&gt;&lt;P&gt;5. Run get storage
policy:&lt;/P&gt;&lt;P&gt;[hdfs@hdp-qa2-n1 ~]$
hdfs storagepolicies -getStoragePolicy -path /cold&lt;/P&gt;&lt;P&gt;The storage policy of
/cold:&lt;/P&gt;BlockStoragePolicy{COLD:2,
storageTypes=[ARCHIVE], creationFallbacks=[], replicationFallbacks=[]}&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:55:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-configure-HDFS-storage-types-and-policies/m-p/96022#M9431</guid>
      <dc:creator>Kkalita</dc:creator>
      <dc:date>2019-08-19T12:55:09Z</dc:date>
    </item>
  </channel>
</rss>

