Skip to content

Instantly share code, notes, and snippets.

@alcir
Last active August 29, 2015 13:58
Show Gist options
  • Save alcir/10100101 to your computer and use it in GitHub Desktop.
Save alcir/10100101 to your computer and use it in GitHub Desktop.
leofs SmartOS
3 zones created
zoneA 192.168.0.136
zoneB 192.168.0.136
zoneC 192.168.0.136
In each zone I've configured the fifo repository, then I have installed:
zoneA
pkgin in leo_storage-1.0.0pre3 leo_manager-1.0.0pre3 leo_gateway-1.0.0pre3
zoneB
pkgin in leo_storage-1.0.0pre3 leo_manager-1.0.0pre3
zoneC
pkgin in leo_storage-1.0.0pre3
Manager configuration
---------------------
In the default configuration file (/opt/local/leo_manager/etc/leo_manager.conf) I've changed these lines only.
zoneA
manager.mode = master
manager.partner = [email protected]
consistency.num_of_replicas = 3
consistency.write = 2
consistency.read = 1
consistency.delete = 2
nodename = [email protected]
zoneB
manager.mode = slave
manager.partner = [email protected]
nodename = [email protected]
Manager start
-------------
On zoneA and zoneB
svcadm enable svc:/pkgsrc/epmd:default
svcadm enable svc:/leofs/manager:default
Storage configuration
---------------------
In the default configuration file (/opt/local/leo_storage/etc/leo_storage.conf) I've changed these lines only.
zoneA
managers = [[email protected], [email protected]]
nodename = [email protected]
zoneB
managers = [[email protected], [email protected]]
nodename = [email protected]
zoneC
managers = [[email protected], [email protected]]
nodename = [email protected]
Storage start
-------------
On zoneA, zoneB and zoneC
svcadm enable svc:/leofs/storage:default
Issue start command
-------------------
telnet zoneA 10010
Connected to localhost.
Escape character is '^]'.
start
Generating RING...
Generated RING
OK 33% - [email protected]
OK 67% - [email protected]
OK 100% - [email protected]
OK
Gateway configuration
---------------------
In the default configuration file (/opt/local/leo_gateway/etc/leo_gateway.conf) I've changed these lines only.
zoneA
managers = [[email protected], [email protected]]
nodename = [email protected]
Gateway start
---------------------
On zoneA
svcadm enable svc:/leofs/gateway:default
Check satus
-----------
telnet zoneA 10010
status
[System config]
System version : 1.0.0-pre3
Cluster Id : cluster_1
DC Id : dc_1
Total replicas : 3
# of successes of R : 1
# of successes of W : 2
# of successes of D : 2
# of DC-awareness replicas : 0
# of Rack-awareness replicas : 0
ring size : 2^128
Current ring hash : be1ce5f6
Prev ring hash : be1ce5f6
[Node(s) state]
-------+------------------------------+--------------+----------------+----------------+----------------------------
type | node | state | current ring | prev ring | updated at
-------+------------------------------+--------------+----------------+----------------+----------------------------
S | [email protected] | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
S | [email protected] | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
S | [email protected] | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:40:47 +0000
G | [email protected] | running | be1ce5f6 | be1ce5f6 | 2014-04-08 07:44:40 +0000
At last
-------
create-user pino password
add-endpoint hostname.of.zoneA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment