http://www.mysqlkorea.co.kr
Çѱ۸Ŵº¾ó 5.0 , Çѱ۸Ŵº¾ó 5.1 , MySQL 5.1 HA , »ç¿ëÀڸŴº¾ó
°øÁö»çÇ×  
´º½º  
Áú¹®°ú ´äº¯
DBA
Developer
Cluster
ÅäÅ©¹Ú½º  
À̺¥Æ®  
¼­Æ÷Æ® ƼÄÏ  
ÃֽűÛ
foreign key ¼³Á¤¡¦
ÀÎÅØ½º Ãß°¡ µî¿¡¡¦
mysql master - s¡¦
´Ù´ë´Ù °ü°è¿¡¼­ ¡¦
mysql myÆÄÀϰú ¡¦
 
Áú¹®°ú ´äº¯ (Cluster) > Ä¿¹Â´ÏƼ Á¸ > Áú¹®°ú ´äº¯ (Cluster)
µÎ´ëÀÇ ¼­¹ö¿¡¼­ Ŭ·¯½ºÅ͸µ¿î¿µ
±Û¾´ÀÌ : gostjayh   ³¯Â¥ : 08-06-26 17:43   Á¶È¸¼ö : 9707
ÇöÀç µÎ´ëÀÇ ¼­¹ö¿¡ °¢°¢ mgmd+ndbd+mysqld ³ëµå¸¦ ¶ç¿ö³õ°í ¿î¿µÁßÀÔ´Ï´Ù.
 
ÃßõÇÏ´Â ¹æ¹ýÀº ¾Æ´ÏÁö¸¸ À̷лóÀ¸·Î´Â ¹®Á¦¾øÀÌ µ¹¾Æ°¡¾ßÇÏ´Â°Ô Á¤»óÀÎ°Í °°Àºµ¥...
 
ndb³ëµå°¡ master·Î µÇ¾îÀÖ´ÂÂÊ ½Ã½ºÅÛÀ» ¸®ºÎÆÃÀ» Çϸé(reboot¸í·É¾î¸¦ ÀÌ¿ëÇÑ °­Á¦Á¾·á) Ŭ·¯½ºÅͰ¡ ±úÁ®¹ö¸®°í ¸¿´Ï´Ù.
 
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3 (not connected, accepting connect from 192.168.1.144)
id=4 (not connected, accepting connect from 192.168.1.145)
[ndb_mgmd(MGM)] 2 node(s)
id=1 (not connected, accepting connect from 192.168.1.144)
id=2    @192.168.1.145  (Version: 5.0.45)
[mysqld(API)]   2 node(s)
id=5 (not connected, accepting connect from 192.168.1.144)
id=6 (not connected, accepting connect from 192.168.1.145)
ÀÌ·¸°Ô¿ä...
 
¸¶½ºÅÍ·Î µÇ¾îÀÖÁö ¾ÊÀº ½Ã½ºÅÛÀ» ¸®ºÎÆÃÇÏ¸é ±¦ÂúÀºµ¥¿ä...ÇØ°á¹æ¹ýÀÌ ÀÖÀ»±î¿ä??
 
·Î±×´Â ´ÙÀ½°ú °°½À´Ï´Ù..
 
2008-06-26 14:20:54 [MgmSrvr] ALERT    -- Node 3: Node 5 Disconnected
2008-06-26 14:20:54 [MgmSrvr] INFO     -- Node 3: Communication to Node 5 closed
2008-06-26 14:20:55 [MgmSrvr] ALERT    -- Node 4: Node 5 Disconnected
2008-06-26 14:20:55 [MgmSrvr] INFO     -- Node 4: Communication to Node 5 closed
2008-06-26 14:20:58 [MgmSrvr] INFO     -- Node 4: Communication to Node 5 opened
2008-06-26 14:20:58 [MgmSrvr] INFO     -- Node 3: Communication to Node 5 opened
2008-06-26 14:21:06 [MgmSrvr] WARNING  -- Node 4: Node 3 missed heartbeat 2
2008-06-26 14:21:06 [MgmSrvr] WARNING  -- Node 4: Node 1 missed heartbeat 2
2008-06-26 14:21:07 [MgmSrvr] WARNING  -- Node 4: Node 3 missed heartbeat 3
2008-06-26 14:21:07 [MgmSrvr] WARNING  -- Node 4: Node 1 missed heartbeat 3
2008-06-26 14:21:08 [MgmSrvr] ALERT    -- Node 2: Node 3 Disconnected
2008-06-26 14:21:08 [MgmSrvr] ALERT    -- Node 2: Node 3 Disconnected
2008-06-26 14:21:10 [MgmSrvr] ALERT    -- Node 2: Node 4 Disconnected
2008-06-26 14:21:58 [MgmSrvr] ALERT    -- Node 4: Forced node shutdown completed. Caused by error 2305: 'Node lost connection to other nodes and can n
ot form a unpartitioned cluster, please investigate if there are error(s) on other node(s)(Arbitration error). Temporary error, restart node'.
Á¤Áø»ï
¿Ã·Á ³õÀ¸½Å »óŸ¦ º¸´Ï
Cluster Configuration
---------------------
[ndbd(NDB)]    2 node(s)
id=3 (not connected, accepting connect from 192.168.1.144)
id=4 (not connected, accepting connect from 192.168.1.145)
[ndb_mgmd(MGM)] 2 node(s)
id=1 (not connected, accepting connect from 192.168.1.144)
id=2    @192.168.1.145  (Version: 5.0.45)
[mysqld(API)]  2 node(s)
id=5 (not connected, accepting connect from 192.168.1.144)
id=6 (not connected, accepting connect from 192.168.1.145)

2¹ø ¼­¹ö¿¡ °ü¸®³ëµå »©°í ndb ³ëµå, mysql ³ëµå ¸ðµÎ ´Ù Á×¾î ÀÖ´Â »óų׿ä...
¿ì¼± ¸ðµç ³ëµåµéÀ» ¶ç¿öÁֽðí¿ä....

¶ç¿öÁֽñâ Àü¿¡... ³×Æ®¿öÅ©µµ Ã¼Å©ÇØ ÁÖ½Ã¸é µÉ °Í °°³×¿ä
gostjayh
³×Æ®¿öÅ© »óÅ´ Ç×»ó Á¤»óÀÔ´Ï´Ù.

À§¿¡ Àû¾î³ùÁö¸¸ Ç×»ó masterÂÊ ³ëµå°¡ ÀÖ´Â ½Ã½ºÅÛÀ» ¸®ºÎÆÃÇϸé ÀÌ·¸°Ô µË´Ï´Ù.
master°¡ ¾Æ´ÑÂÊÀÇ ³ëµå°¡ ÀÖ´Â ½Ã½ºÅÛÀ» ¸®ºÎÆÃÇϸé Á¤»óÀ̶õ ¸»ÀÌÁÒ...

Cluster Configuration
---------------------
[ndbd(NDB)]    2 node(s)
id=3    @192.168.1.144  (Version: 5.0.45, Nodegroup: 0, Master)
id=4    (not connected, accepting connect from 192.168.1.145)

[ndb_mgmd(MGM)] 2 node(s)
id=1    @192.168.1.144  (Version: 5.0.45)
id=2    (not connected, accepting connect from 192.168.1.145)

[mysqld(API)]  2 node(s)
id=5    @192.168.1.144  (Version: 5.0.45)
id=6    (not connected, accepting connect from 192.168.1.145)

ÀÌ·¸°Ô¿ä...

Ưº°È÷ ¼³Á¤ÇØÁà¾ßÇÏ´Â °ÍÀÌ ÀÖ´ÂÁö ±Ã±ÝÇÒ »ÓÀÔ´Ï´Ù.

¾Æ·¡´Â ¼³Á¤ÆÄÀÏ Á¤º¸ÀÔ´Ï´Ù. µµ¿ÍÁÖ¼¼¿ä...¤Ì¤Ì

=====>> config.ini

[NDBD DEFAULT]                      # Options affecting ndbd processes on all data nodes
NoOfReplicas=2                      # Number of replicas
DataMemory=500M
IndexMemory=100M
MaxNoOfConcurrentOperations=100000
MaxNoOfLocalOperations=100000
MaxNoOfAttributes=100000
MaxNoOfOrderedIndexes=5000
MaxNoOfUniqueHashIndexes=5000
MaxNoOfTables=1000

[TCP DEFAULT]                      # TCP/IP options:
portnumber=2202

[NDB_MGMD]
Id=1
HostName=192.168.1.144              # Hostname or IP address of MGM node
DataDir=/var/lib/mysql-cluster      # Directory for MGM node logfiles

[NDB_MGMD]
Id=2
HostName=192.168.1.145              # Hostname or IP address of MGM node
DataDir=/var/lib/mysql-cluster      # Directory for MGM node logfiles

[NDBD]
Id=3                                # Node ID
HostName=192.168.1.144              # Hostname or IP address
DataDir=/usr/mysql/data            # Directory for this data node's datafiles

[NDBD]
Id=4                                # Node ID
HostName=192.168.1.145              # Hostname or IP address
DataDir=/usr/mysql/data            # Directory for this data node's datafiles

[MYSQLD]
Id=5                                # Node ID
HostName=192.168.1.144              # Hostname or IP address

[MYSQLD]
Id=6                                # Node ID
HostName=192.168.1.145              # Hostname or IP address

=====>> my.cnf

[mysql_cluster]                                # Options for ndbd process
ndb-connectstring=192.168.1.145                # location of MGM node

[ndb_mgmd]
config-file=/var/lib/mysql-cluster/config.ini

# The following options will be passed to all MySQL clients
[client]
#password      = your_password
#port            = 3306
socket          = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
#port            = 3306
ndbcluster
default-character-set = euckr
language = /usr/mysql/share/mysql/korean/
skip-character-set-client-handshake
socket          = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id      = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id      = 2
#
# The replication master for this slave - required
#master-host    =  <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user    =  <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =  <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port    =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir        = /tmp/
#log-update    = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 64M
#bdb_max_lock = 100000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/data/
#innodb_log_arch_dir = /usr/local/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
¾Æ½º¶ó´Ù
Àúµµ ´Ô°ú °°Àº ±¸¼ºÀ» Çß¾ú´Âµ¥, Ŭ·¯½ºÅͰ¡ ºÒ¾ÈÁ¤ÇÏ°Ô µ¿ÀÛÇß½À´Ï´Ù.

±¸¼ºÀ» º¸´Ï °ü¸®³ëµå¿Í ndbd ³ëµå°¡ °°ÀÌ ¿Ã¶ó°¡ Àִµ¥, ÀÌ °ÍÀ» µû·Î ºÐ¸®ÇÏ½Ã´Â°Ô ÁÁÀ» °Å °°½À´Ï´Ù.

Á¦°¡ ¿¹Àü¿¡ Å×½ºÆ® ÇßÀ» ¶§ °ü¸®³ëµå¿Í ndbd ³ëµå°¡ ÇÔ²² ¿Ã¶ó°¡ÀÖÀ» °æ¿ì ´Ô°ú °°Àº »óȲÀÌ ¹ß»ýÇß¾ú°Åµç¿ä.

¾Æ¸¶µµ °ü¸®³ëµå¸¦ ½ÇÇàÇÏ½Ç ¶§ °æ°í¸Þ¼¼Áö°¡ Ãâ·ÂµÇ¾úÀ»°Å °°Àºµ¥¿ä, °ü¸®³ëµå¿Í µ¥ÀÌÅÍ ³ëµå¸¦ ºÐ¸®Ç϶ó°í¿ä.?
dbalee
ndb_mgmd¿Í ndbd¸¦ ÇÑ ¼­¹ö¿¡¼­ °°ÀÌ ±âµ¿Çصµ,
mysql clusrer°¡ ½ÃÀÛÇϴµ¥´Â ¹®Á¦°¡ ¾ø½À´Ï´Ù¸¸,
ÀÌ »óȲ¿¡¼­ ¼­¹ö°¡ ¸®ºÎÆÃµÇ¸é, ndb_mgmdµµ Á×°Ô µÇ¹Ç·Î, Àüü ndbdµ¥¸óµµ Á×°Ô µË´Ï´Ù.
ndb_mgmd´Â ¹Ýµå½Ã ndbdµ¥¸ó°ú ºÐ¸®µÈ ¼­¹ö¿¡¼­ ½ÇÇàÇØ¾ß ÇÕ´Ï´Ù.
ndb_mgmd´Â Æò¼Ò¿¡´Â ÀüÇô cpu¸¦ »ç¿ëÇÏÁö ¾Ê°í, mysql clusterÀÇ ¼³Á¤ º¯°æÀ̳ª ¹®Á¦ ¹ß»ý½Ã¿¡¸¸ µ¿ÀÛÀ» ÇÏ°Ô µÇ´Ï,
web¼­¹ö¿¡ ndb_mgmd¸¦ ½ÇÇà½ÃÄѵµ À¥¼­¹ö ºÎÇÏ¿¡ ÀüÇô ¿µÇâ¾øÀÌ,
¾ÈÁ¤ÀûÀ¸·Î mysql cluster¸¦ ¿î¿µÇÒ¼ö ÀÖ°Ô µË´Ï´Ù.
ÀÌÀü±Û µ¥ÀÌÅÍÁ¤¸®½Ã ¸Þ¸ð¸®¿ë·® 
´ÙÀ½±Û SQL nodeÀÇ ºÎÇÏ ºÐ»ê ¹æ¹ý 
MySQL Korea »çÀÌÆ®ÀÇ ÄÁÅÙÃ÷ ¼ÒÀ¯±ÇÀº (ÁÖ)»ó»óÀ̺ñÁî¿¡ ÀÖÀ¸¹Ç·Î ¹«´ÜÀüÀ縦 ±ÝÇÕ´Ï´Ù.
Copyright ¨Ï ssebiz All Rights Reserved.