OpenStackã«åºã¥ãHPC HUBãããžã§ã¯ãã®äœæ¥ã®äžç°ãšããŠããããããå°ããªä»®æ³HPCã¯ã©ã¹ã¿ãŒã§ããä»®æ³ãã·ã³ã®ããã€ãã®ã°ã«ãŒãçšã«ãã©ãŒã«ããã¬ã©ã³ãã§é«æ§èœãªå ±æã¹ãã¬ãŒãžãäœæããã¿ã¹ã¯ãçºçããŸããã ãã®ãããªåã¯ã©ã¹ã¿ãŒã¯åã ã®ã¯ã©ã€ã¢ã³ãã«çºè¡ãããã¯ã©ã€ã¢ã³ãã¯å éšããå®å šã«å¶åŸ¡ããŸãã ãããã£ãŠãç©çã³ã³ãã¥ãŒã¿ãŒäžã§çµã¿ç«ãŠããããéåžžã®ãåæ£ã·ã¹ãã ã®ãã¬ãŒã ã¯ãŒã¯å ã§åé¡ã解決ããããšã¯ã§ããŸããã ã€ãŒãµãããã¯ã©ã¹ã¿ãããã¯ãŒã¯ã¯ãL2ã¬ãã«ã§äºãã«åé¢ãããŠãããã¯ã©ã€ã¢ã³ãããŒã¿ãšãããã¯ãŒã¯ãã©ãã£ãã¯ãäºãã«ä¿è·ããŸãã ããã«ãå€å žçãªå ±æã·ã¹ãã ã®ãã¬ãŒã ã¯ãŒã¯å ã®åä»®æ³ãã·ã³ã«ããŒã¿ãé 眮ããããšã¯ã§ããŸãããåãã·ã³ã®èœåãååã§ã¯ãªããç¹ã«ãã€ããŒã®äœ¿çšãèæ ®ããŠããããŒã¿èŒžè¡ãã«è²»ããããšãªããèšç®ãå®äºããçŽåŸã«è²Žéãªããã»ããµãŒãªãœãŒã¹ã解æŸãããããã§ã-䜿çšã 幞ããªããšã«ããã¹ãŠãããã»ã©æªãããã§ã¯ãããŸããã å ±æã¹ãã¬ãŒãžã¯HPCã®èšç®ã«äœ¿çšãããããšã«ãªã£ãŠãããšããäºå®ã«ç §ãããŠãããã€ãã®è² è·ãæ³å®ã§ããŸãã
- æäœã¯å€§ããªãããã¯ã§å®è¡ãããŸãã
- æžã蟌ã¿æäœã¯é »ç¹ã«è¡ãããŸããããããªãã®æéééã§æ£åšããŸãã
- æžã蟌ã¿æäœã¯ãã¹ãŠã®ããŒãããã»ãŒåæã«ããã«éå§ã§ããŸããããã®å Žåã§ããã§ããã ãæ©ãèšé²ãçµäºããŠãããŒããã«ãŠã³ããç¶ããããã«ããå¿ èŠããããŸãã
ããŒã¿ãèšç®ãããåæã«ä¿åãããããŒããæã€ãã¢ããŒãã¢ã·ã¹ãã ã¯ãååãšããŠHPCãã©ãã€ã ã«åããŸãã 2ã€ã®éåæã¢ã¯ãã£ããã£ãããŒãã«è¡šç€ºãããŸããä»ã®ããŒãããã®ããŒã¿ãã«ãŠã³ãããã³èšé²ããŸãã æåã¯ãããæŸæ£ããããåŸãŸããã§ããã 2ã¬ãã«ã®ã·ã¹ãã ãæ§ç¯ããããšã決å®ãããŸããã ãã®ãããªã¹ãã¬ãŒãžã«ã¯ããã€ãã®ã¢ãããŒãããããŸãã
- OpenStackãããã¯ãŒã¯ä»®æ³åã«ããããã©ãŒãã³ã¹ã®äœäžãåé¿ããããã«ãç¹å¥ã«ç·šæããããããã¯ãŒã¯ããã€ã¹ãä»ããŠä»®æ³ããŒãã«ããŠã³ããããåæ£ãã¡ã€ã«ã·ã¹ãã ã
- ç©çããŒãã«ããŠã³ããããåæ£ãã¡ã€ã«ã·ã¹ãã ãšãä»®æ³ãã¡ã€ã«ã·ã¹ãã ãä»ããã²ã¹ãã·ã¹ãã ããã®ã¢ã¯ã»ã¹ã
- ã²ã¹ããããã¯ããã€ã¹ã®äžã®ä»®æ³ã¯ã©ã¹ã¿ãŒå
ã®å€å
žçãªåæ£ãã¡ã€ã«ã·ã¹ãã ã
- åä»®æ³ããŒãã«å
±éã®åæ£ãããã¯ããã€ã¹ãšããã®å
±æããã€ã¹äžã§å®è¡ãããä»®æ³ã¯ã©ã¹ã¿ãŒå
ã®äºåæ§ææžã¿ãã¡ã€ã«ã·ã¹ãã ã
ãããã®ã¢ãããŒãã®é·æãšçæãåæããŠã¿ãŸãããã
ãªãã·ã§ã³1ïŒã§ã¯ãåŸæ¥ã®åæ£ãã¡ã€ã«ã·ã¹ãã ïŒãŸãã¯ãµãããªãŒïŒãã²ã¹ãOSã«ããŠã³ããããŸãã ãã®å Žåããã¡ã€ã«ã·ã¹ãã ãµãŒããŒã¯åã·ã¹ãã ãããããã³çžäºã«è¡šç€ºãããŸãã ããã¯ãL2ã¬ãã«ã«ãããããã¯ãŒã¯ã®åé¢ã«éåããç°ãªããŠãŒã¶ãŒãä¿åãããããŒã¿ã䜿çšããŠäºãã®ãã©ãã£ãã¯ãèŠãå¯èœæ§ããããŸãã ããã«ãCEPHã®å Žåãã«ãŒãã«ã§ã¯çŽæ¥ã§ã¯ãªããFUSEïŒãŠãŒã¶ãŒç©ºéã®ãã¡ã€ã«ã·ã¹ãã ïŒãä»ããŠãã¡ã€ã«ã·ã¹ãã ã®ããŠã³ãã¢ãŒãã§å調ã¯ã©ãŒã¿ã®ã¿ãå¯èœã§ãïŒã€ãŸãããŠãŒã¶ãŒã¯èš±å¯ããããã£ã¹ã¯ã¹ããŒã¹ãä»ã®ãŠãŒã¶ãŒã®è²»çšã§åå©çšã§ããŸãïŒã ã«ãŒãã«ã«çŽæ¥ããŠã³ããããå Žåãã¯ã©ãŒã¿ã¯ãŸã£ãããµããŒããããŸããã
ãªãã·ã§ã³2ïŒ-ãã¹ãã«ããŠã³ããããåæ£ãã¡ã€ã«ã·ã¹ãã ã®äžã«ããä»®æ³ãã¡ã€ã«ã·ã¹ãã ïŒQEMUã®virtio-9pïŒ-åäœããã«ã¯ãç¹æš©ãäžããããšãªãã¹ãŒããŒãŠãŒã¶ãŒã®ä»£ããã«QEMUãå®è¡ããå¿ èŠããããŸããããã«ãããã·ã¹ãã ã®å šäœçãªã»ãã¥ãªãã£ãäœäžããããã²ã¹ãIDãä¿åããç¹å®ã®ACLãæ§æãããŸããŠãŒã¶ãŒããã³ã²ã¹ãã®ã¢ã¯ã»ã¹æš©ã
ãªãã·ã§ã³3ïŒã§ã¯ãç©çãµãŒããŒã«ãã£ã¹ã¯ã¹ããŒã¹ããªãå Žåãäžéšã®åæ£ã¹ãã¬ãŒãžã®ãªã¢ãŒããããã¯ããã€ã¹ã®ã¿ã䜿çšã§ããŸãã ãã®ãªãã·ã§ã³ã¯ãããã€ãã®çç±ã§å®çšçã§ã¯ãããŸããã
- ããŒã¿ã«ã¢ã¯ã»ã¹ããã«ã¯ããããã¯ãŒã¯åž¯åå¹
ã®2åãå¿
èŠã§ãã ããŒã¿ã¯ãæåã«åæ£ã¹ãã¬ãŒãžããç¹å®ã®ä»®æ³ãã¹ãã«è»¢éãããŠãããæçµæ¶è²»è
ã«ã®ã¿éä¿¡ãããŸãã
- ååãšããŠããã®ãããªã·ã¹ãã ã¯ãã¹ãŠããŒã¿ã®åé·æ§ããµããŒãããŸãããããã¯åãå ¥ããããŸããã ããšãã°ãCEPHã®ããã©ã«ãèšå®ã§ã¯ã䜿çšå¯èœãªã¹ãã¬ãŒãžå®¹éã¯ãã§ã«äœ¿çšå¯èœãªãã£ã¹ã¯å®¹éã®4åã«åæžãããŠããŸãã åæ£FSããµããŒããããã¹ãŠã®ãããã¯ãŒã¯è² è·ããä»®æ³ãããã¯ãŒã¯ç©ºéå ã«ãããŸãã ãããŠãæãé£ããã®ã¯ãåŸè ã®ãªãã·ã§ã³ã§ã¯å®éã«ã¹ãã¬ãŒãžä»®æ³ãã·ã³ã«ç©çããŒããå²ãåœãŠãå¿ èŠããããããå šäœçãªå¹çãå€§å¹ ã«äœäžããããšã§ãã
ãªãã·ã§ã³4ïŒã§ã¯ãCEPHã«åºã¥ããåæ£ãããã¯ããã€ã¹ãšããã®ãããªããã€ã¹ã§åäœããã¯ã©ã¹ã¿ãŒå ã®äœããã®ãã¡ã€ã«ã·ã¹ãã ãè©Šãããšã«ããŸããã å®éãã²ã¹ãã¯ãã¡ãããããã€ã¹ããããã¯CEPHããã€ã¹ãšããŠã§ã¯ãªããéåžžã®ä»®æ³VirtIO SCSIãŸãã¯ãªãã·ã§ã³ã§VirtIOãããã¯ãšããŠèªèããŸãã VirtIO SCSIãéžæããã®ã¯éåžžã«ç°¡åãªçç±ã§ã-unmapã³ãã³ãã®SCSIãµããŒãã«ãããããç¥ãããŠããSATA TRIMã³ãã³ãã«é¡äŒŒããŠããããã¡ã€ã«ãåé€ããããšã²ã¹ãã·ã¹ãã ã«ãã£ãŠéä¿¡ãããä»®æ³ã¹ãã¬ãŒãžã®ã¹ããŒã¹ã解æŸããŸãã
ã²ã¹ãçšã®ãã¡ã€ã«ã·ã¹ãã ã®éžæãç°¡åã§ãã 次ã®2ã€ã®ãªãã·ã§ã³ã®ã¿ããããŸãã
- OCFS2
- Gfs2ã
å ±æã¹ãã¬ãŒãžæ§æ
CEPHã®ã€ã³ã¹ããŒã«ã¯ãããã¥ã¡ã³ãdocs.ceph.com/docs/master/startã§å®å šã«èª¬æãããŠãããç¹å¥ãªåé¡ã¯çºçããŠããŸããã çŸåšãã·ã¹ãã ã¯ããŒã¿ã®åé·ã³ããŒã1ã€äœ¿çšããèš±å¯ãªãã§åäœããŸãã CEPHãããã¯ãŒã¯ã¯ãã¯ã©ã€ã¢ã³ããããã¯ãŒã¯ããåé¢ãããŠããŸãã ãããã¯ããã€ã¹ãäœæããŠãåé¡ã¯çºçããŸããã§ããã ãã¹ãŠãæšæºã§ãã
GFS2ã®æ§æ
æ®å¿µãªãããGFS2ã§ã¯ãã»ããã¢ããã«åœåã®äºæ³ãããããªãé·ãæéãããããŸããã ãããäžã«ã¯èª¬æçãªèª¬æã¯ã»ãšãã©ãªããæ··ä¹±ãæããŸãã äžè¬çãªèãæ¹ã¯æ¬¡ã®ãšããã§ãã ã«ãŒãã«å ã®å ±æãã¡ã€ã«ã·ã¹ãã ã®åäœã¯ãããã€ãã®ããŒã¢ã³ã«ãã£ãŠå¶åŸ¡ãããŸããããŒã¢ã³ãæ£ããæ§æããã«ã¯ãç°¡åãªåªåãç¥èãå¿ èŠã§ãã
æåã«ç¥ã£ãŠããã¹ãæãéèŠãªããšã¯ãUbuntuã§ãã®ãã¡ã€ã«ã·ã¹ãã ãäžããããšã«æåããªãå¯èœæ§ãé«ãããšã§ãã ãŸãã¯ãUbuntuã®äžã§RedHatã®å€éšã§ååã«æŽ»çšãããŠããªãå€ãã®ããã±ãŒãžãåæ§ç¯ããAPIã¬ãã«ã®éèªæãªç«¶åã解決ããå¿ èŠããããŸãã
RedHatã®ãããªã·ã¹ãã ã§ã¯ãã·ãŒã±ã³ã¹ã¯å€ããå°ãªããç解ãããŠããŸãã 以äžã¯ãCentOS 7ã²ã¹ãã·ã¹ãã çšã®ã³ãã³ãã§ãã
ãŸããSELinuxãç¡å¹ã«ããŸãã GFS2ã¯ããã§åäœããŸããã ããã¯ã¡ãŒã«ãŒããã®å ¬åŒæ å ±ã§ãã
vi /etc/sysconfig/selinux # ,
åºæ¬çãªãœãããŠã§ã¢ãé 眮ããŸãã
yum -y install ntp epel-release vim openssh-server net-tools
å¿ èŠãªãµãŒãã¹ããªã³/ãªãã«ããŸãã
chkconfig ntpd on chkconfig firewalld off
ã·ã¹ãã ãæ©èœããããã«ã¯NTPãå¿ èŠã§ããããããã¯ããã€ã¹é åã®ãã¹ãŠã®åæ£ããããã³ã°ã¯ããã«é¢é£ä»ããããŠããŸãã ã·ã¹ãã ã¯å€çããéé¢ãããã¯ã©ã¹ã¿ãŒçšã«æ§æãããŠããããããã¡ã€ã¢ãŠã©ãŒã«ããªãã«ããŸãã 次ã«ãå¿ èŠãªãœãããŠã§ã¢ãã€ã³ãã£ã³ã°ãåã¯ã©ã¹ã¿ãŒããŒãã«é 眮ããŸãã
yum -y install gfs2-utils lvm2-cluster pcs fence-agents-all chkconfig pcsd on # PaceMaker - RedHat lvmconf --enable-cluster # GFS2 echo <PASSWORD> | passwd --stdin hacluster # . :) reboot # SELinux LVM
ãŠãŒã¶ãŒãhaclusterããäœæããå¿ èŠã¯ãªãããšã«æ³šæããŠãã ãããããã±ãŒãžãã€ã³ã¹ããŒã«ãããšãã«ããŠãŒã¶ãŒãhaclusterãã¯èªåçã«äœæãããŸãã å°æ¥çã«ã¯ãã¯ã©ã¹ã¿ãŒãã·ã³éã®çžäºèªèšŒãããã¯ãŒã¯ãäœæããããã«åœŒã®ãã¹ã¯ãŒããå¿ èŠã«ãªããŸãã
ããã§ããããŸã§ã«è¡ãããŠããªãã£ãåæ£ãªããžããªãäœæã§ããããã«ãªããŸããã ããã¯ãCEPHããŒããã€ãŸãããã®äŸã§ã¯ç©çããŒãã§å®è¡ãããŸãã
rbd create my-storage-name --image-format 2 --size 6291456 # ! sudo rbd map rbd/my-storage-name sudo mkfs.gfs2 -p lock_dlm -t gfs2:fs -j17 /dev/rbd0 sudo rbd unmap /dev/rbd0
ãã¡ã€ã«ã·ã¹ãã ããã©ãŒããããããšããã¯ã©ã¹ã¿ãŒåã瀺ãããŸã-ãã®å Žåã¯ãgfs2ãããã®ã¯ã©ã¹ã¿ãŒå ã®ãã¡ã€ã«ã·ã¹ãã ã®ååã¯ãfsãããã°ã®æ°ã¯ã-j17ãã§ãããã£ã¹ã¯ã¹ããŒã¹ãå²ãåœãŠãããã®ã¯ã©ã¹ã¿ãŒãšããã¯ãããã³ã«ïŒãã®å Žåããlock_dlmãã¯åæ£ããã¯ã§ãïŒã ããŒãã£ã·ã§ã³ãããŠã³ããããšãã«ãã¯ã©ã¹ã¿ãŒãšãã¡ã€ã«ã·ã¹ãã ã®ååãæå®ããå¿ èŠããããŸãã ã¯ã©ã¹ã¿ãŒå ã®åé¢ããããããã¯ãŒã¯ã§ã¯ãç°ãªãã¯ã©ã¹ã¿ãŒã«åãååã䜿çšã§ããŸãã ããã¯åé¡ã§ã¯ãããŸããã
ããã§ãã²ã¹ãOSã§ããŠã³ããæ§æããã ãã«ãªããŸããã æ§æã¯ãã¯ã©ã¹ã¿ãŒãã·ã³ã®1ã€ãã1åå®è¡ãããŸãã
pcs cluster destroy --all # ,
çžäºèªèšŒãããã¯ãŒã¯ã®äœæïŒ
pcs cluster auth master n01 n02 n03 n04 -u hacluster -p 1q2w3e4r --force
ããã§ãmasterãšn01..n04ã¯ãå ±æããŒãã£ã·ã§ã³ãå©çšã§ããä»®æ³ãã¹ãã§ãã
ããã©ã«ãã®ã¯ã©ã¹ã¿ãŒãäœæããŸãã ã¯ã©ã¹ã¿åã¯ãåã®æé ã§ãã¡ã€ã«ã·ã¹ãã ãäœæãããšãã«äœ¿çšãããã®ãšäžèŽããå¿ èŠãããããšã«æ³šæããŠãã ããã
pcs cluster setup --name gfs2 master n01 n02 n03 n04 pcs cluster start --all # pcs cluster enable --all #
ãµãŒãã¹ããŒã¢ã³ã®å®è¡-clvmdããã³dlmïŒ
pcs property set no-quorum-policy=ignore pcs stonith create local_stonith fence_kdump pcmk_monitor_action="metadata" pcs resource create dlm ocf:pacemaker:controld op monitor interval=30s \ on-fail=fence clone interleave=true ordered=true pcs resource create clvmd ocf:heartbeat:clvm op monitor interval=30s \ on-fail=fence clone interleave=true ordered=true pcs constraint order start dlm-clone then clvmd-clone pcs constraint colocation add clvmd-clone with dlm-clone
GFS2ããŒãã£ã·ã§ã³ã/ sharedãå ±æãããã¯ããã€ã¹ã«ããŠã³ããã-sdbïŒ
pcs resource create clusterfs Filesystem device="/dev/sdb" \ directory="/shared" fstype="gfs2" "options=noatime,nodiratime" op \ monitor interval=10s on-fail=fence clone interleave=true pcs constraint order start clvmd-clone then clusterfs-clone pcs constraint colocation add clusterfs-clone with clvmd-clone
ãã®ç¬éããã次ã®ã³ãã³ãã䜿çšããŠããµãŒãã¹ã1ã€ãã€äžããã·ã¹ãã å šäœã®éå§ã楜ããããšãã§ããŸãã
pcs status resources
æçµçã«ããã¹ãŠãé©åã«æ©èœããå ŽåãåããŒãã§/å ±æãã¡ã€ã«ã·ã¹ãã ã䜿çšå¯èœã«ãªãããšãããããŸãã
æ§èœè©Šéš
ãã¹ãã§ã¯ãddãä»ããŠåããŒãããããŒã¿ãé çªã«èªã¿æžãããç°¡åãªã¹ã¯ãªããã䜿çšããŸããã次ã«äŸã瀺ããŸãã
dd if=/shared/file of=/dev/null bs=32M iflag=direct dd if=/root/file of=/shared/file bs=32M oflag=direct
ãããã¯ãµã€ãºã¯å€§ããèšå®ãããèªã¿åãã¯ãçŽæ¥ãã¢ãŒãã§è¡ããããã£ã¹ã¯ãã£ãã·ã¥ã®æäœé床ã§ã¯ãªãããã¡ã€ã«ã·ã¹ãã èªäœããã¹ãããŸãã çµæã¯æ¬¡ã®ãšããã§ãã
å³1 ç°ãªããµã€ãºã®ä»®æ³ã¯ã©ã¹ã¿ãŒã®ãã¹ãŠã®ããŒãããã®åæèªã¿åãã åäžããŒãã®ããã©ãŒãã³ã¹ã
å³2ã ç°ãªããµã€ãºã®ä»®æ³ã¯ã©ã¹ã¿ãŒã®ãã¹ãŠã®ããŒãããã®åæèªã¿åãã 环ç©ããã©ãŒãã³ã¹ã
å³3 ç°ãªããµã€ãºã®ä»®æ³ã¯ã©ã¹ã¿ãŒã®ãã¹ãŠã®ããŒãããã®åæèšé²ã åäžããŒãã®ããã©ãŒãã³ã¹ã
å³4 ç°ãªããµã€ãºã®ä»®æ³ã¯ã©ã¹ã¿ãŒã®ãã¹ãŠã®ããŒãããã®åæèšé²ã ããŒã¿ã«ããã©ãŒãã³ã¹
çµè«
ã©ã®ãããªçµè«ãåºãããšãã§ããŸããïŒ
- èªã¿åãã¯å®è³ªçã«ãããã¯ãŒã¯åž¯åå¹
ïŒã9 GbpsãInfinibandãIPoIBïŒã«äŸåããä»®æ³ã¯ã©ã¹ã¿ãŒå
ã®ããŒãæ°ã®å¢å ã«å¿ããŠé©åã«ã¹ã±ãŒãªã³ã°ãããŸãã
- é²é³ã¯å®çšçãªäžéã«åºã¥ããŠãããã¹ã±ãŒãªã³ã°ãããŸããã ãããããããŸã§ã®ä»®å®ãèæ ®ãããšãããã¯ç§ãã¡ã«é©ããŠããŸãã ãã®ãããªå€©äºã®ååšãåŒãèµ·ãããã¡ã«ããºã ã¯ãç§ãã¡ã«ã¯ãŸã æããã§ã¯ãããŸããã
èœãšãç©Ž
èœãšãç©Žã«ã¯ãå°ãªããšãã¯ã©ã¹ã¿ãŒã䜿çšãããã¹ãŠã®ä»®æ³ãã·ã³ã®æåŸãæ£ããåæ¢ããå¿ èŠããããŸãã ããããªããšããã¡ã€ã«ã·ã¹ãã ãå埩ãå¿ èŠãšããç¶æ ã«ãªãå¯èœæ§ããããŸãã æ·±å»ãªåé¡ã¯ãä»ãšã®åæã倱ã£ãpcsã¯ã©ã¹ã¿ãŒããããŒããåæããããã®ãã§ã³ã·ã³ã°ã®æ£ããæ§æã§ãã ããããããã«ã€ããŠã¯æ¬¡ã®èšäºã§è©³ãã説æããŸãã
ãã®è³æã¯ãAndrei NikolaevãDenis LunevãAnna Subbotinaã«ãã£ãŠäœæãããŸããã