doc-exports/docs/evs/dev/evs_03_0005.html
Zaoxu, Li 305c41bb57 EVS 2.0.38 SP1 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2022-10-19 22:27:18 +00:00

95 lines
7.6 KiB
HTML

<a name="evs_03_0005"></a><a name="evs_03_0005"></a>
<h1 class="topictitle1">Deleting an EVS Disk</h1>
<div id="body1540282332461"><div class="section" id="evs_03_0005__section1063418559011"><h4 class="sectiontitle">Scenarios</h4><p id="evs_03_0005__p58789484121">If an EVS disk is no longer used, you can delete it to release virtual resources.</p>
</div>
<div class="section" id="evs_03_0005__section28146133118"><h4 class="sectiontitle">Constraints</h4><ul id="evs_03_0005__ul14770233172539"><li id="evs_03_0005__li43336839172539">An EVS disk can be deleted only when its status is <strong>available</strong>, <strong id="evs_03_0005__b842352706163226">error</strong>, <strong id="evs_03_0005__b842352706163235">error_extending</strong>, <strong id="evs_03_0005__b842352706163241">error_restoring</strong>, or <strong id="evs_03_0005__b842352706163249">error_rollbacking</strong>.</li><li id="evs_03_0005__li32381071172542">Before deleting a shared EVS disk, ensure that the disk has been detached from all its servers.</li></ul>
<div class="notice" id="evs_03_0005__note1340603911537"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="evs_03_0005__ul743855119460"><li id="evs_03_0005__li14381551154620">When you delete an EVS disk, all the disk data including the snapshots created for this disk will be deleted. Exercise caution when performing this operation.</li><li id="evs_03_0005__li113257546467">Deleted EVS disks cannot be recovered. Exercise caution when performing this operation.</li></ul>
</div></div>
</div>
<div class="section" id="evs_03_0005__section1531361811311"><h4 class="sectiontitle">Involved APIs</h4><p id="evs_03_0005__p33281854345">Query the disk list, obtain the ID of the target disk, and then delete the disk.</p>
<p id="evs_03_0005__p73251180314">To meet the preceding requirements, call the following APIs:</p>
</div>
<ul id="evs_03_0005__ul1325151816318"><li id="evs_03_0005__li1259991315119">Query EVS disks.</li><li id="evs_03_0005__li1959910131510">Delete an EVS disk.</li></ul>
<div class="section" id="evs_03_0005__section16886203916519"><h4 class="sectiontitle">Procedure</h4><ol id="evs_03_0005__ol081544055118"><li id="evs_03_0005__li581684015116">Query EVS disks.<ul id="evs_03_0005__evs_03_0004_ul118162040125112"><li id="evs_03_0005__evs_03_0004_li158161740155110">API information<p id="evs_03_0005__evs_03_0004_p670222213411"><a name="evs_03_0005__evs_03_0004_li158161740155110"></a><a name="evs_03_0004_li158161740155110"></a>URI format: GET /v3/{project_id}/volumes</p>
<p id="evs_03_0005__evs_03_0004_p116419475511">For details, see <strong id="evs_03_0005__evs_03_0004_b842352706154153">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0005__evs_03_0004_b84235270615422">EVS Disk</strong> &gt; <strong id="evs_03_0005__evs_03_0004_b842352706154211">Querying EVS Disks</strong> in the <em id="evs_03_0005__evs_03_0004_i886446318154217">Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0005__evs_03_0004_li17816340125118">Example request<p id="evs_03_0005__evs_03_0004_p31824912620"><a name="evs_03_0005__evs_03_0004_li17816340125118"></a><a name="evs_03_0004_li17816340125118"></a>GET /v3/000efdc5f9064584b718b181df137bd7/volumes</p>
</li><li id="evs_03_0005__evs_03_0004_li4816124025117">Example response<pre class="screen" id="evs_03_0005__evs_03_0004_screen1656613210549">{
"volumes": [
{
"id": "6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/6b604cef-9bd8-4f5a-ae56-45839e6e1f0a",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
},
{
"id": "2bce4552-9a7d-48fa-8484-abbbf64b206e",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/2bce4552-9a7d-48fa-8484-abbbf64b206e",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
},
{
"id": "3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "self"
},
{
"href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "bookmark"
}
],
"name": "zjb_u25_test"
}
],
"volumes_links": [
{
"href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes?limit=3&amp;marker=3f1b98ec-a8b5-4e92-a727-88def62d5ad3",
"rel": "next"
}
]
}</pre>
</li></ul>
</li><li id="evs_03_0005__li17817114010516">Delete the disk.<ul id="evs_03_0005__ul481784055111"><li id="evs_03_0005__li5817940105111">API information<p id="evs_03_0005__p75101049862"><a name="evs_03_0005__li5817940105111"></a><a name="li5817940105111"></a>URI format: DELETE /v3/{project_id}/volumes/{volume_id}</p>
<p id="evs_03_0005__p19381155416718">For details, see <strong id="evs_03_0005__b842352706154740">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0005__b842352706154751">EVS Disk</strong> &gt; <strong id="evs_03_0005__b842352706154758">Deleting an EVS Disk</strong> in the <em>Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0005__li18176402515">Example request<p id="evs_03_0005__p08548399814"><a name="evs_03_0005__li18176402515"></a><a name="li18176402515"></a>DELETE /v3/000efdc5f9064584b718b181df137bd7/baremetalservers/5850a7e7-88dd-4d99-8439-347de8cc0dd7/volume/50ef9435-ca68-4b9b-a837-73377b9fdaa3?cascade=true</p>
<div class="note" id="evs_03_0005__note9909185454318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_03_0005__p169101454184312"><strong id="evs_03_0005__b842352706163850">cascade=true</strong> indicates that the snapshots created for the disk will also be deleted.</p>
</div></div>
</li><li id="evs_03_0005__li10817124015112">Example response<p id="evs_03_0005__evs_03_0004_p1581710408519"><a name="evs_03_0005__li10817124015112"></a><a name="li10817124015112"></a>None</p>
<div class="p" id="evs_03_0005__evs_03_0004_p723312591897">or<pre class="screen" id="evs_03_0005__evs_03_0004_screen2699535114213">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
<div class="p" id="evs_03_0005__evs_03_0004_p92381159293">In the preceding example, <strong id="evs_03_0005__evs_03_0004_b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_03_0005__evs_03_0004_b842352706144438">badRequest</strong> or <strong id="evs_03_0005__evs_03_0004_b842352706144454">itemNotFound</strong>. An example is provided as follows:<pre class="screen" id="evs_03_0005__evs_03_0004_screen5305191315435">{
"badRequest": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
</li></ul>
</li></ol>
</div>
</div>