Files
doc-exports/docs/cce/umn/cce_faq_00224.html
qiujiandong1 71d5c814e7 CCE UMN 20250311 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-06-16 14:58:53 +00:00

41 lines
5.6 KiB
HTML

<a name="cce_faq_00224"></a><a name="cce_faq_00224"></a>
<h1 class="topictitle1">How Do I Expand the Storage Capacity of a Container?</h1>
<div id="body8662426"><div class="section" id="cce_faq_00224__en-us_topic_0179003343_section328065120379"><h4 class="sectiontitle">Application Scenario</h4><p id="cce_faq_00224__en-us_topic_0179003343_p14675155417375">The default storage size of a container is 10 GiB. If a large volume of data is generated in the container, expand the capacity using the method described in this topic.</p>
</div>
<div class="section" id="cce_faq_00224__section3868196195120"><h4 class="sectiontitle">Solution</h4><ol id="cce_faq_00224__ol1636721811515"><li id="cce_faq_00224__li736715181515"><span>Log in to the CCE console and click the cluster name to access the cluster console.</span></li><li id="cce_faq_00224__li24942528521"><span>Choose <strong id="cce_faq_00224__b189750130475">Nodes</strong> from the navigation pane.</span></li><li id="cce_faq_00224__li133072217550"><span>Click the <strong id="cce_faq_00224__b15515725143711">Nodes</strong> tab, locate the row containing the target node, and choose <strong id="cce_faq_00224__b148551937125020">More</strong> &gt; <strong id="cce_faq_00224__b15370249135015">Reset Node</strong> in the <strong id="cce_faq_00224__b1144520506">Operation</strong> column.</span><p><div class="notice" id="cce_faq_00224__note093161765617"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="cce_faq_00224__p1315771818569">Resetting a node may make the node-specific resources (such as local storage and workloads scheduled to this node) unavailable. Exercise caution when performing this operation to avoid impact on running services.</p>
</div></div>
</p></li><li id="cce_faq_00224__li38415459464"><span>Reconfigure node parameters.</span><p><p id="cce_faq_00224__p1823115541465">If you need to adjust the container storage space, pay attention to the following configurations:</p>
<p id="cce_faq_00224__p15736830111319"><strong id="cce_faq_00224__b20984165491115">Storage Settings</strong>: Click <strong id="cce_faq_00224__b179848542115">Expand</strong> next to the data disk to configure the following parameter:</p>
<p id="cce_faq_00224__p760410529815"><strong id="cce_faq_00224__b1189853893318">Space Allocation for Pods</strong>: indicates the <span class="keyword" id="cce_faq_00224__keyword360416521088">base size</span> of a pod. It is the maximum size that a workload's pods (including the container images) can grow to in the disk space. Proper settings can prevent pods from taking all the disk space available and avoid service exceptions. It is recommended that the value is less than or equal to 80% of the container engine space. This parameter is related to the node OS and container storage rootfs and is not supported in some scenarios. For details, see <a href="cce_10_0341.html">Data Disk Space Allocation</a>.</p>
<p id="cce_faq_00224__p1285841220720"></p>
</p></li><li id="cce_faq_00224__li427018141128"><span>After the node is reset, log in to the node and check whether the container capacity has been expanded. The command output varies with the container storage rootfs.</span><p><ul id="cce_faq_00224__ul1526584464717"><li id="cce_faq_00224__li1826514474715">Overlayfs: No independent thin pool is allocated. Image data is stored in <strong id="cce_faq_00224__b824994619331">dockersys</strong>. Run the following command to check whether the container capacity has been expanded:<pre class="screen" id="cce_faq_00224__screen23221536261">kubectl exec -it <i><span class="varname" id="cce_faq_00224__varname673416223263">pod_name</span></i> -- /bin/sh
df -h</pre>
<p id="cce_faq_00224__p136817521518">If the information similar to the following is displayed, the overlay capacity has been expanded from 10 GiB to 15 GiB.</p>
<pre class="screen" id="cce_faq_00224__screen1331460566">Filesystem Size Used Avail Use% Mounted on
<strong id="cce_faq_00224__b126351614141716">overlay</strong> <strong id="cce_faq_00224__b95887752416"> 15G 104K 15G 1% /</strong>
tmpfs 64M 0 64M 0% /dev
tmpfs 3.6G 0 3.6G 0% /sys/fs/cgroup
/dev/mapper/vgpaas-share 98G 4.0G 89G 5% /etc/hosts
...</pre>
</li><li id="cce_faq_00224__li9753183813814">Device Mapper: A thin pool is allocated to store image data. Run the following command to check whether the container capacity has been expanded:<pre class="screen" id="cce_faq_00224__screen75324173219">kubectl exec -it <i><span class="varname" id="cce_faq_00224__varname29110329324">pod_name</span></i> -- /bin/sh
df -h</pre>
<p id="cce_faq_00224__p11335144211612">If the information similar to the following is displayed, the thin pool capacity has been expanded from 10 GiB to 15 GiB.</p>
<pre class="screen" id="cce_faq_00224__screen1452310541296">Filesystem Size Used Avail Use% Mounted on
<strong id="cce_faq_00224__b0242109173">/dev/mapper/vgpaas-thinpool-snap-84</strong> <strong id="cce_faq_00224__b24449162244"> 15G 232M 15G 2% /</strong>
tmpfs 64M 0 64M 0% /dev
tmpfs 3.6G 0 3.6G 0% /sys/fs/cgroup
/dev/mapper/vgpaas-kubernetes 11G 41M 11G 1% /etc/hosts
/dev/mapper/vgpaas-dockersys 20G 1.1G 18G 6% /etc/hostname
...</pre>
</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_faq_00037.html">Storage</a></div>
</div>
</div>