尊龙凯时人生就是搏

ÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢£¨ÈçNFS£©

ÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢£¨Èçnfs£©

ÏÈÈÝ£º

ÍøÂçÎļþϵͳ£¨NFS£©ÊÇÒ»ÖÖ³£ÓõÄÂþÑÜʽÎļþϵͳ £¬ÔÊÐí²î±ðµÄÅÌËã»úÖ®¼ä¹²ÏíÎļþ¡£ÔÚLinuxÇéÐÎÏ £¬ÎÒÃÇ¿ÉÒÔͨ¹ýÉèÖø߿ÉÓõÄÍøÂç´æ´¢À´È·±£ÏµÍ³µÄÎȹÌÐԺͿɿ¿ÐÔ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄNFS £¬²¢ÌṩһЩ´úÂëʾÀý¡£

°ì·¨Ò»£º×°ÖÃNFS

Ê×ÏÈ £¬ÎÒÃÇÐèÒªÔÚËùÓнڵãÉÏ×°ÖÃNFSÈí¼þ°ü¡£ÔÚ´ó´ó¶¼Linux¿¯ÐаæÖÐ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî¾ÙÐÐ×°Öãº

$ sudo apt-get install nfs-kernel-server

°ì·¨¶þ£ºÉèÖÃNFS

½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒªÔÚÖ÷½ÚµãÉÏÉèÖÃNFS¡£±à¼­/etc/exportsÎļþ £¬²¢Ìí¼Ó¹²ÏíĿ¼µÄÉèÖá£ÀýÈç £¬ÈôÊÇÎÒÃÇÏëÒª¹²ÏíĿ¼/var/nfsdata £¬²¢ÔÊÐíËùÓнڵ㶼¿ÉÒÔ»á¼û £¬¿ÉÒÔÔÚ/etc/exportsÎļþÖÐÌí¼ÓÒÔÏÂÐУº

/var/nfsdata *(rw,sync,no_subtree_check)

ÄúÒ²¿ÉÒÔƾ֤ÐèÒªÉèÖÃÆäËûµÄÑ¡Ïî £¬ÈçÖ»ÔÊÐíÌض¨½Úµã»á¼û¡¢Ö»¶ÁȨÏ޵ȡ£

°ì·¨Èý£ºÆô¶¯NFSЧÀÍ

Íê³ÉÉèÖúó £¬ÎÒÃÇÐèÒªÆô¶¯NFSЧÀÍ £¬²¢È·±£ÆäÔÚϵͳÆô¶¯Ê±×Ô¶¯Æô¶¯¡£ÔÚ´ó´ó¶¼Linux¿¯ÐаæÖÐ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´Æô¶¯²¢ÉèÖÿª»ú×ÔÆô¶¯£º

$ sudo systemctl start nfs-kernel-server

$ sudo systemctl enable nfs-kernel-server

°ì·¨ËÄ£ºÉèÖÃÍøÂç´æ´¢µÄ¸ß¿ÉÓÃ

ΪÁËʵÏÖÍøÂç´æ´¢µÄ¸ß¿ÉÓÃÐÔ £¬ÎÒÃÇ¿ÉÒÔʹÓÃLinux-HA¹¤¾ß°üÀ´¼à¿ØºÍÖÎÀíNFSЧÀÍ¡£ÒÔÏÂÊÇÒ»¸ö¼òÆӵĴúÂëʾÀý £¬ÑÝʾÔõÑùʹÓÃLinux-HA¹¤¾ß°üÀ´ÉèÖø߿ÉÓõÄNFS¡£

°ì·¨Ò»£º×°ÖÃLinux-HA¹¤¾ß°ü

ÔÚ´ó´ó¶¼Linux¿¯ÐаæÖÐ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×°ÖÃLinux-HA¹¤¾ß°ü£º

$ sudo apt-get install pacemaker corosync

°ì·¨¶þ£ºÉèÖÃLinux-HA

½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒªÉèÖÃLinux-HAÒÔʵÏÖÍøÂç´æ´¢µÄ¸ß¿ÉÓá£Ê×ÏÈ £¬ÔÚËùÓнڵãÉϱ༭/etc/ha.d/authkeysÎļþ £¬²¢Ìí¼ÓÒÔÏÂÄÚÈÝ£º

auth 3

3 md5 YourSharedSecretKey

È»ºó £¬±à¼­/etc/ha.d/ha.cfÎļþ £¬²¢ÉèÖÃÈçÏÂÄÚÈÝ£º

logfile /var/log/ha-log

logfacility local0

keepalive 2

deadtime 30

warntime 10

initdead 120

udpport 694

auto_failback on

node node1

node node2

°ì·¨Èý£ºÉèÖÃ×ÊÔ´ÊðÀí

ÎÒÃÇ»¹ÐèÒªÉèÖÃ×ÊÔ´ÊðÀíÒÔʵÏÖNFSЧÀ͵ĸ߿ÉÓ᣽¨ÉèÒ»¸öеÄÎļþ/etc/ha.d/groups £¬²¢Ìí¼ÓÒÔÏÂÐУº

group nfs-group node1 node2

resource nfs_res_nfs1

  exclusive lockfile
  fsid=0
  block_device /dev/nfs_share
  script /usr/lib/ocf/resource.d/filesystem/nfs
  op monitor interval="10s"

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöÉèÖÃÖÐ £¬ÎÒÃǽ¨ÉèÁËÒ»¸öÃûΪnfs-groupµÄ×ÊÔ´×é £¬²¢½«nfs_res_nfs1×ÊÔ´·ÖÅɸø¸Ã×ÊÔ´×é¡£Äú¿ÉÒÔƾ֤ÐèÒªÐÞ¸Ä×ÊÔ´µÄÃû³ÆºÍÆäËû²ÎÊý¡£

°ì·¨ËÄ£ºÆô¶¯Linux-HAЧÀÍ

Íê³ÉÉèÖúó £¬ÎÒÃÇ¿ÉÒÔÆô¶¯Linux-HAЧÀÍ £¬²¢È·±£ÆäÔÚϵͳÆô¶¯Ê±×Ô¶¯Æô¶¯¡£ÔÚ´ó´ó¶¼Linux¿¯ÐаæÖÐ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´Æô¶¯²¢ÉèÖÿª»ú×ÔÆô¶¯£º

$ sudo systemctl start pacemaker

$ sudo systemctl enable pacemaker

½áÂÛ£º

ͨ¹ýÒÔÉÏ°ì·¨ £¬ÎÒÃÇ¿ÉÒÔÔÚLinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢£¨ÈçNFS£©¡£Õâ¿ÉÒÔÌá¸ßϵͳµÄÎȹÌÐԺͿɿ¿ÐÔ £¬È·±£Êý¾ÝµÄÇå¾²ºÍ¿É»á¼ûÐÔ¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢£¨ÈçNFS£©µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ