{"id":1556,"date":"2025-07-12T04:49:37","date_gmt":"2025-07-12T04:49:37","guid":{"rendered":"https:\/\/linuxjk.cn\/?p=1556"},"modified":"2025-08-23T08:31:59","modified_gmt":"2025-08-23T08:31:59","slug":"%e7%ac%ac%e4%ba%8c%e4%b8%aa%e6%9c%8d%e5%8a%a1-%e5%ad%98%e5%82%a8","status":"publish","type":"post","link":"https:\/\/linuxjk.cn\/?p=1556","title":{"rendered":"\u7b2c\u4e8c\u4e2a\u670d\u52a1-\u5b58\u50a8"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1556\" class=\"elementor elementor-1556\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4e1ded0 e-flex e-con-boxed e-con e-parent\" data-id=\"4e1ded0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ef63a09 elementor-widget elementor-widget-text-editor\" data-id=\"ef63a09\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><code>1.\u90e8\u7f72\u4e0e\u4f7f\u7528\u89c6\u9891<\/code><\/p><pre><a href=\"https:\/\/www.bilibili.com\/video\/BV1H3uzzDE7T\/\"><strong>\u624b\u673a\u7aef\u53ef\u76f4\u63a5\u64ad\u653e\u4e0b\u65b9\u89c6\u9891\uff0cPC\u7aef\u8bf7\u70b9\u51fb\u64ad\u653e\u6309\u94ae\u6216\u70b9\u6b64\u5904\u67e5\u770b\u539f\u89c6\u9891<\/strong><\/a><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-19d08ff elementor-widget elementor-widget-text-editor\" data-id=\"19d08ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><div class=\"smartideo\">\n                <div class=\"player\">\n                    <a href=\"https:\/\/www.bilibili.com\/video\/BV1H3uzzDE7T\/\" target=\"_blank\" class=\"smartideo-play-link\"><div class=\"smartideo-play-button\"><\/div><\/a>\n                    <p style=\"color: #999;margin-top: 50px;\">\u6682\u65f6\u65e0\u6cd5\u64ad\u653e\uff0c\u53ef\u56de\u6e90\u7f51\u7ad9\u64ad\u653e<\/p>\n                <\/div>\n            <\/div><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a1c8ac1 elementor-widget elementor-widget-text-editor\" data-id=\"a1c8ac1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><code>2.\u7528\u6237\u538b\u7f29\u6848\u4f8b<\/code><\/p><pre><a href=\"https:\/\/www.bilibili.com\/video\/BV1jeuozfExY\/\"><strong>\u624b\u673a\u7aef\u53ef\u76f4\u63a5\u64ad\u653e\u4e0b\u65b9\u89c6\u9891\uff0cPC\u7aef\u8bf7\u70b9\u51fb\u64ad\u653e\u6309\u94ae\u6216\u70b9\u6b64\u5904\u67e5\u770b\u539f\u89c6\u9891<\/strong><\/a><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1c7279a elementor-widget elementor-widget-text-editor\" data-id=\"1c7279a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"smartideo\">\n                <div class=\"player\">\n                    <a href=\"https:\/\/www.bilibili.com\/video\/BV1jeuozfExY\/\" target=\"_blank\" class=\"smartideo-play-link\"><div class=\"smartideo-play-button\"><\/div><\/a>\n                    <p style=\"color: #999;margin-top: 50px;\">\u6682\u65f6\u65e0\u6cd5\u64ad\u653e\uff0c\u53ef\u56de\u6e90\u7f51\u7ad9\u64ad\u653e<\/p>\n                <\/div>\n            <\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-06448aa elementor-widget elementor-widget-text-editor\" data-id=\"06448aa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#31_nfs%E6%A0%B8%E5%BF%83%E6%8E%8C%E6%8F%A1\" >3.1 nfs\u6838\u5fc3\u638c\u63e1<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#1_%E5%86%85%E5%AE%B9\" >1) \u5185\u5bb9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#2_%E7%9B%AE%E6%A0%87\" >2) \u76ee\u6807<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#32_%E6%A6%82%E8%BF%B0\" >3.2 \u6982\u8ff0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#33_%E5%AD%98%E5%82%A8%E9%80%89%E5%9E%8B\" >3.3 \u5b58\u50a8\u9009\u578b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#34_NFS%E5%8E%9F%E7%90%86\" >3.4\u00a0 NFS\u539f\u7406<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#_35_%E9%83%A8%E7%BD%B2%E5%8F%8A%E4%BD%BF%E7%94%A8\" >\u00a03.5 \u90e8\u7f72\u53ca\u4f7f\u7528<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#1%E7%8E%AF%E5%A2%83%E8%AF%B4%E6%98%8E\" >1.\u73af\u5883\u8bf4\u660e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#2%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%83%A8%E7%BD%B2%E4%BD%BF%E7%94%A8\" >2.\u670d\u52a1\u7aef\u90e8\u7f72\u4f7f\u7528<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#1%EF%BC%89%E9%83%A8%E7%BD%B2%EF%BC%88%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%EF%BC%89\" >1\uff09\u90e8\u7f72\uff08\u5b89\u88c5\u8f6f\u4ef6\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#%E5%90%AF%E5%8A%A8%EF%BC%88%E5%85%88%E5%90%AF%E5%8A%A8RPC%EF%BC%89\" >\u542f\u52a8\uff08\u5148\u542f\u52a8RPC\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#2%EF%BC%89NFS%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE\" >2\uff09NFS\u670d\u52a1\u5668\u914d\u7f6e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#3%EF%BC%89%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8C%82%E8%BD%BD\" >3\uff09\u5ba2\u6237\u7aef\u6302\u8f7d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#5_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E4%B8%8E%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%B0%8F%E7%BB%93%EF%BC%88%E6%AD%A5%E9%AA%A4%EF%BC%89\" >5) \u670d\u52a1\u7aef\u4e0e\u5ba2\u6237\u7aef\u5c0f\u7ed3\uff08\u6b65\u9aa4\uff09<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#36_NFS%E7%9B%B8%E5%85%B3%E7%9A%84%E6%96%87%E4%BB%B6\" >3.6 NFS\u76f8\u5173\u7684\u6587\u4ef6<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#%E5%B0%8F%E7%BB%93\" >\u5c0f\u7ed3<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#37_NFS%E6%9C%8D%E5%8A%A1%E7%AB%AF%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" >3.7 NFS\u670d\u52a1\u7aef\u7684\u914d\u7f6e\u6587\u4ef6<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#1_%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F\" >1) \u914d\u7f6e\u6587\u4ef6\u683c\u5f0f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#3_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%A0%B8%E5%BF%83%E9%85%8D%E7%BD%AENFS%E9%BB%98%E8%AE%A4%E5%90%8C%E6%AD%A5\" >3) \u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e(NFS\u9ed8\u8ba4\u540c\u6b65)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#4_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E7%94%A8%E6%88%B7%E5%8E%8B%E7%BC%A9\" >4) \u670d\u52a1\u7aef\u7528\u6237\u538b\u7f29<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#5_%E7%94%A8%E6%88%B7%E5%8E%8B%E7%BC%A9%E6%A1%88%E4%BE%8B\" >5) \u7528\u6237\u538b\u7f29\u6848\u4f8b<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#38_NFS%E4%BC%98%E5%8C%96\" >3.8 NFS\u4f18\u5316<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/linuxjk.cn\/?p=1556\/#39_NFS%E5%B0%8F%E7%BB%93\" >3.9 NFS\u5c0f\u7ed3<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"31_nfs%E6%A0%B8%E5%BF%83%E6%8E%8C%E6%8F%A1\"><\/span><strong>3.1 nfs\u6838\u5fc3\u638c\u63e1<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><h2><span class=\"ez-toc-section\" id=\"1_%E5%86%85%E5%AE%B9\"><\/span><strong>1) \u5185\u5bb9 <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>\u5b58\u50a8\u662f\u4ec0\u4e48,\u7f51\u7ad9\u67b6\u6784\u5730\u4f4d<\/strong><\/p><p><strong>\u4e3a\u4f55\u4f7f\u7528\u5b58\u50a8<\/strong><\/p><p><strong>\u5b58\u50a8\u5206\u7c7b<\/strong><\/p><p><strong>NFS\u5b58\u50a8\u539f\u7406<\/strong><\/p><p><strong>NFS\u90e8\u7f72,\u914d\u7f6e\u4e0e\u4f7f\u7528<\/strong><\/p><p><strong>NFS\u914d\u7f6e\u6848\u4f8b\u4e0e\u8be6\u89e3<\/strong><\/p><p><strong>\u603b\u7ed3<\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"2_%E7%9B%AE%E6%A0%87\"><\/span><strong>2) \u76ee\u6807 <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>\u8bf4\u51fa\u6765\u7f51\u7ad9\u4e3a\u4f55\u662f\u5426\u5b58\u50a8\u670d\u52a1(\u5171\u4eab\u5b58\u50a8)<\/strong><\/p><p><strong>\u8bf4\u51fa\u5e38\u89c1\u5b58\u50a8\u670d\u52a1.<\/strong><\/p><p><strong>\u642d\u5efaNFS\u5b58\u50a8,\u5bf9\u670d\u52a1\u8fdb\u884c\u914d\u7f6e(\u6bd4\u5982\u5171\u4eab\/nfsdata\u76ee\u5f55)<\/strong><\/p><p><strong>\u6545\u969c\u4e0e\u6392\u67e5<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-05b6e62 elementor-widget elementor-widget-text-editor\" data-id=\"05b6e62\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"32_%E6%A6%82%E8%BF%B0\"><\/span><strong>3.2 \u6982\u8ff0 <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>\u5b58\u50a8: \u7528\u4e8e\u5b58\u653e<\/strong><strong>\u7528\u6237\u4e0a\u4f20\u7684\u5185\u5bb9(\u6570\u636e),\u4e00\u822c\u5e94\u7528\u5728\u7f51\u7ad9\u96c6\u7fa4\u4e2d.<\/strong><\/p><p><strong>\u4e3a\u4f55\u7528?<\/strong><\/p><p><strong>\u5982\u679c\u4e0d\u4f7f\u7528\u5b58\u50a8,\u7528\u6237\u4e0a\u4f20\u7684\u6570\u636e\u5c31\u76f4\u63a5\u5b58\u653e\u5728\u7f51\u7ad9\u670d\u52a1\u5668\u4e0a\u4e86,\u7528\u6237\u4e0b\u6b21\u8bbf\u95ee\u5c31\u53ef\u80fd\u627e\u4e0d\u5230.<\/strong><\/p><p><strong>\u5982\u679c\u4f7f\u7528\u5b58\u50a8,\u7528\u6237\u4e0a\u4f20\u7684\u5185\u5bb9\u5b58\u653e\u5728\u5b58\u50a8\u4e0a\u9762,\u7528\u6237\u8bbf\u95ee\u5c31\u4f1a\u8bbf\u95ee\u5b58\u50a8.<\/strong><\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1564\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u4e3a\u4ec0\u4e48\u8981\u6709\u5b58\u50a8.png\" alt=\"\" width=\"1302\" height=\"1222\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u4e3a\u4ec0\u4e48\u8981\u6709\u5b58\u50a8.png 1302w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u4e3a\u4ec0\u4e48\u8981\u6709\u5b58\u50a8-300x282.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u4e3a\u4ec0\u4e48\u8981\u6709\u5b58\u50a8-1024x961.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u4e3a\u4ec0\u4e48\u8981\u6709\u5b58\u50a8-768x721.png 768w\" sizes=\"(max-width: 1302px) 100vw, 1302px\" \/><\/p><p><strong>\u4f4d\u7f6e: \u7f51\u7ad9\u540e\u6392<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3fab75b elementor-widget elementor-widget-text-editor\" data-id=\"3fab75b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"33_%E5%AD%98%E5%82%A8%E9%80%89%E5%9E%8B\"><\/span><strong>3.3 \u5b58\u50a8\u9009\u578b<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>\u600e\u4e48\u5b9e\u73b0\uff1f<\/strong><\/p><p><strong><img decoding=\"async\" class=\"alignnone size-full wp-image-1565\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u5b58\u50a8\u9009\u578b.png\" alt=\"\" width=\"1329\" height=\"519\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5b58\u50a8\u9009\u578b.png 1329w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5b58\u50a8\u9009\u578b-300x117.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5b58\u50a8\u9009\u578b-1024x400.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5b58\u50a8\u9009\u578b-768x300.png 768w\" sizes=\"(max-width: 1329px) 100vw, 1329px\" \/><\/strong><\/p><p><strong>\u7b80\u5355\u4e00\u70b9\u7684\u7f51\u7ad9\u7528NFS<\/strong><\/p><p><strong>\u5bf9\u8c61\u5b58\u50a8\u7684\u672c\u8d28\u5c31\u662f\u7269\u7406\u670d\u52a1\u5668+\u5206\u5e03\u5f0f\u5b58\u50a8\u642d\u5efa\u597d\uff0c\u8d1f\u8d23\u7ef4\u62a4\uff0c\u7ed9\u7528\u6237\u4f7f\u7528<\/strong><\/p><h1><span class=\"ez-toc-section\" id=\"34_NFS%E5%8E%9F%E7%90%86\"><\/span><strong>3.4\u00a0 NFS\u539f\u7406<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>NFS (Network File System): \u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf.<\/strong><\/p><p><strong>NFS\u670d\u52a1\u7aef\uff1a2\u4e2a\u670d\u52a1\u7ec4\u6210<\/strong><\/p><p><strong>NFS\u670d\u52a1\uff1arpcbind(portmap)rpc\u670d\u52a1(\u8fdc\u7a0b\u8c03\u7528\u534f\u8bae)<\/strong><\/p><p><strong><img decoding=\"async\" class=\"alignnone size-full wp-image-1567\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/NFS\u539f\u7406.png\" alt=\"\" width=\"1250\" height=\"1115\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u539f\u7406.png 1250w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u539f\u7406-300x268.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u539f\u7406-1024x913.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u539f\u7406-768x685.png 768w\" sizes=\"(max-width: 1250px) 100vw, 1250px\" \/><\/strong><\/p><p><strong>\u5173\u4e8eRPC\u7684\u8bf4\u660e:<\/strong><\/p><p><strong>RPC:\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528,\u672c\u8d28\u8d77\u5230\u8c03\u5ea6\u4f5c\u7528.<\/strong><\/p><p><strong>rpc\u670d\u52a1\u4eceCentOS 6\u5f00\u59cb\u53ebrpcbind,\u4e4b\u524d\u53ebportmapper.<\/strong><\/p><p><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-283f014 elementor-widget elementor-widget-text-editor\" data-id=\"283f014\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"_35_%E9%83%A8%E7%BD%B2%E5%8F%8A%E4%BD%BF%E7%94%A8\"><\/span><strong>\u00a03.5 \u90e8\u7f72\u53ca\u4f7f\u7528<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><h2><span class=\"ez-toc-section\" id=\"1%E7%8E%AF%E5%A2%83%E8%AF%B4%E6%98%8E\"><\/span><strong>1.\u73af\u5883\u8bf4\u660e<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1568\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/NFS\u73af\u5883.png\" alt=\"\" width=\"1309\" height=\"845\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u73af\u5883.png 1309w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u73af\u5883-300x194.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u73af\u5883-1024x661.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u73af\u5883-768x496.png 768w\" sizes=\"(max-width: 1309px) 100vw, 1309px\" \/><\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"2%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%83%A8%E7%BD%B2%E4%BD%BF%E7%94%A8\"><\/span><strong>2.\u670d\u52a1\u7aef\u90e8\u7f72\u4f7f\u7528<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><h3><span class=\"ez-toc-section\" id=\"1%EF%BC%89%E9%83%A8%E7%BD%B2%EF%BC%88%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%EF%BC%89\"><\/span><strong>1\uff09\u90e8\u7f72\uff08\u5b89\u88c5\u8f6f\u4ef6\uff09<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3><p><strong>#\u68c0\u67e5\u662f\u5426\u5b89\u88c5<\/strong><\/p><p><strong><code>rpm -qa |egrep 'nfs|rpcbind'<\/code><\/strong><\/p><p><strong>#\u5982\u679c\u6ca1\u6709\u5c31\u5b89\u88c5<\/strong><\/p><p><strong><code>yum install -y rpcbind nfs-utils<\/code><\/strong><\/p><h3><span class=\"ez-toc-section\" id=\"%E5%90%AF%E5%8A%A8%EF%BC%88%E5%85%88%E5%90%AF%E5%8A%A8RPC%EF%BC%89\"><\/span><strong>\u542f\u52a8\uff08\u5148\u542f\u52a8RPC\uff09<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3><p><strong>#\u542f\u52a8rpcbind<\/strong><\/p><p><strong><code>systemctl enable rpcbind<\/code><\/strong><\/p><p><strong><code>systemctl start rpcbind<\/code><\/strong><\/p><p><strong><code>rpcinfo -p\u00a0 \u00a0<\/code>\u00a0 \u00a0 \u00a0 \u00a0##\u67e5\u770brpc\u670d\u52a1\u4fe1\u606f\uff0c\u8fd9\u4e2a\u670d\u52a1\u53e6\u4e00\u4e2a\u540d\u5b57\u662fportmapper<\/strong><\/p><p><strong>#\u542f\u52a8nfs<\/strong><\/p><p><strong><code>systemctl enable nfs<\/code><\/strong><\/p><p><strong><code>systemctl start nfs<\/code><\/strong><\/p><p><strong><code>rpcinfo -p<\/code>\u00a0<\/strong><\/p><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1569\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u90e8\u7f72nfs.png\" alt=\"\" width=\"1380\" height=\"1149\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u90e8\u7f72nfs.png 1380w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u90e8\u7f72nfs-300x250.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u90e8\u7f72nfs-1024x853.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u90e8\u7f72nfs-768x639.png 768w\" sizes=\"(max-width: 1380px) 100vw, 1380px\" \/><\/strong><\/p><h3><span class=\"ez-toc-section\" id=\"2%EF%BC%89NFS%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE\"><\/span><strong>2\uff09NFS\u670d\u52a1\u5668\u914d\u7f6e<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3><p><strong>#1.\u521b\u5efa\u5171\u4eab\u76ee\u5f55\/nfsdata\/<\/strong><\/p><p><strong>#2.\u4fee\u6539\/nfsdata\u6240\u6709\u8005\u4e3anobody (centos \u7cfb\u7edf\u4e2d nfsnobody)<\/strong><\/p><p><strong><code>chown \u00a0-R nobody.nobody \u00a0 \/nfsdata\/<\/code><\/strong><\/p><p><strong>#3.\u4fee\u6539nfs\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6\/etc\/exports<\/strong><\/p><p><strong>[root@nfs01 ~]# cat \/etc\/exports<\/strong><\/p><p><strong>#1.\u5171\u4eab\/nfsdata\/\u76ee\u5f55 \u7528\u6237 nobody<\/strong><\/p><p><strong><code>\/nfsdata\/ \u00a0 \u00a0172.16.1.0\/24(rw)<\/code><\/strong><\/p><p><strong>#\u914d\u7f6e\u8868\u793a: 172.16.1.0\/24\u7f51\u6bb5\u5bf9NFS\u670d\u52a1\u7aef\u7684\/data\/\u76ee\u5f55,\u62e5\u6709<\/strong><\/p><p><strong>rw\u8bfb\u5199\u6743\u9650.<\/strong><\/p><p><strong><code>[root@nfs01 ~]# systemctl reload nfs<\/code><\/strong><\/p><p><strong>\u67e5\u770b\u662f\u5426\u914d\u7f6e\u6210\u529fnfs\uff1ashowmount -e\/nfs\u673a\u5668ip\/\u4e3b\u673a\u540d<\/strong><\/p><p><strong>[root@nfs01 ~]# <code>showmount -e<\/code><\/strong><\/p><p><strong>Export list for nfs01:<\/strong><\/p><p><strong>\/nfsdata 172.16.1.0\/24<\/strong><\/p><p><strong><code>[root@nfs01 ~]# showmount -e nfs01<\/code><\/strong><\/p><p><strong>Export list for nfs01:<\/strong><\/p><p><strong>\/nfsdata 172.16.1.0\/24<\/strong><\/p><pre><strong>reload\u8868\u793a\u4f18\u96c5\u91cd\u542f,\u4e0d\u4f1a\u65ad\u5f00\u5df2\u6709\u8fde\u63a5\uff08\u76ee\u524d\u53ea\u6709nfs\u548cnginx\u6709\uff09.\n\nrestart\u5728nfs\u4e2d,\u4f1a\u5bfc\u81f4\u5ba2\u6237\u7aef\u4e00\u6bb5\u65f6\u95f4\u7684\u592f\u4f4f<\/strong><\/pre><p><strong>NFS\u670d\u52a1\u7aef\u672c\u5730\u8fdb\u884c\u6d4b\u8bd5:\u4f7f\u7528(\u6302\u8f7d mount \u6216 \/etc\/fstab )<\/strong><\/p><p><strong>#\u6302\u8f7d\u5b58\u50a8<\/strong><\/p><p><strong><code>mount -t nfs \u00a0172.16.1.31:\/data\/ \u00a0 \/mnt\/<\/code><\/strong><\/p><p><strong>\u6392\u9519\u6307\u4ee4: <code>rpcinfo -p ip \u548cshowmount -e ip<\/code><\/strong><\/p><p><strong>NFS\u670d\u52a1\u7aef\u5c0f\u7ed3<\/strong><\/p><p><strong>\u90e8\u7f72:nfs-utils,rpcbind<\/strong><\/p><p><strong>1.\u00a0 \u51c6\u5907\u73af\u5883:\u76ee\u5f55,\u6743\u9650<\/strong><\/p><p><strong>\u1cbc \u670d\u52a1\u914d\u7f6e\u6587\u4ef6:\/etc\/exports<\/strong><\/p><p><strong>\u00a02.\u542f\u52a8\u670d\u52a1:rpc,nfs(\u540e\u9762\u4fee\u6539\u914d\u7f6e\u6587\u4ef6,\u53ea\u9700\u8981\u91cd\u542fnfs reload)<\/strong><\/p><p><strong>3.\u670d\u52a1\u7aef\u672c\u5730\u6d4b\u8bd5(mount)<\/strong><\/p><p><strong><code>mount -t nfs \u00a0172.16.1.31:\/data\/ \u00a0 \/mnt\/<\/code><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a273d18 elementor-widget elementor-widget-text-editor\" data-id=\"a273d18\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2><span class=\"ez-toc-section\" id=\"3%EF%BC%89%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8C%82%E8%BD%BD\"><\/span><strong>3\uff09\u5ba2\u6237\u7aef\u6302\u8f7d<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>\u5ba2\u6237\u7aef\u64cd\u4f5c\uff1a<\/strong><\/p><p>\u5982\u679c\u5ba2\u6237\u7aef\u6ca1\u6709\u5b89\u88c5NFS\uff0c\u6302\u8f7d\u4f1a\u663e\u793a\uff1a\u9009\u9879\u9519\u8bef\uff0c\u9700\u8981\u5b89\u88c5NFS\u7cfb\u7edf\u624d\u80fd\u6302\u8f7dnfs\u7c7b\u578b\u7684\u6587\u4ef6\u7cfb\u7edf<\/p><p><strong>\u4e34\u65f6\u6302\u8f7d\uff1a\u5b89\u88c5nfs-utils\uff0c\u4e0d\u7528\u542f\u52a8\uff0c\u4f7f\u7528\u6302\u8f7d\u547d\u4ee4mount -t nfs \u00a0172.16.1.31:\/data\/ \u00a0 \/mnt\/\u5373\u53ef\u4f7f\u7528\uff08-t \u6307\u5b9a\u7c7b\u578b\uff09<\/strong><\/p><p><strong>\u5378\u8f7d\uff1a<code>umount \/mnt<\/code><\/strong><\/p><p><strong>\u5f3a\u5236\u5378\u8f7d\uff1a<code>umount -lf\u00a0 \/mnt<\/code><\/strong><\/p><p><strong>\u6c38\u4e45\u6302\u8f7d\uff1a<\/strong><\/p><p><strong><code>\u2460mkdir -p \/upload<\/code><\/strong><\/p><p><strong><code>\u2461vim \/etc\/fstab<\/code><\/strong><\/p><p><strong>\ud83d\udc49\u6dfb\u52a0 <code>172.6.1.31:\/nfsdata\/\u00a0 \u00a0\/upload\/\u00a0 \u00a0nfs\u00a0 \u00a0defaults 0 0<\/code><\/strong><\/p><p><strong>\u6ce8\u610f\uff1a\u6c38\u4e45\u6302\u8f7d\u4e4b\u540e\u5fc5\u987b\u4fdd\u8bc1NFS\u670d\u52a1\u5668\u6bd4\u5ba2\u6237\u7aef\u5148\u542f\u52a8\uff0c\u4fdd\u8bc1\u6b63\u5e38\u6302\u8f7d<\/strong><\/p><p><strong>\u6545\u969c\u6848\u4f8b:<\/strong><\/p><p><strong>mount: wrong fs type \u9519\u8bef\u7684\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b,\u5ba2\u6237\u7aef\u65e0\u6cd5\u8bc6\u522bnfs.<\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"5_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E4%B8%8E%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%B0%8F%E7%BB%93%EF%BC%88%E6%AD%A5%E9%AA%A4%EF%BC%89\"><\/span><strong>5) \u670d\u52a1\u7aef\u4e0e\u5ba2\u6237\u7aef\u5c0f\u7ed3\uff08\u6b65\u9aa4\uff09<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1579\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3.png\" alt=\"\" width=\"1752\" height=\"756\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3.png 1752w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3-300x129.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3-1024x442.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3-768x331.png 768w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u5c0f\u7ed3-1536x663.png 1536w\" sizes=\"(max-width: 1752px) 100vw, 1752px\" \/><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-377d217 elementor-widget elementor-widget-text-editor\" data-id=\"377d217\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"36_NFS%E7%9B%B8%E5%85%B3%E7%9A%84%E6%96%87%E4%BB%B6\"><\/span><b>3.6 NFS<\/b><b>\u76f8\u5173\u7684\u6587\u4ef6<\/b><span class=\"ez-toc-section-end\"><\/span><\/h1><p>\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6\uff1a\/etc\/exports\ud83d\udc49\u76f8\u5f53\u4e8e<span style=\"text-decoration: underline;\">\/var\/lib\/nfs\/etab<\/span>\uff08\u4e0d\u7528\u4fee\u6539\uff09<\/p><p>\u5ba2\u6237\u7aef\u914d\u7f6e\u6587\u4ef6\uff1a<\/p><p>\/etc\/fstab(\u5f00\u673a\u81ea\u52a8\u6302\u8f7d)\u5bf9\u5e94\ud83d\udc49<\/p><p>\/proc\/mounts(\u5f53\u524d\u7cfb\u7edf\u7684\u5b9e\u65f6\u6302\u8f7d\u60c5\u51b5)<\/p><h2><span class=\"ez-toc-section\" id=\"%E5%B0%8F%E7%BB%93\"><\/span>\u5c0f\u7ed3<span class=\"ez-toc-section-end\"><\/span><\/h2><p>\u6838\u5fc3:\u670d\u52a1\u7aef\u914d\u7f6e\/etc\/exports<\/p><p>\u6838\u5fc3:\u5ba2\u6237\u7aef\u6c38\u4e45\u6302\u8f7d\u65b9\u5f0f.<\/p><p>\u6838\u5fc3:\u5ba2\u6237\u7aef\u6302\u8f7d\u4e0e\u4f7f\u7528\u5931\u8d25,df -h\u592f\u4f4f,\u53bb\u770b\u770b,\/proc\/mounts\u67e5\u627e\u662f\u5426\u6709\u5931\u8d25\u6302\u8f7d.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eed0c1f elementor-widget elementor-widget-text-editor\" data-id=\"eed0c1f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"37_NFS%E6%9C%8D%E5%8A%A1%E7%AB%AF%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\"><\/span><strong>3.7 NFS\u670d\u52a1\u7aef\u7684\u914d\u7f6e\u6587\u4ef6<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>\/etc\/exports\u7531\u6765nfs\u7ba1\u7406systemctl\u547d\u4ee4\u7684\u80cc\u540e\u662f\u5728\u8c03\u7528exportfs\u547d\u4ee4<\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"1_%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F\"><\/span><strong>1) \u914d\u7f6e\u6587\u4ef6\u683c\u5f0f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>\/etc\/exports<\/strong><\/p><p><strong>\u7b2c\u4e00\u90e8\u5206\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u7b2c\u4e8c\u90e8\u5206<\/strong><\/p><p><strong>\u5171\u4eab\u76ee\u5f55\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u7f51\u6bb5\uff08nfs\u914d\u7f6e\uff09<\/strong><\/p><p><strong>2) NFS\u914d\u7f6e\u6587\u4ef6\u4e2d\u7f51\u7edc\u914d\u7f6e<\/strong><\/p><p><strong>\u7f51\u6bb5<\/strong><\/p><p><strong>172.16.1.0\/24\uff08\u6700\u5e38\u7528\uff09<\/strong><\/p><p><strong>172.16.1.7\uff08\u6307\u5b9aip\uff09<\/strong><\/p><p><strong>baidu.com\uff08\u6307\u5b9a\u57df\u540d\uff09<\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"3_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%A0%B8%E5%BF%83%E9%85%8D%E7%BD%AENFS%E9%BB%98%E8%AE%A4%E5%90%8C%E6%AD%A5\"><\/span><strong>3) \u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e(NFS\u9ed8\u8ba4\u540c\u6b65)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1585\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/NFS\u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e.png\" alt=\"\" width=\"1342\" height=\"319\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e.png 1342w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e-300x71.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e-1024x243.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u670d\u52a1\u7aef\u6838\u5fc3\u914d\u7f6e-768x183.png 768w\" sizes=\"(max-width: 1342px) 100vw, 1342px\" \/><\/strong><\/p><p><strong>\u7406\u89e3:\u540c\u6b65\u4e0e\u5f02\u6b65\u2b50 \u2b50 \u2b50 \u2b50 \u2b50<\/strong><\/p><p><strong>\u5e7c\u513f\u56ed\u5de5\u4f5c<\/strong><\/p><p><strong>\u540c\u6b65: \u6328\u4e2a\u5c0f\u4f19\u4f34\u95ee,\u4f60\u662f\u5426\u8981\u4e0awc.<\/strong><\/p><p><strong>\u5f02\u6b65: \u753b\u4e86\u4e2a\u5708\u5708,\u9700\u8981\u53bbwc\u7684\u5230\u8fd9\u4e2a\u5708\u5708\u4e2d,\u5b9a\u65f6\u53bb\u5e26\u8d70\u5708\u5708\u91cc\u9762\u7684\u4eba.<\/strong><\/p><p><strong>CPU \ud83d\udc49\u5185\u5b58 \ud83d\udc49 \u78c1\u76d8<\/strong><\/p><p><strong>\u540c\u6b65\u5728\u7f51\u7ad9\u67b6\u6784\u4e2d\u6307\u7684\u662f\u76f4\u63a5\u8bbf\u95ee\u5bf9\u5e94\u7684\u8d44\u6e90.<\/strong><\/p><p><strong>\u5f02\u6b65\u5728\u7f51\u7ad9\u67b6\u6784\u4e2d\u5229\u7528\u5404\u79cd\u7f13\u5b58\u8fbe\u5230\u7528\u6237\u4f18\u5148\u8bbf\u95ee\u7f13\u5b58,\u7f13\u5b58\u6ca1\u6709\u518d\u8bbf\u95ee\u5bf9\u5e94\u670d\u52a1.<\/strong><\/p><p><strong>\u5f02\u6b65\u53ef\u4ee5\u9632\u6b62\u7f51\u7ad9\u5e76\u53d1\u8fc7\u9ad8\u5bfc\u81f4\u7684\u5361\u987f\uff0c\u4f46\u662f\u6570\u636e\u53ef\u80fd\u4e22\u5931<\/strong><\/p><h2><span class=\"ez-toc-section\" id=\"4_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E7%94%A8%E6%88%B7%E5%8E%8B%E7%BC%A9\"><\/span><strong>4) \u670d\u52a1\u7aef\u7528\u6237\u538b\u7f29<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>user mapping \u7528\u6237\u538b\u7f29\u6216\u7528\u6237\u6620\u5c04?<\/strong><\/p><p><strong>\u73b0\u8c61:\u5ba2\u6237\u7aef \u8bbf\u95ee\u7684\u65f6\u5019\u7684\u7528\u6237root,\u5230\u4e86\u670d\u52a1\u7aef\u53d8\u6210\u4e86nfsnobody.<\/strong><\/p><p><strong>NFS\u5ba2\u6237\u7aef\u6302\u8f7dNFS\u670d\u52a1\u7aef\u540e,\u521b\u5efa\u7684\u6587\u4ef6\u9ed8\u8ba4\u5c5e\u4e8enfsnobody,\u8fd9\u79cd\u64cd\u4f5c\u5c31\u53eb\u7528\u6237\u538b\u7f29(\u6620\u5c04).<\/strong><\/p><p><strong>\u7528\u6237\u538b\u7f29\u662f\u901a\u8fc7NFS\u670d\u52a1\u7aef\u7684\u914d\u7f6e\u5b9e\u73b0.<\/strong><\/p><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1586\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u914d\u7f6e\uff08\u7528\u6237\u538b\u7f29\uff09.png\" alt=\"\" width=\"1315\" height=\"301\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u914d\u7f6e\uff08\u7528\u6237\u538b\u7f29\uff09.png 1315w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u914d\u7f6e\uff08\u7528\u6237\u538b\u7f29\uff09-300x69.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u914d\u7f6e\uff08\u7528\u6237\u538b\u7f29\uff09-1024x234.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u670d\u52a1\u7aef\u914d\u7f6e\uff08\u7528\u6237\u538b\u7f29\uff09-768x176.png 768w\" sizes=\"(max-width: 1315px) 100vw, 1315px\" \/><\/strong><\/p><p><strong>\u9ed8\u8ba4\u60c5\u51b5\u53ea\u80fdroot\u7528\u6237\u5bf9\u5171\u4eab\u76ee\u5f55\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\uff0c\u5176\u4ed6\u7528\u6237\u6ca1\u6743\u9650<\/strong><\/p><p><strong>all_squash\uff1a\u6240\u6709\u7528\u6237\u90fd\u6709\u6743\u9650\uff0c\u5728nfs\u4e2d\u88ab\u8bbe\u7f6e\u4e3a\u533f\u540d\u7528\u6237<\/strong><\/p><p><strong>\u7528\u6237\u538b\u7f29\/\u7528\u6237\u6620\u5c04: NFS\u5ba2\u6237\u7aef\u8bbf\u95eeNFS\u5171\u4eab\u76ee\u5f55\u7684\u65f6\u5019\u53d8\u6210\u4e86\u4ec0\u4e48\u7528\u6237.<\/strong><\/p><p><strong>nfs\u5ba2\u6237\u7aef\u7528\u6237\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 nfs\u670d\u52a1\u7aef\u7528\u6237<\/strong><\/p><p><strong>root \ud83d\udc49nfsnoboby<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1587\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001.png\" alt=\"\" width=\"1581\" height=\"1290\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001.png 1581w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001-300x245.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001-1024x836.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001-768x627.png 768w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/NFS\u7528\u6237\u538b\u7f29\u8fc7\u7a0b\u3001-1536x1253.png 1536w\" sizes=\"(max-width: 1581px) 100vw, 1581px\" \/><\/strong><\/p><p><strong>\u60f3\u628a\u9ed8\u8ba4\u7684nfsnobody\u4fee\u6539\uff0c\u9700\u8981\u5728\u6240\u6709\u7684\u5ba2\u6237\u7aef\u670d\u52a1\u7aef\u521b\u5efa\u7edf\u4e00\u7528\u6237\u4e14UID\uff0cGID\u4e00\u81f4\uff0c\u5c31\u53ef\u4ee5\u5728\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6\u4e2d\u52a0\u4e0aanonuid\u548canongid<\/strong><\/p><p><a href=\"https:\/\/www.bilibili.com\/video\/BV1jeuozfExY\/\">centos9\u670d\u52a1\u5668\u90e8\u7f72NFS\u4e4b\u7528\u6237\u538b\u7f29\u6848\u4f8b\uff08\u5c06\u9ed8\u8ba4nobody\u6539\u6210www\uff09_\u54d4\u54e9\u54d4\u54e9_bilibili<\/a><\/p><h2><span class=\"ez-toc-section\" id=\"5_%E7%94%A8%E6%88%B7%E5%8E%8B%E7%BC%A9%E6%A1%88%E4%BE%8B\"><\/span><strong>5) \u7528\u6237\u538b\u7f29\u6848\u4f8b<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2><p><strong>\u7528\u6237\u538b\u7f29\u6848\u4f8b:<\/strong><\/p><p><strong>\u642d\u5efa\u7f51\u7ad9,\u5bf9\u5b58\u50a8\u63d0\u51fa\u4e00\u4e9b\u9700\u6c42<\/strong><\/p><p><strong>nfs\u670d\u52a1\u7aef\u8bbe\u7f6e\/nfs\/pics\u5171\u4eab\u76ee\u5f55,\u533f\u540d\u7528\u6237\u4e3awww(\u90fd\u538b\u7f29\u4e3awww).<\/strong><\/p><p><strong>www\u7528\u6237\u7684uid,gid:1999 (\u670d\u52a1\u7aef,\u5ba2\u6237\u7aef\u7edf\u4e00)<\/strong><\/p><p><strong>\u5ba2\u6237\u7aef\u6302\u8f7d\u5230\/upload-pic\/<\/strong><\/p><p><strong>\u6d41\u7a0b C(Client \u5ba2\u6237\u7aef) S(Server \u670d\u52a1\u7aef)<\/strong><\/p><p><strong>\u2460CS:\u90e8\u7f72nfs\u670d\u52a1,rpcbind \u2705<\/strong><\/p><p><strong>\u2461 CS:\u6dfb\u52a0\u7528\u6237www,\u6307\u5b9auid,gid \u2705<\/strong><\/p><p><strong>\u2462S:\u521b\u5efa\u76ee\u5f55,\u4fee\u6539\u6743\u9650,\u4fee\u6539\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6 \u2705<\/strong><\/p><p><strong>\u2463 C:\u5ba2\u6237\u7aef\u8fdb\u884c\u6302\u8f7d\u6d4b\u8bd5 \u2705<\/strong><\/p><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1588\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u7528\u6237\u538b\u7f29\u6848\u4f8b.png\" alt=\"\" width=\"1015\" height=\"1097\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u7528\u6237\u538b\u7f29\u6848\u4f8b.png 1015w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u7528\u6237\u538b\u7f29\u6848\u4f8b-278x300.png 278w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u7528\u6237\u538b\u7f29\u6848\u4f8b-947x1024.png 947w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u7528\u6237\u538b\u7f29\u6848\u4f8b-768x830.png 768w\" sizes=\"(max-width: 1015px) 100vw, 1015px\" \/><\/strong><\/p><p><strong>#1. \u6240\u6709\u4e3b\u673a(nfs\u670d\u52a1\u7aef\u548cnfs\u5ba2\u6237\u7aef)\u6dfb\u52a0\u7528\u6237 www uid\u7edf\u4e001999 1999<\/strong><\/p><p><strong>#2. nfs\u670d\u52a1\u7aef\u914d\u7f6e<\/strong><\/p><p><strong>#3. nfs\u5ba2\u6237\u7aef\u6302\u8f7d<\/strong><\/p><p><strong>#1. \u6240\u6709\u4e3b\u673a(nfs\u670d\u52a1\u7aef\u548cnfs\u5ba2\u6237\u7aef)\u6dfb\u52a0\u7528\u6237 www uid\u7edf\u4e001999 1999<\/strong><\/p><p><strong>\u521b\u5efa\u7528\u6237\u53ca\u7528\u6237\u7ec4\u4e4b\u524d\u5148id\u547d\u4ee4\u67e5\u8be2\u7528\u6237id\uff0c\u5728grep\/etc\/passwd\u67e5\u770b\u662f\u5426\u6709uidgid\u53f7\u51b2\u7a81<\/strong><\/p><p><strong>#<code>groupadd -g 1999 www<\/code><\/strong><\/p><p><strong>#<code>useradd -u 1999 -g www -s \/sbin\/nologin -M www<\/code><\/strong><\/p><p><strong>\uff08-u\u8bbe\u7f6e\u7528\u6237id\uff0c-s\u00a0 \u8bbe\u7f6e\u9ed8\u8ba4shell \u65e0\u6cd5\u767b\u5f55\uff0c-M\u4e0d\u521b\u5efa\u5bb6\u76ee\u5f55\uff0c-g \u8bbe\u7f6e\u7528\u6237\u5bf9\u5e94\u7684\u57fa\u672c\u7528\u6237\u7ec4\uff09<\/strong><\/p><p><strong>\u867d\u7136\u7701\u7565 <code>-g<\/code>\u00a0\u53c2\u6570\u65f6\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u4e0e\u7528\u6237\u540d\u540c\u540d\u7684\u7ec4\u4f5c\u4e3a\u4e3b\u7ec4\uff0c\u4f46\u6b63\u786e\u4e25\u8c28\u7684\u64cd\u4f5c\u987a\u5e8f\u5982\u4e0a\uff0c\u5148\u521b\u5efa\u4e00\u4e2a\u540d\u4e3awww\u7684\u7528\u6237\u7ec4\uff0cid\u4e3a1999\uff0c\u518d\u5c06\u7528\u6237www\u52a0\u51651999\u7684\u7528\u6237\u7ec4\u4e2d(\u663e\u5f0f\u6307\u5b9a)<\/strong><\/p><p><strong><code>useradd \u00a0-u 1999 \u00a0-s \/sbin\/nologin -M www<\/code>\uff08\u6b64\u79cd\u65b9\u6cd5\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\uff1a\u7ec4gid\u968f\u673a\u5206\u914d\u65f6\uff1a<\/strong><\/p><p><strong>\u5982\u679c\u4e3b\u673aA\u81ea\u52a8\u5206\u914d GID=1999\uff0c\u4e3b\u673aB\u5206\u914d GID=2000\uff0c\u5728 NFS \u5171\u4eab\u76ee\u5f55\u4e2d\uff1a<\/strong><\/p><ul><li><strong>\u4e3b\u673aA\u521b\u5efa\u7684\u6587\u4ef6\u5728\u4e3b\u673aB\u663e\u793a\u4e3a\u672a\u77e5\u7528\u6237<\/strong><\/li><li><strong>\u5bfc\u81f4\u6743\u9650\u9519\u8bef\u6216\u6587\u4ef6\u8bbf\u95ee\u5931\u8d25<\/strong><\/li><\/ul><p><strong>#2. nfs\u670d\u52a1\u7aef\u914d\u7f6e<\/strong><\/p><p><strong><code>cat \/etc\/exports<\/code><\/strong><\/p><p><strong><code>\/nfsdata\/ \u00a0 \u00a0 172.16.1.0\/24 (rw,all_squash)<\/code><\/strong><\/p><p><strong><code>\/nfs\/pics\/ \u00a0172.16.1.0\/24 (rw,all_squash,anonuid =1999,anongid=1999)<\/code><\/strong><\/p><p><strong><code>systemctl reload nfs<\/code>\u91cd\u8f7d\u670d\u52a1\u751f\u6548\u4fee\u6539<\/strong><\/p><p><strong><code>showmount -e<\/code>\u67e5\u770b\u662f\u5426\u914d\u7f6e\u6210\u529f<\/strong><\/p><p><strong>\u274c\u6ce8\u610f\uff0c\u8fd9\u91cc\u4e0d\u53ef\u4ee5\u540c\u65f6\u5171\u4eab\/nfs\/\u548c\/nfs\/pics\/\uff0c\u540e\u9762\u7684\u5b50\u76ee\u5f55\u4f1a\u5931\u6548<\/strong><\/p><p><strong>#3. nfs\u5ba2\u6237\u7aef\u6302\u8f7d<\/strong><\/p><p><strong><code>mount - nfs 172.16.1.31:\/nfs\/pics\/\u00a0 \u00a0\/upload-pic\/<\/code><\/strong><\/p><p><strong><code>du -h \/upload-pic\/<\/code><\/strong><\/p><p><strong><code>touch \/upload-pic\/test.txt<\/code> \u00a0 \u00a0 \u00a0\u6d4b\u8bd5\u6548\u679c\uff0c\u4e4b\u540e\u53bb\u670d\u52a1\u7aef\u770b\u662f\u5426\u521b\u5efa\u6210\u529f<\/strong><\/p><p><strong><code>ll \/upload-pic\/<\/code><\/strong><\/p><p><strong>\u9879\u76ee\u5c0f\u7ed3:<\/strong><\/p><p><strong>\u9879\u76eeweb\u670d\u52a1\u5668\u548cnfs\u670d\u52a1\u5668\u7edf\u4e00\u865a\u62df\u7528\u6237\u4e3awww.\u4e3a\u4e86\u7cfb\u7edf\u5b89\u5168.<\/strong><\/p><p><strong>nfs\u670d\u52a1\u5668\u914d\u7f6e\u6587\u4ef6\u4e2d\u4e3b\u8981\u4fee\u6539\u7684\uff1a<code>all_squash,anonuid,anongid.<\/code><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-74ecca1 elementor-widget elementor-widget-text-editor\" data-id=\"74ecca1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"38_NFS%E4%BC%98%E5%8C%96\"><\/span><strong>3.8 NFS\u4f18\u5316<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>\u7ec8\u6781\u4f18\u5316\u76ee\u6807: \u2b50 \u2b50 \u2b50 \u2b50 \u2b50<\/strong><\/p><p><strong>\u5c3d\u53ef\u80fd\u8ba9\u7528\u6237\u7684\u8bf7\u6c42\u5728\u8bbf\u95ee\u7f51\u7ad9\u67b6\u6784\u4e4b\u524d\u89e3\u51b3\u6389\u3002\uff08\u5c3d\u53ef\u80fd\u628a\u7528\u6237\u7684\u8bf7\u6c42\u5f80\u524d\u63a8\uff09<\/strong><\/p><p><strong>NFS\u4f18\u5316: \u786c\u4ef6(\u7269\u7406\u670d\u52a1\u5668+nfs\u670d\u52a1)<\/strong><\/p><p><strong>NFS\u5b89\u5168\u4f18\u5316: \u5ba2\u6237\u7aef\u6302\u8f7d \u53ea\u80fd\u4e0a\u4f20,\u65e0\u6cd5\u6267\u884c.<\/strong><\/p><p><strong>\u6709\u53ef\u80fd\u7528\u6237\u4e0a\u4f20\u7684\u6570\u636e\u4e2d\u6709\u75c5\u6bd2\u7b49\u4e0d\u5b89\u5168\u56e0\u7d20\uff0c\u5b58\u50a8\u4e2d\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p><p><strong>mount -o \u6307\u5b9a\u6302\u8f7d\u9009\u9879\uff0c\u6709\u8fd9\u4e2a\u6982\u5ff5<\/strong><\/p><p><strong><code>mount \u00a0-o noexec,nosuid,nodev \u00a0-t nfs<\/code><\/strong><\/p><p><strong>\u5728web\u670d\u52a1\u5668\u7684\u7a0b\u5e8f\u4ee3\u7801\u4e2d\u4e5f\u53ef\u4ee5\u62e6\u4f4f\u7c7b\u4f3c\u7684\u5371\u9669\u64cd\u4f5c\uff0c\u5728\u5b58\u50a8\u4e2d\u662f\u6700\u540e\u4e00\u9053\u9632\u7ebf<\/strong><\/p><p><strong>noexec\uff1a\u53d6\u6d88\u6302\u8f7d\u540e\u91cd\u65b0\u6302\u8f7d\u65f6\u52a0\u4e0a\u9009\u9879\uff0c\u7981\u6b62\u6267\u884c\u547d\u4ee4\uff0c<code>mount -t nfs -o noexec 172.16.1.31:\/nfs\/pics\/ \/upload-pic\/<\/code><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1593\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u6d4b\u8bd5.png\" alt=\"\" width=\"855\" height=\"312\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u6d4b\u8bd5.png 855w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u6d4b\u8bd5-300x109.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u6d4b\u8bd5-768x280.png 768w\" sizes=\"(max-width: 855px) 100vw, 855px\" \/><\/strong><\/p><p><strong>172.16.1.31:\/data \u00a0 \/video\/<\/strong><\/p><p><strong>#\u8fd9\u51e0\u4e2a\u662f\u5ba2\u6237\u7aef\u6302\u8f7d\u9009\u9879<\/strong><\/p><p><strong>noexec \u6302\u8f7d\u7684nfs\u76ee\u5f55\u4e2d\u5982\u679c\u6709\u547d\u4ee4\uff0c\u65e0\u6cd5\u8fd0\u884c\u3002<\/strong><\/p><p><strong>nosuid \u5e26\u6709suid\u7684\u547d\u4ee4<\/strong><\/p><p><strong>nodev \u5e26\u6709\u7279\u6b8a\u5c5e\u6027\u7684\u6587\u4ef6\u3002<\/strong><\/p><p><strong>\u6c38\u4e45\u751f\u6548\u5b9e\u73b0\u65b9\u6cd5\uff1a\/etc\/fstab\u4e2d\u7684defaults\u6539\u6210\u8fd9\u4e09\u4e2a\u5982\ud83d\udc47\uff1a<\/strong><\/p><p><strong>#\/etc\/fstab<\/strong><\/p><p><strong><code>172.16.1.31:\/data\/ \u00a0 \/video\/ \u00a0 nfs \u00a0noexec,nosuid,nodev \u00a00 0<\/code><\/strong><\/p><p><strong>NFS\u6709\u5355\u70b9\u6545\u969c\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p><p><strong>\u51c6\u5907\u4e2anfs\u5907\u7528\u8282\u70b9(\u6570\u636e),\u6545\u969c\u7684\u65f6\u5019\u8fdb\u884c\u5207\u6362(\u53d6\u51b3\u4e8enfs\u53ef\u4ee5\u6302\u591a\u4e45).<\/strong><\/p><p><strong>\u6216\u8005\u76f4\u63a5\u7528\u591a\u4e2a\u8282\u70b9\u7684\u670d\u52a1\uff1a<\/strong><\/p><p><strong>\u5206\u5e03\u5f0f\u5b58\u50a8:GlusterFS(GFS)\uff0cMinIO,Ceph&#8230;&#8230;&#8230;&#8230;,FastDFS,Mfs<\/strong><\/p><p><strong>\u516c\u6709\u4e91OSS(\u963f\u91cc\u4e91) (\u5bf9\u8c61\u5b58\u50a8\u5728\u4ee3\u7801\u91cc\u9762\u8c03\u7528)<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f0d6e8 elementor-widget elementor-widget-text-editor\" data-id=\"8f0d6e8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h1><span class=\"ez-toc-section\" id=\"39_NFS%E5%B0%8F%E7%BB%93\"><\/span><strong>3.9 NFS\u5c0f\u7ed3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><p><strong>\u8bf4\u51fa\u6765\u7f51\u7ad9\u4e3a\u4f55\u662f\u5426\u5b58\u50a8\u670d\u52a1(\u5171\u4eab\u5b58\u50a8)<\/strong><\/p><p><strong>\u5b58\u50a8\u9009\u578b<\/strong><\/p><p><strong>\u6838\u5fc3\uff1a\u2460\u642d\u5efaNFS\u5b58\u50a8,\u5bf9\u670d\u52a1\u8fdb\u884c\u914d\u7f6e(\u6bd4\u5982\u5171\u4eab\/nfsdata\u76ee\u5f55)<\/strong><\/p><p><strong>\u2461\u7528\u6237\u6620\u5c04\u9009\u9879:<code>all_squash,anonuid,anongid<\/code><\/strong><\/p><p><strong>\u5e38\u7528\uff1a\u6545\u969c\u4e0e\u6392\u67e5:<code>rpcinfo -p ip ,showmount -e ip<\/code><\/strong><\/p><p><strong>\u89e3\u51b3nfs\u670d\u52a1\u5355\u70b9\u95ee\u9898: \u5b9e\u65f6\u540c\u6b65lsyncd.<\/strong><\/p><p><strong>\u5b8c\u6210\u9879\u76ee:\u5168\u7f51\u5907\u4efd\u9879\u76ee,\u5171\u4eab\u5b58\u50a8,nfs\u5b58\u50a8\u5b9e\u65f6\u540c\u6b65(\u89e3\u51b3\u5355\u70b9)<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-032a28a elementor-widget elementor-widget-text-editor\" data-id=\"032a28a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong><a href=\"https:\/\/www.yuque.com\/lidao996\/errors\/dstrtq4ebuof0see\">\u5b58\u50a8\u670d\u52a1\u5e38\u89c1\u6545\u969c<\/a><\/strong><\/p><p><strong>1.\u670d\u52a1\u5668\u91cd\u542f\u540eNFS\u670d\u52a1\u6ca1\u6709\u6b63\u5e38\u542f\u52a8\uff1a<\/strong><\/p><p><strong>\u89e3\u51b3\u65b9\u6848\uff1a\u6392\u67e5\u914d\u7f6e\u6587\u4ef6\/\u5171\u4eab\u76ee\u5f55\u662f\u5426\u6709\u95ee\u9898<\/strong><\/p><p><strong>\u6ce8\u610f\uff1astatus\u67e5\u770b\u8fd0\u884c\u72b6\u6001excited\u662f\u6b63\u5e38\u60c5\u51b5<\/strong><\/p><p><strong>2.\u8bbf\u95ee\u88ab\u62d2\u7edd\uff08access denied\uff09\uff1a<\/strong><\/p><p><strong>\u539f\u56e0\uff1a\u6302\u8f7d\u7528\u7684ip\u4e0e\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6\u91cc\u6307\u5b9a\u7684\u4e3b\u673aip\u5730\u5740\u4e0d\u7b26\uff0c\u5bfc\u81f4\u65e0\u6cd5\u627e\u5230\u5bf9\u5e94\u7684\u673a\u5668\uff0c\u6216\u8005\u5171\u4eab\u76ee\u5f55\u6743\u9650\u4e0d\u5bf9\uff08\u6240\u5c5e\u4e3bnobody\uff09<\/strong><\/p><p><strong>3.\u4f7f\u7528nfs\u5ba2\u6237\u7aef\u6302\u8f7d\u6216\u67e5\u770bnfs\u6302\u8f7d\u76ee\u5f55\u65f6\u5361\u4f4f\u4e86\uff1a<\/strong><\/p><p><strong>\u6392\u67e5\uff1a\u5148ping ip\uff0c\u7136\u540e\u68c0\u67e5\u9632\u706b\u5899\/selinux\u00a0<\/strong><\/p><p><strong>\u5f53df -h\u5361\u4f4f\u4e86\u5982\u4f55\u5bfb\u627e\u6302\u8f7d\u70b9\uff1a\u5ba2\u6237\u7aef\/proc\/mounts\u91cc\u9762\u8fc7\u6ee4nfs\u5373\u53ef<\/strong><\/p><p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1584\" src=\"https:\/\/linuxjk.cn\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9.png\" alt=\"\" width=\"1604\" height=\"197\" srcset=\"https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9.png 1604w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9-300x37.png 300w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9-1024x126.png 1024w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9-768x94.png 768w, https:\/\/linuxjk.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2025\/07\/\u5bfb\u627e\u6302\u8f7d\u70b9-1536x189.png 1536w\" sizes=\"(max-width: 1604px) 100vw, 1604px\" \/><\/strong><\/p><p><strong>\u670d\u52a1\u7aef\u6ca1\u6709\u65e5\u5fd7\u6587\u4ef6\uff0c\u4f7f\u7528status\u67e5\u770b\u8fd0\u884c\u72b6\u51b5\/\u62a5\u9519\u4fe1\u606f<\/strong><\/p><p><strong>\u5ba2\u6237\u7aef\u6392\u67e5\u95ee\u9898\u4f7f\u7528<code>showmount -e nfs01<\/code> \u68c0\u67e5<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>1.\u90e8\u7f72\u4e0e\u4f7f\u7528\u89c6\u9891 \u624b\u673a\u7aef\u53ef\u76f4\u63a5\u64ad\u653e\u4e0b\u65b9\u89c6\u9891\uff0cPC\u7aef\u8bf7\u70b9\u51fb\u64ad\u653e\u6309\u94ae\u6216\u70b9\u6b64\u5904\u67e5\u770b\u539f\u89c6\u9891 \u6682\u65f6\u65e0\u6cd5\u64ad\u653e\uff0c\u53ef\u56de\u6e90\u7f51\u7ad9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[12],"class_list":["post-1556","post","type-post","status-publish","format-standard","hentry","category-vxhs888p","tag-study-note"],"_links":{"self":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/1556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1556"}],"version-history":[{"count":61,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/1556\/revisions"}],"predecessor-version":[{"id":1711,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/1556\/revisions\/1711"}],"wp:attachment":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}