forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
34 lines
5.9 KiB
HTML
34 lines
5.9 KiB
HTML
<a name="EN-US_TOPIC_0113607322"></a><a name="EN-US_TOPIC_0113607322"></a>
|
|
|
|
<h1 class="topictitle1">Detaching an EVS Disk from a BMS</h1>
|
|
<div id="body1526990824340"><div class="section" id="EN-US_TOPIC_0113607322__section123491451123012"><h4 class="sectiontitle">Scenario</h4><p id="EN-US_TOPIC_0113607322__p171255416309">A disk attached to a BMS can be detached.</p>
|
|
<ul id="EN-US_TOPIC_0113607322__ul19983102015815"><li id="EN-US_TOPIC_0113607322__en-us_topic_0102427988_li2948622144736">A disk mounted to <strong id="EN-US_TOPIC_0113607322__en-us_topic_0102427988_b842352706185443">/dev/sda</strong> functions as the system disk. You can only detach the system disk from a stopped BMS.</li><li id="EN-US_TOPIC_0113607322__en-us_topic_0102427988_li571809915431">Disks mounted to a mount point other than <strong id="EN-US_TOPIC_0113607322__en-us_topic_0102427988_b154915427431">/dev/sda</strong> function as data disks and can be detached from a running or stopped BMS.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0113607322__section165294572481"><h4 class="sectiontitle">Restrictions and Limitations</h4><p id="EN-US_TOPIC_0113607322__p161191708395">If a <span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text10827133315521">BMS</span><span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text1968164914717"></span> is stopped, disks can be detached from it without any limitation on the OS. If a <span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text19717385522">BMS</span><span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text997163825212"></span> is running, the constraints are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0113607322__ul1519191643915"><li id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_li89995211771">Before detaching an EVS disk from a Linux <span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text1765813412523">BMS</span><span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text1865874116526"></span>, log in to the <span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text96795441525">BMS</span><span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text5679644165216"></span>, run the <strong id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_b149995211072">unmount</strong> command to disassociate the disk to be detached from the file system, and ensure that no program is reading data from or writing data to the disk. Otherwise, the disk will fail to be detached.</li><li id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_li1499910211875">Before detaching an EVS disk from a Windows <span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text13869144885213">BMS</span><span id="EN-US_TOPIC_0113607322__en-us_topic_0107658627_text20870548135211"></span>, ensure that no program is reading data from or writing data to the disk. Otherwise, data will be lost.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0113607322__section1485352319380"><h4 class="sectiontitle">Involved APIs</h4><p id="EN-US_TOPIC_0113607322__p1937772516389">The following APIs are required:</p>
|
|
<ul id="EN-US_TOPIC_0113607322__ul157031533154216"><li id="EN-US_TOPIC_0113607322__li57032338425">Querying EVS disks attached to a BMS</li><li id="EN-US_TOPIC_0113607322__li20207149144318">Detaching an EVS disk from a BMS</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0113607322__section6667526174811"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0113607322__ol1523711304507"><li id="EN-US_TOPIC_0113607322__li117825814505">Query EVS disks attached to a BMS.<ul id="EN-US_TOPIC_0113607322__ul153616554411"><li id="EN-US_TOPIC_0113607322__li1253615551044">API information<p id="EN-US_TOPIC_0113607322__p1642011685916"><a name="EN-US_TOPIC_0113607322__li1253615551044"></a><a name="li1253615551044"></a>URI format: GET /v2/{project_id}/servers/{server_id}/os-volume_attachments</p>
|
|
<p id="EN-US_TOPIC_0113607322__p37310398565">For details, see section "Querying Information About the Disks Attached to a BMS (Native OpenStack API)" in the <em id="EN-US_TOPIC_0113607322__i334118575177">Bare Metal Server API Reference</em>.</p>
|
|
</li><li id="EN-US_TOPIC_0113607322__li847518211518">Example request<p id="EN-US_TOPIC_0113607322__p19660856678"><a name="EN-US_TOPIC_0113607322__li847518211518"></a><a name="li847518211518"></a>GET https://{ECS Endpoint}/v2/000efdc5f9064584b718b181df137bd7servers/9ab74d89-61e7-4259-8546-465fdebe4944/os-volume_attachments</p>
|
|
</li><li id="EN-US_TOPIC_0113607322__li1882455111812">Example response<pre class="screen" id="EN-US_TOPIC_0113607322__screen208621336194">{
|
|
"volumeAttachment": {
|
|
"device": "/dev/vdb",
|
|
"serverId": "9ab74d89-61e7-4259-8546-465fdebe4944",
|
|
"id": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6",
|
|
"volumeId": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</li><li id="EN-US_TOPIC_0113607322__li22371530115014">Detach an EVS disk from a BMS.<ul id="EN-US_TOPIC_0113607322__ul1418818222917"><li id="EN-US_TOPIC_0113607322__li21891925295">API information<p id="EN-US_TOPIC_0113607322__p221749125811"><a name="EN-US_TOPIC_0113607322__li21891925295"></a><a name="li21891925295"></a>URI format: DELETE /v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}</p>
|
|
<p id="EN-US_TOPIC_0113607322__p19147198587">For details, see section "Detaching an EVS Disk from a BMS (Native OpenStack API)" in the <em id="EN-US_TOPIC_0113607322__i164791277187">Bare Metal Server API Reference</em>.</p>
|
|
</li><li id="EN-US_TOPIC_0113607322__li131897292912">Example request<p id="EN-US_TOPIC_0113607322__p1447764801"><a name="EN-US_TOPIC_0113607322__li131897292912"></a><a name="li131897292912"></a>DELETE https://{ECS Endpoint}/v2.1/000efdc5f9064584b718b181df137bd7/servers/9ab74d89-61e7-4259-8546-465fdebe4944/os-volume_attachments/b53f23bd-ee8f-49ec-9420-d1acfeaf91d6</p>
|
|
</li><li id="EN-US_TOPIC_0113607322__li1919114252919">Example response<p id="EN-US_TOPIC_0113607322__p151185104619"><a name="EN-US_TOPIC_0113607322__li1919114252919"></a><a name="li1919114252919"></a>None</p>
|
|
</li></ul>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
|