Π‘ΠΎΠ³Π»Π°ΡΠ½ΠΎ : β ΡΠ°ΡΠΏΡΠ΅Π΄Π΅Π»ΡΠ½Π½ΠΎΠ΅ ΠΎΡΠΊΠ°Π·ΠΎΡΡΡΠΎΠΉΡΠΈΠ²ΠΎΠ΅ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ΅ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² , ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΠΌΠΎΠ΅ Ρ ΠΊΠ»ΠΈΠ΅Π½ΡΠ°ΠΌΠΈ, ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡΡΠΈΠΌΠΈ API Amazon S3 ΠΈ REST-API, Π° ΡΠ°ΠΊΠΆΠ΅ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΈΠ²Π°ΡΡΠ΅Π³ΠΎ ΡΠ΅ΠΆΠΈΠΌ ΡΠ°Π±ΠΎΡΡ Π² ΡΠΎΠ»ΠΈ NFS-ΡΠ΅ΡΠ²Π΅ΡΠ°. ΠΠΌΠ΅ΡΡΡΡ ΠΎΠΏΡΠΈΠΌΠΈΠ·Π°ΡΠΈΠΈ Π΄Π»Ρ Ρ ΡΠ°Π½Π΅Π½ΠΈΠ΅ ΠΊΠ°ΠΊ ΠΌΠ΅Π»ΠΊΠΈΡ , ΡΠ°ΠΊ ΠΈ ΠΎΡΠ΅Π½Ρ Π±ΠΎΠ»ΡΡΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ², ΠΏΡΠΈΡΡΡΡΡΠ²ΡΠ΅Ρ Π²ΡΡΡΠΎΠ΅Π½Π½ΡΠΉ ΠΌΠ΅Ρ Π°Π½ΠΈΠ·ΠΌ ΠΊΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ, Π²ΠΎΠ·ΠΌΠΎΠΆΠ½Π° ΡΠ΅ΠΏΠ»ΠΈΠΊΠ°ΡΠΈΡ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡ ΠΌΠ΅ΠΆΠ΄Ρ Π΄Π°ΡΠ°-ΡΠ΅Π½ΡΡΠ°ΠΌΠΈ. Π‘ΡΠ΅Π΄ΠΈ ΡΠ΅Π»Π΅ΠΉ ΠΏΡΠΎΠ΅ΠΊΡΠ° ΠΎΡΠΌΠ΅ΡΠ°Π΅ΡΡΡ Π΄ΠΎΡΡΠΈΠΆΠ΅Π½ΠΈΠ΅ Π½Π°Π΄ΡΠΆΠ½ΠΎΡΡΠΈ 99.9999999% Π·Π° ΡΡΡΡ ΠΈΠ·Π±ΡΡΠΎΡΠ½ΠΎΠ³ΠΎ ΡΠ΅ΠΏΠ»ΠΈΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ Π΄ΡΠ±Π»ΠΈΠΊΠ°ΡΠΎΠ² ΠΈ ΠΈΡΠΊΠ»ΡΡΠ΅Π½ΠΈΡ Π΅Π΄ΠΈΠ½ΠΎΠΉ ΡΠΎΡΠΊΠΈ ΠΎΡΠΊΠ°Π·Π°. ΠΠΎΠ΄ ΠΏΡΠΎΠ΅ΠΊΡΠ° Π½Π°ΠΏΠΈΡΠ°Π½ Π½Π° ΡΠ·ΡΠΊΠ΅ Erlang.
LeoFS ΡΠΎΡΡΠΎΠΈΡ ΠΈΠ· ΡΡΡΡ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΠΎΠ²:
- β ΠΎΠ±ΡΠ»ΡΠΆΠΈΠ²Π°Π΅Ρ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΈ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΡ, ΠΈΠ·Π²Π»Π΅ΡΠ΅Π½ΠΈΡ ΠΈ ΡΠ΄Π°Π»Π΅Π½ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² ΠΈ ΠΌΠ΅ΡΠ°Π΄Π°Π½Π½ΡΡ , ΠΎΡΠ²Π΅ΡΠ°Π΅Ρ Π·Π° Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΡΠ΅ΠΏΠ»ΠΈΠΊΠ°ΡΠΈΠΈ, Π²ΠΎΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ΠΈΡ ΠΈ ΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΎΡΠ΅ΡΠ΅Π΄ΠΈ Π·Π°ΠΏΡΠΎΡΠΎΠ² ΠΊΠ»ΠΈΠ΅Π½ΡΠΎΠ².
- β ΠΎΠ±ΡΠ»ΡΠΆΠΈΠ²Π°Π΅Ρ HTTP-Π·Π°ΠΏΡΠΎΡΡ ΠΈ ΠΏΠ΅ΡΠ΅Π½Π°ΠΏΡΠ°Π²Π»ΡΠ΅Ρ ΠΎΡΠ²Π΅ΡΡ ΠΊΠ»ΠΈΠ΅Π½ΡΠ°ΠΌ Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ REST-API ΠΈΠ»ΠΈ S3-API, ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠΈΠ²Π°Π΅Ρ ΠΊΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ Π²ΠΎΡΡΡΠ΅Π±ΠΎΠ²Π°Π½Π½ΡΡ Π΄Π°Π½Π½ΡΡ Π² ΠΏΠ°ΠΌΡΡΠΈ ΠΈ Π½Π° Π΄ΠΈΡΠΊΠ΅.
- β ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π΅Ρ ΡΠ°Π±ΠΎΡΡ ΡΠ·Π»ΠΎΠ² LeoFS Gateway ΠΈ LeoFS Storage, Π²Π΅Π΄ΡΡ ΠΌΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³ ΡΠΎΡΡΠΎΡΠ½ΠΈΡ ΡΠ·Π»ΠΎΠ² ΠΈ ΠΏΡΠΎΠ²Π΅ΡΡΠ΅Ρ ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½ΡΠ΅ ΡΡΠΌΠΌΡ. ΠΠ°ΡΠ°Π½ΡΠΈΡΡΠ΅Ρ ΡΠ΅Π»ΠΎΡΡΠ½ΠΎΡΡΡ Π΄Π°Π½Π½ΡΡ ΠΈ Π²ΡΡΠΎΠΊΡΡ Π΄ΠΎΡΡΡΠΏΠ½ΠΎΡΡΡ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ°.
Π ΡΡΠΎΠΌ ΠΏΠΎΡΡΠ΅ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΠΌ Leofs c ΠΏΠΎΠΌΠΎΡΡΡ ansible-playbook, ΠΏΡΠΎΡΠ΅ΡΡΠΈΡΡΠ΅ΠΌ S3, NFS.
ΠΡΠ»ΠΈ Π²Ρ ΠΏΠΎΠΏΡΡΠ°Π΅ΡΠ΅ΡΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ LeoFS ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡ ΠΎΡΠΈΡΠΈΠ°Π»ΡΠ½ΡΠ΅ playbook-ΠΈ, ΡΠΎ Π²Π°Ρ ΠΆΠ΄ΡΡ ΡΠ°Π·Π½ΡΠ΅ ΠΎΡΠΈΠ±ΠΊΠΈ: ,. Π ΡΡΠΎΠΌ ΠΏΠΎΡΡΠ΅ Π½Π°ΠΏΠΈΡΡ ΡΡΠΎ Π½ΡΠΆΠ½ΠΎ ΡΠ΄Π΅Π»Π°ΡΡ ΡΡΠΎΠ±Ρ ΡΡΠΈ ΠΎΡΠΈΠ±ΠΊΠΈ ΠΈΠ·Π±Π΅ΠΆΠ°ΡΡ.
Π’Π°ΠΌ Π³Π΄Π΅ Π²Ρ Π±ΡΠ΄Π΅ΡΠ΅ Π·Π°ΠΏΡΡΠΊΠ°ΡΡ ansible-playbook, Π½ΡΠΆΠ½ΠΎ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ netcat.
ΠΡΠΈΠΌΠ΅Ρ inventory
ΠΡΠΈΠΌΠ΅Ρ inventory (Π² ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΈ hosts.sample):
# Please check roles/common/vars/leofs_releases for available versions
[all:vars]
leofs_version=1.4.3
build_temp_path="/tmp/leofs_builder"
build_install_path="/tmp/"
build_branch="master"
source="package"
#[builder]
#172.26.9.177
# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_0]
172.26.9.176
# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_1]
172.26.9.178
[leo_storage]
172.26.9.179 leofs_module_nodename=S0@172.26.9.179
172.26.9.181 leofs_module_nodename=S0@172.26.9.181
172.26.9.182 leofs_module_nodename=S0@172.26.9.182
172.26.9.183 leofs_module_nodename=S0@172.26.9.183
[leo_gateway]
172.26.9.180 leofs_module_nodename=G0@172.26.9.180
172.26.9.184 leofs_module_nodename=G0@172.26.9.184
[leofs_nodes:children]
leo_manager_0
leo_manager_1
leo_gateway
leo_storageΠΠΎΠ΄Π³ΠΎΡΠΎΠ²ΠΊΠ° ΡΠ΅ΡΠ²Π΅ΡΠΎΠ²
ΠΡΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ Selinux. ΠΠ°Π΄Π΅ΡΡΡ ΡΡΠΎ ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²ΠΎ ΡΠΎΠ·Π΄Π°ΡΡ ΠΏΠΎΠ»ΠΈΡΠΈΠΊΠΈ Selinux Π΄Π»Ρ LeoFS.
- name: Install libselinux as prerequisite for SELinux Ansible module
yum:
name: "{{item}}"
state: latest
with_items:
- libselinux-python
- libsemanage-python
- name: Disable SELinux at next reboot
selinux:
state: disabled
- name: Set SELinux in permissive mode until the machine is rebooted
command: setenforce 0
ignore_errors: true
changed_when: false
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° netcat ΠΈ redhat-lsb-core. netcat Π½ΡΠΆΠ΅Π½ Π΄Π»Ρ leofs-adm, redhat-lsb-core Π½ΡΠΆΠ΅Π½ Π΄Π»Ρ ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ Π²Π΅ΡΡΠΈΠΈ ΠΠ‘ .
- name: Install Packages
yum: name={{ item }} state=present
with_items:
- nmap-ncat
- redhat-lsb-coreΠ‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ·Π΅ΡΠ° leofs ΠΈ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π΅Π³ΠΎ Π² Π³ΡΡΠΏΠΏΡ wheel
- name: Create user leofs
group:
name: leofs
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- name: Add the user 'leofs' to group 'wheel'
user:
name: leofs
groups: wheel
append: yesΠ£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° Erlang
- name: Remote erlang-20.3.8.23-1.el7.x86_64.rpm install with yum
yum: name=https://github.com/rabbitmq/erlang-rpm/releases/download/v20.3.8.23/erlang-20.3.8.23-1.el7.x86_64.rpm
ΠΠΎΠ»Π½ΡΡ Π²Π΅ΡΡΠΈΡ ΠΏΠΎΠΏΡΠ°Π²Π»Π΅Π½ΡΡ ansible playbook ΠΌΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡΠΈ Π·Π΄Π΅ΡΡ:
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°, ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅, Π·Π°ΠΏΡΡΠΊ
ΠΠ°Π»Π΅Π΅ Π²ΡΠΏΠΎΠ»Π½ΡΠ΅ΠΌ ΠΊΠ°ΠΊ Π½Π°ΠΏΠΈΡΠ°Π½ΠΎ Π² Π±Π΅Π· build_leofs.yml
## Install LeoFS
$ ansible-playbook -i hosts install_leofs.yml
## Config LeoFS
$ ansible-playbook -i hosts config_leofs.yml
## Start LeoFS
$ ansible-playbook -i hosts start_leofs.ymlΠΡΠΎΠ²Π΅ΡΡΠ΅ΠΌ ΡΡΠ°ΡΡΡ ΠΊΠ»Π°ΡΡΠ΅ΡΠ° Π½Π° Primary LeoManager
leofs-adm statusPrimary ΠΈ Secondary ΠΌΠΎΠΆΠ½ΠΎ ΡΠ²ΠΈΠ΄Π΅ΡΡ Π² Π»ΠΎΠ³Π°Ρ ansible-playbook


ΠΡΠ²ΠΎΠ΄ Π±ΡΠ΄Π΅Ρ ΠΏΡΠΈΠΌΠ΅ΡΠ½ΠΎ ΡΠ°ΠΊΠΎΠΉ
[System Confiuration]
-----------------------------------+----------
Item | Value
-----------------------------------+----------
Basic/Consistency level
-----------------------------------+----------
system version | 1.4.3
cluster Id | leofs_1
DC Id | dc_1
Total replicas | 2
number of successes of R | 1
number of successes of W | 1
number of successes of D | 1
number of rack-awareness replicas | 0
ring size | 2^128
-----------------------------------+----------
Multi DC replication settings
-----------------------------------+----------
[mdcr] max number of joinable DCs | 2
[mdcr] total replicas per a DC | 1
[mdcr] number of successes of R | 1
[mdcr] number of successes of W | 1
[mdcr] number of successes of D | 1
-----------------------------------+----------
Manager RING hash
-----------------------------------+----------
current ring-hash | a0314afb
previous ring-hash | a0314afb
-----------------------------------+----------
[State of Node(s)]
-------+----------------------+--------------+---------+----------------+----------------+----------------------------
type | node | state | rack id | current ring | prev ring | updated at
-------+----------------------+--------------+---------+----------------+----------------+----------------------------
S | S0@172.26.9.179 | running | | a0314afb | a0314afb | 2019-12-05 10:33:47 +0000
S | S0@172.26.9.181 | running | | a0314afb | a0314afb | 2019-12-05 10:33:47 +0000
S | S0@172.26.9.182 | running | | a0314afb | a0314afb | 2019-12-05 10:33:47 +0000
S | S0@172.26.9.183 | attached | | | | 2019-12-05 10:33:58 +0000
G | G0@172.26.9.180 | running | | a0314afb | a0314afb | 2019-12-05 10:33:49 +0000
G | G0@172.26.9.184 | running | | a0314afb | a0314afb | 2019-12-05 10:33:49 +0000
-------+----------------------+--------------+---------+----------------+----------------+----------------------------Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ ΡΠ·Π΅ΡΠ°
Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ ΡΠ·Π΅ΡΠ° leofs:
leofs-adm create-user leofs leofs
access-key-id: 9c2615f32e81e6a1caf5
secret-access-key: 8aaaa35c1ad78a2cbfa1a6cd49ba8aaeb3ba39ebΠ‘ΠΏΠΈΡΠΎΠΊ ΡΠ·Π΅ΡΠΎΠ²:
leofs-adm get-users
user_id | role_id | access_key_id | created_at
------------+---------+------------------------+---------------------------
_test_leofs | 9 | 05236 | 2019-12-02 06:56:49 +0000
leofs | 1 | 9c2615f32e81e6a1caf5 | 2019-12-02 10:43:29 +0000Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ Bucket
Π‘Π΄Π΅Π»Π°Π» bucket
leofs-adm add-bucket leofs 9c2615f32e81e6a1caf5
OKΠ‘ΠΏΠΈΡΠΎΠΊ bucket:
leofs-adm get-buckets
cluster id | bucket | owner | permissions | created at
-------------+----------+--------+------------------+---------------------------
leofs_1 | leofs | leofs | Me(full_control) | 2019-12-02 10:44:02 +0000ΠΠΎΠ½ΡΠΈΠ³ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ s3cmd
Π ΠΏΠΎΠ»Π΅ HTTP Proxy server name ΡΠΊΠ°Π·ΡΠ²Π°Π΅ΠΌ IP ΡΠ΅ΡΠ²Π΅ΡΠ° Gateway
s3cmd --configure
Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.
Access key and Secret key are your identifiers for Amazon S3. Leave them empty for using the env variables.
Access Key [9c2615f32e81e6a1caf5]:
Secret Key [8aaaa35c1ad78a2cbfa1a6cd49ba8aaeb3ba39eb]:
Default Region [US]:
Use "s3.amazonaws.com" for S3 Endpoint and not modify it to the target Amazon S3.
S3 Endpoint [s3.amazonaws.com]:
Use "%(bucket)s.s3.amazonaws.com" to the target Amazon S3. "%(bucket)s" and "%(location)s" vars can be used
if the target S3 system supports dns based buckets.
DNS-style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]: leofs
Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password:
Path to GPG program [/usr/bin/gpg]:
When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP, and can only be proxied with Python 2.7 or newer
Use HTTPS protocol [No]:
On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't connect to S3 directly
HTTP Proxy server name [172.26.9.180]:
HTTP Proxy server port [8080]:
New settings:
Access Key: 9c2615f32e81e6a1caf5
Secret Key: 8aaaa35c1ad78a2cbfa1a6cd49ba8aaeb3ba39eb
Default Region: US
S3 Endpoint: s3.amazonaws.com
DNS-style bucket+hostname:port template for accessing a bucket: leofs
Encryption password:
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: False
HTTP Proxy server name: 172.26.9.180
HTTP Proxy server port: 8080
Test access with supplied credentials? [Y/n] Y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)
Now verifying that encryption works...
Not configured. Never mind.
Save settings? [y/N] y
Configuration saved to '/home/user/.s3cfg'ΠΡΠ»ΠΈ Ρ Π²Π°Ρ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΠΎΡΠΈΠ±ΠΊΠ° ERROR: S3 error: 403 (AccessDenied): Access Denied:
s3cmd put test.py s3://leofs/
upload: 'test.py' -> 's3://leofs/test.py' [1 of 1]
382 of 382 100% in 0s 3.40 kB/s done
ERROR: S3 error: 403 (AccessDenied): Access DeniedΠ’ΠΎ Π½ΡΠΆΠ½ΠΎ Π² ΠΊΠΎΠ½ΡΠΈΠ³Π΅ s3cmd ΠΏΠΎΠΏΡΠ°Π²ΠΈΡΡ signature_v2 Π½Π° True. ΠΠΎΠ΄ΡΠΎΠ±Π½ΠΎΡΡΠΈ Π² ΡΡΠΎΠΌ .
ΠΡΠ»ΠΈ signature_v2 Π±ΡΠ΄Π΅Ρ False, ΡΠΎ Π±ΡΠ΄Π΅Ρ Π²ΠΎΡ ΡΠ°ΠΊΠ°Ρ ΠΎΡΠΈΠ±ΠΊΠ°:
WARNING: Retrying failed request: /?delimiter=%2F (getaddrinfo() argument 2 must be integer or string)
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /?delimiter=%2F (getaddrinfo() argument 2 must be integer or string)
WARNING: Waiting 6 sec...
ERROR: Test failed: Request failed for: /?delimiter=%2FΠ’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ Π·Π°Π³ΡΡΠ·ΠΊΠΈ
Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ ΡΠ°ΠΉΠ» 1ΠΠ
fallocate -l 1GB 1gbΠΠ°Π³ΡΡΠΆΠ°Π΅ΠΌ Π΅Π³ΠΎ Π² Leofs
time s3cmd put 1gb s3://leofs/
real 0m19.099s
user 0m7.855s
sys 0m1.620sΠ‘ΡΠ°ΡΠΈΡΡΠΈΠΊΠ°
leofs-adm du Π΄Π»Ρ 1 Π½ΠΎΠ΄Ρ:
leofs-adm du S0@172.26.9.179
active number of objects: 156
total number of objects: 156
active size of objects: 602954495
total size of objects: 602954495
ratio of active size: 100.0%
last compaction start: ____-__-__ __:__:__
last compaction end: ____-__-__ __:__:__ΠΠΈΠ΄ΠΈΠΌ ΡΡΠΎ Π²ΡΠ²ΠΎΠ΄ Π½Π΅ ΠΎΡΠ΅Π½Ρ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠ²Π½ΡΠΉ.
ΠΠΎΡΠΌΠΎΡΡΠΈΠΌ Π³Π΄Π΅ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ ΡΡΠΎΡ ΡΠ°ΠΉΠ».
leofs-adm whereis leofs/1gb
leofs-adm whereis leofs/1gb
-------+----------------------+--------------------------------------+------------+--------------+----------------+----------------+----------------+----------------------------
del? | node | ring address | size | checksum | has children | total chunks | clock | when
-------+----------------------+--------------------------------------+------------+--------------+----------------+----------------+----------------+----------------------------
| S0@172.26.9.181 | 657a9f3a3db822a7f1f5050925b26270 | 976563K | a4634eea55 | true | 64 | 598f2aa976a4f | 2019-12-05 10:48:15 +0000
| S0@172.26.9.182 | 657a9f3a3db822a7f1f5050925b26270 | 976563K | a4634eea55 | true | 64 | 598f2aa976a4f | 2019-12-05 10:48:15 +0000ΠΠΊΡΠΈΠ²ΠΈΡΡΠ΅ΠΌ NFS
ΠΠΊΡΠΈΠ²ΠΈΡΡΠ΅ΠΌ NFS Π½Π° ΡΠ΅ΡΠ²Π΅ΡΠ΅ Leo Gateway 172.26.9.184.
ΠΠ° ΡΠ΅ΡΠ²Π΅ΡΠ΅ ΠΈ ΠΊΠ»ΠΈΠ΅Π½ΡΠ΅ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΠΌ nfs-utils
sudo yum install nfs-utilsΠ‘ΠΎΠ³Π»Π°ΡΠ½ΠΎ ΠΈΠ½ΡΡΡΡΠΊΡΠΈΠΈ ΠΏΠΎΠΏΡΠ°Π²ΠΈΠΌ ΡΠ°ΠΉΠ» ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ /usr/local/leofs/current/leo_gateway/etc/leo_gateway.conf
protocol = nfsΠΠ° ΡΠ΅ΡΠ²Π΅ΡΠ΅ 172.26.9.184 Π·Π°ΠΏΡΡΡΠΈΠΌ rpcbind ΠΈ leofs-gateway
sudo service rpcbind start
sudo service leofs-gateway restartΠΠ° ΡΠ΅ΡΠ²Π΅ΡΠ΅ Π³Π΄Π΅ Π·Π°ΠΏΡΡΠ΅Π½ leo_manager ΡΠΎΠ·Π΄Π°Π΄ΠΈΠΌ bucket Π΄Π»Ρ NFS ΠΈ ΡΠ³Π΅Π½Π΅ΡΠΈΡΡΠ΅ΠΌ ΠΊΠ»ΡΡ Π΄Π»Ρ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΊ NFS
leofs-adm add-bucket test 05236
leofs-adm gen-nfs-mnt-key test 05236 ip-Π°Π΄ΡΠ΅Ρ-nfs-ΠΊΠ»ΠΈΠ΅Π½ΡΠ°ΠΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΠΊ NFS
sudo mkdir /mnt/leofs
## for Linux - "sudo mount -t nfs -o nolock <host>:/<bucket>/<token> <dir>"
sudo mount -t nfs -o nolock ip-Π°Π΄ΡΠ΅Ρ-nfs-ΡΠ΅ΡΠ²Π΅ΡΠ°-ΡΠ°ΠΌ-Π³Π΄Π΅-Ρ-Π²Π°Ρ-ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½-gateway:/bucket/access_key_id/ΠΊΠ»ΡΡ-ΠΏΠΎΠ»ΡΡΠ΅Π½Π½ΡΠΉ-ΠΎΡ-gen-nfs-mnt-key /mnt/leofs
sudo mount -t nfs -o nolock 172.26.9.184:/test/05236/bb5034f0c740148a346ed663ca0cf5157efb439f /mnt/leofsΠΡΠΎΡΠΌΠΎΡΡ Π΄ΠΈΡΠΊΠΎΠ²ΠΎΠ³ΠΎ ΠΏΡΠΎΡΡΠ°Π½ΡΡΠ²Π° ΡΠ΅ΡΠ΅Π· NFS ΠΊΠ»ΠΈΠ΅Π½Ρ
ΠΠΈΡΠΊΠΎΠ²ΠΎΠ΅ ΠΏΡΠΎΡΡΠ°Π½ΡΡΠ²ΠΎ c ΡΡΠ΅ΡΠΎΠΌ ΡΡΠΎ ΠΊΠ°ΠΆΠ΄Π°Ρ Π½ΠΎΠ΄Π° storage ΠΈΠΌΠ΅Π΅Ρ Π΄ΠΈΡΠΊ 40ΠΠ (3 Π½ΠΎΠ΄Ρ running, 1 Π½ΠΎΠ΄Π° attached):
df -hP
Filesystem Size Used Avail Use% Mounted on
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b 60G 3.6G 57G 6% /mnt/leofsΠ£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° LeoFS Ρ 6 storage Π½ΠΎΠ΄Π°ΠΌΠΈ.
Inventory (Π±Π΅Π· builder):
# Please check roles/common/vars/leofs_releases for available versions
[all:vars]
leofs_version=1.4.3
build_temp_path="/tmp/leofs_builder"
build_install_path="/tmp/"
build_branch="master"
source="package"
# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_0]
172.26.9.177
# nodename of leo_manager_0 and leo_manager_1 are set at group_vars/all
[leo_manager_1]
172.26.9.176
[leo_storage]
172.26.9.178 leofs_module_nodename=S0@172.26.9.178
172.26.9.179 leofs_module_nodename=S0@172.26.9.179
172.26.9.181 leofs_module_nodename=S0@172.26.9.181
172.26.9.182 leofs_module_nodename=S0@172.26.9.182
172.26.9.183 leofs_module_nodename=S0@172.26.9.183
172.26.9.185 leofs_module_nodename=S0@172.26.9.185
[leo_gateway]
172.26.9.180 leofs_module_nodename=G0@172.26.9.180
172.26.9.184 leofs_module_nodename=G0@172.26.9.184
[leofs_nodes:children]
leo_manager_0
leo_manager_1
leo_gateway
leo_storageΠΡΠ²ΠΎΠ΄ leofs-adm status
ΠΡΠ²ΠΎΠ΄ leofs-adm status
[System Confiuration]
-----------------------------------+----------
Item | Value
-----------------------------------+----------
Basic/Consistency level
-----------------------------------+----------
system version | 1.4.3
cluster Id | leofs_1
DC Id | dc_1
Total replicas | 2
number of successes of R | 1
number of successes of W | 1
number of successes of D | 1
number of rack-awareness replicas | 0
ring size | 2^128
-----------------------------------+----------
Multi DC replication settings
-----------------------------------+----------
[mdcr] max number of joinable DCs | 2
[mdcr] total replicas per a DC | 1
[mdcr] number of successes of R | 1
[mdcr] number of successes of W | 1
[mdcr] number of successes of D | 1
-----------------------------------+----------
Manager RING hash
-----------------------------------+----------
current ring-hash | d8ff465e
previous ring-hash | d8ff465e
-----------------------------------+----------
[State of Node(s)]
-------+----------------------+--------------+---------+----------------+----------------+----------------------------
type | node | state | rack id | current ring | prev ring | updated at
-------+----------------------+--------------+---------+----------------+----------------+----------------------------
S | S0@172.26.9.178 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:29 +0000
S | S0@172.26.9.179 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:29 +0000
S | S0@172.26.9.181 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:30 +0000
S | S0@172.26.9.182 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:29 +0000
S | S0@172.26.9.183 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:29 +0000
S | S0@172.26.9.185 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:29 +0000
G | G0@172.26.9.180 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:31 +0000
G | G0@172.26.9.184 | running | | d8ff465e | d8ff465e | 2019-12-06 05:18:31 +0000
-------+----------------------+--------------+---------+----------------+----------------+----------------------------ΠΠΈΡΠΊΠΎΠ²ΠΎΠ΅ ΠΏΡΠΎΡΡΠ°Π½ΡΡΠ²ΠΎ c ΡΡΠ΅ΡΠΎΠΌ ΡΡΠΎ ΠΊΠ°ΠΆΠ΄Π°Ρ Π½ΠΎΠ΄Π° storage ΠΈΠΌΠ΅Π΅Ρ Π΄ΠΈΡΠΊ 40ΠΠ (6 Π½ΠΎΠ΄ running):
df -hP
Filesystem Size Used Avail Use% Mounted on
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b 120G 3.6G 117G 3% /mnt/leofsΠΡΠ»ΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ 5 Π½ΠΎΠ΄ storage
[leo_storage]
172.26.9.178 leofs_module_nodename=S0@172.26.9.178
172.26.9.179 leofs_module_nodename=S1@172.26.9.179
172.26.9.181 leofs_module_nodename=S2@172.26.9.181
172.26.9.182 leofs_module_nodename=S3@172.26.9.182
172.26.9.183 leofs_module_nodename=S4@172.26.9.183df -hP
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b 100G 3.0G 97G 3% /mnt/leofsΠΠΎΠ³ΠΈ
ΠΠΎΠ³ΠΈ Π½Π°Ρ
ΠΎΠ΄ΡΡΡΡ Π² Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡΡ
/usr/local/leofs/current/*/log
Π’Π΅Π»Π΅Π³ΡΠ°ΠΌ ΠΊΠ°Π½Π°Π»:
ΠΡΡΠΎΡΠ½ΠΈΠΊ: habr.com
