{"id":19681,"date":"2017-08-26T06:31:28","date_gmt":"2017-08-25T22:31:28","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/26\/ubuntu-16-04-lts-%e5%ae%89%e8%a3%9d-iscsi-initiator\/"},"modified":"2021-03-18T17:25:08","modified_gmt":"2021-03-18T09:25:08","slug":"ubuntu-16-04-lts-%e5%ae%89%e8%a3%9d-iscsi-initiator","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/26\/ubuntu-16-04-lts-%e5%ae%89%e8%a3%9d-iscsi-initiator\/","title":{"rendered":"Ubuntu 16.04 LTS \u5b89\u88dd iSCSI Initiator"},"content":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1a <br \/><a href=\"https:\/\/www.server-world.info\/en\/note?os=Ubuntu_16.04&amp;p=iscsi&amp;f=2\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 16.04 LTS : iSCSI Taregt(iscsitarget) : Server World<\/a> <br \/><a href=\"https:\/\/www.server-world.info\/en\/note?os=Ubuntu_16.04&amp;p=iscsi&amp;f=3\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 16.04 LTS : iSCSI Initiator(Ubuntu) : Server World<\/a> <br \/><a href=\"https:\/\/www.server-world.info\/en\/note?os=Ubuntu_16.04&amp;p=iscsi\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 16.04 LTS : iSCSI Taregt(targetcli) : Server World<\/a> <\/p>\n<p>1. \u5b89\u88dd open-iscsi \u5957\u4ef6 <br \/># <span style=\"color: #ff0000\">apt-get -y install open-iscsi<\/span> <\/p>\n<p>2. \u4fee\u6539 <span style=\"color: #0000ff\">\/etc\/iscsi\/initiatorname.iscsi<\/span> \u8a2d\u5b9a\u6a94 <br \/># <span style=\"color: #ff0000\">vim \/etc\/iscsi\/initiatorname.iscsi<\/span> <br \/><span style=\"color: #0000ff\">InitiatorName=iqn.2017-04.tces.test:linux-pc<\/span> <\/p>\n<p>3. \u4fee\u6539 <span style=\"color: #0000ff\">\/etc\/iscsi\/iscsid.conf<\/span>\u00a0 \u8a2d\u5b9a\u6a94 <br \/># <span style=\"color: #ff0000\">cp \/etc\/iscsi\/iscsid.conf \/etc\/iscsi\/iscsid.conf.$(date +%F)<\/span> <br \/># <span style=\"color: #ff0000\">vim<\/span> <span style=\"color: #ff0000\">\/etc\/iscsi\/iscsid.conf<\/span> <br \/>\u628a <br \/><span style=\"color: #0000ff\">#node.session.auth.authmethod = CHAP<\/span> <br \/><span style=\"color: #0000ff\">#node.session.auth.username = username<\/span> <br \/><span style=\"color: #0000ff\">#node.session.auth.password = password<\/span> <br \/>\u4fee\u6539\u6210 <br \/><span style=\"color: #ff0000\">node.session.auth.authmethod = CHAP<\/span> <br \/><span style=\"color: #ff0000\">node.session.auth.username = username<\/span> <br \/><span style=\"color: #ff0000\">node.session.auth.password = password<\/span><\/p>\n<p>4. \u91cd\u65b0\u555f\u52d5 iscsid open-iscsi \u670d\u52d9<br \/># <span style=\"color: #ff0000\">systemctl restart iscsid open-iscsi<\/span><\/p>\n<p>5. \u5c0b\u627e iSCSI Server \u5206\u4eab\u7684\u8a2d\u5099<br \/>#<span style=\"color: #ff0000\"> \/usr\/bin\/iscsiadm -m discovery -t sendtargets -p 192.168.1.16<\/span><br \/><span style=\"color: #0000ff\">192.168.1.16:3260,1 iqn.2017-04.tces.test:linux-pc<\/span> <\/p>\n<p>6. \u767b\u5165\u4f7f\u7528 iSCSI \u8a2d\u5099<br \/># <span style=\"color: #ff0000\">\/usr\/sbin\/iscsiadm -m node &#8211;login<\/span><br \/><span style=\"color: #0000ff\">Logging in to [iface: default, target: iqn.2017-04.tces.test:<\/span><span style=\"color: #0000ff\">linux-pc, portal: 192.168.1.16,3260] (multiple)<\/span><br \/><span style=\"color: #0000ff\">Login to [iface: default, target: iqn.2017-04.tces.test:<\/span><span style=\"color: #0000ff\">linux-pc, portal: 192.168.1.16,3260] successful.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1a Ubuntu 16.04 LTS : iSCSI Taregt(iscsitarget) : Se &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/26\/ubuntu-16-04-lts-%e5%ae%89%e8%a3%9d-iscsi-initiator\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Ubuntu 16.04 LTS \u5b89\u88dd iSCSI Initiator\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[187,119],"tags":[],"class_list":["post-19681","post","type-post","status-publish","format-standard","hentry","category-c-105646","category-c-78464"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["691047"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19681"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19681"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19681\/revisions"}],"predecessor-version":[{"id":21177,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19681\/revisions\/21177"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}