{"id":53093,"date":"2025-08-12T00:09:59","date_gmt":"2025-08-11T16:09:59","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/53093.html"},"modified":"2025-08-12T00:09:59","modified_gmt":"2025-08-11T16:09:59","slug":"nfs-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8eiscsi-%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/53093.html","title":{"rendered":"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668"},"content":{"rendered":"<h2>NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668<\/h2>\n<h3>NFS \u670d\u52a1\u5668<\/h3>\n<h4>NFS \u670d\u52a1\u4ecb\u7ecd:\u7528\u6765\u5728UNIX&amp;Linux\u7cfb\u7edf\u95f4\u5b9e\u73b0\u78c1\u76d8\u6587\u4ef6\u5171\u4eab\u7684\u4e00\u79cd\u65b9\u6cd5<\/h4>\n<p>NFS&#xff08;Network File System&#xff0c;\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf&#xff09;\u662f\u4e00\u79cd\u8ba9\u4e0d\u540c\u8ba1\u7b97\u673a\u4e4b\u95f4\u901a\u8fc7\u7f51\u7edc\u5171\u4eab\u6587\u4ef6\u7684\u6280\u672f&#xff0c;\u7b80\u5355\u8bf4\u5c31\u662f \u201c\u628a\u4e00\u53f0\u7535\u8111\u7684\u6587\u4ef6\u5939\u2018\u6302\u2019\u5230\u53e6\u4e00\u53f0\u7535\u8111\u4e0a&#xff0c;\u5c31\u50cf\u7528\u81ea\u5df1\u7684\u786c\u76d8\u4e00\u6837\u65b9\u4fbf\u201d\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u8981\u7528 NFS&#xff1f;<\/h4>\n<p>\u60f3\u8c61\u4e00\u4e2a\u529e\u516c\u5ba4\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u670d\u52a1\u5668\u4e0a\u6709\u4e00\u4e2a\u5171\u4eab\u6587\u4ef6\u5939&#xff0c;\u5b58\u7740\u6240\u6709\u4eba\u9700\u8981\u7684\u8d44\u6599&#xff1b;<\/li>\n<li>\u5458\u5de5\u7684\u7535\u8111\u4e0d\u9700\u8981\u5404\u81ea\u590d\u5236\u4e00\u4efd&#xff0c;\u76f4\u63a5\u901a\u8fc7\u7f51\u7edc\u8bbf\u95ee\u670d\u52a1\u5668\u7684\u6587\u4ef6\u5939&#xff0c;\u4fee\u6539\u540e\u5927\u5bb6\u80fd\u5b9e\u65f6\u770b\u5230\u6700\u65b0\u7248\u672c&#xff1b;<\/li>\n<li>\u8282\u7701\u5b58\u50a8\u7a7a\u95f4&#xff0c;\u8fd8\u80fd\u7edf\u4e00\u7ba1\u7406\u6587\u4ef6&#xff08;\u6bd4\u5982\u6743\u9650\u63a7\u5236&#xff0c;\u8c01\u80fd\u770b\u3001\u8c01\u80fd\u6539&#xff09;\u3002<\/li>\n<\/ul>\n<h4>NFS \u7684 \u201c\u5de5\u4f5c\u5957\u8def\u201d<\/h4>\n<p>\u5c31\u50cf\u501f\u4e1c\u897f\u7684\u8fc7\u7a0b&#xff1a;<\/p>\n<li>\u670d\u52a1\u5668 \u201c\u6446\u597d\u4e1c\u897f\u201d&#xff1a;\u5728 NFS \u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u8981\u5171\u4eab\u7684\u6587\u4ef6\u5939&#xff08;\u6bd4\u5982\/data\/share&#xff09;&#xff0c;\u5e76\u8bbe\u7f6e\u89c4\u5219&#xff08;\u54ea\u4e9b\u7535\u8111\u80fd\u8bbf\u95ee\u3001\u6709\u4ec0\u4e48\u6743\u9650&#xff09;\u3002<\/li>\n<li>\u5ba2\u6237\u7aef \u201c\u8bf4\u8981\u501f\u201d&#xff1a;\u5ba2\u6237\u7aef\u7535\u8111\u901a\u8fc7\u547d\u4ee4&#xff0c;\u628a\u670d\u52a1\u5668\u7684\u5171\u4eab\u6587\u4ef6\u5939 \u201c\u6302\u8f7d\u201d \u5230\u81ea\u5df1\u7684\u67d0\u4e2a\u76ee\u5f55\u4e0b&#xff08;\u6bd4\u5982\/mnt\/nfs&#xff09;\u3002<\/li>\n<li>\u76f4\u63a5\u7528\u5c31\u884c&#xff1a;\u4e4b\u540e\u5ba2\u6237\u7aef\u64cd\u4f5c\/mnt\/nfs&#xff0c;\u5c31\u76f8\u5f53\u4e8e\u76f4\u63a5\u64cd\u4f5c\u670d\u52a1\u5668\u4e0a\u7684\/data\/share&#xff0c;\u590d\u5236\u3001\u4fee\u6539\u3001\u5220\u9664\u6587\u4ef6\u90fd\u548c\u672c\u5730\u6587\u4ef6\u5939\u4e00\u6837\u3002<\/li>\n<h4>\u6838\u5fc3\u7279\u70b9<\/h4>\n<ul>\n<li>\u7b80\u5355\u76f4\u63a5&#xff1a;\u57fa\u4e8e Linux\/Unix \u7cfb\u7edf\u539f\u751f\u652f\u6301&#xff0c;\u914d\u7f6e\u76f8\u5bf9\u7b80\u5355&#xff0c;\u9002\u5408\u5c40\u57df\u7f51\u5185\u5feb\u901f\u5171\u4eab\u3002<\/li>\n<li>\u4f9d\u8d56\u7f51\u7edc&#xff1a;\u901f\u5ea6\u53d7\u7f51\u7edc\u5f71\u54cd&#xff0c;\u4e00\u822c\u5728\u5c40\u57df\u7f51\u5185\u7528&#xff08;\u6bd4\u5982\u516c\u53f8\u5185\u90e8\u3001\u673a\u623f\u670d\u52a1\u5668\u4e4b\u95f4&#xff09;&#xff0c;\u4e0d\u9002\u5408\u8de8\u516c\u7f51&#xff08;\u6162\u4e14\u4e0d\u5b89\u5168&#xff09;\u3002<\/li>\n<li>\u6743\u9650\u7cbe\u7ec6&#xff1a;\u53ef\u4ee5\u8bbe\u7f6e \u201c\u53ea\u8bfb\u201d\u201c\u8bfb\u5199\u201d\u201c\u53ea\u80fd\u67d0\u4e2a IP \u8bbf\u95ee\u201d \u7b49\u6743\u9650&#xff0c;\u907f\u514d\u4e71\u6539\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h4>\u5e38\u89c1\u5e94\u7528\u573a\u666f<\/h4>\n<ul>\n<li>\u4e2d\u5c0f\u578b\u4f01\u4e1a\u5185\u90e8\u6587\u4ef6\u5171\u4eab&#xff08;\u6bd4\u5982\u90e8\u95e8\u8d44\u6599\u3001\u9879\u76ee\u6587\u6863&#xff09;&#xff1b;<\/li>\n<li>\u670d\u52a1\u5668\u96c6\u7fa4\u4e4b\u95f4\u5171\u4eab\u6570\u636e&#xff08;\u6bd4\u5982 Web \u670d\u52a1\u5668\u96c6\u7fa4\u5171\u4eab\u9759\u6001\u8d44\u6e90&#xff09;&#xff1b;<\/li>\n<li>\u5d4c\u5165\u5f0f\u8bbe\u5907&#xff08;\u6bd4\u5982\u8def\u7531\u5668\u3001\u667a\u80fd\u5bb6\u5c45&#xff09;\u901a\u8fc7\u7f51\u7edc\u8bbf\u95ee\u5b58\u50a8\u8bbe\u5907\u3002<\/li>\n<\/ul>\n<h4>\u4e3e\u4e2a \u201c\u63a5\u5730\u6c14\u201d \u7684\u4f8b\u5b50<\/h4>\n<p>NFS \u5c31\u50cf\u529e\u516c\u5ba4\u7684 \u201c\u516c\u5171\u6587\u4ef6\u67dc\u201d&#xff1a;<\/p>\n<ul>\n<li>\u670d\u52a1\u5668\u662f\u6587\u4ef6\u67dc\u672c\u8eab&#xff0c;\u7ba1\u7406\u5458&#xff08;NFS \u914d\u7f6e&#xff09;\u89c4\u5b9a \u201c\u54ea\u4e2a\u62bd\u5c49&#xff08;\u6587\u4ef6\u5939&#xff09;\u5bf9\u54ea\u4e9b\u4eba&#xff08;\u5ba2\u6237\u7aef&#xff09;\u5f00\u653e&#xff0c;\u80fd\u770b\u8fd8\u662f\u80fd\u6539\u201d&#xff1b;<\/li>\n<li>\u5458\u5de5&#xff08;\u5ba2\u6237\u7aef&#xff09;\u4e0d\u7528\u628a\u6587\u4ef6\u67dc\u642c\u56de\u5bb6&#xff0c;\u53ea\u8981\u77e5\u9053 \u201c\u6587\u4ef6\u67dc\u5728\u54ea\u201d&#xff08;\u670d\u52a1\u5668 IP&#xff09;&#xff0c;\u5c31\u80fd\u76f4\u63a5\u6253\u5f00\u62bd\u5c49\u7528\u91cc\u9762\u7684\u6587\u4ef6&#xff0c;\u7528\u5b8c\u540e\u6587\u4ef6\u8fd8\u5728\u67dc\u5b50\u91cc&#xff0c;\u5176\u4ed6\u4eba\u4e5f\u80fd\u63a5\u7740\u7528<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811160957-689a15d59d247.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<li>\u89d2\u8272\u4e0e\u6d41\u7a0b\n<ul>\n<li>\u5de6\u4fa7&#xff08;NFS \u5ba2\u6237\u7aef&#xff09;&#xff1a;\u7528\u6237\u8fdb\u7a0b\u8981\u8bbf\u95ee\u6587\u4ef6\u65f6&#xff0c;\u82e5\u4e3a\u7f51\u7edc\u5171\u4eab\u6587\u4ef6&#xff0c;\u5148\u7ecf RPC\u670d\u52a1&#xff08;portmap&#xff09; \u534f\u5546&#xff0c;\u518d\u901a\u8fc7 TCP\/IP\u534f\u8bae\u6808 \u53d1\u8bf7\u6c42&#xff1b;\u82e5\u662f\u672c\u5730\u6587\u4ef6&#xff0c;\u76f4\u63a5\u8d70 \u672c\u5730\u6587\u4ef6\u8bbf\u95ee\u3002<\/li>\n<li>\u53f3\u4fa7&#xff08;NFS \u670d\u52a1\u5668\u7aef&#xff09;&#xff1a;\u6536\u5230\u5ba2\u6237\u7aef\u8bf7\u6c42\u540e&#xff0c;RPC\u670d\u52a1&#xff08;portmap&#xff09; \u8d1f\u8d23\u8c03\u5ea6&#xff0c;NFS\u670d\u52a1 \u5904\u7406\u5177\u4f53\u6587\u4ef6\u903b\u8f91&#xff08;\u8bfb \/ \u5199\u7b49&#xff09;&#xff0c;\u6700\u7ec8\u901a\u8fc7 \u672c\u5730\u6587\u4ef6\u8bbf\u95ee \u64cd\u4f5c\u670d\u52a1\u5668\u5b9e\u9645\u5b58\u50a8\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6838\u5fc3\u4f9d\u8d56\n<ul>\n<li>RPC&#xff08;\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528&#xff09; \u662f \u201c\u6c9f\u901a\u6865\u6881\u201d&#xff0c;\u8ba9\u5ba2\u6237\u7aef\u80fd\u50cf\u8c03\u7528\u672c\u5730\u51fd\u6570\u4e00\u6837&#xff0c;\u8fdc\u7a0b\u64cd\u4f5c\u670d\u52a1\u5668\u6587\u4ef6&#xff1b;<\/li>\n<li>TCP\/IP \u662f\u7f51\u7edc\u4f20\u8f93\u57fa\u7840&#xff0c;\u786e\u4fdd\u8bf7\u6c42 \/ \u54cd\u5e94\u80fd\u8de8\u673a\u5668\u4f20\u9012\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u7b80\u5355\u8bf4&#xff0c;\u8fd9\u5f20\u56fe\u8bb2\u7684\u662f&#xff1a;\u5ba2\u6237\u7aef\u60f3\u8bbf\u95ee\u670d\u52a1\u5668\u7684\u5171\u4eab\u6587\u4ef6\u65f6&#xff0c;\u901a\u8fc7 RPC \u7ea6\u5b9a\u89c4\u5219\u3001TCP\/IP \u4f20\u6570\u636e&#xff0c;\u670d\u52a1\u5668\u518d\u5b9e\u9645\u64cd\u4f5c\u672c\u5730\u5b58\u50a8\u54cd\u5e94 &#xff0c;\u5b9e\u73b0 \u201c\u7f51\u7edc\u4e0a\u5171\u4eab\u6587\u4ef6\u50cf\u7528\u672c\u5730\u6587\u4ef6\u4e00\u6837\u201d \u7684\u6548\u679c\u3002<\/p>\n<h4>\u90e8\u7f72\u670d\u52a1<\/h4>\n<p>NFS\u670d\u52a1\u7531nfs-utils\u8f6f\u4ef6\u5305\u63d0\u4f9b&#xff0c;RHEL8\u9ed8\u8ba4\u5b89\u88c5\u4e86\u8be5\u8f6f\u4ef6\u5305\u3002<\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5\u8f6f\u4ef6\u5305<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">10<\/span>:14:41<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y nfs-utils<\/span><\/p>\n<p><span class=\"token comment\"># \u51c6\u5907\u5171\u4eab\u76ee\u5f55<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">10<\/span>:14:41<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir -p \/shares\/webapp<\/span><br \/>\n<span class=\"token comment\">#\u8bbe\u7f6e\u6743\u9650<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">10<\/span>:15:56<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># chown 48:48 \/shares\/webapp<\/span><\/p>\n<h4>\u914d\u7f6e NFS \u5bfc\u51fa<\/h4>\n<p>NFS \u670d\u52a1\u5668\u5171\u4eab\u76ee\u5f55&#xff08;\u5bfc\u51fa\u76ee\u5f55&#xff09;\u7684\u914d\u7f6e\u89c4\u5219<\/p>\n<h4>1. \u201c\u914d\u7f6e\u6587\u4ef6\u653e\u5728\u54ea&#xff1f;\u201d<\/h4>\n<ul>\n<li>\u4e3b\u8981\u6587\u4ef6\u662f \/etc\/exports&#xff0c;\u76f8\u5f53\u4e8e \u201c\u4e3b\u5f00\u5173\u9762\u677f\u201d&#xff0c;\u76f4\u63a5\u6539\u5b83\u80fd\u63a7\u5236\u5171\u4eab&#xff1b;<\/li>\n<li>\u8fd8\u53ef\u4ee5\u5728 \/etc\/exports.d \u76ee\u5f55\u91cc&#xff0c;\u653e\u4ee5 .exports \u7ed3\u5c3e\u3001\u6587\u4ef6\u540d\u4e0d\u5e26\u70b9\u5f00\u5934\u7684\u6587\u4ef6&#xff08;\u6bd4\u5982 web.exports&#xff09;&#xff0c;\u8fd9\u4e9b\u6587\u4ef6\u4e5f\u4f1a\u751f\u6548&#xff0c;\u76f8\u5f53\u4e8e \u201c\u6269\u5c55\u5f00\u5173\u9762\u677f\u201d\u3002<\/li>\n<\/ul>\n<p>\u2192 \u6548\u679c&#xff1a;\u4e24\u79cd\u65b9\u5f0f\u9009\u4e00\u79cd&#xff08;\u6216\u7ed3\u5408\u7528&#xff09;&#xff0c;\u90fd\u80fd\u8ba9 NFS \u670d\u52a1\u5668\u77e5\u9053 \u201c\u54ea\u4e9b\u76ee\u5f55\u8981\u5171\u4eab\u7ed9\u522b\u4eba\u201d\u3002<\/p>\n<h4>2. \u201c\u600e\u4e48\u5199\u914d\u7f6e\u66f4\u5b89\u5168&#xff1f;\u201d<\/h4>\n<p>\u5b98\u65b9\u5efa\u8bae&#xff1a;\u4f18\u5148\u7528 \/etc\/exports.d \u91cc\u7684\u6587\u4ef6&#xff0c;\u800c\u4e0d\u662f\u76f4\u63a5\u6539 \/etc\/exports\u3002<\/p>\n<p>\u2192 \u4e3a\u5565&#xff1f; \u6bd4\u5982\u4f60\u8981\u7ed9\u591a\u4e2a\u9879\u76ee\u5f00\u5171\u4eab&#xff0c;\u6bcf\u4e2a\u9879\u76ee\u5355\u72ec\u5199\u4e00\u4e2a .exports \u6587\u4ef6&#xff08;\u50cf blog.exports \u7ed9\u535a\u5ba2\u3001game.exports \u7ed9\u6e38\u620f&#xff09;&#xff0c;\u6539\u67d0\u4e2a\u9879\u76ee\u65f6&#xff0c;\u5176\u4ed6\u9879\u76ee\u7684\u914d\u7f6e\u4e0d\u4f1a\u88ab\u610f\u5916\u641e\u574f&#xff08;\u76f8\u5f53\u4e8e \u201c\u4e00\u4e2a\u9879\u76ee\u4e00\u4e2a\u5f00\u5173&#xff0c;\u4e92\u4e0d\u5f71\u54cd\u201d&#xff09;\u3002<\/p>\n<h4>3. \u201c\u914d\u7f6e\u6587\u4ef6\u548b\u5199&#xff1f;\u201d<\/h4>\n<p>\u6bcf\u4e00\u884c\u683c\u5f0f&#xff1a;<\/p>\n<p>\u8981\u5171\u4eab\u7684\u76ee\u5f55  \u5ba2\u6237\u7aef1(\u6743\u96501)  \u5ba2\u6237\u7aef2(\u6743\u96502)&#8230;<\/p>\n<ul>\n<li>\u7b2c\u4e00\u90e8\u5206&#xff1a;\u8981\u5171\u4eab\u7684\u76ee\u5f55 \u2192 \u6bd4\u5982 \/data\/nfs_share&#xff0c;\u5c31\u662f\u4f60\u60f3\u7ed9\u522b\u4eba\u7528\u7684 \u201c\u6587\u4ef6\u5939\u8def\u5f84\u201d&#xff1b;<\/li>\n<li>\u7b2c\u4e8c\u90e8\u5206&#xff1a;\u5ba2\u6237\u7aef&#043;\u6743\u9650 \u2192 \u54ea\u4e9b\u7535\u8111\u80fd\u8bbf\u95ee\u8fd9\u4e2a\u6587\u4ef6\u5939&#xff1f;\u8bbf\u95ee\u65f6\u7ed9\u5565\u6743\u9650&#xff1f;<\/li>\n<\/ul>\n<h4>4. \u201c\u5343\u4e07\u522b\u778e\u641e\u7684\u5751&#xff01;\u201d<\/h4>\n<p>\u2192 \u522b\u628a SMB&#xff08;Windows \u5171\u4eab\u3001\u6bd4\u5982 Samba \u5171\u4eab\u7684\u76ee\u5f55&#xff09;\u518d\u7528 NFS \u5171\u4eab&#xff01; \u6bd4\u5982\u4f60\u7528 Samba \u628a \/data \u7ed9 Windows \u5171\u4eab&#xff0c;\u53c8\u7528 NFS \u5171\u4eab\u540c\u4e00\u4e2a \/data&#xff0c;\u53ef\u80fd\u4f1a\u51fa\u73b0 \u201c\u6587\u4ef6\u4e71\u7801\u3001\u5185\u5bb9\u635f\u574f\u3001\u6570\u636e\u4e0d\u4e00\u81f4\u201d&#xff08;\u76f8\u5f53\u4e8e \u201c\u4e00\u4e2a\u6587\u4ef6\u5939\u540c\u65f6\u88ab\u4e24\u79cd\u5171\u4eab\u65b9\u5f0f\u2018\u62a2\u7740\u7528\u2019&#xff0c;\u4e92\u76f8\u6253\u67b6\u201d&#xff09;\u3002<\/p>\n<h4>\u603b\u7ed3&#xff08;\u4eba\u8bdd\u7248&#xff09;<\/h4>\n<p>\u60f3\u8ba9 NFS \u670d\u52a1\u5668\u628a\u67d0\u4e2a\u6587\u4ef6\u5939\u5171\u4eab\u7ed9\u522b\u4eba&#xff1a;<\/p>\n<li>\u53ef\u4ee5\u76f4\u63a5\u6539 \/etc\/exports&#xff0c;\u6216\u8005\u5728 \/etc\/exports.d \u91cc\u65b0\u5efa .exports \u6587\u4ef6&#xff1b;<\/li>\n<li>\u6bcf\u884c\u5199 \u201c\u8981\u5171\u4eab\u7684\u6587\u4ef6\u5939 &#043; \u5141\u8bb8\u54ea\u4e9b\u7535\u8111\u8bbf\u95ee &#043; \u7ed9\u5565\u6743\u9650\u201d&#xff1b;<\/li>\n<li>\u522b\u548c Samba&#xff08;SMB&#xff09;\u5171\u4eab\u540c\u4e00\u4e2a\u6587\u4ef6\u5939&#xff0c;\u4f1a\u51fa\u95ee\u9898&#xff01;<\/li>\n<p><span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">10<\/span>:33:16<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/exports<\/span><br \/>\n\/shares\/webapp <span class=\"token number\">10.1<\/span>.8.0\/24<span class=\"token punctuation\">(<\/span>rw<span class=\"token punctuation\">)<\/span><\/p>\n<ul>\n<li>shares\/webapp&#xff1a;\u670d\u52a1\u5668\u4e0a\u8981\u5171\u4eab\u7684\u5177\u4f53\u6587\u4ef6\u5939\u8def\u5f84&#xff08;\u201c\u54ea\u4e2a\u62bd\u5c49\u201d&#xff09;&#xff1b;<\/li>\n<li>10.1.8.0\/24&#xff1a;\u5141\u8bb8\u8bbf\u95ee\u7684\u5ba2\u6237\u7aef\u8303\u56f4&#xff08;\u201c\u54ea\u4e9b\u4eba\u80fd\u6765\u201d&#xff0c;\u6574\u4e2a 10.1.8.x \u7f51\u6bb5\u7684\u8bbe\u5907&#xff09;&#xff1b;<\/li>\n<li>(rw)&#xff1a;\u7ed9\u5ba2\u6237\u7aef\u7684\u6743\u9650&#xff08;\u201c\u80fd\u505a\u5565\u201d&#xff0c;rw&#061;read&#043;write&#xff0c;\u65e2\u53ef\u4ee5\u770b\u91cc\u9762\u7684\u6587\u4ef6&#xff0c;\u4e5f\u80fd\u4fee\u6539 \/ \u65b0\u589e \/ \u5220\u9664&#xff09;\u3002<\/li>\n<\/ul>\n<h4>\u5ba2\u6237\u7aef\u6302\u8f7d<\/h4>\n<p><span class=\"token comment\"># \u5b89\u88c5\u8f6f\u4ef6\u5305<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">10<\/span>:31:23<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#yum install -y nfs-utils<\/span><\/p>\n<p><span class=\"token comment\"># \u6302\u8f7d<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">10<\/span>:31:23<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#mkdir \/var\/www\/html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">10<\/span>:31:23<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount server:\/shares\/webapp \/var\/www\/html<\/span><\/p>\n<p><span class=\"token comment\">#\u542f\u52a8<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">10<\/span>:32:48<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable httpd &#8211;now<\/span><\/p>\n<h4>1. \u89d2\u8272\u5bf9\u5e94<\/h4>\n<ul>\n<li>server:\/shares\/webapp&#xff1a;\u8fd9\u662f NFS \u670d\u52a1\u5668\u4e0a\u7684 \u201c\u5171\u4eab\u4ed3\u5e93\u201d&#xff0c;\u91cc\u9762\u5b58\u7740\u7f51\u7ad9\u8981\u7528\u7684\u6587\u4ef6&#xff08;\u6bd4\u5982\u7f51\u9875\u4ee3\u7801\u3001\u56fe\u7247&#xff09;\u3002<\/li>\n<li>\/var\/www\/html&#xff1a;\u5ba2\u6237\u7aef&#xff08;\u6bd4\u5982 Web \u670d\u52a1\u5668&#xff09;\u7684 \u201c\u7f51\u7ad9\u8d27\u67b6\u201d&#xff0c;\u6b63\u5e38\u60c5\u51b5\u4e0b&#xff0c;\u8fd9\u91cc\u653e\u5565\u6587\u4ef6&#xff0c;\u7f51\u7ad9\u5c31\u663e\u793a\u5565\u5185\u5bb9\u3002<\/li>\n<\/ul>\n<h4>2. \u547d\u4ee4\u6548\u679c&#xff1a;\u201c\u5ac1\u63a5\u4ed3\u5e93\u5230\u8d27\u67b6\u201d<\/h4>\n<p>\u6267\u884c mount \u540e&#xff0c;\u5ba2\u6237\u7aef\u7684 \/var\/www\/html \u76ee\u5f55 \u4e0d\u518d\u662f\u672c\u5730\u6587\u4ef6\u5939 &#xff0c;\u800c\u662f\u76f4\u63a5 \u201c\u8fde\u5230\u670d\u52a1\u5668\u7684\u5171\u4eab\u4ed3\u5e93\u201d&#xff1a;<\/p>\n<ul>\n<li>\u5ba2\u6237\u7aef\u5f80 \/var\/www\/html \u91cc\u653e\u6587\u4ef6 \u2192 \u5b9e\u9645\u5b58\u5230\u670d\u52a1\u5668\u7684 \/shares\/webapp&#xff1b;<\/li>\n<li>\u5ba2\u6237\u7aef\u4ece \/var\/www\/html \u8bfb\u6587\u4ef6 \u2192 \u5b9e\u9645\u4ece\u670d\u52a1\u5668\u7684 \/shares\/webapp \u53d6&#xff1b;<\/li>\n<li>\u76f8\u5f53\u4e8e \u201c\u628a\u670d\u52a1\u5668\u7684\u4ed3\u5e93&#xff0c;\u76f4\u63a5\u5f53\u6210\u672c\u5730\u8d27\u67b6\u7528\u201d&#xff0c;\u4e24\u8fb9\u6587\u4ef6\u5b9e\u65f6\u540c\u6b65\u3002<\/li>\n<\/ul>\n<h4>3. \u573a\u666f\u7c7b\u6bd4&#xff08;\u5f00\u7f51\u5e97&#xff09;<\/h4>\n<ul>\n<li>\u4f60\u662f \u201c\u7f51\u5e97\u5e97\u4e3b\u201d&#xff08;\u5ba2\u6237\u7aef Web \u670d\u52a1\u5668&#xff09;&#xff0c;\u539f\u672c\u81ea\u5df1\u4ed3\u5e93&#xff08;\/var\/www\/html&#xff09;\u56e4\u8d27&#xff1b;<\/li>\n<li>\u73b0\u5728\u7528 NFS \u628a \u201c\u603b\u516c\u53f8\u7684\u5171\u4eab\u4ed3\u5e93\u201d&#xff08;server:\/shares\/webapp&#xff09;\u76f4\u63a5\u6302\u5230\u81ea\u5df1\u8d27\u67b6\u4e0a&#xff1b;<\/li>\n<li>\u987e\u5ba2&#xff08;\u7528\u6237\u8bbf\u95ee\u7f51\u7ad9&#xff09;\u770b\u5230\u7684\u5546\u54c1&#xff0c;\u5b9e\u9645\u662f\u603b\u516c\u53f8\u4ed3\u5e93\u91cc\u7684\u8d27&#xff1b;\u4f60\u65b0\u589e \/ \u4fee\u6539\u5546\u54c1&#xff0c;\u4e5f\u76f4\u63a5\u6539\u603b\u516c\u53f8\u4ed3\u5e93\u7684\u5185\u5bb9&#xff0c;\u6240\u6709\u5206\u5e97&#xff08;\u5176\u4ed6\u5ba2\u6237\u7aef&#xff09;\u90fd\u80fd\u540c\u6b65\u770b\u5230\u3002<\/li>\n<\/ul>\n<h4>4. \u6f5c\u5728\u98ce\u9669&#xff08;\u50cf \u201c\u8d27\u67b6\u8fde\u4ed3\u5e93\u201d \u7684\u9690\u60a3&#xff09;<\/h4>\n<ul>\n<li>\u7f51\u7edc\u5361\u4e86&#xff1a;\u5ba2\u6237\u7aef\u8bfb\u6587\u4ef6\u65f6&#xff0c;\u670d\u52a1\u5668\u4ed3\u5e93\u5361\u4e86 \u2192 \u7f51\u7ad9\u52a0\u8f7d\u6162\u751a\u81f3\u62a5\u9519&#xff08;\u8d27\u67b6\u53d6\u4e0d\u5230\u4ed3\u5e93\u7684\u8d27&#xff09;&#xff1b;<\/li>\n<li>\u6743\u9650\u6ca1\u914d\u5bf9&#xff1a;\u670d\u52a1\u5668\u4ed3\u5e93\u6743\u9650\u548c\u5ba2\u6237\u7aef\u8d27\u67b6\u8981\u6c42\u4e0d\u4e00\u81f4 \u2192 \u5b58\u6587\u4ef6\u5931\u8d25&#xff08;\u6bd4\u5982\u4ed3\u5e93\u53ea\u8bfb&#xff0c;\u8d27\u67b6\u8981\u5199\u6743\u9650&#xff09;&#xff1b;<\/li>\n<li>\u9002\u5408\u573a\u666f&#xff1a;\u9002\u5408 \u201c\u591a\u5ba2\u6237\u7aef\u5171\u4eab\u4e00\u5957\u7f51\u7ad9\u6587\u4ef6\u201d&#xff08;\u6bd4\u5982\u8d1f\u8f7d\u5747\u8861\u7684 Web \u96c6\u7fa4&#xff09;&#xff0c;\u4f46\u5bf9\u7f51\u7edc\u7a33\u5b9a\u6027\u8981\u6c42\u9ad8\u3002<\/li>\n<\/ul>\n<p>\u7b80\u5355\u8bf4&#xff0c;\u8fd9\u6761\u547d\u4ee4\u5c31\u662f \u201c\u8ba9\u5ba2\u6237\u7aef\u7684\u7f51\u7ad9\u76ee\u5f55&#xff0c;\u76f4\u63a5\u2018\u5ac1\u63a5\u2019\u5230\u670d\u52a1\u5668\u7684\u5171\u4eab\u6587\u4ef6\u5939&#xff0c;\u5b9e\u73b0\u6587\u4ef6\u5b9e\u65f6\u540c\u6b65\u201d &#xff0c;\u65b9\u4fbf\u591a\u673a\u5668\u5171\u4eab\u540c\u4e00\u5957\u7f51\u7ad9\u8d44\u6e90<\/p>\n<p>\u6301\u4e45\u5316\u6302\u8f7d<\/p>\n<p>\u4fee\u6539 \/etc\/fstab&#xff0c;\u6700\u540e\u6dfb\u52a0\u5982\u4e0b\u8bb0\u5f55&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">10<\/span>:49:00<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/fstab<\/span><br \/>\nserver:\/shares\/webapp   \/var\/www\/html  nfs defaults        <span class=\"token number\">0<\/span> <span class=\"token number\">0<\/span><\/p>\n<h4>\u6587\u4ef6\u64cd\u4f5c\u9a8c\u8bc1<\/h4>\n<ul>\n<li>\u5199\u5165\u6587\u4ef6\u6d4b\u8bd5&#xff1a;\u5728\u5ba2\u6237\u7aef\u8fdb\u5165 \/var\/www\/html \u76ee\u5f55&#xff0c;\u521b\u5efa\u4e00\u4e2a\u6d4b\u8bd5\u6587\u4ef6&#xff0c;\u6bd4\u5982\u4f7f\u7528 touch test.txt \u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u7a7a\u6587\u4ef6\u3002\u7136\u540e\u5728 NFS \u670d\u52a1\u5668\u7684 \/shares\/webapp \u76ee\u5f55\u4e0b\u67e5\u770b\u662f\u5426\u5b58\u5728\u8fd9\u4e2a test.txt \u6587\u4ef6 \u3002\u5982\u679c\u5b58\u5728&#xff0c;\u8bf4\u660e\u5ba2\u6237\u7aef\u5bf9\u6302\u8f7d\u76ee\u5f55\u7684\u5199\u5165\u64cd\u4f5c\u662f\u6b63\u5e38\u7684\u3002<\/li>\n<li>\u8bfb\u53d6\u6587\u4ef6\u6d4b\u8bd5&#xff1a;\u5728 NFS \u670d\u52a1\u5668\u7684 \/shares\/webapp \u76ee\u5f55\u4e0b\u653e\u5165\u4e00\u4e2a\u5df2\u77e5\u5185\u5bb9\u7684\u6587\u4ef6&#xff0c;\u6bd4\u5982 sample.txt \u3002\u7136\u540e\u5728\u5ba2\u6237\u7aef\u8fdb\u5165 \/var\/www\/html \u76ee\u5f55&#xff0c;\u4f7f\u7528 cat sample.txt \u547d\u4ee4\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9 &#xff0c;\u5982\u679c\u80fd\u6b63\u786e\u663e\u793a\u6587\u4ef6\u5185\u5bb9&#xff0c;\u8bf4\u660e\u8bfb\u53d6\u64cd\u4f5c\u6b63\u5e38\u3002<\/li>\n<\/ul>\n<h3>iSCSI \u670d\u52a1\u5668<\/h3>\n<h4>iSCSI \u670d\u52a1\u4ecb\u7ecd<\/h4>\n<p>SCSI&#xff08;Small Computer System Interface&#xff0c;\u5c0f\u578b\u8ba1\u7b97\u673a\u7cfb\u7edf\u63a5\u53e3&#xff09;&#xff0c;\u4e00\u79cd\u7528\u4e8e\u8ba1\u7b97\u673a\u548c\u667a\u80fd\u8bbe\u5907\u4e4b\u95f4&#xff08;\u786c\u76d8\u3001\u8f6f\u9a71\u3001\u5149\u9a71\u3001\u6253\u5370\u673a\u3001\u626b\u63cf\u4eea\u7b49&#xff09;\u8fde\u63a5\u6807\u51c6<\/p>\n<p>iSCSI&#xff08;Internet Small Computer System Interface&#xff0c;Internet \u5c0f\u578b\u8ba1\u7b97\u673a\u7cfb\u7edf\u63a5\u53e3)&#xff0c;\u53c8\u79f0\u4e3aIP-SAN&#xff0c;\u662fIBM\u516c\u53f8\u7814\u7a76\u5f00\u53d1\u7684IP SAN\u6280\u672f&#xff0c;\u8be5\u6280\u672f\u662f\u5c06\u73b0\u6709SCSI\u63a5\u53e3\u4e0e\u4ee5\u592a\u7f51\u7edc(Ethernet)\u6280\u672f\u7ed3\u5408&#xff0c;\u57fa\u4e8eTCP\/IP\u7684\u534f\u8bae\u8fde\u63a5iSCSI\u670d\u52a1\u7aef&#xff08;Target&#xff09;\u548c\u5ba2\u6237\u7aef(Initiator)&#xff0c;\u4f7f\u5f97\u5c01\u88c5\u540e\u7684SCSI\u6570\u636e\u5305\u53ef\u4ee5\u5728\u4e92\u8054\u7f51\u4f20\u8f93&#xff0c;\u6700\u7ec8\u5b9e\u73b0iSCSI\u670d\u52a1\u7aef\u63d0\u4f9b\u5b58\u50a8\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n<h4>iSCSI \u67b6\u6784<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811160958-689a15d60969e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>iSCSI&#xff08;\u4e92\u8054\u7f51\u5c0f\u578b\u8ba1\u7b97\u673a\u7cfb\u7edf\u63a5\u53e3&#xff09;\u67b6\u6784\u57fa\u4e8e TCP\/IP \u7f51\u7edc&#xff0c;\u5b9e\u73b0\u5757\u7ea7\u5b58\u50a8\u6570\u636e\u4f20\u8f93&#xff0c;\u4e3b\u8981\u5305\u542b\u4ee5\u4e0b\u6838\u5fc3\u7ec4\u4ef6\u53ca\u5173\u7cfb&#xff1a;<\/p>\n<h4>1. \u6838\u5fc3\u7ec4\u4ef6<\/h4>\n<ul>\n<li>iSCSI \u76ee\u6807\u7aef&#xff08;Target&#xff09;&#xff1a;\u5b58\u50a8\u8bbe\u5907\u7aef&#xff0c;\u63d0\u4f9b\u53ef\u5171\u4eab\u7684\u5757\u5b58\u50a8\u8d44\u6e90&#xff08;\u5982\u786c\u76d8\u3001LUN&#xff09;&#xff0c;\u8d1f\u8d23\u63a5\u6536\u548c\u5904\u7406 initiator \u7684\u8bf7\u6c42\u3002<\/li>\n<li>iSCSI \u53d1\u8d77\u7aef&#xff08;Initiator&#xff09;&#xff1a;\u5ba2\u6237\u7aef&#xff08;\u5982\u670d\u52a1\u5668&#xff09;&#xff0c;\u901a\u8fc7\u8f6f\u4ef6\u6216\u786c\u4ef6\u65b9\u5f0f\u53d1\u8d77\u5bf9 Target \u7684\u8fde\u63a5&#xff0c;\u5c06\u8fdc\u7a0b\u5b58\u50a8\u89c6\u4e3a\u672c\u5730\u78c1\u76d8\u4f7f\u7528\u3002<\/li>\n<li>\u5b58\u50a8\u7f51\u7edc&#xff1a;\u57fa\u4e8e TCP\/IP \u7684\u7f51\u7edc&#xff08;\u4ee5\u592a\u7f51\u4e3a\u4e3b&#xff09;&#xff0c;\u7528\u4e8e\u8fde\u63a5 Initiator \u548c Target&#xff0c;\u4f20\u8f93 iSCSI \u534f\u8bae\u6570\u636e\u3002<\/li>\n<li>LUN&#xff08;\u903b\u8f91\u5355\u5143\u53f7&#xff09;&#xff1a;Target \u63d0\u4f9b\u7684\u903b\u8f91\u5b58\u50a8\u5355\u5143&#xff0c;\u662f Initiator \u5b9e\u9645\u8bbf\u95ee\u7684 \u201c\u865a\u62df\u78c1\u76d8\u201d\u3002<\/li>\n<\/ul>\n<h4>2. \u57fa\u672c\u6d41\u7a0b<\/h4>\n<li>Initiator \u901a\u8fc7 IP \u5730\u5740\u53d1\u73b0 Target&#xff1b;<\/li>\n<li>\u53cc\u65b9\u5efa\u7acb TCP \u8fde\u63a5&#xff08;\u9ed8\u8ba4\u7aef\u53e3 3260&#xff09;&#xff0c;\u8fdb\u884c\u8eab\u4efd\u8ba4\u8bc1&#xff08;\u5982 CHAP&#xff09;&#xff1b;<\/li>\n<li>Initiator \u6302\u8f7d Target \u63d0\u4f9b\u7684 LUN&#xff0c;\u5c06\u5176\u4f5c\u4e3a\u672c\u5730\u78c1\u76d8\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c&#xff1b;<\/li>\n<li>\u6570\u636e\u901a\u8fc7 iSCSI \u534f\u8bae\u5728 TCP\/IP \u7f51\u7edc\u4e2d\u4f20\u8f93&#xff0c;\u5b9e\u73b0\u5757\u7ea7\u6570\u636e\u4ea4\u4e92\u3002<\/li>\n<h4>3. \u7279\u70b9<\/h4>\n<ul>\n<li>\u57fa\u4e8e\u73b0\u6709\u4ee5\u592a\u7f51&#xff0c;\u90e8\u7f72\u6210\u672c\u4f4e&#xff0c;\u517c\u5bb9\u6027\u5f3a&#xff1b;<\/li>\n<li>\u652f\u6301\u8fdc\u8ddd\u79bb\u4f20\u8f93&#xff0c;\u9002\u5408\u8de8\u673a\u623f\u5b58\u50a8\u5171\u4eab&#xff1b;<\/li>\n<li>\u5757\u7ea7\u8bbf\u95ee&#xff0c;\u6027\u80fd\u63a5\u8fd1\u672c\u5730\u5b58\u50a8&#xff0c;\u9002\u7528\u4e8e\u6570\u636e\u5e93\u3001\u865a\u62df\u5316\u7b49\u573a\u666f<\/li>\n<\/ul>\n<p>SCSI \u67b6\u6784\u5c31\u50cf \u201c\u7f51\u7edc\u7248\u7684\u786c\u76d8\u5feb\u9012\u7cfb\u7edf\u201d&#xff0c;\u6bcf\u4e2a\u7ec4\u4ef6\u90fd\u50cf\u5feb\u9012\u94fe\u4e0a\u7684\u89d2\u8272&#xff0c;\u54b1\u4eec\u4e00\u6b65\u6b65\u62c6\u89e3&#xff1a;<\/p>\n<h4>1. iSCSI \u76ee\u6807\u7aef&#xff08;Target&#xff09;\u2014\u2014 \u5b58\u50a8\u4ed3\u5e93<\/h4>\n<p>\u5b83\u662f \u201c\u653e\u786c\u76d8\u7684\u4ed3\u5e93\u201d&#xff0c;\u91cc\u9762\u6709\u5f88\u591a \u201c\u865a\u62df\u8d27\u67b6\u201d&#xff08;LUN&#xff0c;\u903b\u8f91\u5355\u5143\u53f7&#xff09;&#xff0c;\u6bcf\u4e2a\u8d27\u67b6\u90fd\u50cf\u4e00\u5757\u72ec\u7acb\u7684\u786c\u76d8\u3002\u4ed3\u5e93\u95e8\u53e3\u6709\u4e2a \u201c\u63a5\u5f85\u5904\u201d&#xff08;TPG&#xff0c;\u76ee\u6807\u7aef\u53e3\u7ec4&#xff09;&#xff0c;\u6302\u7740\u552f\u4e00\u7684 \u201c\u4ed3\u5e93\u7f16\u53f7\u201d&#xff08;IQN&#xff0c;\u6bd4\u5982iqn.2025-08.\u516c\u53f8\u540d:\u4ed3\u5e93\u540d&#xff09;&#xff0c;\u8fd8\u6807\u7740 \u201c\u6536\u8d27\u5730\u5740\u201d&#xff08;\u670d\u52a1\u5668 IP &#043; \u7aef\u53e3 3260&#xff09;\u3002<\/p>\n<p>\u6bd4\u5982&#xff1a;\u4f60\u5efa\u4e86\u4e00\u4e2a\u53ebdisk1\u7684\u4ed3\u5e93&#xff0c;\u91cc\u9762\u6709 2 \u4e2a\u8d27\u67b6&#xff08;LUN 0 \u548c LUN 1&#xff09;&#xff0c;\u5730\u5740\u662f10.1.8.10:3260&#xff0c;\u7f16\u53f7\u662fiqn.2025-08.cloud.yy:disk1\u3002<\/p>\n<h4>2. iSCSI \u53d1\u8d77\u7aef&#xff08;Initiator&#xff09;\u2014\u2014 \u6536\u4ef6\u5ba2\u6237<\/h4>\n<p>\u5b83\u662f \u201c\u8981\u79df\u786c\u76d8\u7684\u7535\u8111\u201d&#xff0c;\u76f8\u5f53\u4e8e\u5ba2\u6237\u3002\u5ba2\u6237\u624b\u91cc\u6709\u81ea\u5df1\u7684 \u201c\u8eab\u4efd\u8bc1\u201d&#xff08;\u5ba2\u6237\u7aef IQN&#xff09;&#xff0c;\u6bd4\u5982iqn.2025-08.cloud.yy:client\u3002\u5ba2\u6237\u4f1a\u62ff\u7740\u8eab\u4efd\u8bc1&#xff0c;\u6839\u636e \u201c\u4ed3\u5e93\u5730\u5740\u201d \u548c \u201c\u7f16\u53f7\u201d \u627e\u5230\u4ed3\u5e93&#xff0c;\u7533\u8bf7\u79df\u7528\u8d27\u67b6\u3002<\/p>\n<h4>3. \u5b58\u50a8\u7f51\u7edc \u2014\u2014 \u5feb\u9012\u8def\u7ebf<\/h4>\n<p>\u5c31\u662f\u666e\u901a\u7684\u4ee5\u592a\u7f51&#xff08;\u7f51\u7ebf\u3001\u4ea4\u6362\u673a\u8fd9\u4e9b&#xff09;&#xff0c;\u76f8\u5f53\u4e8e \u201c\u4ed3\u5e93\u5230\u5ba2\u6237\u5bb6\u7684\u8def\u201d\u3002\u5ba2\u6237\u548c\u4ed3\u5e93\u4e4b\u95f4\u7684\u6240\u6709\u6570\u636e&#xff08;\u6bd4\u5982 \u201c\u6211\u8981\u5b58\u4e2a\u6587\u4ef6\u201d\u201c\u7ed9\u6211\u4f20 100M \u6570\u636e\u201d&#xff09;\u90fd\u901a\u8fc7\u8fd9\u6761\u8def\u8d70&#xff0c;\u7528 TCP\/IP \u5305\u88c5\u6210 \u201c\u5feb\u9012\u5305\u88f9\u201d&#xff08;iSCSI \u534f\u8bae\u6570\u636e&#xff09;\u3002<\/p>\n<h4>4. \u6574\u4e2a\u6d41\u7a0b\u5c31\u50cf \u201c\u79df\u786c\u76d8\u5feb\u9012\u201d<\/h4>\n<li>\u627e\u4ed3\u5e93&#xff1a;\u5ba2\u6237&#xff08;Initiator&#xff09;\u7528 \u201c\u5730\u5740 10.1.8.10\u201d \u626b\u63cf&#xff0c;\u53d1\u73b0 \u201c\u7f16\u53f7\u4e3a iqn.2025-08.cloud.yy:disk1 \u7684\u4ed3\u5e93\u201d&#xff08;Target&#xff09;\u3002<\/li>\n<li>\u9a8c\u8eab\u4efd&#xff1a;\u4ed3\u5e93\u95e8\u536b&#xff08;ACL \u8bbf\u95ee\u63a7\u5236&#xff09;\u6838\u5bf9\u5ba2\u6237\u8eab\u4efd\u8bc1&#xff0c;\u5728\u767d\u540d\u5355\u91cc\u5c31\u653e\u884c\u3002<\/li>\n<li>\u79df\u8d27\u67b6&#xff1a;\u5ba2\u6237\u79df\u4e0b\u4ed3\u5e93\u91cc\u7684 1 \u53f7\u8d27\u67b6&#xff08;LUN 0&#xff09;&#xff0c;\u4ed3\u5e93\u628a\u8d27\u67b6 \u201c\u5feb\u9012\u201d \u7ed9\u5ba2\u6237 \u2014\u2014 \u5ba2\u6237\u7535\u8111\u4e0a\u7a81\u7136\u591a\u51fa\u4e00\u5757 \u201c\u672c\u5730\u786c\u76d8\u201d&#xff08;\u5176\u5b9e\u662f\u8fdc\u7a0b LUN&#xff09;\u3002<\/li>\n<li>\u7528\u786c\u76d8&#xff1a;\u5ba2\u6237\u5f80\u8fd9\u5757 \u201c\u786c\u76d8\u201d \u5b58\u6587\u4ef6&#xff0c;\u6570\u636e\u901a\u8fc7\u7f51\u7edc \u201c\u5feb\u9012\u201d \u5230\u4ed3\u5e93\u7684 1 \u53f7\u8d27\u67b6&#xff1b;\u8bfb\u6587\u4ef6\u65f6&#xff0c;\u4ed3\u5e93\u518d\u628a\u6570\u636e \u201c\u5feb\u9012\u201d \u56de\u6765&#xff0c;\u901f\u5ea6\u5feb\u5f97\u50cf\u786c\u76d8\u5c31\u5728\u81ea\u5df1\u7535\u8111\u91cc\u3002<\/li>\n<h4>\u5173\u952e\u7279\u70b9&#xff1a;<\/h4>\n<ul>\n<li>\u4e0d\u7528\u4e13\u95e8\u94fa \u201c\u9ad8\u901f\u8def\u201d&#xff08;\u6bd4\u5982\u5149\u7ea4 SAN&#xff09;&#xff0c;\u666e\u901a\u7f51\u7ebf\u5c31\u80fd\u8dd1&#xff0c;\u6210\u672c\u4f4e&#xff1b;<\/li>\n<li>\u5ba2\u6237\u7528\u8fdc\u7a0b\u786c\u76d8\u5c31\u50cf\u7528\u81ea\u5df1\u7684&#xff0c;\u5b58\u4e1c\u897f\u3001\u5206\u533a\u3001\u683c\u5f0f\u5316\u90fd\u4e00\u6837&#xff1b;<\/li>\n<li>\u9002\u5408 \u201c\u591a\u5ba2\u6237\u5171\u7528\u4e00\u4e2a\u5927\u4ed3\u5e93\u201d&#xff08;\u6bd4\u5982\u516c\u53f8\u91cc 10 \u53f0\u670d\u52a1\u5668\u5171\u4eab\u5b58\u50a8&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u7b80\u5355\u8bf4&#xff0c;iSCSI \u5c31\u662f \u201c\u628a\u8fdc\u7a0b\u786c\u76d8\u901a\u8fc7\u7f51\u7edc\u2018\u5feb\u9012\u2019\u5230\u4f60\u7535\u8111\u4e0a&#xff0c;\u7528\u8d77\u6765\u8ddf\u672c\u5730\u76d8\u6ca1\u5dee\u201d \u7684\u795e\u5947\u67b6\u6784<\/p>\n<h3>\u914d\u7f6e iSCSI Targets<\/h3>\n<p>\u914d\u7f6e iSCSI Targets\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6&#xff1a;<\/p>\n<ul>\n<li>targetd&#xff0c;\u670d\u52a1\u7aef\u8f6f\u4ef6\u3002<\/li>\n<li>targetcli&#xff0c;\u7528\u4e8e\u914d\u7f6etargetd\u670d\u52a1\u3002<\/li>\n<\/ul>\n<h4>1. \u914d\u7f6e Target IQN\u2014\u2014 \u7ed9\u786c\u76d8\u505a \u201c\u4e13\u5c5e\u540d\u724c\u201d\u3002<\/h4>\n<p>\u4f60\u8981\u51fa\u79df\u4e00\u5757\u53ebdisk1\u7684\u786c\u76d8&#xff0c;\u5f97\u5148\u7ed9\u5b83\u505a\u4e2a\u5168\u7f51\u552f\u4e00\u7684\u540d\u724c&#xff08;IQN&#xff1a;iqn.2025-8.cloud.yy.server:disk1&#xff09;\u3002 \u8fd9\u540d\u724c\u683c\u5f0f\u5f88\u8bb2\u7a76&#xff1a;\u5e74\u4efd-\u6708\u4efd.\u5e97\u540d\u53cd\u5199:\u786c\u76d8\u540d&#xff0c;\u76f8\u5f53\u4e8e \u201c2025 \u5e74 8 \u6708&#xff0c;cloud.yy.server \u5e97\u7684 disk1 \u786c\u76d8\u201d&#xff0c;\u5168\u4e16\u754c\u72ec\u4e00\u4efd&#xff0c;\u522b\u4eba\u627e\u5b83\u7684\u65f6\u5019\u4e00\u62a5\u540d\u5b57\u5c31\u77e5\u9053\u662f\u54ea\u5757\u3002 \u540c\u65f6\u5e97\u91cc\u81ea\u52a8\u5efa\u4e86\u4e2a \u201c\u63a5\u5f85\u7a97\u53e3\u201d&#xff08;TPG 1&#xff09;&#xff0c;\u9ed8\u8ba4\u6240\u6709\u95e8\u90fd\u80fd\u8fdb&#xff08;0.0.0.0:3260&#xff09;&#xff0c;\u7b49\u7740\u79df\u5ba2\u6765\u5bf9\u63a5\u3002<\/p>\n<p>\u914d\u7f6e backstore \u5bf9\u8c61<\/p>\n<p>\u8981\u4f7f\u7528targetcli\u521b\u5efa\u540e\u5907\u5b58\u50a8&#xff0c;\u8bf7\u4f7f\u7528\u5176create\u547d\u4ee4\u3002 \u8be5\u547d\u4ee4\u7684\u884c\u4e3a\u53d6\u51b3\u4e8e\u60a8\u5728\u914d\u7f6e\u6811\u4e2d\u7684\u5f53\u524d\u4f4d\u7f6e\u3002<\/p>\n<h4>2. \u914d\u7f6e LUN\u2014\u2014 \u628a\u786c\u76d8\u653e\u8fdb \u201c\u5c55\u793a\u67dc\u201d<\/h4>\n<p>\u4f60\u6709\u4e2a\u5b9e<\/p>\n<p>\u9645\u7684\u786c\u76d8&#xff08;\/backstores\/block\/myblock1&#xff0c;\u53ef\u80fd\u662f\u5757\u7269\u7406\u76d8\u6216\u5206\u533a&#xff09;&#xff0c;\u73b0\u5728\u8981\u628a\u5b83\u653e\u8fdb\u63a5\u5f85\u7a97\u53e3\u7684\u5c55\u793a\u67dc&#xff08;LUN&#xff09;\u91cc&#xff0c;\u6807\u4e0a\u7f16\u53f7 \u201c0\u201d&#xff08;Created LUN 0&#xff09;\u3002 \u79df\u5ba2\u6765\u4e86\u770b\u5230\u7684\u5c31\u662f\u8fd9\u4e2a\u5c55\u793a\u67dc\u91cc\u7684\u786c\u76d8&#xff0c;\u76f8\u5f53\u4e8e \u201c\u4f60\u79df\u7684\u5c31\u662f\u8fd9\u4e2a\u67dc\u91cc\u7684\u76d8&#xff0c;\u76f4\u63a5\u7528\u201d\u3002<\/p>\n<h4>3. \u914d\u7f6e ACL\u2014\u2014 \u5217 \u201c\u5141\u8bb8\u5165\u5185\u7684\u79df\u5ba2\u540d\u5355\u201d<\/h4>\n<p>\u4e0d\u662f\u8c01\u90fd\u80fd\u79df&#xff0c;\u4f60\u5f97\u5217\u4e2a\u767d\u540d\u5355&#xff1a;\u53ea\u5141\u8bb8\u8eab\u4efd\u8bc1\u53f7\u662fiqn.2024-12.cloud.laoma.client\u7684\u79df\u5ba2\u8fdb\u6765&#xff08;\u5ba2\u6237\u7aef\u7684 IQN&#xff09;\u3002 \u8fd9\u5c31\u50cf\u7ed9\u95e8\u536b\u4e00\u5f20\u540d\u5355&#xff0c;\u53ea\u6709\u540d\u5355\u4e0a\u7684\u4eba\u624d\u80fd\u8fdb\u63a5\u5f85\u7a97\u53e3&#xff0c;\u522b\u4eba\u6765\u4e86\u76f4\u63a5\u62e6\u5728\u95e8\u5916\u3002\u540c\u65f6\u544a\u8bc9\u95e8\u536b&#xff1a;\u201c\u5141\u8bb8\u8fd9\u4e2a\u79df\u5ba2\u7528 0 \u53f7\u5c55\u793a\u67dc\u7684\u786c\u76d8\u201d&#xff08;mapped LUN 0&#xff09;\u3002<\/p>\n<h4>4. \u914d\u7f6e Portal\u2014\u2014 \u6307\u5b9a \u201c\u5e97\u94fa\u6b63\u95e8\u4f4d\u7f6e\u201d<\/h4>\n<p>\u4e4b\u524d\u9ed8\u8ba4\u6240\u6709\u95e8\u90fd\u80fd\u8fdb&#xff0c;\u4e0d\u592a\u5b89\u5168\u3002\u4f60\u628a\u5176\u4ed6\u95e8\u90fd\u5173\u4e86&#xff08;\u5220\u9664 0.0.0.0:3260&#xff09;&#xff0c;\u53ea\u7559 10.1.8.10 \u8fd9\u4e2a\u6b63\u95e8&#xff08;IP&#xff09;&#xff0c;\u95e8\u53e3\u6302\u4e2a\u724c\u5b50 \u201c3260 \u53f7\u7a97\u53e3\u529e\u7406\u201d&#xff08;\u7aef\u53e3&#xff09;\u3002 \u79df\u5ba2\u5fc5\u987b\u4ece\u8fd9\u4e2a\u6b63\u95e8\u8fdb&#xff0c;\u76f8\u5f53\u4e8e \u201c\u53ea\u5728 10.1.8.10 \u8fd9\u4e2a\u5730\u5740\u63a5\u5ba2&#xff0c;\u522b\u7684\u5730\u65b9\u627e\u4e0d\u5230\u5e97\u201d\u3002<\/p>\n<h4>5. \u4fdd\u5b58\u914d\u7f6e \u2014\u2014 \u628a\u89c4\u77e9 \u201c\u5199\u5728\u5899\u4e0a\u201d<\/h4>\n<p>\u6700\u540e\u9501\u95e8\u4e0b\u73ed&#xff08;exit&#xff09;&#xff0c;\u7cfb\u7edf\u81ea\u52a8\u628a\u6240\u6709\u89c4\u77e9&#xff08;\u540d\u724c\u3001\u5c55\u793a\u67dc\u3001\u767d\u540d\u5355\u3001\u6b63\u95e8\u4f4d\u7f6e&#xff09;\u5199\u5728\u5899\u4e0a&#xff08;\/etc\/target\/saveconfig.json&#xff09;&#xff0c;\u4e0b\u6b21\u5f00\u5e97\u8fd8\u6309\u8fd9\u4e2a\u6765&#xff0c;\u4e0d\u7528\u91cd\u65b0\u6446\u3002<\/p>\n<h4>\u79df\u5ba2\u600e\u4e48\u7528&#xff1f;<\/h4>\n<p>\u79df\u5ba2&#xff08;\u5ba2\u6237\u7aef&#xff09;\u62ff\u7740\u81ea\u5df1\u7684\u8eab\u4efd\u8bc1&#xff08;\/etc\/iscsi\/initiatorname.iscsi\u91cc\u7684 IQN&#xff09;&#xff0c;\u5230 10.1.8.10 \u6b63\u95e8&#xff0c;\u62a5\u51fa\u8981\u79df\u7684\u786c\u76d8\u540d\u724c&#xff08;iqn.2025-8.cloud.yy.server:disk1&#xff09;&#xff0c;\u95e8\u536b\u6838\u5bf9\u767d\u540d\u5355\u6ca1\u95ee\u9898&#xff0c;\u5c31\u4f1a\u628a\u5c55\u793a\u67dc\u91cc\u7684\u786c\u76d8\u7ed9\u4ed6\u7528 \u2014\u2014 \u79df\u5ba2\u5728\u81ea\u5df1\u7535\u8111\u4e0a\u80fd\u76f4\u63a5\u770b\u5230\u8fd9\u5757 \u201c\u7f51\u7edc\u786c\u76d8\u201d&#xff0c;\u8ddf\u63d2\u5728\u672c\u5730\u7684\u76d8\u4e00\u6a21\u4e00\u6837&#xff0c;\u5b58\u4e1c\u897f\u3001\u5220\u6587\u4ef6\u90fd\u968f\u4fbf\u64cd\u4f5c&#xff5e;<\/p>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u5c31\u50cf\u5f00\u4e86\u5bb6 \u201c\u786c\u76d8\u51fa\u79df\u8fde\u9501\u5e97\u201d&#xff0c;\u89c4\u77e9\u6e05\u6670\u3001\u4f4d\u7f6e\u660e\u786e\u3001\u53ea\u63a5\u5f85\u6307\u5b9a\u5ba2\u6237&#xff0c;\u8fdc\u7a0b\u7528\u76d8\u5c31\u8ddf\u5728\u5e97\u91cc\u62ff\u4e00\u6837\u65b9\u4fbf&#xff5e;<\/p>\n<p><span class=\"token comment\">#\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u533a<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">14<\/span>:35:43<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lsblk<\/span><br \/>\nNAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT<br \/>\nsda               <span class=\"token number\">8<\/span>:0    <span class=\"token number\">0<\/span>  200G  <span class=\"token number\">0<\/span> disk<br \/>\n\u251c\u2500sda1            <span class=\"token number\">8<\/span>:1    <span class=\"token number\">0<\/span>    1G  <span class=\"token number\">0<\/span> part \/boot<br \/>\n\u251c\u2500sda2            <span class=\"token number\">8<\/span>:2    <span class=\"token number\">0<\/span>   52G  <span class=\"token number\">0<\/span> part<br \/>\n\u2502 \u251c\u2500centos-root <span class=\"token number\">253<\/span>:0    <span class=\"token number\">0<\/span>   50G  <span class=\"token number\">0<\/span> lvm  \/<br \/>\n\u2502 \u2514\u2500centos-swap <span class=\"token number\">253<\/span>:1    <span class=\"token number\">0<\/span>    2G  <span class=\"token number\">0<\/span> lvm  <span class=\"token punctuation\">[<\/span>SWAP<span class=\"token punctuation\">]<\/span><br \/>\n\u2514\u2500sda3            <span class=\"token number\">8<\/span>:3    <span class=\"token number\">0<\/span>  147G  <span class=\"token number\">0<\/span> part<br \/>\nsr0              <span class=\"token number\">11<\/span>:0    <span class=\"token number\">1<\/span>  <span class=\"token number\">4<\/span>.4G  <span class=\"token number\">0<\/span> rom<br \/>\n<span class=\"token comment\">#\u51c6\u5907\u6587\u4ef6<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">14<\/span>:35:46<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># dd if&#061;\/dev\/zero of&#061;\/tmp\/bigfile bs&#061;1M count&#061;256<\/span><br \/>\n\u8bb0\u5f55\u4e86256&#043;0 \u7684\u8bfb\u5165<br \/>\n\u8bb0\u5f55\u4e86256&#043;0 \u7684\u5199\u51fa<br \/>\n<span class=\"token number\">268435456<\/span>\u5b57\u8282<span class=\"token punctuation\">(<\/span><span class=\"token number\">268<\/span> MB<span class=\"token punctuation\">)<\/span>\u5df2\u590d\u5236&#xff0c;1.31542 \u79d2&#xff0c;204 MB\/\u79d2<\/p>\n<p><span class=\"token comment\">#\u5b89\u88c5\u8f6f\u4ef6<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">14<\/span>:38:33<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y targetd targetcli<\/span><br \/>\n<span class=\"token comment\">#\u542f\u7528\u670d\u52a1<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">14<\/span>:40:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl enable &#8211;now targetd<\/span><br \/>\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/targetd.service to \/usr\/lib\/systemd\/system\/targetd.service.<\/p>\n<p>\u5728\u670d\u52a1\u7aef<\/p>\n<p><span class=\"token comment\">#\u8fdb\u5165\u914d\u7f6e<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;server ~ <span class=\"token number\">14<\/span>:41:35<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># targetcli<\/span><br \/>\n<span class=\"token comment\">#\u51c6\u5907\u50a8\u5b58<\/span><br \/>\n\/<span class=\"token operator\">&gt;<\/span> \/backstores\/block create webapp1 \/dev\/sda3<\/p>\n<p>\/<span class=\"token operator\">&gt;<\/span> \/backstores\/fileio create file1 \/tmp\/bigfile<\/p>\n<p><span class=\"token comment\">#\u914d\u7f6e\u5171\u4eab<\/span><br \/>\n\/<span class=\"token operator\">&gt;<\/span> <span class=\"token builtin class-name\">cd<\/span> \/iscsi <\/p>\n<p><span class=\"token comment\">#\u521b\u5efa\u76ee\u6807<\/span><br \/>\n\/iscsi<span class=\"token operator\">&gt;<\/span> create iqn.2025-08.cloud.yy.server:webapp<\/p>\n<p><span class=\"token comment\">#\u8fdb\u5165\u76ee\u6807<\/span><br \/>\n\/iscsi<span class=\"token operator\">&gt;<\/span> <span class=\"token builtin class-name\">cd<\/span> iqn.2025-08.cloud.yy.server:webapp\/tpg1<\/p>\n<p><span class=\"token comment\">#\u653e\u884c\u5ba2\u6237\u7aef<\/span><br \/>\n\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> acls\/ create iqn.2025-08.cloud.yy.server:client<\/p>\n<p><span class=\"token comment\">#\u6dfb\u52a0\u540e\u7aef\u50a8\u5907<\/span><br \/>\n\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> luns\/ create \/backstores\/block\/webapp1<br \/>\n\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> luns\/ create \/backstores\/fileio\/file1 <\/p>\n<p><span class=\"token comment\">#\u914d\u7f6e\u76d1\u542c<\/span><br \/>\n\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> portals\/ delete <span class=\"token number\">0.0<\/span>.0.0 <span class=\"token number\">3260<\/span> <\/p>\n<p>\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> portals\/ create <span class=\"token number\">10.1<\/span>.8.10 <span class=\"token number\">3260<\/span><\/p>\n<p><span class=\"token comment\">#\u9000\u51fa\u81ea\u52a8\u4fdd\u5b58<\/span><br \/>\n\/iscsi\/iqn.20<span class=\"token punctuation\">..<\/span>.r:webapp\/tpg<span class=\"token operator\"><span class=\"token file-descriptor important\">1<\/span>&gt;<\/span> <span class=\"token builtin class-name\">exit<\/span><\/p>\n<p>\u5ba2\u6237\u7aef\u914d\u7f6e<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">11<\/span>:05:59<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># yum install -y iscsi-initiator-utils<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">13<\/span>:55:15<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># vim \/etc\/iscsi\/initiatorname.iscsi <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">13<\/span>:57:30<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># cat \/etc\/iscsi\/initiatorname.iscsi <\/span><\/p>\n<p><span class=\"token comment\">#\u626b\u63cf<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">14<\/span>:11:02<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m discovery -t st -p 10.1.8.10<\/span><br \/>\n<span class=\"token number\">10.1<\/span>.8.10:3260,1 iqn.2025-08.cloud.yy.server:webapp<br \/>\n<span class=\"token comment\">#\u767b\u5f55<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">14<\/span>:56:04<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m node -T iqn.2025-08.cloud.yy.server:webapp -l<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">14<\/span>:01:49<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># lsblk<\/span><br \/>\nNAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT<br \/>\nsda               <span class=\"token number\">8<\/span>:0    <span class=\"token number\">0<\/span>  200G  <span class=\"token number\">0<\/span> disk<br \/>\n\u251c\u2500sda1            <span class=\"token number\">8<\/span>:1    <span class=\"token number\">0<\/span>    1G  <span class=\"token number\">0<\/span> part \/boot<br \/>\n\u2514\u2500sda2            <span class=\"token number\">8<\/span>:2    <span class=\"token number\">0<\/span>   52G  <span class=\"token number\">0<\/span> part<br \/>\n  \u251c\u2500centos-root <span class=\"token number\">253<\/span>:0    <span class=\"token number\">0<\/span>   50G  <span class=\"token number\">0<\/span> lvm  \/<br \/>\n  \u2514\u2500centos-swap <span class=\"token number\">253<\/span>:1    <span class=\"token number\">0<\/span>    2G  <span class=\"token number\">0<\/span> lvm  <span class=\"token punctuation\">[<\/span>SWAP<span class=\"token punctuation\">]<\/span><br \/>\nsdb               <span class=\"token number\">8<\/span>:16   <span class=\"token number\">0<\/span>  147G  <span class=\"token number\">0<\/span> disk<br \/>\nsdc               <span class=\"token number\">8<\/span>:32   <span class=\"token number\">0<\/span>    2G  <span class=\"token number\">0<\/span> disk<br \/>\nsr0              <span class=\"token number\">11<\/span>:0    <span class=\"token number\">1<\/span>  <span class=\"token number\">4<\/span>.4G  <span class=\"token number\">0<\/span> rom  <\/p>\n<p>\u54b1\u4eec\u628a\u6574\u4e2a\u8fc7\u7a0b\u6bd4\u4f5c \u201c\u5f00\u4e00\u5bb6\u7f51\u7edc\u786c\u76d8\u79df\u8d41\u5e97\u5e76\u63a5\u5f85\u7b2c\u4e00\u4f4d\u79df\u5ba2\u201d&#xff0c;\u6bcf\u4e00\u6b65\u90fd\u50cf\u73b0\u5b9e\u4e2d\u5f00\u5e97\u505a\u751f\u610f\u7684\u64cd\u4f5c&#xff1a;<\/p>\n<h4>\u670d\u52a1\u5668\u7aef&#xff1a;\u628a \u201c\u786c\u76d8\u201d \u53d8\u6210 \u201c\u53ef\u51fa\u79df\u7684\u7f51\u7edc\u4ed3\u5e93\u201d<\/h4>\n<li>\n<p>\u51c6\u5907 \u201c\u5f85\u79df\u7684\u8d27\u67dc\u201d<\/p>\n<p> \/backstores\/block create webapp1 \/dev\/sda3  <span class=\"token comment\"># \u628a\u7269\u7406\u786c\u76d8\u5206\u533asda3\u505a\u6210\u201c1\u53f7\u5b9e\u4f53\u8d27\u67dc\u201d<\/span><br \/>\n\/backstores\/fileio create file1 \/tmp\/bigfile  <span class=\"token comment\"># \u7528\u5927\u6587\u4ef6\u505a\u4e00\u4e2a\u201c2\u53f7\u865a\u62df\u8d27\u67dc\u201d<\/span><\/p>\n<p>\u5c31\u50cf\u5f00\u5e97\u524d\u5148\u6574\u7406\u8d27\u67dc&#xff1a;1 \u53f7\u662f\u5b9e\u6253\u5b9e\u7684\u7269\u7406\u8d27\u67b6&#xff08;\u786c\u76d8\u5206\u533a&#xff09;&#xff0c;2 \u53f7\u662f\u4e34\u65f6\u7528\u7eb8\u7bb1\u642d\u7684\u865a\u62df\u8d27\u67b6&#xff08;\u6587\u4ef6\u6a21\u62df&#xff09;&#xff0c;\u90fd\u7528\u6765\u653e\u79df\u5ba2\u7684\u4e1c\u897f\u3002<\/p>\n<\/li>\n<li>\n<p>\u7ed9\u4ed3\u5e93\u6302 \u201c\u552f\u4e00\u62db\u724c\u201d<\/p>\n<p> \/iscsi create iqn.2025-08.cloud.yy.server:webapp  <span class=\"token comment\"># \u7ed9\u4ed3\u5e93\u8d77\u4e2a\u72ec\u6709\u540d\u724c<\/span><\/p>\n<p>\u8fd9\u62db\u724c&#xff08;IQN&#xff09;\u662f\u5168\u4e16\u754c\u552f\u4e00\u7684&#xff0c;\u683c\u5f0f\u50cf \u201c2025 \u5e74 8 \u6708\u30fbcloud.yy.server \u5e97\u30fbwebapp \u4ed3\u5e93\u201d&#xff0c;\u79df\u5ba2\u51ed\u7740\u8fd9\u4e2a\u62db\u724c\u624d\u80fd\u627e\u5230\u4f60\u7684\u5e97\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e \u201c\u8c01\u80fd\u8fdb\u6765\u79df\u201d<\/p>\n<p> acls\/ create iqn.2025-08.cloud.yy.server:client  <span class=\"token comment\"># \u628a\u79df\u5ba2\u8eab\u4efd\u8bc1\u52a0\u5165\u767d\u540d\u5355<\/span><\/p>\n<p>\u76f8\u5f53\u4e8e\u7ed9\u95e8\u536b\u4e00\u5f20\u540d\u5355&#xff1a;\u201c\u53ea\u6709\u8eab\u4efd\u8bc1\u662f\u8fd9\u4e2a\u53f7\u7684\u79df\u5ba2&#xff0c;\u624d\u80fd\u8fdb\u4ed3\u5e93\u201d&#xff0c;\u5176\u4ed6\u4eba\u60f3\u79df\u4e5f\u8fdb\u4e0d\u6765\u3002<\/p>\n<\/li>\n<li>\n<p>\u628a \u201c\u8d27\u67dc\u642c\u8fdb\u4ed3\u5e93\u201d<\/p>\n<p> luns\/ create \/backstores\/block\/webapp1  <span class=\"token comment\"># 1\u53f7\u5b9e\u4f53\u8d27\u67dc\u653e\u8fdb\u4ed3\u5e93<\/span><br \/>\nluns\/ create \/backstores\/fileio\/file1   <span class=\"token comment\"># 2\u53f7\u865a\u62df\u8d27\u67dc\u653e\u8fdb\u4ed3\u5e93<\/span><\/p>\n<p>\u73b0\u5728\u4ed3\u5e93\u91cc\u6709\u4e24\u4e2a\u8d27\u67dc\u4e86&#xff0c;\u79df\u5ba2\u8fdb\u6765\u5c31\u80fd\u770b\u5230\u8fd9\u4e24\u4e2a\u53ef\u4ee5\u7528\u7684\u5b58\u50a8\u7a7a\u95f4\u3002<\/p>\n<\/li>\n<li>\n<p>\u6307\u5b9a \u201c\u4ed3\u5e93\u6b63\u95e8\u201d<\/p>\n<p> portals\/ delete <span class=\"token number\">0.0<\/span>.0.0 <span class=\"token number\">3260<\/span>  <span class=\"token comment\"># \u5173\u6389\u6240\u6709\u95e8&#xff0c;\u53ea\u7559\u4e00\u4e2a\u6b63\u95e8<\/span><br \/>\nportals\/ create <span class=\"token number\">10.1<\/span>.8.10 <span class=\"token number\">3260<\/span>  <span class=\"token comment\"># \u6b63\u95e8\u5730\u5740&#xff1a;10.1.8.10&#xff0c;\u95e8\u724c\u53f73260<\/span><\/p>\n<p>\u5c31\u50cf\u544a\u8bc9\u79df\u5ba2&#xff1a;\u201c\u522b\u8d70\u9519\u4e86&#xff0c;\u6211\u4eec\u5e97\u53ea\u5728 10.1.8.10 \u8fd9\u4e2a\u5730\u5740\u5f00\u95e8&#xff0c;\u95e8\u53e3\u6807\u7740 3260 \u53f7\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u9501\u95e8\u5b58\u6863<\/p>\n<p> <span class=\"token builtin class-name\">exit<\/span>  <span class=\"token comment\"># \u81ea\u52a8\u4fdd\u5b58\u6240\u6709\u8bbe\u7f6e<\/span><\/p>\n<p>\u76f8\u5f53\u4e8e\u628a \u201c\u8d27\u67dc\u4f4d\u7f6e\u3001\u79df\u5ba2\u540d\u5355\u3001\u6b63\u95e8\u5730\u5740\u201d \u90fd\u5199\u5728\u5e97\u94fa\u624b\u518c\u91cc&#xff0c;\u4e0b\u6b21\u5f00\u95e8\u8fd8\u6309\u8fd9\u4e2a\u6765\u3002<\/p>\n<\/li>\n<h4>\u5ba2\u6237\u7aef&#xff1a;\u79df\u5ba2\u627e\u5e97\u3001\u8fdb\u95e8\u3001\u770b\u5230\u8d27\u67dc<\/h4>\n<li>\n<p>\u51c6\u5907 \u201c\u79df\u623f\u5de5\u5177\u201d<\/p>\n<p> yum <span class=\"token function\">install<\/span> -y iscsi-initiator-utils  <span class=\"token comment\"># \u88c5\u201c\u5f00\u95e8\u94a5\u5319\u548c\u4ed3\u5e93\u5730\u56fe\u201d<\/span><\/p>\n<p>\u6ca1\u6709\u8fd9\u4e9b\u5de5\u5177&#xff0c;\u79df\u5ba2\u8fde\u4f60\u7684\u5e97\u95e8\u90fd\u8ba4\u4e0d\u51fa\u6765\u3002<\/p>\n<\/li>\n<li>\n<p>\u5e26\u4e0a \u201c\u8eab\u4efd\u8bc1\u201d<\/p>\n<p> <span class=\"token function\">vim<\/span> \/etc\/iscsi\/initiatorname.iscsi  <span class=\"token comment\"># \u586b\u5199\u81ea\u5df1\u7684\u8eab\u4efd\u8bc1\u53f7&#xff08;\u5ba2\u6237\u7aefIQN&#xff09;<\/span><\/p>\n<p>\u8fd9\u8eab\u4efd\u8bc1\u53f7\u5fc5\u987b\u548c\u670d\u52a1\u5668\u767d\u540d\u5355\u4e0a\u7684\u4e00\u81f4&#xff0c;\u4e0d\u7136\u95e8\u536b\u4e0d\u8ba9\u8fdb&#xff08;\u5c31\u662f\u4f60\u586b\u7684iqn.2025-08.cloud.yy.server:client&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u7528\u5730\u56fe \u201c\u627e\u5230\u5e97\u94fa\u201d<\/p>\n<p> iscsiadm -m discovery -t st -p <span class=\"token number\">10.1<\/span>.8.10  <span class=\"token comment\"># \u641c\u201c10.1.8.10\u201d\u8fd9\u4e2a\u5730\u5740<\/span><br \/>\n<span class=\"token comment\"># \u7ed3\u679c&#xff1a;\u627e\u5230\u4e86\u201c\u62db\u724c\u662fiqn.2025-08.cloud.yy.server:webapp\u201d\u7684\u5e97<\/span><\/p>\n<p>\u76f8\u5f53\u4e8e\u79df\u5ba2\u7528\u5730\u56fe\u641c\u5730\u5740&#xff0c;\u67e5\u5230 \u201c\u8fd9\u4e2a\u4f4d\u7f6e\u6709\u4e2a\u4ed3\u5e93&#xff0c;\u62db\u724c\u662f xxx\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u201c\u8fdb\u5e97\u79df\u623f\u201d<\/p>\n<p> iscsiadm -m node -T \u62db\u724c\u540d -l  <span class=\"token comment\"># \u51ed\u62db\u724c\u540d\u8fdb\u5e97&#xff0c;\u767b\u5f55\u6210\u529f<\/span><\/p>\n<p>\u95e8\u536b\u6838\u5bf9\u8eab\u4efd\u8bc1\u540e\u653e\u884c&#xff0c;\u79df\u5ba2\u6210\u529f\u8fdb\u5165\u4ed3\u5e93\u3002<\/p>\n<\/li>\n<li>\n<p>\u201c\u770b\u5230\u80fd\u79df\u7528\u7684\u8d27\u67dc\u201d<\/p>\n<p> lsblk  <span class=\"token comment\"># \u67e5\u770b\u6240\u6709\u53ef\u7528\u7684\u201c\u8d27\u67dc\u201d<\/span><\/p>\n<p>\u8f93\u51fa\u91cc\u7684sdb&#xff08;147G&#xff09;\u548csdc&#xff08;2G&#xff09;\u5c31\u662f\u670d\u52a1\u5668\u5171\u4eab\u7684\u4e24\u4e2a\u8d27\u67dc&#xff0c;\u79df\u5ba2\u53ef\u4ee5\u76f4\u63a5\u7528\u5b83\u4eec\u5b58\u4e1c\u897f \u2014\u2014 \u5c31\u50cf\u6253\u5f00\u81ea\u5df1\u5bb6\u7684\u67dc\u5b50\u4e00\u6837\u65b9\u4fbf&#xff5e;<\/p>\n<\/li>\n<h4>\u603b\u7ed3&#xff1a;\u6574\u4e2a\u8fc7\u7a0b\u5c31\u50cf<\/h4>\n<p>\u670d\u52a1\u5668\u7aef\u642d\u4e86\u4e2a\u5e26\u62db\u724c\u3001\u6709\u8d27\u67dc\u3001\u9650\u8bbf\u5ba2\u7684 \u201c\u7f51\u7edc\u4ed3\u5e93\u201d&#xff0c;\u5ba2\u6237\u7aef\u51ed\u7740\u8eab\u4efd\u8bc1\u627e\u5230\u4ed3\u5e93\u3001\u8fdb\u95e8\u79df\u7528&#xff0c;\u6700\u540e\u5728\u81ea\u5df1\u7535\u8111\u4e0a\u5c31\u80fd\u770b\u5230\u5e76\u4f7f\u7528\u4ed3\u5e93\u91cc\u7684\u8d27\u67dc\u3002\u4ece\u5934\u5230\u5c3e&#xff0c;\u79df\u5ba2\u7528\u7f51\u7edc\u786c\u76d8\u5c31\u8ddf\u7528\u81ea\u5df1\u5bb6\u7684\u786c\u76d8\u4e00\u6837\u7b80\u5355&#xff0c;\u8fd9\u5c31\u662f iSCSI \u7684\u9b54\u529b&#xff5e;<\/p>\n<p>\u683c\u5f0f\u5316 iSCSI \u8bbe\u5907<\/p>\n<p>\u591a\u4e2a\u542f\u52a8\u7a0b\u5e8f\u540c\u65f6\u4ece\u540c\u4e00\u76ee\u6807\u5b89\u88c5\u540c\u4e00\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u4f1a\u5bfc\u81f4\u6587\u4ef6\u7cfb\u7edf\u635f\u574f\u6216\u5c1d\u8bd5\u8bfb\u53d6\u6570\u636e\u65f6\u51fa\u73b0\u4e0d\u4e00\u81f4<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">14<\/span>:56:24<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkfs.xfs \/dev\/sdb<\/span><\/p>\n<p>\u6301\u4e45\u5316\u6302\u8f7d<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">15<\/span>:26:01<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mkdir -p \/var\/www\/html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">15<\/span>:26:17<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mount \/dev\/sdb \/var\/www\/html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">15<\/span>:26:19<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># echo xxx &gt; \/var\/www\/html\/index.html<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~ <span class=\"token number\">15<\/span>:28:12<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># blkid \/dev\/sdb<\/span><br \/>\n\/dev\/sdb: <span class=\"token assign-left variable\">UUID<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;1508954d-7b24-4a0c-8854-10fdf5c654df&#034;<\/span> <span class=\"token assign-left variable\">TYPE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;xfs<\/p>\n<p>[root&#064;client ~ 15:28:12]#vim \/etc\/fstab<br \/>\nUUID&#061;&#034;<\/span>1508954d-7b24-4a0c-8854-10fdf5c654df \/data xfs defaults,_netdev        <span class=\"token number\">0<\/span> <span class=\"token number\">0<\/span><\/p>\n<p>\u5728\/etc\/fstab\u4e2d\u7684iSCSI\u76ee\u6807\u4e0a\u6301\u4e45\u5730\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u65f6&#xff0c;\u8bf7\u786e\u4fdd\u9075\u5faa\u4ee5\u4e0b\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>\u4f7f\u7528\u5e26\u6709\u2013fs\u9009\u9879\u7684lsblk\u547d\u4ee4\u6765\u786e\u5b9a\u6587\u4ef6\u7cfb\u7edfUUID&#xff0c;\u7136\u540e\u4f7f\u7528\u8be5UUID\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u3002 \u4e0d\u8981\u4f7f\u7528\u8bbe\u5907\u540d\u79f0&#xff08;\/dev\/sd*&#xff09;\u3002 \u8bbe\u5907\u7684\u540d\u79f0\u53d6\u51b3\u4e8e iSCSI \u8bbe\u5907\u901a\u8fc7\u7f51\u7edc\u54cd\u5e94\u7684\u987a\u5e8f&#xff0c;\u56e0\u6b64\u8bbe\u5907\u540d\u79f0\u53ef\u80fd\u4f1a\u5728\u5f15\u5bfc\u4e4b\u540e\u66f4\u6539\u3002\u5982\u679c\u5728 \/etc\/fstab \u4e2d\u4f7f\u7528\u8bbe\u5907\u540d\u79f0&#xff0c;\u5219\u7cfb\u7edf\u53ef\u80fd\u4f1a\u5c06\u8bbe\u5907\u6302\u8f7d\u5728\u9519\u8bef\u7684\u6302\u8f7d\u70b9\u4e0b\u3002<\/li>\n<li>\u5728\/etc\/fstab\u4e2d\u4f7f\u7528 _netdev \u6302\u8f7d\u9009\u9879\u3002 \u56e0\u4e3aiSCSI\u4f9d\u8d56\u7f51\u7edc\u8bbf\u95ee\u8fdc\u7a0b\u8bbe\u5907&#xff0c;\u6240\u4ee5\u6b64\u9009\u9879\u53ef\u786e\u4fdd\u5728\u7f51\u7edc\u548c\u542f\u52a8\u5668\u542f\u52a8\u4e4b\u524d&#xff0c;\u7cfb\u7edf\u4e0d\u4f1a\u5c1d\u8bd5\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n<h4>\u969c\u5904\u7406<\/h4>\n<p>\u5982\u679c\u53d1\u73b0\u6210\u529f&#xff0c;\u4f46\u662f\u542f\u52a8\u5668\u767b\u5f55\u5230\u53d1\u73b0\u7684\u76ee\u6807\u65f6\u9047\u5230\u95ee\u9898&#xff0c;\u5219\u8be5\u95ee\u9898\u5f88\u53ef\u80fd\u4e0e\u8bbf\u95ee\u63a7\u5236\u6216\u8eab\u4efd\u9a8c\u8bc1\u6709\u5173\u3002\u5ba2\u6237\u7aef\u4e0a\u7684IQN\u4e0e\u670d\u52a1\u5668\u4e0a\u7684IQN\u4e0d\u5339\u914d\u4f1a\u5bfc\u81f4\u76ee\u6807\u767b\u5f55\u5931\u8d25\u3002<\/p>\n<p>\u5982\u679c\u95ee\u9898\u662f\u7531\u4e8e\u5ba2\u6237\u7aef\u4e0a\u7684\u542f\u52a8\u5668IQN\u4e0d\u6b63\u786e\u5f15\u8d77\u7684&#xff0c;\u8bf7\u5728\u5ba2\u6237\u7aef\u7684\/etc\/iscsi\/initiatorname.iscsi\u6587\u4ef6\u4e2d\u4fee\u590dIQN&#xff0c;\u7136\u540e\u91cd\u65b0\u542f\u52a8iscsid\u670d\u52a1\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n<p>\u539f\u56e0&#xff1a;iscsid \u670d\u52a1\u7f13\u5b58\u4e86\u4e4b\u524d\u5ba2\u6237\u7aef\u626b\u63cf\u65f6\u4f7f\u7528\u7684IQN\u3002<\/p>\n<p>\u5904\u7406\u65b9\u6cd5&#xff1a;\u505c\u6b62 iscsid \u670d\u52a1&#xff0c;\u91ca\u653e\u4e4b\u524d\u5ba2\u6237\u7aef\u626b\u63cf\u65f6\u4f7f\u7528\u7684IQN\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl stop iscsid <\/span><\/p>\n<p><span class=\"token comment\"># \u91cd\u65b0\u53d1\u73b0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m discovery -t st -p server<\/span><br \/>\n<span class=\"token number\">10.1<\/span>.8.10:3260,1 iqn.2024-12.cloud.laoma.server:disk1<\/p>\n<p><span class=\"token comment\"># \u91cd\u65b0\u767b\u5f55<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m node -T iqn.2024-12.cloud.laoma.server:disk1 -l<\/span><\/p>\n<p>\u5982\u679c\u53d1\u73b0\u6210\u529f&#xff0c;\u4f46\u662f\u542f\u52a8\u5668\u767b\u5f55\u5230\u53d1\u73b0\u7684\u76ee\u6807\u65f6\u9047\u5230\u95ee\u9898&#xff0c;\u5219\u8be5\u95ee\u9898\u5f88\u53ef\u80fd\u4e0e\u8bbf\u95ee\u63a7\u5236\u6216\u8eab\u4efd\u9a8c\u8bc1\u6709\u5173\u3002\u5ba2\u6237\u7aef\u4e0a\u7684IQN\u4e0e\u670d\u52a1\u5668\u4e0a\u7684IQN\u4e0d\u5339\u914d\u4f1a\u5bfc\u81f4\u76ee\u6807\u767b\u5f55\u5931\u8d25\u3002<\/p>\n<p>\u5982\u679c\u95ee\u9898\u662f\u7531\u4e8e\u5ba2\u6237\u7aef\u4e0a\u7684\u542f\u52a8\u5668IQN\u4e0d\u6b63\u786e\u5f15\u8d77\u7684&#xff0c;\u8bf7\u5728\u5ba2\u6237\u7aef\u7684\/etc\/iscsi\/initiatorname.iscsi\u6587\u4ef6\u4e2d\u4fee\u590dIQN&#xff0c;\u7136\u540e\u91cd\u65b0\u542f\u52a8iscsid\u670d\u52a1\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n<p>\u539f\u56e0&#xff1a;iscsid \u670d\u52a1\u7f13\u5b58\u4e86\u4e4b\u524d\u5ba2\u6237\u7aef\u626b\u63cf\u65f6\u4f7f\u7528\u7684IQN\u3002<\/p>\n<p>\u5904\u7406\u65b9\u6cd5&#xff1a;\u505c\u6b62 iscsid \u670d\u52a1&#xff0c;\u91ca\u653e\u4e4b\u524d\u5ba2\u6237\u7aef\u626b\u63cf\u65f6\u4f7f\u7528\u7684IQN\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># systemctl stop iscsid <\/span><\/p>\n<p><span class=\"token comment\"># \u91cd\u65b0\u53d1\u73b0<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m discovery -t st -p server<\/span><br \/>\n<span class=\"token number\">10.1<\/span>.8.10:3260,1 iqn.2024-12.cloud.laoma.server:disk1<\/p>\n<p><span class=\"token comment\"># \u91cd\u65b0\u767b\u5f55<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;client ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># iscsiadm -m node -T iqn.2024-12.cloud.laoma.server:disk1 -l<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u53ef\u4ee5\u76f4\u63a5\u6539\uff0c\u6216\u8005\u5728\u91cc\u65b0\u5efa.exports\u6587\u4ef6\uff1b\u6bcf\u884c\u5199 \u201c\u8981\u5171\u4eab\u7684\u6587\u4ef6\u5939 + \u5141\u8bb8\u54ea\u4e9b\u7535\u8111\u8bbf\u95ee + \u7ed9\u5565\u6743\u9650\u201d\uff1b\u522b\u548c Samba\uff08SMB\uff09\u5171\u4eab\u540c\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u4f1a\u51fa\u95ee\u9898\uff01\uff1a\u670d\u52a1\u5668\u4e0a\u8981\u5171\u4eab\u7684\u5177\u4f53\u6587\u4ef6\u5939\u8def\u5f84\uff08\u201c\u54ea\u4e2a\u62bd\u5c49\u201d\uff09\uff1b\uff1a\u5141\u8bb8\u8bbf\u95ee\u7684\u5ba2\u6237\u7aef\u8303\u56f4\uff08\u201c\u54ea\u4e9b\u4eba\u80fd\u6765\u201d\uff0c\u6574\u4e2a 10.1.8.x \u7f51\u6bb5\u7684\u8bbe\u5907\uff09\uff1b(rw)\uff1a\u7ed9\u5ba2\u6237\u7aef\u7684\u6743\u9650\uff08\u201c\u80fd\u505a\u5565\u201d\uff0crw=read+write\uff0c\u65e2\u53ef\u4ee5\u770b\u91cc\u9762\u7684\u6587\u4ef6\uff0c\u4e5f\u80fd\u4fee\u6539 \/ \u65b0\u589e \/ \u5220\u9664\uff09\u3002SCSI\u3002<\/p>\n","protected":false},"author":2,"featured_media":53091,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[230,43,44],"topic":[],"class_list":["post-53093","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-php","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/53093.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u53ef\u4ee5\u76f4\u63a5\u6539\uff0c\u6216\u8005\u5728\u91cc\u65b0\u5efa.exports\u6587\u4ef6\uff1b\u6bcf\u884c\u5199 \u201c\u8981\u5171\u4eab\u7684\u6587\u4ef6\u5939 + \u5141\u8bb8\u54ea\u4e9b\u7535\u8111\u8bbf\u95ee + \u7ed9\u5565\u6743\u9650\u201d\uff1b\u522b\u548c Samba\uff08SMB\uff09\u5171\u4eab\u540c\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u4f1a\u51fa\u95ee\u9898\uff01\uff1a\u670d\u52a1\u5668\u4e0a\u8981\u5171\u4eab\u7684\u5177\u4f53\u6587\u4ef6\u5939\u8def\u5f84\uff08\u201c\u54ea\u4e2a\u62bd\u5c49\u201d\uff09\uff1b\uff1a\u5141\u8bb8\u8bbf\u95ee\u7684\u5ba2\u6237\u7aef\u8303\u56f4\uff08\u201c\u54ea\u4e9b\u4eba\u80fd\u6765\u201d\uff0c\u6574\u4e2a 10.1.8.x \u7f51\u6bb5\u7684\u8bbe\u5907\uff09\uff1b(rw)\uff1a\u7ed9\u5ba2\u6237\u7aef\u7684\u6743\u9650\uff08\u201c\u80fd\u505a\u5565\u201d\uff0crw=read+write\uff0c\u65e2\u53ef\u4ee5\u770b\u91cc\u9762\u7684\u6587\u4ef6\uff0c\u4e5f\u80fd\u4fee\u6539 \/ \u65b0\u589e \/ \u5220\u9664\uff09\u3002SCSI\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/53093.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-11T16:09:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811160957-689a15d59d247.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53093.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/53093.html\",\"name\":\"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-11T16:09:59+00:00\",\"dateModified\":\"2025-08-11T16:09:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/53093.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/53093.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53093.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/53093.html","og_locale":"zh_CN","og_type":"article","og_title":"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb900\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u53ef\u4ee5\u76f4\u63a5\u6539\uff0c\u6216\u8005\u5728\u91cc\u65b0\u5efa.exports\u6587\u4ef6\uff1b\u6bcf\u884c\u5199 \u201c\u8981\u5171\u4eab\u7684\u6587\u4ef6\u5939 + \u5141\u8bb8\u54ea\u4e9b\u7535\u8111\u8bbf\u95ee + \u7ed9\u5565\u6743\u9650\u201d\uff1b\u522b\u548c Samba\uff08SMB\uff09\u5171\u4eab\u540c\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u4f1a\u51fa\u95ee\u9898\uff01\uff1a\u670d\u52a1\u5668\u4e0a\u8981\u5171\u4eab\u7684\u5177\u4f53\u6587\u4ef6\u5939\u8def\u5f84\uff08\u201c\u54ea\u4e2a\u62bd\u5c49\u201d\uff09\uff1b\uff1a\u5141\u8bb8\u8bbf\u95ee\u7684\u5ba2\u6237\u7aef\u8303\u56f4\uff08\u201c\u54ea\u4e9b\u4eba\u80fd\u6765\u201d\uff0c\u6574\u4e2a 10.1.8.x \u7f51\u6bb5\u7684\u8bbe\u5907\uff09\uff1b(rw)\uff1a\u7ed9\u5ba2\u6237\u7aef\u7684\u6743\u9650\uff08\u201c\u80fd\u505a\u5565\u201d\uff0crw=read+write\uff0c\u65e2\u53ef\u4ee5\u770b\u91cc\u9762\u7684\u6587\u4ef6\uff0c\u4e5f\u80fd\u4fee\u6539 \/ \u65b0\u589e \/ \u5220\u9664\uff09\u3002SCSI\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/53093.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-11T16:09:59+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811160957-689a15d59d247.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"9 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/53093.html","url":"https:\/\/www.wsisp.com\/helps\/53093.html","name":"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-11T16:09:59+00:00","dateModified":"2025-08-11T16:09:59+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/53093.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/53093.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/53093.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"NFS \u670d\u52a1\u5668\u4e0eiSCSI \u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=53093"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53093\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/53091"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=53093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=53093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=53093"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=53093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}