S3, NFS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ์™€ ํ˜ธํ™˜๋˜๋Š” ๋ถ„์‚ฐ ๋‚ด๊ฒฐํ•จ์„ฑ LeoFS ๊ฐ์ฒด ์Šคํ† ๋ฆฌ์ง€ ์„ค์น˜

์— ๋”ฐ๋ฅด๋ฉด ์˜คํ”ˆ๋„ท: ๋ ˆ์˜คFS โ€” ๋ถ„์‚ฐ๋œ ๋‚ด๊ฒฐํ•จ์„ฑ ๊ฐ์ฒด ์Šคํ† ๋ฆฌ์ง€ ๋ ˆ์˜คFS, Amazon S3 API ๋ฐ REST-API๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ์™€ ํ˜ธํ™˜๋˜๋ฉฐ NFS ์„œ๋ฒ„ ๋ชจ๋“œ๋„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ž‘์€ ๊ฐœ์ฒด์™€ ๋งค์šฐ ํฐ ๊ฐœ์ฒด๋ฅผ ๋ชจ๋‘ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•œ ์ตœ์ ํ™”๊ฐ€ ์žˆ๊ณ , ์บ์‹ฑ ๋ฉ”์ปค๋‹ˆ์ฆ˜์ด ๋‚ด์žฅ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๋ฐ์ดํ„ฐ ์„ผํ„ฐ ๊ฐ„ ์Šคํ† ๋ฆฌ์ง€ ๋ณต์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ด ํ”„๋กœ์ ํŠธ์˜ ๋ชฉํ‘œ๋Š” ์ค‘๋ณต ๋ณต์ œ๋ฅผ ํ†ตํ•ด 99.9999999%์˜ ์‹ ๋ขฐ์„ฑ์„ ๋‹ฌ์„ฑํ•˜๊ณ  ๋‹จ์ผ ์žฅ์•  ์ง€์ ์„ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ ์ฝ”๋“œ๋Š” Erlang์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

LeoFS๋Š” ์„ธ ๊ฐ€์ง€ ๊ตฌ์„ฑ ์š”์†Œ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.

  • LeoFS ์Šคํ† ๋ฆฌ์ง€ โ€” ๊ฐ์ฒด์™€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€, ๊ฒ€์ƒ‰ ๋ฐ ์‚ญ์ œํ•˜๋Š” ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉฐ ๋ณต์ œ, ๋ณต๊ตฌ ๋ฐ ํด๋ผ์ด์–ธํŠธ ์š”์ฒญ ๋Œ€๊ธฐ์—ด ์ฒ˜๋ฆฌ๋ฅผ ๋‹ด๋‹นํ•ฉ๋‹ˆ๋‹ค.
  • LeoFS ๊ฒŒ์ดํŠธ์›จ์ด โ€” HTTP ์š”์ฒญ์„ ์ œ๊ณตํ•˜๊ณ  REST-API ๋˜๋Š” S3-API๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ์— ์‘๋‹ต์„ ๋ฆฌ๋””๋ ‰์…˜ํ•˜๊ณ  ๋ฉ”๋ชจ๋ฆฌ์™€ ๋””์Šคํฌ์— ๊ฐ€์žฅ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์บ์‹ฑํ•ฉ๋‹ˆ๋‹ค.
  • LeoFS ๊ด€๋ฆฌ์ž โ€” LeoFS ๊ฒŒ์ดํŠธ์›จ์ด ๋ฐ LeoFS ์Šคํ† ๋ฆฌ์ง€ ๋…ธ๋“œ์˜ ์ž‘๋™์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ  ๋…ธ๋“œ ์ƒํƒœ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋ฉฐ ์ฒดํฌ์„ฌ์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ๋ฌด๊ฒฐ์„ฑ๊ณผ ๋†’์€ ์Šคํ† ๋ฆฌ์ง€ ๊ฐ€์šฉ์„ฑ์„ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.

์ด ๊ฒŒ์‹œ๋ฌผ์—์„œ๋Š” ansible-playbook์„ ์‚ฌ์šฉํ•˜์—ฌ Leofs๋ฅผ ์„ค์น˜ํ•˜๊ณ  S3, NFS๋ฅผ ํ…Œ์ŠคํŠธํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ณต์‹ ํ”Œ๋ ˆ์ด๋ถ์„ ์‚ฌ์šฉํ•˜์—ฌ LeoFS๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ•˜๋ฉด ๋‹ค์–‘ํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค: 1,2. ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ์ด๋Ÿฌํ•œ ์‹ค์ˆ˜๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์ˆ˜ํ–‰ํ•ด์•ผ ํ•  ์ž‘์—…์„ ์ž‘์„ฑํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

ansible-playbook์„ ์‹คํ–‰ํ•˜๋ ค๋ฉด netcat์„ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์žฌ๊ณ  ์˜ˆ

์˜ˆ์‹œ ์ธ๋ฒคํ† ๋ฆฌ(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 [email protected]
172.26.9.181 [email protected]
172.26.9.182 [email protected]
172.26.9.183 [email protected]

[leo_gateway]
172.26.9.180 [email protected]
172.26.9.184 [email protected]

[leofs_nodes:children]
leo_manager_0
leo_manager_1
leo_gateway
leo_storage

์„œ๋ฒ„ ์ค€๋น„

Selinux๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค. ์ปค๋ฎค๋‹ˆํ‹ฐ์—์„œ LeoFS์— ๋Œ€ํ•œ Selinux ์ •์ฑ…์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

    - 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 OS ๋ฒ„์ „์„ ํ™•์ธํ•˜๋Š” ๋ฐ ํ•„์š”ํ•จ ์—ฌ๊ธฐ์—.

    - name: Install Packages
      yum: name={{ item }} state=present
      with_items:
        - nmap-ncat
        - redhat-lsb-core

์‚ฌ์šฉ์ž leofs๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ํœ  ๊ทธ๋ฃน์— ์ถ”๊ฐ€

    - 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

์–ผ๋žญ ์„ค์น˜

    - 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 ํ”Œ๋ ˆ์ด๋ถ์˜ ์ „์ฒด ๋ฒ„์ „์€ ์—ฌ๊ธฐ์—์„œ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. https://github.com/patsevanton/leofs_ansible

์„ค์น˜, ๊ตฌ์„ฑ, ์‹คํ–‰

๋‹ค์Œ์œผ๋กœ ์šฐ๋ฆฌ๋Š” ๋‹ค์Œ์— ์“ฐ์—ฌ์ง„ ๋Œ€๋กœ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. https://github.com/leo-project/leofs_ansible 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 status

๊ธฐ๋ณธ ๋ฐ ๋ณด์กฐ๋Š” ansible-playbook ๋กœ๊ทธ์—์„œ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

S3, NFS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ์™€ ํ˜ธํ™˜๋˜๋Š” ๋ถ„์‚ฐ ๋‚ด๊ฒฐํ•จ์„ฑ LeoFS ๊ฐ์ฒด ์Šคํ† ๋ฆฌ์ง€ ์„ค์น˜

S3, NFS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ์™€ ํ˜ธํ™˜๋˜๋Š” ๋ถ„์‚ฐ ๋‚ด๊ฒฐํ•จ์„ฑ LeoFS ๊ฐ์ฒด ์Šคํ† ๋ฆฌ์ง€ ์„ค์น˜

์ถœ๋ ฅ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค

 [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    | [email protected]      | running      |         | a0314afb       | a0314afb       | 2019-12-05 10:33:47 +0000
  S    | [email protected]      | running      |         | a0314afb       | a0314afb       | 2019-12-05 10:33:47 +0000
  S    | [email protected]      | running      |         | a0314afb       | a0314afb       | 2019-12-05 10:33:47 +0000
  S    | [email protected]      | attached     |         |                |                | 2019-12-05 10:33:58 +0000
  G    | [email protected]      | running      |         | a0314afb       | a0314afb       | 2019-12-05 10:33:49 +0000
  G    | [email protected]      | 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

๋ฒ„ํ‚ท ์ƒ์„ฑ

์–‘๋™์ด๋ฅผ ๋งŒ๋“ค์—ˆ์–ด์š”

leofs-adm add-bucket leofs 9c2615f32e81e6a1caf5
OK

ํฌ๋ง ์‚ฌํ•ญ:

 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 ์ง€์ •

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

๋ถ€ํ•˜ ํ…Œ์ŠคํŠธ

1GB ํŒŒ์ผ ์ƒ์„ฑ

fallocate -l 1GB 1gb

Leofs์— ์—…๋กœ๋“œํ•˜์„ธ์š”.

time s3cmd put 1gb s3://leofs/
real    0m19.099s
user    0m7.855s
sys 0m1.620s

ํ†ต๊ณ„

1๊ฐœ ๋…ธ๋“œ์— ๋Œ€ํ•œ leofs-adm du:

leofs-adm du [email protected]
 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์€ leofs/1gb์ž…๋‹ˆ๋‹ค.

leofs-adm whereis leofs/1gb
-------+----------------------+--------------------------------------+------------+--------------+----------------+----------------+----------------+----------------------------
 del?  |         node         |             ring address             |    size    |   checksum   |  has children  |  total chunks  |     clock      |             when            
-------+----------------------+--------------------------------------+------------+--------------+----------------+----------------+----------------+----------------------------
       | [email protected]      | 657a9f3a3db822a7f1f5050925b26270     |    976563K |   a4634eea55 | true           |             64 | 598f2aa976a4f  | 2019-12-05 10:48:15 +0000
       | [email protected]      | 657a9f3a3db822a7f1f5050925b26270     |    976563K |   a4634eea55 | true           |             64 | 598f2aa976a4f  | 2019-12-05 10:48:15 +0000

NFS ํ™œ์„ฑํ™”

Leo Gateway 172.26.9.184 ์„œ๋ฒ„์—์„œ NFS๋ฅผ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.

์„œ๋ฒ„์™€ ํด๋ผ์ด์–ธํŠธ์— 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๊ฐ€ ์‹คํ–‰ ์ค‘์ธ ์„œ๋ฒ„์—์„œ 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 ํด๋ผ์ด์–ธํŠธ๋ฅผ ํ†ตํ•ด ๋””์Šคํฌ ๊ณต๊ฐ„ ๋ณด๊ธฐ

๊ฐ ์Šคํ† ๋ฆฌ์ง€ ๋…ธ๋“œ์— 40GB ๋””์Šคํฌ๊ฐ€ ์žˆ๋‹ค๋Š” ์ ์„ ๊ณ ๋ คํ•œ ๋””์Šคํฌ ๊ณต๊ฐ„(์‹คํ–‰ ์ค‘์ธ ๋…ธ๋“œ 3๊ฐœ, ์—ฐ๊ฒฐ๋œ ๋…ธ๋“œ 1๊ฐœ):

df -hP
Filesystem                                                         Size  Used Avail Use% Mounted on
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b   60G  3.6G   57G   6% /mnt/leofs

6๊ฐœ์˜ ์Šคํ† ๋ฆฌ์ง€ ๋…ธ๋“œ๊ฐ€ ์žˆ๋Š” LeoFS ์„ค์น˜.

์ธ๋ฒคํ† ๋ฆฌ(๋นŒ๋” ์—†์Œ):

# 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 [email protected]
172.26.9.179 [email protected]
172.26.9.181 [email protected]
172.26.9.182 [email protected]
172.26.9.183 [email protected]
172.26.9.185 [email protected]

[leo_gateway]
172.26.9.180 [email protected]
172.26.9.184 [email protected]

[leofs_nodes:children]
leo_manager_0
leo_manager_1
leo_gateway
leo_storage

leofs-adm ์ƒํƒœ ์ถœ๋ ฅ

leofs-adm ์ƒํƒœ ์ถœ๋ ฅ

 [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    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:29 +0000
  S    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:29 +0000
  S    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:30 +0000
  S    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:29 +0000
  S    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:29 +0000
  S    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:29 +0000
  G    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:31 +0000
  G    | [email protected]      | running      |         | d8ff465e       | d8ff465e       | 2019-12-06 05:18:31 +0000
-------+----------------------+--------------+---------+----------------+----------------+----------------------------

๊ฐ ์Šคํ† ๋ฆฌ์ง€ ๋…ธ๋“œ์— 40GB ๋””์Šคํฌ(์‹คํ–‰ ์ค‘์ธ ๋…ธ๋“œ 6๊ฐœ)๊ฐ€ ์žˆ๋‹ค๋Š” ์ ์„ ๊ณ ๋ คํ•œ ๋””์Šคํฌ ๊ณต๊ฐ„:

df -hP
Filesystem                                                         Size  Used Avail Use% Mounted on
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b  120G  3.6G  117G   3% /mnt/leofs

5๊ฐœ์˜ ์Šคํ† ๋ฆฌ์ง€ ๋…ธ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ

[leo_storage]
172.26.9.178 [email protected]
172.26.9.179 [email protected]
172.26.9.181 [email protected]
172.26.9.182 [email protected]
172.26.9.183 [email protected]

df -hP
172.26.9.184:/test/05236/e7298032e78749149dd83a1e366afb328811c95b  100G  3.0G   97G   3% /mnt/leofs

๋กœ๊ทธ

๋กœ๊ทธ๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ์Šต๋‹ˆ๋‹ค. /usr/local/leofs/current/*/log

๋ฒˆ์—ญ: SDS ๋ฐ ํด๋Ÿฌ์Šคํ„ฐ FS

์ถœ์ฒ˜ : habr.com

์ฝ”๋ฉ˜ํŠธ๋ฅผ ์ถ”๊ฐ€