forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
99 lines
13 KiB
HTML
99 lines
13 KiB
HTML
<a name="ALM-27007"></a><a name="ALM-27007"></a>
|
|
|
|
<h1 class="topictitle1">ALM-27007 Database Enters the Read-Only Mode</h1>
|
|
<div id="body1593485868636"><div class="section" id="ALM-27007__section73176357113"><h4 class="sectiontitle">Description</h4><p id="ALM-27007__p55071435717">The system checks the disk space usage of the data directory on the active DBServer node every 30 seconds. The alarm is generated when the disk space usage exceeds 90%.</p>
|
|
<p id="ALM-27007__p55079351619">The alarm is cleared when the disk space usage is lower than 80%.</p>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section1731813514112"><h4 class="sectiontitle">Attribute</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ALM-27007__table03199351911" frame="border" border="1" rules="all"><thead align="left"><tr id="ALM-27007__row175079351212"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.1.4.1.1"><p id="ALM-27007__p1450710359116">Alarm ID</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.1.4.1.2"><p id="ALM-27007__p450793519117">Alarm Severity</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.1.4.1.3"><p id="ALM-27007__p6507835410">Auto Clear</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ALM-27007__row050719356110"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.1.4.1.1 "><p id="ALM-27007__p19507173514114">27007</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.1.4.1.2 "><p id="ALM-27007__p14507173519118">Critical</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.1.4.1.3 "><p id="ALM-27007__p550783510113">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section17325193519116"><h4 class="sectiontitle">Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ALM-27007__table15326535113" frame="border" border="1" rules="all"><thead align="left"><tr id="ALM-27007__row1950719351318"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.3.1.1"><p id="ALM-27007__p1250713352014">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.3.1.2"><p id="ALM-27007__p15077351115">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ALM-27007__row3507835517"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.1 "><p id="ALM-27007__p3507135213">ClusterName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.2 "><p id="ALM-27007__p550783515117">Specifies the cluster for which the alarm is generated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ALM-27007__row13507193517110"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.1 "><p id="ALM-27007__p16507203511110">ServiceName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.2 "><p id="ALM-27007__p145076351013">Specifies the service for which the alarm is generated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ALM-27007__row150716353113"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.1 "><p id="ALM-27007__p5507133519116">RoleName</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.2 "><p id="ALM-27007__p5507235619">Specifies the role for which the alarm is generated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ALM-27007__row350717351018"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.1 "><p id="ALM-27007__p350703515115">Trigger Condition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.3.1.2 "><p id="ALM-27007__p1550717351914">Specifies the threshold triggering the alarm. If the actual indicator value exceeds this threshold, the alarm is generated.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section1933273514114"><h4 class="sectiontitle">Impact on the System</h4><p id="ALM-27007__p150712351012">The database enters the read-only mode, causing service data loss.</p>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section23336351413"><h4 class="sectiontitle">Possible Causes</h4><p id="ALM-27007__p195071735016">The disk configuration cannot meet service requirements. The disk usage reaches the upper limit.</p>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section15334335119"><h4 class="sectiontitle">Procedure</h4><p id="ALM-27007__p65081735317"><strong id="ALM-27007__b115081335415">Check whether the disk space usage reaches the upper limit.</strong></p>
|
|
<ol id="ALM-27007__ol1534919317017"><li id="ALM-27007__li17343631209"><span>On FusionInsight Manager, choose <strong id="ALM-27007__b534383111017">Cluster</strong> > <em id="ALM-27007__i53431031707">Name of the desired cluster</em> > <strong id="ALM-27007__b9343183118013">Services</strong> > <strong id="ALM-27007__b183431931602">DBService</strong>.</span></li><li id="ALM-27007__li4344531806"><span>On the <strong id="ALM-27007__b134319316012">Dashboard</strong> page, view the <strong id="ALM-27007__b18343113114011">Disk Space Usage of the Data Directory</strong> chart and check whether the disk space usage of the data directory exceeds 90%.</span><p><ul id="ALM-27007__ul1634410311205"><li id="ALM-27007__li1034423118010">If yes, go to <a href="#ALM-27007__li203461531006">3</a>.</li><li id="ALM-27007__li634415317012">If no, go to <a href="#ALM-27007__li133383310015">13</a>.</li></ul>
|
|
</p></li><li id="ALM-27007__li203461531006"><a name="ALM-27007__li203461531006"></a><a name="li203461531006"></a><span>Log in to the active management node of the DBServer as user <strong id="ALM-27007__b73444311102">omm</strong> and run the following commands to check whether the database enters the read-only mode:</span><p><p id="ALM-27007__p103443314019"><strong id="ALM-27007__b834453115012">source $DBSERVER_HOME/.dbservice_profile</strong></p>
|
|
<p id="ALM-27007__p1634415311020"><strong id="ALM-27007__b133448312017">gsql -U omm -W </strong><em id="ALM-27007__i1434417319014">password</em><strong id="ALM-27007__b1634418311105"> -d postgres -p 20051</strong></p>
|
|
<p id="ALM-27007__p10345331608"><strong id="ALM-27007__b113457311806">show default_transaction_read_only;</strong></p>
|
|
<div class="note" id="ALM-27007__note16345153118013"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ALM-27007__p33451311901">In the preceding commands, <em id="ALM-27007__i173451311908">password</em> indicates the password of user <strong id="ALM-27007__b93451318016">omm</strong> of the DBService database. You can run the <strong id="ALM-27007__b234518317012">\q</strong> command to exit the database.</p>
|
|
</div></div>
|
|
<p id="ALM-27007__p2034518314010">Check whether the value of <strong id="ALM-27007__b2345133118011">default_transaction_read_only</strong> is <strong id="ALM-27007__b3345113118015">on</strong>.</p>
|
|
<pre class="screen" id="ALM-27007__screen734610318016">POSTGRES=# show default_transaction_read_only;
|
|
default_transaction_read_only
|
|
-------------------------------
|
|
<strong id="ALM-27007__b2346531904">on</strong>
|
|
(1 row)</pre>
|
|
<ul id="ALM-27007__ul3346183110015"><li id="ALM-27007__li5346193118014">If yes, go to <a href="#ALM-27007__li1234615311708">4</a>.</li><li id="ALM-27007__li1334633118016">If no, go to <a href="#ALM-27007__li133383310015">13</a>.</li></ul>
|
|
</p></li><li id="ALM-27007__li1234615311708"><a name="ALM-27007__li1234615311708"></a><a name="li1234615311708"></a><span>Run the following commands to open the <strong id="ALM-27007__b183468312008">dbservice.properties</strong> file:</span><p><p id="ALM-27007__p103464311209"><strong id="ALM-27007__b43468317012">source $DBSERVER_HOME/.dbservice_profile</strong></p>
|
|
<p id="ALM-27007__p10346153116011"><strong id="ALM-27007__b1834623114010">vi ${DBSERVICE_SOFTWARE_DIR}/tools/dbservice.properties</strong></p>
|
|
</p></li><li id="ALM-27007__li1634614311103"><span>Change the value of <strong id="ALM-27007__b153464311709">gaussdb_readonly_auto</strong> to <strong id="ALM-27007__b13466311007">OFF</strong>.</span></li><li id="ALM-27007__li19347173118016"><span>Run the following command to open the <strong id="ALM-27007__b580818573613">postgresql.conf</strong> file:</span><p><p id="ALM-27007__p33471531609"><strong id="ALM-27007__b183479317014">vi ${DBSERVICE_DATA_DIR</strong>}<strong id="ALM-27007__b534723116019">/postgresql.conf</strong></p>
|
|
</p></li><li id="ALM-27007__li1834711315019"><span>Delete <strong id="ALM-27007__b1234733112020">default_transaction_read_only = on</strong>.</span></li><li id="ALM-27007__li73471311202"><span>Run the following command for the configuration to take effect:</span><p><p id="ALM-27007__p183479314014"><strong id="ALM-27007__b9347163116011">gs_ctl reload -D ${DBSERVICE_DATA_DIR</strong>}</p>
|
|
</p></li><li id="ALM-27007__li134717312016"><span>Log in to FusionInsight Manager and choose <strong id="ALM-27007__b1834711311902">O&M</strong> > <strong id="ALM-27007__b1834793120013">Alarm</strong> > <strong id="ALM-27007__b193472031507">Alarms</strong>. On the right of the alarm "Database Enters the Read-Only Mode", click <strong id="ALM-27007__b73476318020">Clear</strong> in the <strong id="ALM-27007__b1934716311403">Operation</strong> column. In the dialog box that is displayed, click <strong id="ALM-27007__b834720311805">OK</strong> to manually clear the alarm.</span></li><li id="ALM-27007__li534893111014"><span>Log in to the active management node of the DBServer as user <strong id="ALM-27007__b6347131205">omm</strong> and run the following commands to view the files whose size exceeds 500 MB in the data directory and check whether there are large files incorrectly written into the directory:</span><p><p id="ALM-27007__p934714311704"><strong id="ALM-27007__b1334710315016">source $DBSERVER_HOME/.dbservice_profile</strong></p>
|
|
<p id="ALM-27007__p11348203114014"><strong id="ALM-27007__b8348133110018">find "$DBSERVICE_DATA_DIR"/../ -type f -size +500M</strong></p>
|
|
<ul id="ALM-27007__ul16348193112019"><li id="ALM-27007__li113482311308">If yes, go to <a href="#ALM-27007__li534815311101">11</a>.</li><li id="ALM-27007__li153489312008">If no, go to <a href="#ALM-27007__li133383310015">13</a>.</li></ul>
|
|
</p></li><li id="ALM-27007__li534815311101"><a name="ALM-27007__li534815311101"></a><a name="li534815311101"></a><span>Handle the files that are incorrectly written into the directory based on the actual scenario.</span></li><li id="ALM-27007__li1934811317013"><span>Log in to FusionInsight Manager and choose <strong id="ALM-27007__b9348631505">Cluster</strong> > <em id="ALM-27007__i1234812314014">Name of the desired cluster</em> > <strong id="ALM-27007__b10348131803">Services</strong> > <strong id="ALM-27007__b183483315016">DBService</strong>. On the <strong id="ALM-27007__b53481331804">Dashboard</strong> page, view the <strong id="ALM-27007__b434815311209">Disk Space Usage of the Data Directory</strong> chart and check whether the disk space usage is lower than 80%.</span><p><ul id="ALM-27007__ul4348113117018"><li id="ALM-27007__li18348931502">If yes, no further action is required.</li><li id="ALM-27007__li1734853115014">If no, go to <a href="#ALM-27007__li133383310015">13</a>.</li></ul>
|
|
</p></li></ol>
|
|
<p id="ALM-27007__p1818610563418"><strong id="ALM-27007__b1250923514117">Collect fault information.</strong></p>
|
|
<ol start="13" id="ALM-27007__ol1733912310011"><li id="ALM-27007__li133383310015"><a name="ALM-27007__li133383310015"></a><a name="li133383310015"></a><span>On FusionInsight Manager, choose <strong id="ALM-27007__b1333863115019">O&M</strong> > <strong id="ALM-27007__b1133819310016">Log</strong> > <strong id="ALM-27007__b13381831900">Download</strong>.</span></li><li id="ALM-27007__li433816311308"><span>Expand the <strong id="ALM-27007__b133389311401">Service</strong> drop-down list, and select <strong id="ALM-27007__b83389313016">DBService</strong> for the target cluster.</span></li><li id="ALM-27007__li1533915311408"><span>Specify the host for collecting logs by setting the <strong id="ALM-27007__b633811311302">Host</strong> parameter which is optional. By default, all hosts are selected.</span></li><li id="ALM-27007__li17339131604"><span>Click <span><img id="ALM-27007__image13395311606" src="en-us_image_0269624001.png"></span> in the upper right corner, and set <strong id="ALM-27007__b0339163118012">Start Date</strong> and <strong id="ALM-27007__b1233913311104">End Date</strong> for log collection to 10 minutes ahead of and after the alarm generation time, respectively. Then, click <strong id="ALM-27007__b193396317012">Download</strong>.</span></li><li id="ALM-27007__li143391131608"><span>Contact the <span id="ALM-27007__text833917311105">O&M personnel</span> and send the collected logs.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section10396235911"><h4 class="sectiontitle">Alarm Clearing</h4><p id="ALM-27007__p45099357111">After the fault is rectified, the system automatically clears this alarm.</p>
|
|
</div>
|
|
<div class="section" id="ALM-27007__section147771053193515"><h4 class="sectiontitle">Related Information</h4><p id="ALM-27007__p198871353113510">None</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1298.html">Alarm Reference (Applicable to MRS 3.x)</a></div>
|
|
</div>
|
|
</div>
|
|
|