{"id":51507,"date":"2025-08-10T23:39:24","date_gmt":"2025-08-10T15:39:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/51507.html"},"modified":"2025-08-10T23:39:24","modified_gmt":"2025-08-10T15:39:24","slug":"linux%e5%b8%b8%e8%a7%81%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%ae%ef%bc%88%e4%ba%8c%ef%bc%89%ef%bc%9anfs%e5%92%8ciscsi%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/51507.html","title":{"rendered":"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\u670d\u52a1\u5668"},"content":{"rendered":"<h2>NFS \u670d\u52a1\u5668<\/h2>\n<h3>NFS \u670d\u52a1\u4ecb\u7ecd<\/h3>\n<p>\u662f\u4e00\u79cd\u7f51\u7edc\u6587\u4ef6\u5171\u4eab\u534f\u8bae&#xff0c;\u6700\u521d\u7531 Sun Microsystems \u5f00\u53d1&#xff0c;\u7528\u4e8e\u5728\u7f51\u7edc\u4e2d\u5c06\u67d0\u53f0\u670d\u52a1\u5668\u4e0a\u7684\u76ee\u5f55\u5171\u4eab\u51fa\u6765&#xff0c;\u4f9b\u5176\u4ed6\u5ba2\u6237\u7aef\u4e3b\u673a\u6302\u8f7d\u548c\u8bbf\u95ee\u3002\u5b83\u5141\u8bb8\u7528\u6237\u50cf\u8bbf\u95ee\u672c\u5730\u78c1\u76d8\u4e00\u6837\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<h4>NFS \u7684\u4f5c\u7528\u548c\u7279\u70b9<\/h4>\n<table>\n<tr>\u4f5c\u7528\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>\u6587\u4ef6\u5171\u4eab<\/td>\n<td>\u591a\u53f0\u4e3b\u673a\u5171\u4eab\u8bbf\u95ee\u4e00\u5957\u6587\u4ef6\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u7edc\u900f\u660e<\/td>\n<td>\u7528\u6237\u8bbf\u95ee\u8fdc\u7a0b\u6587\u4ef6\u5c31\u50cf\u672c\u5730\u4e00\u6837<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u7528\u6237\u8bbf\u95ee<\/td>\n<td>\u652f\u6301\u591a\u4e2a\u5ba2\u6237\u7aef\u540c\u65f6\u8bfb\u5199<\/td>\n<\/tr>\n<tr>\n<td>\u7075\u6d3b\u63a7\u5236<\/td>\n<td>\u652f\u6301\u57fa\u4e8e IP \u5730\u5740\u548c\u6743\u9650\u7684\u8bbf\u95ee\u63a7\u5236<\/td>\n<\/tr>\n<tr>\n<td>Unix\/Linux \u539f\u751f\u652f\u6301<\/td>\n<td>\u4e0d\u9700\u989d\u5916\u8f6f\u4ef6&#xff0c;\u8f7b\u677e\u914d\u7f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u90e8\u7f72\u670d\u52a1<\/h3>\n<h4>NFS \u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u5171\u4eab\u5e76\u7ed3\u5408 Apache \u7f51\u7ad9\u670d\u52a1<\/h4>\n<p>\u00a0# \u5b89\u88c5\u8f6f\u4ef6\u5305&#xff0c;\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u90fd\u8981\u5b89\u88c5<br \/>\n\u00a0# \u5c31\u50cf\u7ed9\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u90fd\u5b89\u88c5\u201c\u5171\u4eab\u67dc\u7ba1\u7406\u5de5\u5177\u201d&#xff0c;\u4e0d\u7ba1\u662f\u5f53\u201c\u67dc\u4e3b\u201d&#xff08;server&#xff09;\u8fd8\u662f\u201c\u53d6\u6587\u4ef6\u7684\u201d&#xff08;client&#xff09;&#xff0c;\u90fd\u5f97\u4f1a\u7528\u94a5\u5319\u5f00\u95e8\u3002<br \/>\n\u00a0[root&#064;server ~ 10:09:55]# yum install -y nfs-utils<br \/>\n\u00a0[root&#064;client ~ 10:06:03]# yum install -y nfs-utils<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u51c6\u5907\u7528\u6237<br \/>\n\u00a0# \u786e\u4fdd\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u64cd\u4f5c\u6587\u4ef6\u7684\u201c\u7528\u6237\u201d\u4e00\u81f4&#xff0c;\u5426\u5219\u53ef\u80fd\u53d1\u751f\u201c\u4f60\u6253\u4e0d\u5f00\u522b\u4eba\u4e0a\u9501\u7684\u67dc\u5b50\u201d\u7684\u60c5\u51b5\u3002Apache \u7528\u6237&#xff08;UID 48&#xff09;\u662f\u7f51\u9875\u670d\u52a1\u7684\u4ee3\u8868&#xff0c;\u8981\u7ed9\u5b83\u6743\u9650\u3002<br \/>\n\u00a0[root&#064;server ~ 10:10:38]# id yuxb<br \/>\n\u00a0uid&#061;1000(yuxb) gid&#061;1000(yuxb) \u7ec4&#061;1000(yuxb),10(wheel)<br \/>\n\u00a0\u200b<br \/>\n\u00a0# server \u7aef\u51c6\u5907\u5171\u4eab\u76ee\u5f55<br \/>\n\u00a0# \u6743\u9650\u8bbe\u7f6e\u7684\u548capache\u4e00\u6837&#xff0c;\u786e\u4fdd\u7f51\u9875\u8bbf\u95ee\u6743\u9650\u3002<br \/>\n\u00a0[root&#064;client ~ 10:13:46]# id apache<br \/>\n\u00a0uid&#061;48(apache) gid&#061;48(apache) \u7ec4&#061;48(apache)<br \/>\n\u00a0[root&#064;server ~ 10:11:40]# mkdir -p \/shares\/webapp<br \/>\n\u00a0# \u5728 server \u4e0a\u653e\u4e86\u4e00\u4e2a\u201c\u5171\u4eab\u6587\u4ef6\u67dc\u201d&#xff0c;\u5e76\u628a\u67dc\u5b50\u7684\u94a5\u5319\u4ea4\u7ed9 Apache \u7528\u6237\u7ba1\u7406&#xff08;\u5373\u7ed9 Apache \u6743\u9650&#xff09;\u3002<br \/>\n\u00a0[root&#064;server ~ 10:21:00]# chown 48:48 \/shares\/webapp<br \/>\n\u00a0[root&#064;server ~ 10:21:35]# ll -d \/shares\/webapp\/<br \/>\n\u00a0drwxr-xr-x 2 48 48 6 8\u6708 \u00a0 7 10:21 \/shares\/webapp\/<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u914d\u7f6e\u670d\u52a1\u5668<br \/>\n\u00a0# \u5728\u8fd9\u4e2a\u6587\u4ef6\u91cc\u767b\u8bb0&#xff1a;\u201c\u6211\u5bb6\u7684\u54ea\u4e2a\u6587\u4ef6\u67dc\u53ef\u4ee5\u88ab\u54ea\u4e9b\u4eba\u8bbf\u95ee\u3001\u4ed6\u4eec\u80fd\u505a\u4ec0\u4e48\u4e8b\u201d\u3002<br \/>\n\u00a0# rw \u8868\u793a\u53ef\u8bfb\u5199&#xff0c;10.1.8.0\/24 \u8868\u793a\u5141\u8bb8\u6574\u4e2a\u7f51\u6bb5\u7684\u4e3b\u673a\u6765\u8bbf\u95ee\u3002<br \/>\n\u00a0[root&#064;server ~ 10:21:43]# vim \/etc\/exports<br \/>\n\u00a0[root&#064;server ~ 10:24:01]# cat \/etc\/exports<br \/>\n\u00a0\/shares\/webapp 10.1.8.0\/24(rw) *(ro)<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u542f\u7528\u5e76\u542f\u52a8\u670d\u52a1<br \/>\n\u00a0# \u542f\u52a8\u670d\u52a1\u540e&#xff0c;\u5ba2\u6237\u7aef\u7528 showmount \u5c31\u80fd\u770b\u5230\u201c\u5171\u4eab\u6587\u4ef6\u67dc\u5217\u8868\u201d&#xff0c;\u5c31\u50cf\u5728\u516c\u544a\u680f\u4e0a\u770b\u516c\u53f8\u8d44\u6e90\u6e05\u5355\u3002<br \/>\n\u00a0[root&#064;server ~ 10:24:07]# systemctl enable nfs-server.service &#8211;now<br \/>\n\u00a0Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/nfs-server.service to \/usr\/lib\/systemd\/system\/nfs-server.service.<br \/>\n\u00a0[root&#064;client ~ 10:25:32]# showmount -e server<br \/>\n\u00a0Export list for server:<br \/>\n\u00a0\/shares\/webapp (everyone)<br \/>\n\u00a0# \u8fd9\u91cc\u4f1a\u53d1\u73b0\u540e\u9762\u662feveryone&#xff0c;*\u662f\u5168\u7f51\u5171\u4eab&#xff0c;\u5e26\u6709\u53ea\u8bfb\u6743\u9650<br \/>\n\u00a0# \u53bb\u6389*\u540e\u8868\u793a\u53ea\u5141\u8bb8 10.1.8.0\/24 \u7f51\u6bb5\u7684\u4e3b\u673a \u8bfb\u5199\u8bbf\u95ee&#xff0c;\u66f4\u5408\u7406\u5b89\u5168\u3002<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u4fee\u6539\u4e0b\u914d\u7f6e<br \/>\n\u00a0[root&#064;server ~ 10:25:15]# vim \/etc\/exports<br \/>\n\u00a0[root&#064;server ~ 10:26:48]# cat \/etc\/exports<br \/>\n\u00a0\/shares\/webapp 10.1.8.0\/24(rw)<br \/>\n\u00a0[root&#064;server ~ 10:26:18]# systemctl restart nfs-server<br \/>\n\u00a0[root&#064;client ~ 10:25:37]# showmount -e server<br \/>\n\u00a0Export list for server:<br \/>\n\u00a0\/shares\/webapp 10.1.8.0\/24<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u6302\u8f7d\u548c\u5199\u5165<br \/>\n\u00a0[root&#064;client ~ 10:27:34]# mount server:\/shares\/webapp \/var\/www\/html<br \/>\n\u00a0[root&#064;server ~ 10:28:13]# echo Welcome to yuxb website. &gt; \/shares\/webapp\/index.html<br \/>\n\u00a0[root&#064;client ~ 10:28:33]# systemctl enable httpd &#8211;now<br \/>\n\u00a0Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service to \/usr\/lib\/systemd\/system\/httpd.service.<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u914d\u7f6e\u9632\u706b\u5899<br \/>\n\u00a0[root&#064;server ~ 10:28:22]# systemctl status firewalld.service<br \/>\n\u00a0\u25cf firewalld.service &#8211; firewalld &#8211; dynamic firewall daemon<br \/>\n\u00a0 \u00a0 Loaded: loaded (\/usr\/lib\/systemd\/system\/firewalld.service; disabled; vendor preset: enabled)<br \/>\n\u00a0 \u00a0 Active: inactive (dead)<br \/>\n\u00a0 \u00a0 \u00a0 Docs: man:firewalld(1)<br \/>\n\u00a0[root&#064;client ~ 10:28:42]# systemctl status firewalld.service<br \/>\n\u00a0\u25cf firewalld.service &#8211; firewalld &#8211; dynamic firewall daemon<br \/>\n\u00a0 \u00a0 Loaded: loaded (\/usr\/lib\/systemd\/system\/firewalld.service; disabled; vendor preset: enabled)<br \/>\n\u00a0 \u00a0 Active: inactive (dead)<br \/>\n\u00a0 \u00a0 \u00a0 Docs: man:firewalld(1)<br \/>\n\u00a0 \u00a0<br \/>\n\u00a0# \u9a8c\u8bc1\u5ba2\u6237\u7aef<br \/>\n\u00a0[root&#064;client ~ 10:27:48]# ls \/var\/www\/html<br \/>\n\u00a0index.html<br \/>\n\u00a0# \u6d4f\u89c8\u5668\u8f93\u516510.1.8.11&#xff0c;\u53ef\u770b\u5230\u7f51\u9875\u5185\u5bb9&#xff0c;\u8bf4\u660e\u6302\u8f7d\u6210\u529f\u3001\u670d\u52a1\u53ef\u8bbf\u95ee\u3002<\/p>\n<h4>\u914d\u7f6e NFS \u6302\u8f7d\u5e76\u6d4b\u8bd5<\/h4>\n<p>\u00a0# \u5199\u5185\u5bb9\u6d4b\u8bd5<br \/>\n\u00a0[root&#064;client ~ 10:44:00]# cd \/var\/www\/html\/<br \/>\n\u00a0[root&#064;client html 10:47:48]# ls<br \/>\n\u00a0index.html<br \/>\n\u00a0[root&#064;client html 10:47:49]# echo hahah &gt; web1.html<br \/>\n\u00a0-bash: web1.html: \u6743\u9650\u4e0d\u591f<br \/>\n\u00a0\u200b<br \/>\n\u00a0[root&#064;client ~ 10:50:30]# grep apache \/etc\/passwd<br \/>\n\u00a0apache:x:48:48:Apache:\/usr\/share\/httpd:\/sbin\/nologin<br \/>\n\u00a0\u200b<br \/>\n\u00a0# \u5207\u6362\u6210 Apache \u8eab\u4efd\u6765\u5199\u6587\u4ef6&#xff0c;\u5c31\u50cf\u4f60\u6362\u4e0a\u4fdd\u5b89\u5236\u670d&#xff0c;\u4fdd\u5b89\u5c31\u4e0d\u4f1a\u62e6\u4f60\u4e86\u3002\u89e3\u51b3\u201c\u6743\u9650\u4e0d\u591f\u201d\u7684\u95ee\u9898<br \/>\n\u00a0[root&#064;client ~ 10:49:07]# su -l -s \/bin\/bash apache<br \/>\n\u00a0-bash-4.2$ echo 666 &gt; \/var\/www\/html\/web1.html<br \/>\n\u00a0-bash-4.2$ \u767b\u51fa<br \/>\n\u00a0\u200b<br \/>\n\u00a0\u200b<br \/>\n\u00a0[root&#064;client ~ 10:51:12]# df<br \/>\n\u00a0\u6587\u4ef6\u7cfb\u7edf \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1K-\u5757 \u00a0  \u5df2\u7528 \u00a0 \u00a0 \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\n\u00a0devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0485776 \u00a0 \u00a0 \u00a0 0 \u00a0 485776 \u00a0 \u00a00% \/dev<br \/>\n\u00a0tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 497816 \u00a0 \u00a0 \u00a0 0 \u00a0 497816 \u00a0 \u00a00% \/dev\/shm<br \/>\n\u00a0tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 497816 \u00a0 \u00a07780 \u00a0 490036 \u00a0 \u00a02% \/run<br \/>\n\u00a0tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 497816 \u00a0 \u00a0 \u00a0 0 \u00a0 497816 \u00a0 \u00a00% \/sys\/fs\/cgroup<br \/>\n\u00a0\/dev\/mapper\/centos-root 52403200 1670752 50732448 \u00a0 \u00a04% \/<br \/>\n\u00a0\/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01038336 \u00a0142216 \u00a0 896120 \u00a0 14% \/boot<br \/>\n\u00a0tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a099564 \u00a0 \u00a0 \u00a0 0 \u00a0 \u00a099564 \u00a0 \u00a00% \/run\/user\/1000<br \/>\n\u00a0server:\/shares\/webapp \u00a0 52403200 1673600 50729600 \u00a0 \u00a04% \/var\/www\/html<br \/>\n\u00a0[root&#064;client ~ 10:51:13]# vim \/etc\/fstab<br \/>\n\u00a0[root&#064;client ~ 10:51:46]# cat \/etc\/fstab<br \/>\n\u00a0\u200b<br \/>\n\u00a0#<br \/>\n\u00a0# \/etc\/fstab<br \/>\n\u00a0# Created by anaconda on Fri Aug  1 15:45:32 2025<br \/>\n\u00a0#<br \/>\n\u00a0# Accessible filesystems, by reference, are maintained under &#039;\/dev\/disk&#039;<br \/>\n\u00a0# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info<br \/>\n\u00a0#<br \/>\n\u00a0\/dev\/mapper\/centos-root \/ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xfs \u00a0 \u00a0 defaults \u00a0 \u00a0 \u00a0 \u00a00 0<br \/>\n\u00a0UUID&#061;b5c926d1-b582-436b-95a9-38664b23e619 \/boot \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xfs \u00a0 \u00a0 defaults \u00a0 \u00a0 \u00a0 \u00a00 0<br \/>\n\u00a0\/dev\/mapper\/centos-swap swap \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  swap \u00a0  defaults \u00a0 \u00a0 \u00a0 \u00a00 0<br \/>\n\u00a0server:\/shares\/webapp \u00a0 \/var\/www\/html nfs defaults \u00a0 \u00a0 \u00a0 \u00a00 0<br \/>\n\u00a0[root&#064;client ~ 10:52:12]# umount \/var\/www\/html\/<br \/>\n\u00a0[root&#064;client ~ 10:52:22]# mount \/var\/www\/html\/<br \/>\n\u00a0# reboot\u91cd\u542f\u540e\u76f4\u63a5\u6d4f\u89c8\u5668\u8f93\u516510.1.8.11\u6d4b\u8bd5<br \/>\n\u00a0# 10.1.8.11\/web1.html\u53ef\u4ee5\u6210\u529f<br \/>\n\u00a0[root&#064;client ~ 11:02:51]# mount -a<br \/>\n\u00a0[root&#064;client ~ 11:03:03]# ls \/var\/www\/html<br \/>\n\u00a0index.html  web1.html<br \/>\n\u00a0\u200b<\/p>\n<h2>iSCSI \u670d\u52a1\u5668<\/h2>\n<h3>iSCSI \u670d\u52a1\u4ecb\u7ecd<\/h3>\n<h4>\u4ec0\u4e48\u662f iSCSI&#xff1f;<\/h4>\n<p>iSCSI&#xff08;Internet Small Computer System Interface&#xff09; \u662f\u4e00\u79cd\u901a\u8fc7 IP \u7f51\u7edc\u4f20\u8f93 SCSI \u547d\u4ee4 \u7684\u534f\u8bae&#xff0c;\u5b83\u53ef\u4ee5\u8ba9\u8fdc\u7a0b\u78c1\u76d8\u50cf\u672c\u5730\u78c1\u76d8\u4e00\u6837\u6302\u8f7d\u5230\u4e3b\u673a\u4e0a&#xff0c;\u4ece\u800c\u5b9e\u73b0 \u5757\u7ea7\u5b58\u50a8\u5171\u4eab\u3002<\/p>\n<h4>iSCSI \u7684\u7279\u70b9<\/h4>\n<table>\n<tr>\u7279\u70b9\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u4f7f\u7528\u6807\u51c6 IP \u7f51\u7edc<\/td>\n<td>\u4e0d\u9700\u8981\u4e13\u7528\u5149\u7ea4\u8bbe\u5907&#xff08;\u5982 Fibre Channel&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u652f\u6301\u5757\u7ea7\u8bbf\u95ee<\/td>\n<td>\u66f4\u9002\u5408\u6570\u636e\u5e93\u7b49\u9ad8\u6027\u80fd\u9700\u6c42\u573a\u666f<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u6269\u5c55\u6027\u5f3a<\/td>\n<td>\u591a\u4e2a Initiator \u53ef\u8fde\u63a5\u591a\u4e2a Target<\/td>\n<\/tr>\n<tr>\n<td>\u6210\u672c\u4f4e<\/td>\n<td>\u5229\u7528\u73b0\u6709\u4ee5\u592a\u7f51\u5b9e\u73b0\u5b58\u50a8\u7f51\u7edc<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>iSCSI \u67b6\u6784<\/h3>\n<p>iSCSI \u67b6\u6784\u57fa\u4e8e \u5ba2\u6237\u7aef-\u670d\u52a1\u5668 \u6a21\u578b&#xff0c;\u7531\u4e24\u5927\u6838\u5fc3\u7ec4\u6210&#xff1a;<\/p>\n<ul>\n<li>\n<p>Initiator&#xff08;\u53d1\u8d77\u7aef&#xff09;&#xff1a;\u5ba2\u6237\u7aef&#xff0c;\u53d1\u8d77\u8fde\u63a5\u3001\u4f7f\u7528\u8fdc\u7a0b\u78c1\u76d8<\/p>\n<\/li>\n<li>\n<p>Target&#xff08;\u76ee\u6807\u7aef&#xff09;&#xff1a;\u670d\u52a1\u5668&#xff0c;\u63d0\u4f9b\u5b58\u50a8\u8d44\u6e90&#xff08;LUN&#xff09;<\/p>\n<\/li>\n<\/ul>\n<p>\u5b83\u4eec\u901a\u8fc7 TCP\/IP \u7f51\u7edc \u901a\u4fe1&#xff0c;\u5c06\u5b58\u50a8\u8d44\u6e90\u901a\u8fc7\u7f51\u7edc\u201c\u6620\u5c04\u201d\u5230\u5ba2\u6237\u7aef&#xff0c;\u5c31\u50cf\u63d2\u4e0a\u4e86\u4e00\u5757\u201c\u8fdc\u7a0b\u786c\u76d8\u201d\u3002<\/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>\n<p>targetd&#xff0c;\u670d\u52a1\u7aef\u8f6f\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>targetcli&#xff0c;\u7528\u4e8e\u914d\u7f6etargetd\u670d\u52a1\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u76f8\u5f53\u4e8e\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86\u201c\u8fdc\u7a0b\u786c\u76d8\u5236\u9020\u5de5\u5382\u201d&#xff0c;\u7528 targetcli \u5de5\u5177\u6765\u9020\u76d8\u3001\u5305\u88c5\u3001\u8d34\u6807\u7b7e\u3002<\/p>\n<p>\u00a0# \u5b89\u88c5\u8f6f\u4ef6<br \/>\n\u00a0[root&#064;server ~ 11:05:50]# yum install -y targetd targetcli<br \/>\n\u00a0[root&#064;server ~ 11:06:19]# systemctl enable target &#8211;now<br \/>\n\u00a0Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/target.service to \/usr\/lib\/systemd\/system\/target.service.<\/p>\n<p>\u00a0# dd \u5236\u4f5c\u4e86\u4e00\u4e2a2G\u7684\u201c\u538b\u7f29\u997c\u5e72\u76d8\u201d&#xff0c;\u518d\u628a\u5b83\u6ce8\u518c\u6210 file1&#xff0c;\u4e5f\u53ef\u4ee5\u88ab\u5ba2\u6237\u7aef\u5f53\u786c\u76d8\u7528\u3002<br \/>\n\u00a0[root&#064;server ~ 14:37:29]# dd if&#061;\/dev\/zero of&#061;\/tmp\/bigfile bs&#061;1M count&#061;2048<br \/>\n\u00a0\u8bb0\u5f55\u4e862048&#043;0 \u7684\u8bfb\u5165<br \/>\n\u00a0\u8bb0\u5f55\u4e862048&#043;0 \u7684\u5199\u51fa<br \/>\n\u00a02147483648\u5b57\u8282(2.1 GB)\u5df2\u590d\u5236&#xff0c;5.66996 \u79d2&#xff0c;379 MB\/\u79d2<br \/>\n\u00a0\u200b<br \/>\n\u00a0[root&#064;server ~ 11:12:35]# targetcli<br \/>\n\u00a0Warning: Could not load preferences file \/root\/.targetcli\/prefs.bin.<br \/>\n\u00a0targetcli shell version 2.1.53<br \/>\n\u00a0Copyright 2011-2013 by Datera, Inc and others.<br \/>\n\u00a0For help on commands, type &#039;help&#039;.<br \/>\n\u00a0\u200b<br \/>\n\u00a0\/&gt; ls<br \/>\n\u00a0o- \/ &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [&#8230;]<br \/>\n\u00a0  o- backstores &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [&#8230;]<br \/>\n\u00a0  | o- block &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 0]<br \/>\n\u00a0  | o- fileio &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [Storage Objects: 0]<br \/>\n\u00a0  | o- pscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 0]<br \/>\n\u00a0  | o- ramdisk &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Storage Objects: 0]<br \/>\n\u00a0  o- iscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 0]<br \/>\n\u00a0  o- loopback &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 0]<br \/>\n\u00a0\/&gt;<br \/>\n\u00a0\u200b<\/p>\n<h4>\u914d\u7f6e backstore \u5bf9\u8c61<\/h4>\n<p>backstore\u7c7b\u578b&#xff1a;<\/p>\n<ul>\n<li>\n<p>block&#xff1a;\u670d\u52a1\u5668\u4e2d\u7684\u5757\u8bbe\u5907&#xff0c;\u4f8b\u5982\u78c1\u76d8\u9a71\u52a8\u5668&#xff0c;\u78c1\u76d8\u5206\u533a\u6216\u903b\u8f91\u5377\u3002<\/p>\n<\/li>\n<li>\n<p>fileio&#xff1a;\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u5e38\u89c4\u6587\u4ef6\u3002targetcli\u5c06\u8be5\u6587\u4ef6\u7528\u4f5c\u78c1\u76d8\u6620\u50cf\u3002<\/p>\n<\/li>\n<li>\n<p>pscsi&#xff1a;\u7269\u7406SCSI\u8bbe\u5907\u3002 \u8fd9\u79cd\u7c7b\u578b\u7684\u5b58\u50a8\u5141\u8bb8\u5ba2\u6237\u7aef\u901a\u8fc7\u7f51\u7edc\u8bbf\u95ee\u670d\u52a1\u5668\u4e0a\u7684\u7269\u7406SCSI\u8bbe\u5907\u3002<\/p>\n<\/li>\n<li>\n<p>ramdisk&#xff1a;\u5185\u5b58\u4e2d\u7684\u78c1\u76d8\u8bbe\u5907\u3002 \u8fd9\u79cd\u7c7b\u578b\u7684\u5b58\u50a8\u4e0d\u4f1a\u6301\u4e45\u5b58\u50a8\u6570\u636e\u3002 \u670d\u52a1\u5668\u91cd\u65b0\u542f\u52a8\u540e&#xff0c;\u6570\u636e\u5c06\u4e22\u5931\u3002<\/p>\n<\/li>\n<\/ul>\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<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>\u00a0# \u628a \/dev\/sdb \u8fd9\u5757\u7269\u7406\u786c\u76d8\u201c\u6ce8\u518c\u6210\u4ea7\u54c1\u201d&#xff0c;\u547d\u540d\u4e3a myblock1&#xff0c;\u51c6\u5907\u53d1\u8d27\u3002<br \/>\n\u00a0\/&gt; cd \/backstores\/block<br \/>\n\u00a0\/backstores\/block&gt; create myblock1 \/dev\/sdb<br \/>\n\u00a0Created block storage object myblock1 using \/dev\/sdb.<br \/>\n\u00a0\/backstores\/block&gt; ls<br \/>\n\u00a0o- block &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Storage Objects: 1]<br \/>\n\u00a0  o- myblock1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [\/dev\/sdb (200.0GiB) write-thru deactivated]<br \/>\n\u00a0 \u00a0  o- alua &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [ALUA Groups: 1]<br \/>\n\u00a0 \u00a0 \u00a0  o- default_tg_pt_gp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [ALUA state: Active\/optimized]<\/p>\n<h4>\u914d\u7f6e Target IQN<\/h4>\n<p>\u5728\/iscsi\u4f2a\u76ee\u5f55\u4e2d&#xff0c;\u521b\u5efaIQN&#xff0c;\u5c06\u60a8\u9009\u62e9\u7684IQN\u540d\u79f0\u4f5c\u4e3a\u5176\u7b2c\u4e00\u4e2a\u53c2\u6570\u3002<\/p>\n<p>\u7ed9\u8fd9\u5757\u786c\u76d8\u8d34\u4e0a\u201c\u8eab\u4efd\u8bc1\u53f7\u7801\u201d&#xff0c;\u8fd9\u5c31\u662f IQN&#xff08;iSCSI Qualified Name&#xff09;&#xff0c;\u786e\u4fdd\u552f\u4e00\u4e14\u53ef\u8bc6\u522b\u3002<\/p>\n<p>\u00a0\/backstores\/block&gt; cd<br \/>\n\u00a0\u200b<br \/>\n\u00a0\/iscsi&gt;<br \/>\n\u00a0\/iscsi&gt; create iqn.2025-08.cloud.yuxb.server:myblock1<br \/>\n\u00a0Created target iqn.2025-08.cloud.yuxb.server:myblock1.<br \/>\n\u00a0Created TPG 1.<br \/>\n\u00a0Global pref auto_add_default_portal&#061;true<br \/>\n\u00a0Created default portal listening on all IPs (0.0.0.0), port 3260.<br \/>\n\u00a0\/&gt; cd \/backstores\/fileio<br \/>\n\u00a0\/backstores\/fileio&gt; create file1 \/tmp\/bigfile<br \/>\n\u00a0Created fileio file1 with size 2147483648<br \/>\n\u00a0\/backstores\/fileio&gt; ls \/<br \/>\n\u00a0o- \/ &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [&#8230;]<br \/>\n\u00a0  o- backstores &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [&#8230;]<br \/>\n\u00a0  | o- block &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 1]<br \/>\n\u00a0  | | o- myblock1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [\/dev\/sdb (200.0GiB) write-thru deactivated]<br \/>\n\u00a0  | | \u00a0 o- alua &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [ALUA Groups: 1]<br \/>\n\u00a0  | | \u00a0 \u00a0 o- default_tg_pt_gp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [ALUA state: Active\/optimized]<br \/>\n\u00a0  | o- fileio &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [Storage Objects: 1]<br \/>\n\u00a0  | | o- file1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [\/tmp\/bigfile (2.0GiB) write-back deactivated]<br \/>\n\u00a0  | | \u00a0 o- alua &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [ALUA Groups: 1]<br \/>\n\u00a0  | | \u00a0 \u00a0 o- default_tg_pt_gp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [ALUA state: Active\/optimized]<br \/>\n\u00a0  | o- pscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 0]<br \/>\n\u00a0  | o- ramdisk &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Storage Objects: 0]<br \/>\n\u00a0  o- iscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 1]<br \/>\n\u00a0  | o- iqn.2025-08.cloud.yuxb.server:myblock1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [TPGs: 1]<br \/>\n\u00a0  | \u00a0 o- tpg1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [no-gen-acls, no-auth]<br \/>\n\u00a0  | \u00a0 \u00a0 o- acls &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [ACLs: 0]<br \/>\n\u00a0  | \u00a0 \u00a0 o- luns &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [LUNs: 0]<br \/>\n\u00a0  | \u00a0 \u00a0 o- portals &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [Portals: 1]<br \/>\n\u00a0  | \u00a0 \u00a0 \u00a0 o- 0.0.0.0:3260 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [OK]<br \/>\n\u00a0  o- loopback &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 0]<\/p>\n<h4>\u914d\u7f6e LUN<\/h4>\n<p>\u6bcf\u5757\u786c\u76d8\u6216\u6587\u4ef6\u90fd\u8981\u5206\u914d\u4e00\u4e2a\u7f16\u53f7&#xff08;LUN&#xff09;&#xff0c;\u5ba2\u6237\u7aef\u901a\u8fc7\u8fd9\u4e2a\u7f16\u53f7\u8bbf\u95ee\u7279\u5b9a\u5b58\u50a8\u8d44\u6e90\u3002<\/p>\n<p>\u00a0\/iscsi\/iqn.20&#8230;myblock1\/tpg1&gt; luns\/ create \/backstores\/block\/myblock1<br \/>\n\u00a0Created LUN 0.<br \/>\n\u00a0Created LUN 0-&gt;0 mapping in node ACL iqn.2025-08.cloud.yuxb.server:client<br \/>\n\u00a0\/iscsi\/iqn.20&#8230;myblock1\/tpg1&gt; luns\/ create \/backstores\/fileio\/file1<br \/>\n\u00a0Created LUN 1.<br \/>\n\u00a0Created LUN 1-&gt;1 mapping in node ACL iqn.2025-08.cloud.yuxb.server:client<br \/>\n\u00a0\u200b<\/p>\n<h4>\u914d\u7f6e ACL<\/h4>\n<p>\u4e3a\u5ba2\u6237\u521b\u5efa\u4e86\u201c\u8bbf\u95ee\u6388\u6743\u201d&#xff0c;\u5426\u5219\u522b\u4eba\u77e5\u9053 IQN \u4e5f\u4e0d\u80fd\u8bbf\u95ee\u786c\u76d8&#xff0c;\u76f8\u5f53\u4e8e\u5237\u95e8\u7981\u5361\u3002<\/p>\n<p>\u00a0\/iscsi&gt; cd iqn.2025-08.cloud.yuxb.server:myblock1\/tpg1\/<br \/>\n\u00a0\/iscsi\/iqn.20&#8230;myblock1\/tpg1&gt; acls\/ create iqn.2025-08.cloud.yuxb.server:client<br \/>\n\u00a0Created Node ACL for iqn.2025-08.cloud.yuxb.server:client<br \/>\n\u00a0\u200b<br \/>\n\u00a0\/iscsi\/iqn.20&#8230;myblock1\/tpg1&gt; ls \/<br \/>\n\u00a0o- \/ &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [&#8230;]<br \/>\n\u00a0  o- backstores &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [&#8230;]<br \/>\n\u00a0  | o- block &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 1]<br \/>\n\u00a0  | | o- myblock1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [\/dev\/sdb (200.0GiB) write-thru activated]<br \/>\n\u00a0  | | \u00a0 o- alua &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [ALUA Groups: 1]<br \/>\n\u00a0  | | \u00a0 \u00a0 o- default_tg_pt_gp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [ALUA state: Active\/optimized]<br \/>\n\u00a0  | o- fileio &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [Storage Objects: 1]<br \/>\n\u00a0  | | o- file1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [\/tmp\/bigfile (2.0GiB) write-back activated]<br \/>\n\u00a0  | | \u00a0 o- alua &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [ALUA Groups: 1]<br \/>\n\u00a0  | | \u00a0 \u00a0 o- default_tg_pt_gp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [ALUA state: Active\/optimized]<br \/>\n\u00a0  | o- pscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Storage Objects: 0]<br \/>\n\u00a0  | o- ramdisk &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Storage Objects: 0]<br \/>\n\u00a0  o- iscsi &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 1]<br \/>\n\u00a0  | o- iqn.2025-08.cloud.yuxb.server:myblock1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [TPGs: 1]<br \/>\n\u00a0  | \u00a0 o- tpg1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [no-gen-acls, no-auth]<br \/>\n\u00a0  | \u00a0 \u00a0 o- acls &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [ACLs: 1]<br \/>\n\u00a0  | \u00a0 \u00a0 | o- iqn.2025-08.cloud.yuxb.server:client &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [Mapped LUNs: 2]<br \/>\n\u00a0  | \u00a0 \u00a0 | \u00a0 o- mapped_lun0 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [lun0 block\/myblock1 (rw)]<br \/>\n\u00a0  | \u00a0 \u00a0 | \u00a0 o- mapped_lun1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [lun1 fileio\/file1 (rw)]<br \/>\n\u00a0  | \u00a0 \u00a0 o- luns &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [LUNs: 2]<br \/>\n\u00a0  | \u00a0 \u00a0 | o- lun0 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [block\/myblock1 (\/dev\/sdb) (default_tg_pt_gp)]<br \/>\n\u00a0  | \u00a0 \u00a0 | o- lun1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [fileio\/file1 (\/tmp\/bigfile) (default_tg_pt_gp)]<br \/>\n\u00a0  | \u00a0 \u00a0 o- portals &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [Portals: 1]<br \/>\n\u00a0  | \u00a0 \u00a0 \u00a0 o- 10.1.8.10:3260 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [OK]<br \/>\n\u00a0  o- loopback &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Targets: 0]<\/p>\n<h4>\u914d\u7f6e Portal<\/h4>\n<p>\u201cPortal\u201d\u662f\u53d1\u8d27\u7684\u95e8\u724c\u53f7&#xff0c;\u9ed8\u8ba4\u662f\u5168\u7f51\u53ef\u8bbf\u95ee0.0.0.0&#xff0c;\u6362\u6210\u5185\u90e8\u5730\u574010.1.8.10\u66f4\u5b89\u5168<\/p>\n<p>\/iscsi\/iqn.20&#8230;\/tpg1\/portals&gt; delete 0.0.0.0 3260<br \/>\nDeleted network portal 0.0.0.0:3260<br \/>\n\/iscsi\/iqn.20&#8230;\/tpg1\/portals&gt; create 10.1.8.10 3260<br \/>\nUsing default IP port 3260<br \/>\nCreated network portal 10.1.8.10:3260.<br \/>\n\/iscsi\/iqn.20&#8230;\/tpg1\/portals&gt; ls<br \/>\no- portals &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. [Portals: 1]<br \/>\n  o- 10.1.8.10:3260 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; [OK]<\/p>\n<h4>\u4fdd\u5b58\u914d\u7f6e<\/h4>\n<p>\/iscsi\/iqn.20&#8230;\/tpg1\/portals&gt; exit<br \/>\nGlobal pref auto_save_on_exit&#061;true<br \/>\nLast 10 configs saved in \/etc\/target\/backup\/.<br \/>\nConfiguration saved to \/etc\/target\/saveconfig.json<\/p>\n<h3>\u975e\u4ea4\u4e92\u5f0f\u7ba1\u7406 Targets<\/h3>\n<p>targetcli \/backstores\/block create myblock1 \/dev\/sda3<br \/>\ntargetcli \/backstores\/fileio create file1 \/tmp\/bigfile<br \/>\ntargetcli \/iscsi create iqn.2024-12.cloud.yuxb.server:disk1<\/p>\n<p>targetcli \/iscsi\/iqn.2024-12.cloud.yuxb.server:disk1\/tpg1\/luns create \/backstores\/block\/myblock1<br \/>\ntargetcli \/iscsi\/iqn.2024-12.cloud.yuxb.server:disk1\/tpg1\/luns create \/backstores\/fileio\/file1<\/p>\n<p>targetcli \/iscsi\/iqn.2024-12.cloud.yuxb.server:disk1\/tpg1\/acls create iqn.2025-08.cloud.yuxb.server:client<\/p>\n<p>targetcli \/iscsi\/iqn.2024-12.cloud.yuxb.server:disk1\/tpg1\/portals delete 0.0.0.0 3260<br \/>\ntargetcli \/iscsi\/iqn.2024-12.cloud.yuxb.server:disk1\/tpg1\/portals create 10.1.8.10 3260<\/p>\n<p>targetcli saveconfig<\/p>\n<h3>\u8bbf\u95ee iSCSI \u5b58\u50a8<\/h3>\n<h4>\u51c6\u5907\u7cfb\u7edf<\/h4>\n<p># \u5b89\u88c5\u8f6f\u4ef6<br \/>\n# \u5ba2\u6237\u7aef\u4e5f\u9700\u8981\u201c\u5feb\u9012\u63a5\u6536\u5668\u201d&#xff0c;\u8fd9\u4e2a\u5de5\u5177\u80fd\u53d1\u8d77\u8fde\u63a5\u8bf7\u6c42\u5e76\u6302\u8f7d\u8fdc\u7a0b\u786c\u76d8\u3002<br \/>\n[root&#064;client ~ 11:05:40]# yum install -y iscsi-initiator-utils<\/p>\n<p># \u544a\u8bc9\u5feb\u9012\u5458&#xff1a;\u201c\u6211\u662f\u8c01&#xff0c;\u6211\u7684\u5730\u5740\u662f\u54ea\u91cc\u201d\u3002\u8fd9\u4e2a\u540d\u79f0\u5fc5\u987b\u548c\u670d\u52a1\u5668\u4e0a ACL \u914d\u7f6e\u7684\u4e00\u81f4\u3002<br \/>\n[root&#064;client ~ 13:55:21]# vim \/etc\/iscsi\/initiatorname.iscsi<br \/>\n[root&#064;client ~ 13:57:31]# cat \/etc\/iscsi\/initiatorname.iscsi<br \/>\nInitiatorName&#061;iqn.2025-08.cloud.yuxb.server:client<\/p>\n<h4>\u8fde\u63a5 iSCSI \u76ee\u6807<\/h4>\n<p># \u5728\u201c\u67e5\u5feb\u9012\u201d \u2192 \u627e\u5230\u5feb\u9012 \u2192 \u6b63\u5f0f\u7b7e\u6536\u3002<\/p>\n<p># \u56de\u5230client\u7aef<br \/>\n# \u626b\u63cf<br \/>\n[root&#064;client ~ 13:58:07]# iscsiadm -m discovery -t st -p 10.1.8.10<br \/>\n10.1.8.10:3260,1 iqn.2025-08.cloud.yuxb.server:myblock1<\/p>\n<p># \u767b\u5f55<br \/>\n[root&#064;client ~ 13:59:47]# iscsiadm -m node -T iqn.2025-08.cloud.yuxb.server:myblock1 -l<br \/>\nLogging in to [iface: default, target: iqn.2025-08.cloud.yuxb.server:myblock1, portal: 10.1.8.10,3260] (multiple)<br \/>\nLogin to [iface: default, target: iqn.2025-08.cloud.yuxb.server:myblock1, portal: 10.1.8.10,3260] successful.<\/p>\n<p># \u9a8c\u8bc1<br \/>\n[root&#064;client ~ 14:01:46]# lsblk<br \/>\nNAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT<br \/>\nsda               8:0    0  200G  0 disk<br \/>\n\u251c\u2500sda1            8:1    0    1G  0 part \/boot<br \/>\n\u2514\u2500sda2            8:2    0   52G  0 part<br \/>\n  \u251c\u2500centos-root 253:0    0   50G  0 lvm  \/<br \/>\n  \u2514\u2500centos-swap 253:1    0    2G  0 lvm  [SWAP]<br \/>\nsdb               8:16   0  200G  0 disk<br \/>\nsdc               8:32   0    2G  0 disk<br \/>\nsr0              11:0    1  4.4G  0 rom  <\/p>\n<p># \u5148\u683c\u5f0f\u5316<br \/>\n[root&#064;client ~ 15:25:03]# mkfs.xfs \/dev\/sdb<br \/>\nmeta-data&#061;\/dev\/sdb               isize&#061;512    agcount&#061;4, agsize&#061;13107200 blks<br \/>\n         &#061;                       sectsz&#061;512   attr&#061;2, projid32bit&#061;1<br \/>\n         &#061;                       crc&#061;1        finobt&#061;0, sparse&#061;0<br \/>\ndata     &#061;                       bsize&#061;4096   blocks&#061;52428800, imaxpct&#061;25<br \/>\n         &#061;                       sunit&#061;0      swidth&#061;0 blks<br \/>\nnaming   &#061;version 2              bsize&#061;4096   ascii-ci&#061;0 ftype&#061;1<br \/>\nlog      &#061;internal log           bsize&#061;4096   blocks&#061;25600, version&#061;2<br \/>\n         &#061;                       sectsz&#061;512   sunit&#061;0 blks, lazy-count&#061;1<br \/>\nrealtime &#061;none                   extsz&#061;4096   blocks&#061;0, rtextents&#061;0<br \/>\n[root&#064;client ~ 15:25:32]# mount \/dev\/sdb \/var\/www\/html<br \/>\nmount: \u6302\u8f7d\u70b9 \/var\/www\/html \u4e0d\u5b58\u5728<br \/>\n[root&#064;client ~ 15:25:52]# yum install -y httpd<br \/>\n[root&#064;client ~ 15:26:04]# mount \/dev\/sdb \/var\/www\/html\/<br \/>\n[root&#064;client ~ 15:26:15]# echo dsfghn &gt; \/var\/www\/html\/index.html<br \/>\n[root&#064;client ~ 15:26:30]# systemctl enable httpd &#8211;now<br \/>\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service to \/usr\/lib\/systemd\/system\/httpd.service.<br \/>\n[root&#064;client ~ 15:26:47]# blkid \/dev\/sdb<br \/>\n\/dev\/sdb: UUID&#061;&#034;15b6a982-850c-408c-b195-63790b69f359&#034; TYPE&#061;&#034;xfs&#034;<br \/>\n# \u53bb\u6d4f\u89c8\u5668\u8f93\u516510.1.8.11\u5c31\u53ef\u4ee5\u8bbf\u95ee\u5230\u9875\u9762\u548c\u5185\u5bb9<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb919\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf16\u6b21\u3002iSCSI\uff08Internet Small Computer System Interface\uff09 \u662f\u4e00\u79cd\u901a\u8fc7 IP \u7f51\u7edc\u4f20\u8f93 SCSI \u547d\u4ee4 \u7684\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u8ba9\u8fdc\u7a0b\u78c1\u76d8\u50cf\u672c\u5730\u78c1\u76d8\u4e00\u6837\u6302\u8f7d\u5230\u4e3b\u673a\u4e0a\uff0c\u4ece\u800c\u5b9e\u73b0 \u5757\u7ea7\u5b58\u50a8\u5171\u4eab\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,305,44],"topic":[],"class_list":["post-51507","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-305","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\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\/51507.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb919\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf16\u6b21\u3002iSCSI\uff08Internet Small Computer System Interface\uff09 \u662f\u4e00\u79cd\u901a\u8fc7 IP \u7f51\u7edc\u4f20\u8f93 SCSI \u547d\u4ee4 \u7684\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u8ba9\u8fdc\u7a0b\u78c1\u76d8\u50cf\u672c\u5730\u78c1\u76d8\u4e00\u6837\u6302\u8f7d\u5230\u4e3b\u673a\u4e0a\uff0c\u4ece\u800c\u5b9e\u73b0 \u5757\u7ea7\u5b58\u50a8\u5171\u4eab\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/51507.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-10T15:39:24+00:00\" \/>\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=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51507.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/51507.html\",\"name\":\"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T15:39:24+00:00\",\"dateModified\":\"2025-08-10T15:39:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/51507.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/51507.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51507.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\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":"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\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\/51507.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb919\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf16\u6b21\u3002iSCSI\uff08Internet Small Computer System Interface\uff09 \u662f\u4e00\u79cd\u901a\u8fc7 IP \u7f51\u7edc\u4f20\u8f93 SCSI \u547d\u4ee4 \u7684\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u8ba9\u8fdc\u7a0b\u78c1\u76d8\u50cf\u672c\u5730\u78c1\u76d8\u4e00\u6837\u6302\u8f7d\u5230\u4e3b\u673a\u4e0a\uff0c\u4ece\u800c\u5b9e\u73b0 \u5757\u7ea7\u5b58\u50a8\u5171\u4eab\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/51507.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T15:39:24+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/51507.html","url":"https:\/\/www.wsisp.com\/helps\/51507.html","name":"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T15:39:24+00:00","dateModified":"2025-08-10T15:39:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/51507.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/51507.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/51507.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5e38\u89c1\u670d\u52a1\u5668\u914d\u7f6e\uff08\u4e8c\uff09\uff1aNFS\u548cISCSI\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\/51507","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=51507"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51507\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=51507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=51507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=51507"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=51507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}