LeoFS’s system launch is very easy and simple as follows.
| Order | Command | Explanation |
|---|---|---|
| 1 | $ bin/leofs_manager start | Starting Manager Master on Manager Master Node |
| 2 | $ bin/leofs_manager start | Starting Manager Slave on Manager Slave Node |
| 3 | $ bin/leofs_storage start | Startting Storage(s) on each Storage Node |
| 4 | $ telnet $manager-master 10010 | Accessing Manager Master Console by telnet |
| 5 | > start | Starting LeoFS (manager and storages) |
| 6 | > status | Confirm status of the cluster on Manager Master Console #1 |
| 7 | $ bin/leofs_gateway start | Startting Gateway(s) on each Gateway Node |
| 8 | > status | Confirm status of the cluster on Manager Master Console #2 |
$ cd $LEOFS_DEPLOYED_DIR
$ manager_0/bin/leo_manager start
$ cd $LEOFS_DEPLOYED_DIR
$ manager_1/bin/leo_manager start
$ cd $LEOFS_DEPLOYED_DIR
$ storage/bin/leo_storage start
‘status’ command - Inspect LeoFS-cluster
$ telnet 127.0.0.1 10010
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
status
[system config]
version : 0.12.7
# of replicas : 3
# of successes of R : 1
# of successes of W : 2
# of successes of D : 2
ring size : 2^128
ring hash (cur) : -1
ring hash (prev) : -1
[node(s) state]
-------------------------------------------------------------------------------------------------
type node state ring (cur) ring (prev) when
-------------------------------------------------------------------------------------------------
S storage_0@127.0.0.1 attached 2012-09-12 14:16:10 +0900
S storage_1@127.0.0.1 attached 2012-09-12 14:17:08 +0900
S storage_2@127.0.0.1 attached 2012-09-12 14:17:23 +0900
S storage_3@127.0.0.1 attached 2012-09-12 14:18:00 +0900
start
OK
status
[system config]
version : 0.12.7
# of replicas : 3
# of successes of R : 1
# of successes of W : 2
# of successes of D : 2
ring size : 2^128
ring hash (cur) : 1428891014
ring hash (prev) : 1428891014
[node(s) state]
-------------------------------------------------------------------------------------------------
type node state ring (cur) ring (prev) when
-------------------------------------------------------------------------------------------------
S storage_0@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:16:10 +0900
S storage_1@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:08 +0900
S storage_2@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:23 +0900
S storage_3@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:18:00 +0900
$ cd $LEOFS_DEPLOYED_DIR/
$ gateway/bin/leo_gateway start
status
[system config]
version : 0.12.7
# of replicas : 3
# of successes of R : 1
# of successes of W : 2
# of successes of D : 2
ring size : 2^128
ring hash (cur) : 1428891014
ring hash (prev) : 1428891014
[node(s) state]
-------------------------------------------------------------------------------------------------
type node state ring (cur) ring (prev) when
-------------------------------------------------------------------------------------------------
S storage_0@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:16:10 +0900
S storage_1@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:08 +0900
S storage_2@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:23 +0900
S storage_3@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:18:00 +0900
G gateway_0@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:23:26 +0900
LeoFS-cluster’s operation commands are executed on LeoFS-Manager Console.
| Command | Explanation |
|---|---|
| Storage-node related commands: | |
| detach ${storage-node} |
|
| suspend ${storage-node} |
|
| resume ${storage-node} |
|
| Storage-cluster related commands: | |
| start |
|
| rebalance |
|
| whereis ${file-path} |
|
| Recover | |
| recover file ${file-path} |
|
| recover node ${storage-node} |
|
| recover ring ${storage-node} |
|
Command: detach ${storage-node}
detach storage_0@127.0.0.1
OK
rebalance
OK
Paths used by whereis are ruled by this rule
Command: whereis ${file-path}
whereis leo/fast/storage.key
-----------------------------------------------------------------------------------------------------------------------
del? node ring address size # of chunks checksum vclock when
-----------------------------------------------------------------------------------------------------------------------
storage_1@127.0.0.1 207643840133 35409 0 4116193149 1332407492290951 2012-06-29 14:23:31 +0900
storage_0@127.0.0.1 207643840133 35409 0 4116193149 1332407492290951 2012-06-29 14:23:31 +0900
‘recover file’ - Synchronize an object between nodes in charge
recover file leo/fast/storage.key
OK
‘recover node’ - Recover belonging targe-node’s objects
recover node storage_0@127.0.0.1
OK
‘recover ring’ - Synchronize target-node’s RING with Manager’s RING
recover ring storage_0@127.0.0.1
OK
| Command | Explanation |
|---|---|
| Disk Usage | |
| du ${storage-node} |
|
| du detail ${storage-node} |
|
| Compaction | |
| compact start ${storage-node} all | ${num_of_targets} [${num_of_compact_proc}] |
|
| compact suspend ${storage-node} |
|
| compact resume ${storage-node} |
|
| compact status ${storage-node} |
|
‘du’ - Display disk usage(summary)
Command: du ${storage-node}
du storage_0@127.0.0.1
active number of objects: 19968
total number of objects: 39936
active size of objects: 198256974.0
total size of objects: 254725020.0
ratio of active size: 77.83%
last compaction start: 2013-03-04 12:39:47 +0900
last compaction end: 2013-03-04 12:39:55 +0900
‘du detail’ - Display disk usage in detail(per raw file)
Command: du detail ${storage-node}
du detail storage_0@127.0.0.1
[du(storage stats)]
file path: /home/leofs/dev/leofs/package/leofs/storage/avs/object/0.avs
active number of objects: 320
total number of objects: 640
active size of objects: 3206378.0
total size of objects: 4082036.0
ratio of active size: 78.55%
last compaction start: 2013-03-04 12:39:47 +0900
last compaction end: 2013-03-04 12:39:55 +0900
.
.
.
file path: /home/leofs/dev/leofs/package/leofs/storage/avs/object/63.avs
active number of objects: 293
total number of objects: 586
active size of objects: 2968909.0
total size of objects: 3737690.0
ratio of active size: 79.43%
last compaction start: ____-__-__ __:__:__
last compaction end: ____-__-__ __:__:__
‘compact start’ - Start doing compaction raw-files with targets and a number of compaction-processes
Command: compact start ${storage-node} all | ${num_of_targets} [${num_of_compact_proc}]
Note
Default ${num_of_compact_proc} is ‘3’ - You can control the number of process to execute compaction in parallel. It enables you to get maximum performance by setting a appropriate number corresponding with number of cores.
## All compaction-targets will be executed with 3 concurrent processes
## (default concurrents is 3)
compact start storage_0@127.0.0.1 all
OK
## Number of compaction-targets will be executed with 2 concurrent processes
compact start storage_0@127.0.0.1 5 2
OK
‘compact suspend’ - Suspend a compaction job in progress
Command: compact suspend ${storage-node}
compact suspend storage_0@127.0.0.1
OK
‘compact resume’ - Resume a compaction job under suspension
Command: compact resume ${storage-node}
compact resume storage_0@127.0.0.1
OK
‘compact status’ - Retrieve compation statuses
Command: compact status ${storage-node}
compact status storage_0@127.0.0.1
current status: running
last compaction start: 2013-03-04 12:39:47 +0900
total targets: 64
# of pending targets: 5
# of ongoing targets: 3
# of out of targets : 56
| Command | Explanation |
|---|---|
| purge ${file-path} |
|
| Command | Explanation |
|---|---|
| create-user ${user-id} |
|
| delete-user ${user-id} |
|
| get-users |
|
| set-endpoint ${endpoint} |
|
| delete-endpoint ${endpoint} |
|
| get-endpoints |
|
| add-bucket ${bucket} ${access_key_id} |
|
| delete-bucket ${bucket} ${access_key_id} |
|
| get-buckets |
|
Command: create-user ${user-id}
create-user test_account
access-key-id: be8111173c8218aaf1c3
secret-access-key: 929b09f9b794832142c59218f2907cd1c35ac163
Command: delete-user ${user-id}
delete-user test
ok
Command: get-users
get-users
user_id | access_key_id | created_at
------------+------------------------+---------------------------
_test_leofs | 05236 | 2012-12-07 10:27:39 +0900
leo | 39bbad4f3b837ed209fb | 2012-12-07 10:27:39 +0900
Note
LeoFS’s domains are ruled by this rule
Command: set-endpoint ${endpoint}
set-endpoint test_account
OK
Command: delete-endpoint ${endpoint}
delete-endpoint test
OK
Command: get-endpoints
get-endpoints
endpoint | created at
-----------------+---------------------------
s3.amazonaws.com | 2012-09-12 14:09:52 +0900
localhost | 2012-09-12 14:09:52 +0900
leofs.org | 2012-09-12 14:09:52 +0900
Command: add-bucket ${bucket} ${access_key_id}
add-bucket backup 05236
OK
Command: delete-bucket ${bucket} ${access_key_id}
delete-bucket backup 05236
OK
Command: get-buckets
get-buckets
bucket | owner | created at
-------+-----------+---------------------------
backup | __leofs__ | 2012-09-12 14:30:07 +0900
docs | __leofs__ | 2012-09-12 14:29:30 +0900
logs | __leofs__ | 2012-09-12 14:29:34 +0900
photo | __leofs__ | 2012-09-12 14:29:26 +0900
| Command | Explanation |
|---|---|
| status [${NODE}] |
|
| history | Retrieve operation histories |
Command-1: status
status
[system config]
version : 0.12.7
# of replicas : 1
# of successes of R : 1
# of successes of W : 1
# of successes of D : 1
ring size : 2^128
ring hash (cur) : 1428891014
ring hash (prev) : 1428891014
[node(s) state]
-------------------------------------------------------------------------------------------------
type node state ring (cur) ring (prev) when
-------------------------------------------------------------------------------------------------
S storage_0@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:16:10 +0900
S storage_1@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:08 +0900
S storage_2@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:17:23 +0900
S storage_3@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:18:00 +0900
G gateway_0@127.0.0.1 running 1428891014 1428891014 2012-09-12 14:23:26 +0900
Command-2: status ${storage-node} OR status ${gateway-node}
status storage_0@127.0.0.1
[config]
version : 0.14.1
obj-container : [[{path,"./avs"},{num_of_containers,64}]]
log dir : ./log
[status-1: ring]
ring state (cur) : 64212f2d
ring state (prev) : 64212f2d
[status-2: erlang-vm]
vm version : 5.9.3.1
total mem usage : 30886632
system mem usage : 12774309
procs mem usage : 18178027
ets mem usage : 1154464
procs : 326/1048576
kernel_poll : true
thread_pool_size : 32
[status-3: # of msgs]
replication msgs : 0
vnode-sync msgs : 0
rebalance msgs : 0
status gateway_0@127.0.0.1
[config-1]
version : 0.14.1
log dir : ./log
[config-2]
-- http-server-related --
using api [s3|rest] : s3
listening port : 8080
listening ssl port : 8443
# of_acceptors : 0
-- cache-related --
http cache [true|false] : false
# of cache_workers : 128
cache expire : 300
cache max content len : 1048576
ram cache capacity : 1073741824
disc cache capacity : 0
disc cache threshold : 1048576
disc cache data dir : ./cache/data
disc cache journal dir : ./cache/journal
-- large-object-related --
max # of chunked objs : 1000
max object length : 524288000
chunked object length : 5242880
threshold chunked obj length : 5767168
[status-1: ring]
ring state (cur) : 64212f2d
ring state (prev) : 64212f2d
[status-2: erlang-vm]
vm version : 5.9.3.1
total mem usage : 48095776
system mem usage : 34839664
procs mem usage : 13261128
ets mem usage : 1195144
procs : 504/1048576
kernel_poll : true
thread_pool_size : 32
Command: history
history
[Histories]
1 | 2012-06-29 14:23:01 +0900 | status
2 | 2012-06-29 14:23:02 +0900 | status
3 | 2012-06-29 14:23:03 +0900 | attach storage_0@127.0.0.1
4 | 2012-06-29 14:23:04 +0900 | attach storage_1@127.0.0.1
5 | 2012-06-29 14:23:05 +0900 | attach storage_2@127.0.0.1
6 | 2012-06-29 14:23:06 +0900 | attach storage_3@127.0.0.1
7 | 2012-06-29 14:23:07 +0900 | start
8 | 2012-06-29 14:23:15 +0900 | status