{"id":93758,"date":"2020-04-15T02:21:50","date_gmt":"2020-04-14T18:21:50","guid":{"rendered":"http:\/\/4563.org\/?p=93758"},"modified":"2020-04-15T02:21:50","modified_gmt":"2020-04-14T18:21:50","slug":"%e4%b8%8d%e6%87%82%e5%b0%b1%e9%97%ae%ef%bc%8c-iscsi-%e6%98%af%e5%8f%aa%e8%83%bd%e5%b1%80%e5%9f%9f%e7%bd%91%e9%80%9a%e4%bf%a1%e5%98%9b%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=93758","title":{"rendered":"\u4e0d\u61c2\u5c31\u95ee\uff0c iSCSI \u662f\u53ea\u80fd\u5c40\u57df\u7f51\u901a\u4fe1\u561b\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e0d\u61c2\u5c31\u95ee\uff0c iSCSI \u662f\u53ea\u80fd\u5c40\u57df\u7f51\u901a\u4fe1\u561b\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Vanes <\/span>  <span><i><\/i> 23<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h3>\u573a\u666f\uff1a<\/h3>\n<ul>\n<li>\u4e24\u53f0\u670d\u52a1\u5668\u3002<\/li>\n<li>\u4e00\u53f0\u505a iSCSI Server, \u90e8\u7f72\u4e86 targetcli + tcmu.<\/li>\n<li>\u4e00\u53f0\u505a iSCSI initiator, \u4f7f\u7528 iscsiadm \u8fdb\u884c\u901a\u4fe1\u3002<\/li>\n<\/ul>\n<h3>\u914d\u7f6e<\/h3>\n<ul>\n<li>targetcli \u914d\u7f6e\u4e86\u76f8\u5e94\u7684\u5b58\u50a8\u540e\u7aef\u3002\u5e76\u914d\u7f6e ACL, portal\uff0c\u7ed1\u5b9a IQN \u3002<\/li>\n<\/ul>\n<pre><code> o- iscsi ............. [Targets: 1]   | o- iqn.xxx.target............................ [TPGs: 1]   |   o- tpg1 ....... [no-gen-acls, no-auth]   |     o- acls ......................................................[ACLs: 1]   |     | o- iqn.1994-05.com.redhat:73f6b33526c............................... [Mapped LUNs: 1]   |     |   o- mapped_lun0    |     o- luns ................ [LUNs: 1]   |     | o- lun0................................................ [user\/xxx (default_tg_pt_gp)]   |     o- portals ......... [Portals: 1]   |       o- 0.0.0.0:3260 .... [OK] <\/code><\/pre>\n<h3>\u5ba2\u6237\u7aef\u53d1\u8d77\u8bf7\u6c42<\/h3>\n<h4>discovery<\/h4>\n<ul>\n<li>iscsiadm -m discovery -t sendtargets -p [ip(\u5916\u7f51)]:3260<\/li>\n<li>\u4f7f\u7528 \u5916\u7f51 IP \u53ef\u4ee5\u627e\u5230\u5bf9\u5e94\u7684 node \u4fe1\u606f\uff0c\u67e5\u770b node \u5217\u8868<\/li>\n<li>iscsiadm -m node<\/li>\n<\/ul>\n<pre><code>192.168.0.18:3260,1 iqn.xxx.target <\/code><\/pre>\n<ul>\n<li>\u8fd4\u56de\u4e86 Target \u670d\u52a1\u5668\u7684\u5185\u7f51 IP\uff0c\u6240\u4ee5\u767b\u5f55\u64cd\u4f5c\u4f1a\u8d85\u65f6\u3002<\/li>\n<\/ul>\n<h3>\u95ee\u9898<\/h3>\n<ul>\n<li>\u662f\u53ea\u80fd\u5c40\u57df\u7f51\u8bbf\u95ee\u561b\uff1f<\/li>\n<li>\u8981\u60f3\u516c\u7f51\u8bbf\u95ee\uff0c\u6709\u4ec0\u4e48\u597d\u7684\u89e3\u51b3\u529e\u6cd5\u5417\uff1f<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1167147\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : echo1937 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. iSCSI \u8d70\u7684\u662f TCP\/IP \u534f\u8bae\uff0c\u4e0d\u9650\u5b9a\u5c40\u57df\u7f51\u8bbf\u95ee\uff1b<\/p>\n<p>2. Internet \u573a\u666f\u4e0b\uff0c\u4e00\u822c\u9700\u8981\u4e13\u7ebf\u6216\u8005 VPN \u6765\u89e3\u51b3\u5e26\u5bbd\u548c\u7a33\u5b9a\u6027\u95ee\u9898\uff1b<\/p>\n<p>3. \u4f60\u7684\u914d\u7f6e\u6709\u95ee\u9898\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167148\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Laforet <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5e7f\u57df\u7f51\u4f20\u8f93\u7406\u8bba\u4e0a\u6ca1\u95ee\u9898\uff0c\u516c\u7f51\u7f51\u5173\u4e0a\u8bbe\u7f6e\u7aef\u53e3\u8f6c\u53d1\u5c31\u884c\u4e86\uff0c\u66f4\u7a33\u59a5\u7684\u65b9\u6cd5\u662f\u5efa\u4e00\u4e2a\u57fa\u4e8e UDP \u6216\u8005 GRE \u7684\u79c1\u6709\u901a\u9053\uff0c\u7136\u540e\u5728\u91cc\u9762\u8dd1 iSCSI \u3002\u95ee\u9898\u662f\u5e7f\u57df\u7f51\u7684\u5e26\u5bbd\u548c\u5ef6\u8fdf\u6446\u5728\u90a3\u91cc\uff0c\u4f60\u8fd9\u6837\u5e72\u56fe\u4ec0\u4e48\u5462\u4e0d\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167149\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Vanes <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Laforet \u989d\u6211\u8fd9\u8fb9\u662f\u505a\u4e00\u4e2a\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u4e00\u4e9b\u5173\u4e8e TCMU \u7684\u529f\u80fd\uff0c\u751f\u4ea7\u73af\u5883\u80af\u5b9a\u8fd8\u662f\u5c40\u57df\u7f51\u4f7f\u7528\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167150\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Vanes <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @echo1937 \u60f3\u95ee\u4e0b\u5e26\u4f6c\uff0c\u54ea\u91cc\u6709\u95ee\u9898\u5462\uff1f\u6211\u7684\u8fd9\u4e2a\u573a\u666f\u662f\u505a\u4e2a\u4e34\u65f6\u7684\u6d4b\u8bd5\uff0c\u56e0\u4e3a\u76ee\u524d\u624b\u4e0a\u786c\u4ef6\u8d44\u6e90\u6709\u9650\u7684\u539f\u56e0\u3002\u8fd8\u671b\u4e0d\u541d\u8d50\u6559                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167151\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Vanes <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Laforet \u5e7f\u57df\u7f51\u7406\u8bba\u4e0a\u5e94\u8be5\u662f\u6ca1\u95ee\u9898\u7684\u3002\u4f46\u6211\u53d1\u73b0\u6211\u8fd9\u8fb9\u53bb discovery \u7684\u65f6\u5019\uff0cnode \u5217\u8868\u91cc\u8bb0\u5f55\u7684\u5bf9\u5e94 target \u7684\u5185\u7f51 IP\uff0c\u662f\u6211\u914d\u7f6e\u6709\u4ec0\u4e48\u95ee\u9898\u561b\uff1f \u6211\u5c1d\u8bd5\u8fc7\u628a server \u7aef\u7684 portal \u6539\u6210\u4e86\u5bf9\u5e94\u7684\u516c\u7f51 IP\uff0c\u4f46\u662f\u6539\u4e86\u4e4b\u540e\uff0c\u76f4\u63a5 discover \u90fd\u88ab\u62d2\u7edd\u6389\u4e86\u3002connecction refused.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167152\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : struggle001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u957f\u9014\u4f20\u8f93\u9009\u62e9\u4e13\u7528\u7f51\u7edc\u5427\uff0c\u8d70\u516c\u7f51 \u8fd9\u4e2a\u573a\u666f\u5c31\u4e0d\u592a\u597d\u3002\u54c8\u54c8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167153\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Vanes <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @struggle001 \u6211\u8fd9\u8fb9\u53ea\u662f\u505a\u4e2a\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u4e00\u4e9b\u529f\u80fd\u3002\u56e0\u4e3a\u76ee\u524d\u786c\u4ef6\u8d44\u6e90\u53d7\u9650                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167154\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : defunct9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f00 ssh\uff0c\u8ba9\u6211\u4e0a\u53bb\u770b\u770b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1167155\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lajicab <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u786e\u5b9a\u516c\u7f51\u7684 iscsi \u6ca1\u95ee\u9898\uff0c\u5728\u529e\u516c\u5ba4\u6302\u8f7d\u4e86\u5bb6\u91cc\u7684 nas\uff0c\u5bb6\u91cc\u7684 NAS \u6709\u516c\u7f51 IP\uff0c\u4e0d\u8fc7\u4f53\u9a8c\u975e\u5e38\u7684\u4e0d\u597d\uff0c\u54ea\u6015\u662f\u57ce\u57df\u7f51\u4e0b\uff0c\u975e\u5e38\u7684\u4e0d\u7a33\u5b9a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u61c2\u5c31\u95ee\uff0c iSCSI \u662f\u53ea\u80fd\u5c40\u57df&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/93758"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=93758"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/93758\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=93758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=93758"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=93758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}