doc-exports/docs/obs/umn/obs_03_0407.html
zhangyue b55201d729 OBS UMN DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-03-18 15:39:30 +00:00

73 lines
12 KiB
HTML

<a name="obs_03_0407"></a><a name="obs_03_0407"></a>
<h1 class="topictitle1">Adding a Bucket</h1>
<div id="body8662426"><p id="obs_03_0407__a4556438db6bb46e0a6dec12ebc754b57">Buckets are containers that store objects in OBS. Before you can store data in OBS, you must create a bucket.</p>
<div class="note" id="obs_03_0407__note14401833152"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0407__obs_03_0306_p10676115174029">An account can create a maximum of 100 buckets and parallel file systems.</p>
</div></div>
<div class="section" id="obs_03_0407__s74adf863725c43719b19e47e5011b4f8"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0407__o3dc069cdcbba4416a3683f6520f3ecce"><li id="obs_03_0407__l0204956d1e384b6ba74c2d480eae6b31"><span>Log in to OBS Browser.</span></li><li id="obs_03_0407__l0c4ad7fe085d4a19b2ea5d054c4c0e5f"><span>Click <strong id="obs_03_0407__obs_03_0022_b20369115342911">Add Bucket</strong> on the upper left of the page. The <strong id="obs_03_0407__obs_03_0022_b0561135842917">Add Bucket</strong> dialog box is displayed.</span></li><li id="obs_03_0407__li1178272966"><span>Set the bucket parameters, as listed in <a href="#obs_03_0407__tcbb89d695149467789cfdd635af1df0c">Table 1</a>.</span><p><div class="fignone" id="obs_03_0407__fig26241231155117"><span class="figcap"><b>Figure 1 </b>Adding a bucket</span><br><span><img id="obs_03_0407__obs_03_0022_image14851687350" src="en-us_image_0129772318.png" title="Click to enlarge" class="imgResize"></span></div>
<div class="tablenoborder"><a name="obs_03_0407__tcbb89d695149467789cfdd635af1df0c"></a><a name="tcbb89d695149467789cfdd635af1df0c"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0407__tcbb89d695149467789cfdd635af1df0c" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Creating a Bucket</caption><thead align="left"><tr id="obs_03_0407__r68a17455096b4296954bbe548e043709"><th align="left" class="cellrowborder" valign="top" width="24.43%" id="mcps1.3.3.2.3.2.2.2.3.1.1"><p id="obs_03_0407__a76f02fb52bf14395997650f11df1b34a">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="75.57000000000001%" id="mcps1.3.3.2.3.2.2.2.3.1.2"><p id="obs_03_0407__a5709eab95b5d41059beae08d3b5924c0">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0407__row11330107171416"><td class="cellrowborder" valign="top" width="24.43%" headers="mcps1.3.3.2.3.2.2.2.3.1.1 "><p id="obs_03_0407__p1235820187143">Method</p>
</td>
<td class="cellrowborder" valign="top" width="75.57000000000001%" headers="mcps1.3.3.2.3.2.2.2.3.1.2 "><p id="obs_03_0407__p1736011816142">Select <strong id="obs_03_0407__b2063314911316">Create new bucket</strong>.</p>
</td>
</tr>
<tr id="obs_03_0407__r2249a188eb05438b9917d04f844cad9c"><td class="cellrowborder" valign="top" width="24.43%" headers="mcps1.3.3.2.3.2.2.2.3.1.1 "><p id="obs_03_0407__a5111ec176e734d2bb5c64143dccbe60f">Region</p>
</td>
<td class="cellrowborder" valign="top" width="75.57000000000001%" headers="mcps1.3.3.2.3.2.2.2.3.1.2 "><p id="obs_03_0407__aadb0ea0c72fa42dfb7eeb1ce8b45a3f2">Region where the bucket to be created is located.</p>
</td>
</tr>
<tr id="obs_03_0407__rbe52c4e262b746eeb342333853dd9b8b"><td class="cellrowborder" valign="top" width="24.43%" headers="mcps1.3.3.2.3.2.2.2.3.1.1 "><p id="obs_03_0407__ab3621186e39740a9a05e214db724cefd">Storage Class</p>
</td>
<td class="cellrowborder" valign="top" width="75.57000000000001%" headers="mcps1.3.3.2.3.2.2.2.3.1.2 "><p id="obs_03_0407__p20843171251910">OBS offers three storage classes: standard, warm, and cold.</p>
<ul id="obs_03_0407__ul37204198202142"><li id="obs_03_0407__li66402333202142">Standard storage class: applies to storing frequently accessed (multiple times per month) hot or small files that require quick response.</li></ul>
<ul id="obs_03_0407__uef63531703f3494dad84f6a2666529f1"><li id="obs_03_0407__li382757195916">Warm storage class: applies to storing semi-frequently accessed (less than 12 times a year) data requiring quick response.</li><li id="obs_03_0407__li2037084711014">Cold storage class: applies to archiving rarely-accessed (once a year) data without high requirements on response speed.</li></ul>
</td>
</tr>
<tr id="obs_03_0407__rbb06d7afa582475da604f2ba63295b8f"><td class="cellrowborder" valign="top" width="24.43%" headers="mcps1.3.3.2.3.2.2.2.3.1.1 "><p id="obs_03_0407__ad68ce33e814b4bff9220bdc4683d61c2">Bucket Name</p>
</td>
<td class="cellrowborder" valign="top" width="75.57000000000001%" headers="mcps1.3.3.2.3.2.2.2.3.1.2 "><p id="obs_03_0407__p22439457145857">Name the bucket according to the globally applied DNS naming regulation as follows:</p>
<ul id="obs_03_0407__ul28645947"><li id="obs_03_0407__li384625105610">The name must be globally unique in OBS.</li><li id="obs_03_0407__li119161154105612">The name must contain 3 to 63 characters. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.</li><li id="obs_03_0407__li207966565710">The name cannot start or end with a period (.) or hyphen (-), and cannot contain two consecutive periods (.) or contain a period (.) and a hyphen (-) adjacent to each other.</li><li id="obs_03_0407__li998263125719">The name cannot be an IP address.</li><li id="obs_03_0407__li56486939">If the name contains a period (.), certificate verification will fail when you access OBS through HTTPS using a virtual host.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="obs_03_0407__n5769f9cad6e04fd69b295b4b90007eb3"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_03_0407__u8a010dc445104ba38cc3365ea0b5ac87"><li class="text" id="obs_03_0407__lae02fb0aa9b344d6b4299787d8095a37">When a URL is used to access a bucket, the bucket name will become a part of the URL. According to the DNS rule, URLs do not support uppercase letters and cannot be used to access a bucket whose name contains uppercase letters. Therefore, a bucket name can contain only lowercase letters, digits, hyphens (-), and periods (.) For example, if you attempt to access bucket <strong id="obs_03_0407__b1713004914143115">MyBucket</strong> using the URL, bucket <strong id="obs_03_0407__b824252739143115">mybucket</strong> will be accessed instead, causing an access error.</li><li id="obs_03_0407__l0cfdfa861c254f27a15be081abab0dc8">DNS naming can standardize the bucket naming globally, facilitating the resolution when accessing a bucket. Users can benefit from new functions and optimized features, and static website hosting is then applicable to buckets.</li><li id="obs_03_0407__l3cf264a544654009813a7464a1a4380b">Once you create a bucket, you cannot change the name of it. Make sure that the bucket name you set is appropriate.</li></ul>
</div></div>
</p></li><li id="obs_03_0407__li10171750596"><span>Click <strong id="obs_03_0407__b926027838143049">OK</strong>.</span></li><li id="obs_03_0407__li944717573486"><span>In the displayed dialog box, click <strong id="obs_03_0407__obs_03_0022_b19371431195919">Close</strong> to close the dialog box.</span></li></ol>
</div>
<div class="section" id="obs_03_0407__s626c2e4aa1bd45ef946718aaa1738fd8"><h4 class="sectiontitle">Region Information Configuration</h4><p id="obs_03_0407__ad8e7cbae8a3740dcad9ee7dc40513427">The <strong id="obs_03_0407__b17885123232211">Region</strong> information can be configured on OBS Browser. The following details the configuration procedure:</p>
<ol id="obs_03_0407__oedd79853e3114fe8a9c6e9f63b3082a2"><li id="obs_03_0407__l53f8d9d4fae04ae0b7741fa7b9ef3c7c">Open file <strong id="obs_03_0407__b1839690742143943">region</strong> in folder <strong id="obs_03_0407__b682755533143943">OBS Browser</strong> in the decompression path of OBS Browser.</li><li id="obs_03_0407__l4aa3f076f142423d88f9a85ed49e8ca5">Change the value of parameter <strong id="obs_03_0407__b383787137144019">options</strong> in file <strong id="obs_03_0407__b658626849144019">region</strong>.<p id="obs_03_0407__ad37d717a2f584565890d2f82c974fc6d">Enter the region information to be added to the end of parameter <strong id="obs_03_0407__b425094148144028">options</strong> in the following format:</p>
<p id="obs_03_0407__p17146735164213"><em id="obs_03_0407__i29763283412">{"key":"Region alias","value":"Region"}</em></p>
<p id="obs_03_0407__a8241de24eed44765b1a576fc3c9cff68">The newly added information must be in the JSON format. The following describes the parameters.</p>
<ul id="obs_03_0407__ua7fb9b9981f94809926be3379c22874b"><li id="obs_03_0407__ld5085c9b03e94d2197c14405607fd06f"><strong id="obs_03_0407__b61571823172710">key</strong>: indicates a user-defined region alias. Its value is in the <strong id="obs_03_0407__b881357622144050">Region</strong> drop-down list in the <strong id="obs_03_0407__b60534478143545">Add Bucket</strong> dialog box. For a convenient view, you are advised to enter not more than 25 characters.</li><li id="obs_03_0407__l7f7406e74ce34458aab42e91fe8d4276"><strong id="obs_03_0407__b2501163718912">value</strong> indicates region. Enter the value based on regions supported by OBS.<p id="obs_03_0407__aa1436a5944704bb7a20e16b9c2d8f1da">Each time when a <strong id="obs_03_0407__a58f28c4553fc45338b3465ca6795435e">Region</strong> is added, a group of values will be added to <strong id="obs_03_0407__a87480c29d6024fb182698841b31684d7">options</strong>, that is, <strong id="obs_03_0407__a478da2c6475546a79a3e62abe0f9fed4">{"key":"<em id="obs_03_0407__ad9d717a30ffe4b54897ed0a279ab4545">Region alias</em>","value":"<em id="obs_03_0407__a92a43c49e0df402e90cd69d79b4746b3">Region</em>"}</strong>. Groups of values are separated by commas (,). The following provides two configuration examples of newly added <strong id="obs_03_0407__b1429432860142715">region01</strong> and <strong id="obs_03_0407__b981135911142715">region02</strong>. Keep the values of other parameters in file <strong id="obs_03_0407__b1763202104144151">region</strong> unchanged.</p>
<p id="obs_03_0407__p1684755734017"><em id="obs_03_0407__i784785744016">"options":[{"key":"test_region01","value":"region01"},{"key":"test_region02","value":"region02"}]</em></p>
</li></ul>
</li><li id="obs_03_0407__l290ab85534fd4bdb8eddd04696cf510a">After file <strong id="obs_03_0407__b1898571411493">region</strong> is successfully modified, restart OBS Browser so that the configurations can take effect.</li></ol>
</div>
<div class="section" id="obs_03_0407__s0a798aa211674304a45666128436970c"><h4 class="sectiontitle">Related Operations</h4><p id="obs_03_0407__a8e39fca99b1d4ea68d3db52c4076fdee">You can specify its storage class when creating a bucket or change its storage class after bucket creation. The procedure is as follows:</p>
<ol id="obs_03_0407__en-us_topic_0068417479_ol54196626"><li id="obs_03_0407__en-us_topic_0068417479_li18007590"><span>Log in to OBS Browser.</span></li><li id="obs_03_0407__en-us_topic_0068417479_li27850590"><span>Select a bucket from the bucket list and click <span><img id="obs_03_0407__image45641245171318" src="en-us_image_0237534341.png"></span> on the right. The <strong id="obs_03_0407__b139082035184413">Change Storage Class</strong> dialog box is displayed.</span></li><li id="obs_03_0407__en-us_topic_0068417479_li18577973"><span>Select the desired storage class and click <strong id="obs_03_0407__b842352706165443">OK</strong>.</span><p><div class="note" id="obs_03_0407__note178892514117"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_03_0407__en-us_topic_0045853662_ul2922161693817"><li id="obs_03_0407__en-us_topic_0045853662_li792271683811">Changing the storage class of a bucket does not change the storage class of existing objects in the bucket.</li><li id="obs_03_0407__en-us_topic_0045853662_li11901518123816">If you do not specify a storage class for an object when uploading it, it inherits the bucket's storage class by default. After the bucket's storage class is changed, newly uploaded objects will inherit the new storage class of the bucket by default.</li></ul>
</div></div>
</p></li><li id="obs_03_0407__li1321213215110"><span>In the displayed dialog box, click <strong id="obs_03_0407__obs_03_0022_b19371431195919_1">Close</strong> to close the dialog box.</span></li></ol>
<p id="obs_03_0407__en-us_topic_0068417479_p983108915817"></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0406.html">Managing Buckets</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>