CCE API 20251107 version

Reviewed-by: Gergo-Bence Lorincz <a200452876@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
This commit is contained in:
2026-02-17 10:09:34 +00:00
committed by zuul
parent b8457f8476
commit affc0093ff
26 changed files with 3645 additions and 261 deletions

View File

@ -15,7 +15,7 @@ storageDevice=/dev/vdb
vgcreate ${vgName} ${storageDevice}</pre>
</div>
</li><li id="node_storage_example__en-us_topic_0000001207069618_li23058191031">EVS disks match the disks created in <strong id="node_storage_example__en-us_topic_0000001207069618_b121287102717">dataVolumes</strong> based on the settings of <strong id="node_storage_example__en-us_topic_0000001207069618_b131291350152416">matchLabels</strong>.</li></ol>
</li><li id="node_storage_example__en-us_topic_0000001207069618_li117111634433">Policies have priorities to match <strong id="node_storage_example__en-us_topic_0000001207069618_b1925417132278">matchLabels</strong>. The <strong id="node_storage_example__en-us_topic_0000001207069618_b204408516511">matchLabels</strong> policy nearest to <strong id="node_storage_example__en-us_topic_0000001207069618_b41561438317">storageSelectors</strong> has a higher priority and the disk nearest to <strong id="node_storage_example__en-us_topic_0000001207069618_b1491422012711">dataVolumes</strong> will be preferentially matches. As <strong id="node_storage_example__en-us_topic_0000001207069618_b13629123310290">matchLabels</strong> uses loose matching, you are advised to place the <strong id="node_storage_example__en-us_topic_0000001207069618_b1092135719611">matchLabels</strong> policy with a small matching range on the top. For example:<div class="p" id="node_storage_example__en-us_topic_0000001207069618_p177629163419"><span><img id="node_storage_example__en-us_topic_0000001207069618_image5240152411538" src="en-us_image_0000001207617538.png" title="Click to enlarge" class="imgResize"></span><ol type="a" id="node_storage_example__en-us_topic_0000001207069618_ol1754716742"><li id="node_storage_example__en-us_topic_0000001207069618_li9541116248">In step 1, the first disk in <strong id="node_storage_example__en-us_topic_0000001207069618_b113884264325">dataVolumes</strong> is matched by the EVS disk whose size is 100 GiB and storage class is SAS. In step 2, the second disk in <strong id="node_storage_example__en-us_topic_0000001207069618_b1674773313449">dataVolumes</strong> is matched by the EVS disk whose size is 100 GiB because the first disk has been selected.</li><li id="node_storage_example__en-us_topic_0000001207069618_li25415160410">In step 3, two disks in <strong id="node_storage_example__en-us_topic_0000001207069618_b1191053713331">dataVolumes</strong> can be matched because <strong id="node_storage_example__en-us_topic_0000001207069618_b153181629153315">volumeType</strong> or <strong id="node_storage_example__en-us_topic_0000001207069618_b119099318338">count</strong> is not specified in <strong id="node_storage_example__en-us_topic_0000001207069618_b75458247126">matchLabels</strong>. In this case, no disk is available for matching in step 4.</li></ol>
</li><li id="node_storage_example__en-us_topic_0000001207069618_li117111634433">Policies have priorities to match <strong id="node_storage_example__en-us_topic_0000001207069618_b1925417132278">matchLabels</strong>. The <strong id="node_storage_example__en-us_topic_0000001207069618_b204408516511">matchLabels</strong> policy nearest to <strong id="node_storage_example__en-us_topic_0000001207069618_b41561438317">storageSelectors</strong> has a higher priority and the disk nearest to <strong id="node_storage_example__en-us_topic_0000001207069618_b1491422012711">dataVolumes</strong> will be preferentially matches. As <strong id="node_storage_example__en-us_topic_0000001207069618_b13629123310290">matchLabels</strong> uses loose matching, you are advised to place the <strong id="node_storage_example__en-us_topic_0000001207069618_b1092135719611">matchLabels</strong> policy with a small matching range on the top. For example:<div class="p" id="node_storage_example__en-us_topic_0000001207069618_p177629163419"><span><img id="node_storage_example__en-us_topic_0000001207069618_image5240152411538" src="en-us_image_0000001207617538.png" title="Click to enlarge" class="imgResize"></span><ol type="a" id="node_storage_example__en-us_topic_0000001207069618_ol1754716742"><li id="node_storage_example__en-us_topic_0000001207069618_li9541116248">In step 1, the first disk in <strong id="node_storage_example__en-us_topic_0000001207069618_b113884264325">dataVolumes</strong> is matched by the EVS disk whose size is 100 GiB and storage class is SAS. In step 2, the second disk in <strong id="node_storage_example__en-us_topic_0000001207069618_b1674773313449">dataVolumes</strong> is matched by the EVS disk whose size is 100 GiB because the first disk has been selected.</li><li id="node_storage_example__en-us_topic_0000001207069618_li25415160410">In step 3, two disks in <strong id="node_storage_example__en-us_topic_0000001207069618_b958618181359">dataVolumes</strong> can be matched because <strong id="node_storage_example__en-us_topic_0000001207069618_b4587141815517">volumeType</strong> or <strong id="node_storage_example__en-us_topic_0000001207069618_b8587018057">count</strong> is not specified. In this case, no disk is available for matching in step 4.</li></ol>
</div>
</li><li id="node_storage_example__en-us_topic_0000001207069618_li78286464319"><strong id="node_storage_example__en-us_topic_0000001207069618_b181371053114510">storageGroups</strong> associates with <strong id="node_storage_example__en-us_topic_0000001207069618_b16743185584513">storageSelectors</strong> based on <strong id="node_storage_example__en-us_topic_0000001207069618_b7844135573316">selectorName</strong>. Finally, two 100 GiB disks are selected. The CCE backend groups the two PVs into a volume group (VG) and divides the VG into two logical volumes (LVs) in the ratio of 9:1. 10% of Kubernetes LVs are partitioned in striped mode. 90% runtime LVs are partitioned in linear mode by default because runtimeConfig is not configured.</li></ol>
</div>
@ -218,7 +218,7 @@ vgcreate ${vgName} ${storageDevice}</pre>
</div>
<div class="section" id="node_storage_example__en-us_topic_0000001207069618_section163256264156"><h4 class="sectiontitle">Creating Striped LVs to Improve Disk Performance</h4><p id="node_storage_example__en-us_topic_0000001207069618_p12858184310159">Currently, the striped LV function is supported only by calling an API. The following is an example:</p>
<p id="node_storage_example__en-us_topic_0000001207069618_p911834651514"><span><img id="node_storage_example__en-us_topic_0000001207069618_image1389812341168" src="en-us_image_0000001252020583.png" title="Click to enlarge" class="imgResize"></span></p>
<ol id="node_storage_example__en-us_topic_0000001207069618_ol7789413121719"><li id="node_storage_example__en-us_topic_0000001207069618_li17891013121712"><strong id="node_storage_example__en-us_topic_0000001207069618_b154262614309">storageSelectors</strong> matches all EVS disks in <strong id="node_storage_example__en-us_topic_0000001207069618_b15422634143016">dataVolumes</strong> because <strong id="node_storage_example__en-us_topic_0000001207069618_b10454154613011">matchLabels</strong> is not contained in <strong id="node_storage_example__en-us_topic_0000001207069618_b33031551153018">storageSelectors</strong>.</li><li id="node_storage_example__en-us_topic_0000001207069618_li12789131310171">Create a VG named <strong id="node_storage_example__en-us_topic_0000001207069618_b89501408324">vgpaas</strong> using LVM.</li><li id="node_storage_example__en-us_topic_0000001207069618_li3789161317176">Strip 90% of the <strong id="node_storage_example__en-us_topic_0000001207069618_b1914129113217">vgpaas</strong> space into runtime LVs.</li><li id="node_storage_example__en-us_topic_0000001207069618_li157893136179">Strip 10% of the <strong id="node_storage_example__en-us_topic_0000001207069618_b14091386321">vgpaas</strong> space into Kubernetes LVs.</li></ol>
<ol id="node_storage_example__en-us_topic_0000001207069618_ol7789413121719"><li id="node_storage_example__en-us_topic_0000001207069618_li17891013121712">If <strong id="node_storage_example__en-us_topic_0000001207069618_b1864610411482">matchLabels</strong> in <strong id="node_storage_example__en-us_topic_0000001207069618_b14163134418819">storageSelectors</strong> is empty, all EVS disks will be selected.</li><li id="node_storage_example__en-us_topic_0000001207069618_li12789131310171">Create a VG named <strong id="node_storage_example__en-us_topic_0000001207069618_b89501408324">vgpaas</strong> using LVM.</li><li id="node_storage_example__en-us_topic_0000001207069618_li3789161317176">Strip 90% of the <strong id="node_storage_example__en-us_topic_0000001207069618_b1914129113217">vgpaas</strong> space into runtime LVs.</li><li id="node_storage_example__en-us_topic_0000001207069618_li157893136179">Strip 10% of the <strong id="node_storage_example__en-us_topic_0000001207069618_b14091386321">vgpaas</strong> space into Kubernetes LVs.</li></ol>
<div class="note" id="node_storage_example__en-us_topic_0000001207069618_note1598564031718"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="node_storage_example__en-us_topic_0000001207069618_ul77543234504"><li id="node_storage_example__en-us_topic_0000001207069618_li7790024155011">Two or more data disks are required for striping.</li><li id="node_storage_example__en-us_topic_0000001207069618_li18754102315014">When creating a striped LV, ensure that the types and sizes of the PVs added to the VG are the same. Otherwise, the creation will fail.</li><li id="node_storage_example__en-us_topic_0000001207069618_li32967561071">When creating a striped LV, use the striping configuration for both the runtime LV and Kubernetes LV. Otherwise, the creation will fail.</li></ul>
</div></div>
<p id="node_storage_example__en-us_topic_0000001207069618_p1529343517181">Log in to the node and run the following command to view the striping result:</p>