[localhost]$ kumo-manager -v -l localhost [localhost]$ kumo-server -v -m localhost -l localhost:19801 -L 19901 -s ./kumodb1.tch # -l is RPC address [localhost]$ kumo-server -v -m localhost -l localhost:19802 -L 19902 -s ./kumodb2.tch # and port, -L is [localhost]$ kumo-server -v -m localhost -l localhost:19803 -L 19902 -s ./kumodb3.tch # stream port. [localhost]$ kumo-gateway -v -m localhost -t 11211 # memcached client is accepted on -t port. [localhost]$ kumoctl localhost attach # attach kumo-servers into the cluster.
kumofs doesn’t use configuration files. All configuration is done on command line arguments. You can use memcached client and get(s)/set/cas/delete values from/into kumofs
See Design for the role of the nodes.
First, run kumo-manager on svr1 and svr2. kumo-manager requires IP address of its host and IP address of the another kumo-manager:
[on svr1]$ kumo-manager -v -l svr1 -p svr2 [on svr2]$ kumo-manager -v -l svr2 -p svr1
kumo-manager listens on 19700/tcp by default.
Second, run kumo-server on svr1,svr2,svr3. kumo-server requires IP address of its host, IP address of the kumo-managers and path to the database file:
[on svr1]$ kumo-server -v -l svr1 -m svr1 -p svr2 -s /var/kumodb.tch [on svr2]$ kumo-server -v -l svr2 -m svr1 -p svr2 -s /var/kumodb.tch [on svr3]$ kumo-server -v -l svr3 -m svr1 -p svr2 -s /var/kumodb.tch
Third, attach kumo-servers into the cluster using kumoctl command. Confirm that the kumo-servers are recognized by the kumo-manager first:
[ ]$ kumoctl svr1 status hash space timestamp: Wed Dec 03 22:15:55 +0900 2008 clock 62 attached node: not attached node: 192.168.0.101:19800 192.168.0.102:19800 192.168.0.103:19800
Recognized kumo-servers are listed at not attached node. Then, attach them as follows:
[ ]$ kumoctl svr1 attach
Attached kumo-servers are listed at attached node. Confirm it as follows:
[ ]$ kumoctl svr1 status hash space timestamp: Wed Dec 03 22:16:00 +0900 2008 clock 72 attached node: 192.168.0.101:19800 (active) 192.168.0.102:19800 (active) 192.168.0.103:19800 (active) not attached node:
Finally, run kumo-gateway on the hosts that runs applications that uses kumofs. kumo-gateway requires IP address of the kumo-managers and port number that accepts memcached protocol client:
[on cli1]$ kumo-gateway -v -m svr1 -p svr2 -t 11211
It is ready to use kumofs cluster. Connect localhost:11211 using memcached client on cli1.
To add a server into the system that is built in the tutorial, run kumo-server on another host, and then attach it using kumoctl command:
[on svr4]$ kumo-server -v -l svr4 -m svr1 -p svr2 -s /var/kumodb.tch [ ]$ kumoctl svr1 attach
[ ]$ kumoctl svr1 remove
You can get status of the cluster from from kumo-manager. Use kumoctl command to get the status. Specify IP address of the kumo-manager for first argument and ‘status’ for second argument:
[ ]$ kumoctl svr1 status hash space timestamp: Wed Dec 03 22:15:45 +0900 2008 clock 58 attached node: 192.168.0.101:19800 (active) 192.168.0.102:19800 (active) 192.168.0.103:19800 (active) 192.168.0.104:19800 (fault) not attached node: 192.168.0.104:19800
kumo-server is the node that stores data. You can get load information such as the number of items that is stored on the node using kumostat command.
$ kumostat svr3 items $ kumostat svr3 cmd_get
kumotop command shows status of the servers like top command:
$ kumotop -m svr1
kumofs distributes key-value pairs into the multiple servers. kumohash command look up which node stores the key.
$ kumohash -m svr1 assign “the-key”