{"id":1737,"date":"2021-03-07T21:34:32","date_gmt":"2021-03-07T13:34:32","guid":{"rendered":"http:\/\/881880.xyz\/?p=1737"},"modified":"2021-03-07T21:44:35","modified_gmt":"2021-03-07T13:44:35","slug":"%e7%be%a4%e6%99%96%e7%b3%bb%e7%bb%9fups%e4%bd%bf%e7%94%a8%e6%8a%80%e5%b7%a7%e3%80%82%e4%b8%8d%e8%bf%9b%e5%85%a5%e5%ae%89%e5%85%a8%e6%a8%a1%e5%bc%8f%ef%bc%8c%e8%80%8c%e6%98%af%e7%9b%b4%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/881880.xyz\/?p=1737","title":{"rendered":"\u7fa4\u6656\u7cfb\u7edfUPS\u4f7f\u7528\u6280\u5de7\u3002\u4e0d\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\uff0c\u800c\u662f\u76f4\u63a5\u5173\u673a\u3002"},"content":{"rendered":"<p>\u9996\u5148\u7528root\u6743\u9650\uff0c\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\uff0ccat \/var\/log\/messages\uff0c\u53d1\u73b0\u6709\u8fd9\u4e48\u4e00\u6761\u65e5\u5fd7\uff1a<\/p>\n<p>2020-03-06T23:04:31+08:00 bkynas synoups: [UPS] Check Boot Status.<\/p>\n<p>2020-03-06T23:04:31+08:00 bkynas synoups: [UPS] Server is going to Safe Mode. It will stop all services and umount all volumes.<\/p>\n<p>\u8fd9\u662f\u65ad\u7535\u540e\uff0c\u7cfb\u7edf\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\u5173\u95ed\u670d\u52a1\u5378\u8f7d\u5377\u7684\u65e5\u5fd7\u3002<\/p>\n<p>\u90a3\u4e48\u53ef\u4ee5\u786e\u5b9a\u8fd9\u4e2a\u5730\u65b9\u5c31\u662f\u65ad\u7535\u540e\uff0c\u7cfb\u7edf\u6267\u884c\u6267\u884c\u547d\u4ee4\u7684\u5730\u65b9\uff0c\u53ea\u4e0d\u8fc7\u662f\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\u800c\u4e0d\u662f\u5173\u673a\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u65e5\u5fd7\u662f\u7531synoups\u8fd9\u4e2a\u7a0b\u5e8f\u8f93\u51fa\u7684\u3002\u987a\u85e4\u6478\u74dc\uff0c\u627e\u5230synoups\u8fd9\u4e2a\u7a0b\u5e8f\uff0c\u76ee\u5f55\u662f\/usr\/syno\/bin\/synoups\uff0c\u76f4\u63a5cat\u4e00\u4e0b\uff0c\u53d1\u73b0synoups\u4e0d\u662f\u4e8c\u8fdb\u5236\u6267\u884c\u7a0b\u5e8f\uff0c\u800c\u662f\u4e00\u4e2aLinux\u811a\u672c\u3002<\/p>\n<p>\u597d\u7684\uff0c\u6253\u5f00\u5b83vi \/usr\/syno\/bin\/synoups\uff08vi \u53cavim\u77e5\u8bc6\u8fd9\u91cc\u4e0d\u8bb2\u4e86\uff09<\/p>\n<p>\u641c\u7d22\u4e00\u4e0b\u65e5\u5fd7\u5173\u952e\u5b57Server is going to Safe Mode\uff0c\u679c\u7136\u627e\u5230\u4e86<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u53d1\u73b0\uff0c\u7b2c142\u884c\u8f93\u51fa\u4e86\u6211\u4eec\u4e0a\u9762\u67e5\u8be2\u5230\u7684\u65e5\u5fd7\uff0c\u7b2c148-150\u884c\u6267\u884c\u4e86\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\u5f88\u7b80\u5355\uff0c\u5148\u628a\u6587\u4ef6\u5907\u4efd\u4e00\u4efd\uff0c\u7136\u540e\u628a148-150\u884c\u6ce8\u91ca\u6389\uff0c\u76f4\u63a5\u589e\u52a0\u4e00\u884cpoweroff\u5173\u673a\u547d\u4ee4\u3002<\/p>\n<pre class=\"lang:default decode:true \">SYSLOG \"[UPS] Server is going to Safe Mode. It will stop all services and umount all volumes.\"\n\nif [ \"yes\" = \"$RUN_HA\" ]; then\n\n$SZF_HA_RC ups-safemode\nfi\n\n# $SYNOBOOTBIN --set-safe-shutdown \uff08\u5c31\u662f\u8fd9\u91cc\u8fd9\u4e09\u884c\u51b3\u5b9a\u4e86\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\uff0c\u53ef\u4ee5\u91cd\u542fNAS\u3002\u5728\u8fd9\u4e09\u884c\u524d\u9762\u52a0\u4e0a#\u53f7\u4ed6\u4eec\u5c31\u53d8\u6210\u4e0d\u6267\u884c\u4e86\u518d\u52a0\u5165\u547d\u4ee4\uff09\n# we should hook synopoweroff not only reboot\n# \/usr\/syno\/sbin\/synopoweroff -fr\n\npoweroff<\/pre>\n<p>\u4fdd\u5b58\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u8fd9\u65f6\u5019\u65ad\u6389\u5e02\u7535\uff0c30\u79d2\u540e\uff0c\u7fa4\u6656\u81ea\u52a8\u5173\u673a\uff0c\u800c\u4e0d\u662f\u8fdb\u5165\u5b89\u5168\u6a21\u5f0f\u5728\u786c\u76d8\u8fd8\u5728\u8f6c\u7684\u60c5\u51b5\u4e0b\u88abUPS\u76f4\u63a5\u65ad\u7535\u3002<\/p>\n<p>\u5f53\u7136\u8fd9\u4e2a\u65b9\u6848\u8fd8\u6709\u4e00\u4e2a\u5c0f\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u7fa4\u6656\u81ea\u52a8\u5173\u673a\u4e86\uff0cUPS\u8fd8\u662f\u5f00\u7684\u3002\u4e0d\u8fc7\u8fd9\u90fd\u4e0d\u662f\u95ee\u9898\uff0c\u6bd5\u7adf\u6570\u636e\u6700\u73cd\u8d35\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u7528root\u6743\u9650\uff0c\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\uff0ccat \/var &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1737","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1737"}],"version-history":[{"count":2,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1737\/revisions"}],"predecessor-version":[{"id":1740,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1737\/revisions\/1740"}],"wp:attachment":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}