{"id":5615,"date":"2021-08-31T17:43:33","date_gmt":"2021-08-31T09:43:33","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=5615"},"modified":"2021-08-31T17:43:32","modified_gmt":"2021-08-31T09:43:32","slug":"sophon-nfs%e6%97%a0%e6%b3%95%e5%90%af%e5%8a%a8%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=5615","title":{"rendered":"sophon nfs\u65e0\u6cd5\u542f\u52a8\u7684\u95ee\u9898"},"content":{"rendered":"<h4>\u539f\u56e0\u5206\u6790<\/h4>\n<p>sophon nfs\u65e0\u6cd5\u542f\u52a8\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a:<br \/>\n\uff081\uff09nfs\u8fdb\u7a0b\u5df2\u7ecf\u5b8c\u5168\u6d88\u5931\u540e\uff0c\u6587\u4ef6mount\u8fd8\u5728\uff1b<br \/>\n\uff082\uff09rpcbind\u7aef\u53e3\u88ab\u5360\u7528\uff1b<br \/>\n\uff083\uff09nfsd\u7ebf\u7a0b\u672a\u6b63\u5e38\u9000\u51fa\uff0c\u5bfc\u81f4\u79ef\u7d2f\u8fc7\u591a\uff1b<br \/>\n\uff084\uff09\u5bbf\u4e3b\u673a\u4e0a\u5b58\u5728nfs\u670d\u52a1\u3002<\/p>\n<hr \/>\n<h4>\u5904\u7406\u65b9\u6848<\/h4>\n<p>1.sophon2.4\u4e4b\u524d\u7684\u7248\u672c<br \/>\n\u786e\u4fddnfs\u8fdb\u7a0b\u5df2\u7ecf\u5b8c\u5168\u6d88\u5931\u540e\uff0c<code>mount | grep nfs<\/code>\u67e5\u770b\u76f8\u5173\u6302\u8f7d\u70b9\uff0c\u624b\u52a8\u53d6\u6d88\u6302\u8f7d\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8nfs\u3002<\/p>\n<p><\/p>\n<p>2.sophon2.4\u4e4b\u540e\u7684\u7248\u672c<br \/>\nnfs\u4f7f\u7528\u5bb9\u5668\u5316\u90e8\u7f72\uff0c\u89e3\u51b3\u4e86\u5bb9\u5668\u5220\u9664\u91cd\u542f\u540e\uff0c\u6587\u4ef6mount\u8fd8\u5728\u7684\u95ee\u9898\u3002<br \/>\n\u4e00\u822cnfs pod\u542f\u52a8\u5931\u8d25\u539f\u56e0\uff1a<br \/>\n1.\u8282\u70b9\u4e0arpcbind\u6b63\u5728\u8fd0\u884c\uff0c\u5bfc\u81f4\u7aef\u53e3\u51b2\u7a81\uff0c\u5982\u4e0b\u9519\u8bef\uff08\u65b9\u6cd5\uff1a\u5982\u679c\u786e\u8ba4\u6ca1\u6709\u5176\u4ed6\u670d\u52a1\u4f7f\u7528\u5230\u8fd9\u4e2arpcbind,\u53ef\u4ee5\u8282\u70b9\u4e0ayum remove rpcbind\uff09\u663e\u793arpc.statd\u5df2\u7ecf\u8fd0\u884c\u3002<\/p>\n<pre><code class=\"language-shell\">+ log 'starting rpc.statd on port 32765 (outgoing from port 32766)'\n+ echo '----> starting rpc.statd on port 32765 (outgoing from port 32766)'\n----> starting rpc.statd on port 32765 (outgoing from port 32766)\n+ \/sbin\/rpc.statd --no-notify --port 32765 --outgoing-port 32766\nStatd service already running!<\/code><\/pre>\n<p>2.nfsd\u7ebf\u7a0b\u5728pod\u9000\u51fa\u65f6\u6ca1\u6709\u6b63\u5e38\u9000\u51fa\uff08\u5f88\u5c11\u89c1\uff0c\u66f4\u591a\u7684\u65f6\u5019\u662fpod\u4e0d\u662f\u901a\u8fc7delete po\uff0cdelete deployment\u7684\u65b9\u6cd5\u9000\u51fa\u7684\u65f6\u5019\u4f1a\u51fa\u73b0\uff09\uff0c\u53ef\u80fd\u7531\u5355\u673a\u7248nfs\u670d\u52a1\u5347\u7ea7\u5230nfs pod\u65f6\uff0c\u4e5f\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u3002<br \/>\n\u62a5\u9519\u662f \uff1a<\/p>\n<pre><code class=\"language-shell\">+ mount -t nfs -o soft,retrans=1,timeo=14,fg,v3,nolock localhost:\/vdir\/mnt\/disk1\/sophon\/nfs_dir\/sophon4 test_nfs\nmount.nfs: requested NFS version or transport protocol is not supported\nmount: mounting localhost:\/vdir\/mnt\/disk1\/sophon\/nfs_dir\/sophon4 on test_nfs failed: Not supported<\/code><\/pre>\n<p>\u9700\u8981\u6740\u6389\u7ebf\u7a0b\uff0c\u6267\u884c\uff1a<code>kill -9 $(ps -ef | grep [[]nfsd[]]| awk  &#039;{print $2}&#039;)<\/code><\/p>\n<p>3.\u5982\u679csophon-nfs pod\u542f\u52a8\u5f02\u5e38\uff0c\u62a5\u9519\u4e2d\u6709rpc\u548cnfsd mount fail\u7b49\u4fe1\u606f\uff0c\u53ef\u80fd\u662f\u5bbf\u4e3b\u673a\u4e0a\u5b58\u5728nfs\u670d\u52a1\u6240\u81f4\u3002<\/p>\n<p>\u5224\u65ad\u65b9\u5f0f\uff1akubectl get po -owide | grep sophon-nfs\uff0c\u5f97\u5230sophon-nfs\u7684pod\u6240\u5728\u5bbf\u4e3b\u673a\u8282\u70b9\uff0c\u53bb\u8be5\u8282\u70b9\u4e0a\u6267\u884c\uff1asystemctl status nfs, systemctl status rpcbind\uff0c\u5982\u679c\u663e\u793a\u662factive\u6216\u8005\u5f02\u5e38\u7b49\u72b6\u6001\uff0c\u8bf4\u660e\u5bbf\u4e3b\u673a\u4e0a\u786e\u5b9e\u5b58\u5728nfs\/rpcbind\u670d\u52a1\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a\u5982\u679c\u5bbf\u4e3b\u673a\u4e0a\u7684nfs\u670d\u52a1\u88ab\u5176\u5b83\u670d\u52a1\u6240\u4f7f\u7528\uff0c\u90a3\u4e48\u4fee\u6539sophon-nfs\u548csophon-nfs-backup\u89d2\u8272\u7684\u90e8\u7f72\u8282\u70b9\u3002<\/p>\n<p>\u5982\u679c\u5bbf\u4e3b\u673a\u4e0a\u7684nfs\u670d\u52a1\u53ef\u4ee5\u88ab\u6c38\u4e45\u6027\u505c\u670d\uff0c\u53ef\u4ee5\u9009\u62e9\uff1a<br \/>\n\u65b9\u5f0f1: \u4fee\u6539sophon-nfs\u548csophon-nfs-backup\u7684pod\u7684\u90e8\u7f72\u8282\u70b9\u3002<br \/>\n\u65b9\u5f0f2: systemctl stop nfs, systemctl stop rpcbind, centos\u7cfb\u7edf\u4e0a\u5378\u8f7d\u547d\u4ee4\uff0c yum remove nfs-utils rpcbind -y, ubuntu\u4e0a\u5378\u8f7d\u547d\u4ee4\uff1a sudo apt-get remove nfs-server -y\uff0c\u5b8c\u6210\u5bf9\u670d\u52a1\u7684\u5378\u8f7d\u3002<br \/>\n\u6700\u540esystemctl status nfs, systemctl status rpcbind\uff0c\u786e\u8ba4\u63d0\u793a\u662f\u4e24\u4e2a\u670d\u52a1\u90fd\u6ca1\u6709\u5b89\u88c5\uff0c\u8bf4\u660e\u5378\u8f7d\u5b8c\u6210\u3002\u91cd\u542fsophon-nfs pod\u5373\u53ef\u3002<\/p>\n<p>sophon-nfs\u7684\u5bb9\u5668\u5e38\u89c1\u62a5\u9519\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\" src=\"\/.\/wp-content\/uploads\/2021\/03\/image-1616744076532.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u56e0\u5206\u6790 sophon nfs\u65e0\u6cd5\u542f\u52a8\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a: \uff081\uff09nfs\u8fdb\u7a0b\u5df2\u7ecf\u5b8c\u5168\u6d88\u5931\u540e\uff0c\u6587\u4ef6mount\u8fd8\u5728\uff1b \uff08 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=5615\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-5615","post","type-post","status-publish","format-standard","hentry","category-configuration"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5615"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5615\/revisions"}],"predecessor-version":[{"id":5978,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5615\/revisions\/5978"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}