Yang, Tong 3f5759eed2 MRS comp-lts 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2023-01-19 17:08:45 +00:00

37 lines
3.0 KiB
HTML

<a name="mrs_01_1697"></a><a name="mrs_01_1697"></a>
<h1 class="topictitle1">Why Does an Error Occur During DataNode Capacity Calculation When Multiple data.dir Are Configured in a Partition?</h1>
<div id="body8662426"><div class="section" id="mrs_01_1697__en-us_topic_0000001173789292_se84ef91514924901a490852881e1ce5f"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1697__en-us_topic_0000001173789292_acb54b2f3c1084f718375899865f8b987">DataNode capacity count incorrect if several data.dir configured in one disk partition.</p>
</div>
<div class="section" id="mrs_01_1697__en-us_topic_0000001173789292_s9177ce806ede4784ad50b1c2fe806b93"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1697__en-us_topic_0000001173789292_a2d506dccdcd442a982e5a99ea1338ea6">Currently calculation will be done based on the disk like <i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1697__en-us_topic_0000001173789292_cmdname1492484710615">df</span></b></i> command in linux. Ideally user should not configure multiple directories for same disk which will be huge impact on performance where all data will go to one disk.</p>
<p id="mrs_01_1697__en-us_topic_0000001173789292_aadf3fa32644e4568a3811c2e2cc3c95f">Hence it is always better to configure like below:</p>
<p id="mrs_01_1697__en-us_topic_0000001173789292_a7e347908733947329d0786ab313ca515">For example:</p>
<p id="mrs_01_1697__en-us_topic_0000001173789292_a8ccd170e4d6041d19d8702d478d4f0e5">if the machine is having disks like following:</p>
<pre class="screen" id="mrs_01_1697__en-us_topic_0000001173789292_saae9a2055fbd4b2cb6da1be8c82fff06">host-4:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 352G 11G 324G 4% /
udev 190G 252K 190G 1% /dev
tmpfs 190G 72K 190G 1% /dev/shm
/dev/sdb1 2.7T 74G 2.5T 3% /data1
/dev/sdc1 2.7T 75G 2.5T 3% /data2
/dev/sdd1 2.7T 73G 2.5T 3% /data</pre>
<p id="mrs_01_1697__en-us_topic_0000001173789292_ac0a53fe3a11843b9986ea425073499dd">Suggested way of configuration:</p>
<pre class="screen" id="mrs_01_1697__en-us_topic_0000001173789292_sc0b5e78e437647c0835c4d3d5bd552ac">&lt;property&gt;
&lt;name&gt;dfs.datanode.data.dir&lt;/name&gt;
&lt;value&gt;/data1/datadir/,/data2/datadir,/data3/datadir&lt;/value&gt;
&lt;/property&gt;</pre>
<p id="mrs_01_1697__en-us_topic_0000001173789292_a258f229adf6345b9856f19e76cb120e5">Following is not recommended:</p>
<pre class="screen" id="mrs_01_1697__en-us_topic_0000001173789292_s323cdf55543d4f8b802d41903066c1e3">&lt;property&gt;
&lt;name&gt;dfs.datanode.data.dir&lt;/name&gt;
&lt;value&gt;/data1/datadir1/,/data2/datadir1,/data3/datadir1,/data1/datadir2/data1/datadir3,/data2/datadir2,/data2/datadir3,/data3/datadir2,/data3/datadir3&lt;/value&gt;
&lt;/property&gt;</pre>
<p id="mrs_01_1697__en-us_topic_0000001173789292_p10474165245120"></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1690.html">FAQ</a></div>
</div>
</div>