æè©ïŒISCSIã¿ãŒã²ããã®æ§ææ¹æ³ã説æããèšäºãã€ã³ã¿ãŒãããäžã«å€æ°ãããŸãããäœããã®çç±ã§ãã€ãã·ãšãŒã¿ãŒã®æäœã«é¢ããèšäºã¯ã»ãšãã©ãããŸããã ã¿ãŒã²ãããæè¡çã«è€éã§ãããšããäºå®ã«ãããããããã€ãã·ãšãŒã¿ãŒãšã®ç®¡çäžã®å€§éšãããããŸã-ããè€éãªæŠå¿µããããä»äºã®éåžžã«æçœãªååã¯ãããŸããã
iSCSI
ISCSIã«ã€ããŠã話ãããåã«ãææ°ã®ãããã¯ãŒã¯ã®æ å ±ãžã®ããŸããŸãªã¿ã€ãã®ãªã¢ãŒãã¢ã¯ã»ã¹ã«ã€ããŠç°¡åã«èª¬æããŸãã
NAS察SAN
å¥ã®ã³ã³ãã¥ãŒã¿ãŒã«ããããŒã¿ã«ã¢ã¯ã»ã¹ããã«ã¯ã次ã®2ã€ã®æ¹æ³ããããŸãããã¡ã€ã«ïŒãªã¢ãŒãã³ã³ãã¥ãŒã¿ãŒãããã¡ã€ã«ãèŠæ±ããããšããã©ã®ãã¡ã€ã«ã·ã¹ãã ããããè¡ããã¯é¢ä¿ãããŸããïŒãNFSãCIFSïŒSMBïŒã®å žåçãªä»£è¡šè ; ããã³ãããã¯-ãããã¯ããã£ã¹ã¯åªäœãããªã¢ãŒãã³ã³ãã¥ãŒã¿ãŒã«èŠæ±ãããå ŽåïŒããŒããã£ã¹ã¯ãããããã¯ãèªã¿åãããæ¹æ³ãšåæ§ïŒã ãã®å ŽåãèŠæ±åŽã¯ãããã¯ããã€ã¹äžã«ãã¡ã€ã«ã·ã¹ãã ãäœæãããããã¯ããã€ã¹ãéä¿¡ãããµãŒããŒã¯ãã®äžã«ãããã¡ã€ã«ã·ã¹ãã ãèªèããŸããã æåã®æ¹æ³ã¯NASïŒãããã¯ãŒã¯æ¥ç¶ã¹ãã¬ãŒãžïŒãšåŒã°ãã2çªç®ã®æ¹æ³ã¯SANïŒã¹ãã¬ãŒãžãšãªã¢ãããã¯ãŒã¯ïŒã§ãã ååã¯äžè¬ã«ä»ã®å åã瀺ããŸãïŒSANã¯ã¹ãã¬ãŒãžå°çšãããã¯ãŒã¯ãæå³ããŸãïŒããNASããã¡ã€ã«ã§ãããSANããããã¯ãŒã¯äžã®ãããã¯ããã€ã¹ã§ããããšããããŸããã ãããŠã誰ããïŒïŒïŒãããã¯ééã£ãååã§ããããšãç解ããŠããŸããããã以äžããããã¯ä¿®æ£ãããŸããTCPãä»ããscsi
ãããã¯ããã€ã¹ã®ã¢ã¯ã»ã¹ãããã³ã«ã®1ã€ã¯iscsiã§ãã ååã®æåãiãã¯Apple補åã§ã¯ãªããInternetçšèª
SCSIã®äžçã§ã¯ã次ã®çšèªãåãå ¥ããããŠããŸããã¿ãŒã²ããã¯ããããã¯ããã€ã¹ãæäŸãã人ã§ãã éåžžã®ã³ã³ãã¥ãŒã¿ãŒã®äžçããæãè¿ãã¢ããã°ã¯ãµãŒããŒã§ãã
ã€ãã·ãšãŒã¿ãŒ -ãããã¯ããã€ã¹ã䜿çšããã¯ã©ã€ã¢ã³ãã 顧客çžåœã
WWID-ããã€ã¹ã®äžæã®èå¥åããã®ååã ã¢ããã°DNSåã
LUN-ã¢ã¯ã»ã¹ãããŠãããã£ã¹ã¯ã®ãããŒã¹ãã®çªå·ã æãè¿ãé¡äŒŒç©ã¯ãããŒããã£ã¹ã¯ã®ããŒãã£ã·ã§ã³ã§ãã
iSCSIã¯æ¬¡ã®å€æŽããããããŸããWWIDããªããªãã代ããã«IQNïŒiSCSI Qualified NameïŒã®æŠå¿µãå°å ¥ãããŸãããã€ãŸããçŽç²ãªååã§ãDNSãšã®æ··ä¹±ã®çšåºŠã«äŒŒãŠããŸãïŒããããªéãã¯ãããŸãïŒã IQNã®äŸã次ã«ç€ºããŸããiqn.2011-09.testïŒnameã
IETDããã³open-iscsiïŒLinuxã®ãµãŒããŒããã³ã¯ã©ã€ã¢ã³ãïŒã¯ãå¥ã®éåžžã«éèŠãªæŠå¿µããããããŸããããã¯ãã»ãšãã©ã®å Žåãiscsiã®ããã¥ã¢ã«ã«ã¯èšèŒãããŠããŸãã-ããŒã¿ã«ã ããŒã¿ã«ã¯ã倧ãŸãã«èšã£ãŠãåäžã®ãµãŒããŒã«ãã£ãŠã¢ããŠã³ã¹ãããè€æ°ã®ã¿ãŒã²ããã§ãã wwwãšã®é¡äŒŒç¹ã¯ãããŸããããWebãµãŒããŒããã®ä»®æ³ãã¹ãã®ãã¹ãŠããªã¹ãããããã«æ±ããããå Žåãããã¯ããã§ãã ããŒã¿ã«ã¯ãã¢ã¯ã»ã¹å¯èœãªã¿ãŒã²ãããšå©çšå¯èœãªIPã®ãªã¹ãã瀺ããŸãïŒã¯ããiscsiã¯ã€ãã·ãšãŒã¿ãŒããã¿ãŒã²ãããžã®è€æ°ã®ã«ãŒãããµããŒãããŸãïŒã
æšç
ãã®èšäºã¯ã¿ãŒã²ããã«é¢ãããã®ã§ã¯ãªãã®ã§ãã¿ãŒã²ãããäœããããã«ã€ããŠç°¡åã«èª¬æããŸãã 圌ã¯ãããã¯ããã€ã¹ãååŸãããã®ããã€ã¹ã«ååãšLUNã貌ãä»ãããããããŒã¿ã«ã«å ¬éããŸãããã®åŸã誰ã§ãïŒæ¿èªããæš©éïŒã圌ã«é£çµ¡ã§ããããã«ããŸãã
ç°¡åãªæ§æãã¡ã€ã«ã®äŸã次ã«ç€ºããŸããã¿ãŒã²ããã®æ©èœïŒIETã®äŸã䜿çšããæ§æãã¡ã€ã«ïŒã¯ãããããæããã«ãªããšæããŸãã
ã¿ãŒã²ããiqn.2011-09.exampleïŒããŒã¿ IncomingUserãŠãŒã¶ãŒåPa $$ w0rd Lun 0ãã¹= / dev / md1
ïŒåçŽãªè€åäœã¯ããšã¯ã¹ããŒããªãã·ã§ã³ã®ã¿ãç°ãªããŸãïŒã ãããã£ãŠãã¿ãŒã²ãããããå Žåã¯ããããæ¥ç¶ããŸãã ãããŠãããã§é£ããéšåãå§ãŸããŸããã€ãã·ãšãŒã¿ãŒã«ã¯ç¬èªã®ããžãã¯ããããããnfsã®åçŽãªããŠã³ãã®ããã«ã¯èŠããŸããã
ã€ãã·ãšãŒã¿ãŒ
Open-iscsiãã€ãã·ãšãŒã¿ãŒãšããŠäœ¿çšãããŸãã ãããã£ãŠãæãéèŠãªããšã¯ã åäœã¢ãŒããšã¹ããŒã¿ã¹ãããããšã§ãã ééã£ãã¢ãŒãã§ã³ãã³ããäžããããç¶æ ãèæ ®ããªãå Žåãçµæã¯éåžžã«èœèããŸãã
ãããã£ãŠãåäœã¢ãŒãïŒ
- ã¿ãŒã²ããã®æ€çŽ¢ïŒãã£ã¹ã«ããªãŒïŒ
- ã¿ãŒã²ããã«æ¥ç¶
- æ¥ç¶ãããã¿ãŒã²ãããæäœãã
ãã®ãªã¹ããããã©ã€ããµã€ã¯ã«ã¯éåžžã«ç解ãããããã®ã§ããæåã«èŠã€ããŠããæ¥ç¶ãã次ã«åæããŠããåæ¥ç¶ããŸãã Open-iscsiã¯ããããã¯ããã€ã¹ã䜿çšãããŠããªãå Žåã§ããã»ãã·ã§ã³ãéãããŸãŸã«ããŸãã ããã«ããµãŒããŒãåèµ·åããå Žåã§ããã»ãã·ã§ã³ãéãããŸãŸã«ããŸãïŒãã¡ãããç¹å®ã®å¶éãŸã§ïŒã iscsiã»ãã·ã§ã³ã¯éããŠããTCPæ¥ç¶ãšã¯ç°ãªããiscsiã¯ã¿ãŒã²ããã«ééçã«åæ¥ç¶ã§ããŸãã åæ/æ¥ç¶-ãå€éšãã§å¶åŸ¡ãããæäœïŒä»ã®ãœãããŠã§ã¢ããããŸãã¯æåã§ïŒã
ç¶æ ã«ã€ããŠå°ãã æ€åºåŸãopen-iscsi ã¯æ€åºããããã¹ãŠã®ã¿ãŒã²ãããèšæ¶ããŸãïŒãããã¯/ etc / iscsi /ã«æ ŒçŽãããŸãïŒãèšãæãããšãæ€åºã¯äžå®ã®æäœã§ãããããšãã°DNS解決ãªã©ããŸã£ãã察å¿ããŸããã èŠã€ãã£ãã¿ãŒã²ããã¯æåã§åé€ã§ããŸãïŒã¡ãªã¿ã«ãäžè¬çãªééãã¯ãå®éšãšèšå®ã®çµæãšããŠopen-iscsiã«å€æ°ã®ã¿ãŒã²ãããããããããã«ãã°ã€ã³ããããšãããšãã¿ãŒã²ããã®ååãå€ãè¡ã§ããããã«å€ãã®ãšã©ãŒãã¯ããŒã«ããããšã§ãé·ãéãµãŒããŒã«ååšããŠããŸããããopen-iscsiãèŠããŠãããŠãã ããïŒã ããã«ãopen-iscsiã䜿çšãããšãèšæ¶ãããŠããã¿ãŒã²ããã®èšå®ãå€æŽã§ããŸãããã®ãã¡ã¢ãªãã¯ãããŒã¢ã³ãåèµ·å/åèµ·åããåŸã§ããã¿ãŒã²ããã®ãããªãäœæ¥ã«åœ±é¿ããŸãã
ãããã¯ããã€ã¹
æåã«å€ãã®äººãèŠããã2çªç®ã®è³ªåã¯ãæ¥ç¶åŸã«ã©ãã«å°éããããšããããšã§ãã open-iscsiã¯ãããšãããããããã¯ãŒã¯ã§ãã£ãŠããSCSIã¯ã©ã¹ã®BLOCKããã€ã¹ïŒãI sayããšèšãã®ã¯äœã®æå³ããããŸããïŒãäœæããŸããã€ãŸãã/ dev / sdãã¡ããªãŒã®æåãåãåããŸãã æåã®ããªãŒã¬ã¿ãŒã䜿çšãããŸãããªããªã ã·ã¹ãã ã®æ®ãã®éšåã§ã¯ãããã¯ãããã¯ããã€ã¹ã§ããããã¯å žåçãªããŒããã©ã€ãã§ãããusb-sataãä»ããŠããŸãã¯åã«sataã«çŽæ¥æ¥ç¶ããå Žåãšå€ãããŸããã
ããã«ããããã°ãã°ããããã¯ããã€ã¹ã®ååã調ã¹ãã«ã¯ã©ãããã°ããã§ããããšãããããã¯ãçºçããŸãã iscsiadmã®è©³çŽ°åºåã«åºåãããŸãïŒïŒiscsiadm -m session -P 3ïŒã
ãã°ã€ã³
SAS / UWSCSIãšã¯ç°ãªããiSCSIã¯èª°ã§ãã¢ã¯ã»ã¹ã§ããŸãã ãã®ãããªäºæ ããä¿è·ããããã«ããŠãŒã¶ãŒåãšãã¹ã¯ãŒãïŒchapïŒããããiscsiadmãžã®è»¢éã¯åå¿è ãŠãŒã¶ãŒã«ãšã£ãŠãã1ã€ã®é çã®çš®ã§ãã ããã¯ã2ã€ã®æ¹æ³ã§å®è£ ã§ããŸãããã§ã«èŠã€ãã£ãã¿ãŒã²ããã®ããããã£ãå€æŽããopen-iscsiæ§æãã¡ã€ã«ã§ãŠãŒã¶ãŒå/ãã¹ã¯ãŒããèšå®ããŸãã
ãã®ãããªå°é£ã®çç±ã¯ããã¹ã¯ãŒããšãã°ã€ã³ããã»ã¹ããŠãŒã¶ãŒã®å±æ§ã§ã¯ãªããã·ã¹ãã ã®å±æ§ã§ããããã§ãã iSCSIã¯FCã€ã³ãã©ã¹ãã©ã¯ãã£ã®å®äŸ¡ãªããŒãžã§ã³ã§ãããããŒããŒãã®èåŸã«ãã人ã®ã³ã³ããã¹ãã§ã®ããŠãŒã¶ãŒãã®æŠå¿µã¯ããã§ã¯é©çšãããŸããã sqlããŒã¿ããŒã¹ãiscsiãããã¯ããã€ã¹äžã«ããå Žåã¯ããã¡ããããªãã¬ãŒã¿ãŒã1åã泚æãæã£ãåŸã§ã¯ãªããsqlãµãŒããŒãèªåçã«èµ·åããå¿ èŠããããŸãã
æ§æãã¡ã€ã«
ããã¯éåžžã«éèŠãªãã¡ã€ã«ã§ãããã°ã€ã³/ãã¹ã¯ãŒãã«å ããŠããšã©ãŒãæ€åºãããšãã®open-iscsiã®åäœãèšè¿°ããŠããããã§ãã ããã«ãåŸæ¹ããšã©ãŒãçºçããããšã¯ãããŸããããäžæåæ¢ïŒããšãã°ãããŒã¿ãµãŒããŒãåèµ·åããã®ã«ååãªçŽ5åïŒãçºçããŸãã ãŸãããã°ã€ã³ããã»ã¹ïŒè©Šè¡åæ°ãè©Šè¡éã®åŸ æ©æéïŒããã³ããã»ã¹èªäœã®åŸ®èª¿æŽãå¶åŸ¡ããŸãã ãããã®ãã©ã¡ãŒã¿ã¯äœæ¥äžéåžžã«éèŠã§ãããããšãã°10ã20ç§éé»æºã³ãŒããåãå€ããå Žåã®iscsiã®åäœãç解ããå¿ èŠãããããšã«æ³šæããŠãã ããã
ã¯ã€ãã¯ãªãã¡ã¬ã³ã¹
ç°¡åã«èŠã€ãããããããšã©ã€ã³ãåŒçšããã®ã¯ããŸã奜ãã§ã¯ãªãã®ã§ãiscsiã䜿çšããå žåçãªã·ããªãªã瀺ããŸãã
ãŸããå¿ èŠãªã¿ãŒã²ãããèŠã€ããŸããããã«ã¯ãã€ãã·ãšãŒã¿ãŒIP / DNSåãç¥ãå¿ èŠããããŸã
iscsiadm -m discovery -t st -p 192.168.0.1
-t stã¯ãã¿ãŒã²ããéä¿¡ã³ãã³ãã§ãã
iscsiadm -m node
ïŒãã°ã€ã³çšã®ãªã¹ããèŠã€ãããŸããïŒ
iscsiadm -m node -l -T iqn.2011-09.example:data
ïŒãã°ã€ã³ãã€ãŸãããããã¯ããã€ã¹ãæ¥ç¶ããŠäœæããŸãïŒã
iscsiadm -m session
ïŒæ¥ç¶å ã®ãªã¹ãïŒ
iscsiadm -m session -P3
ïŒè©³çŽ°ãåºåããŸãããåºåã®æåŸã«ãã©ã®ãããã¯ããã€ã¹ãã©ã®ã¿ãŒã²ããã«å±ããŠãããã瀺ãããŸãïŒã
iscsiadm - m session -u -T iqn.2011-09.example:data
ïŒç¹å®ã®ãã®ãããã°ã¢ãŠãïŒ
iscsiadm -m node -l
ïŒæ€åºããããã¹ãŠã®ã¿ãŒã²ããã«ãã°ã€ã³ïŒ
iscsiadm -m node -u
ïŒãã¹ãŠã®ã¿ãŒã²ãããããã°ã¢ãŠãïŒ
iscsiadm -m node --op delete -T iqn.2011-09.example:data
ïŒã¿ãŒã²ãããæ€åºããããã®ããåé€ããŸãïŒã
ãã«ããã¹
é倧ãªæ±ºå®ã«ãããŠéèŠãªãã1ã€ã®åé¡ã¯ããœãŒã¹ãžã®è€æ°ã®ã«ãŒãã®ãµããŒãã§ãã iscsiã®çŸããã¯ãä»ã®ãã©ãã£ãã¯ãšåãããã«éåžžã®æ¹æ³ã§åŠçã§ããéåžžã®IPã®äœ¿çšã§ãïŒå®éã«ã¯éåžžã¯ã«ãŒãã£ã³ã°ããããã¹ã€ãããããã ãã§ã-è² è·ã倧ããããŸãïŒã ãã®ãããiscsiã¯ãæµæããªããã¢ãŒãã§ãã«ããã¹ããµããŒãããŸãã Open-iscsiã ãã§ã¯ãåãã¿ãŒã²ããã®è€æ°ã®IPã«æ¥ç¶ã§ããŸããã åãã¿ãŒã²ããã®è€æ°ã®IPã«æ¥ç¶ãããŠããå Žåãããã«ããè€æ°ã®ãããã¯ããã€ã¹ã衚瀺ãããŸãã
ãã ãã解決çããããŸã-ããã¯multipathdã§ãããåãèå¥åãæã€ãã£ã¹ã¯ãæ€åºããã«ã¹ã¿ã ããªã·ãŒã䜿çšããŠããã«ããã¹ã§æåŸ ã©ããã«åŠçããŸãã ãã®èšäºã¯ãã«ããã¹ã«é¢ãããã®ã§ã¯ãªãããããã®ããã»ã¹ã®è¬ã«ã€ããŠã¯è©³ãã説æããŸããããéèŠãªç¹ã次ã«ç€ºããŸãã
- ãã«ããã¹ã䜿çšããå Žåãå°ããªã¿ã€ã ã¢ãŠããèšå®ããå¿ èŠããããŸã-äžè¯ãã¹éã®åãæ¿ãã¯ååã«é«éã§ãªããã°ãªããŸãã
- å€ããå°ãªããé«éãã£ãã«ïŒ10G以äžãå€ãã®å Žåã®ã¬ãããïŒã®ç¶æ ã§ã¯ããã€ãªã³ã¢ã¬ãã·ã³ã°ã䜿çšããæ©èœã倱ããããããè² è·ã®äžŠåæ§ã¯åé¿ããå¿ èŠããããŸãã