오브젝트 스토리지 서비스를 시작하기 전에, 초기 account, 컨테이너, 오브젝트 ring을 생성해야 합니다. ring 빌더는 각 노드가 스토리디 아키텍처를 결정하고 배포하는데 사용하는 구성 파일을 생성합니다. 간략화하여 이 가이드에서는 하나의 region 및 2^10 (1024) 개의 최대 파티션을 갖는 zone을, 각 오브젝트는 3개의 replica를, 그리고 파티션을 한 번 이상 옮기는데 최소 1시간을 갖도록 사용합니다. 오브젝트 스토리지에서 파티션은 통상적인 파티션 테이블보다는 스토리지 장치에서의 디렉토리를 가리킵니다. 자세한 정보는 Deployment Guide 를 살펴봅니다.
주석
해당 단계를 컨트롤러 노드에서 진행합니다.
계정 서버는 account ring을 사용하여 컨테이너에 대한 목록을 유지합니다.
/etc/swift 디렉토리를 변경합니다.
account.builder 파일을 기반으로 생성:
# swift-ring-builder account.builder create 10 3 1
주석
이 명령어는 출력값이 없습니다.
Ring을 각 스토리지 노드에 추가:
# swift-ring-builder account.builder \
add --region 1 --zone 1 --ip STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS --port 6002 \
--device DEVICE_NAME --weight DEVICE_WEIGHT
STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS 를 스토리지 노드에서 관리 네트워크를 위한 IP 주소로 변경합니다. DEVICE_NAME 는 동일한 스토리지 노드에서의 스토리지 장치 이름으로 변경합니다. 예를 들어, Storage 노드 설치와 구성 에서 /dev/sdb 스토리지 장치를 사용하고 weight 100을 갖는 첫 번째 스토리지 노드를 사용하는 경우에는 다음과 같습니다:
# swift-ring-builder account.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb --weight 100
해당 명령어를 각 스토리지 노드에서 각 스토리지 장치에 대해 반복합니다. 예제 아키텍처에서는 다음 명령어를 4가지로 변경하여 사용합니다:
# swift-ring-builder account.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6002R10.0.0.51:6002/sdb_"" with 100.0 weight got id 0
# swift-ring-builder account.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6002 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6002R10.0.0.51:6002/sdc_"" with 100.0 weight got id 1
# swift-ring-builder account.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6002 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6002R10.0.0.52:6002/sdb_"" with 100.0 weight got id 2
# swift-ring-builder account.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6002 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6002R10.0.0.52:6002/sdc_"" with 100.0 weight got id 3
Ring 내용을 확인합니다:
# swift-ring-builder account.builder
account.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6002 10.0.0.51 6002 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6002 10.0.0.51 6002 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6002 10.0.0.52 6002 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6002 10.0.0.52 6002 sdc 100.00 0 -100.00
Ring을 재조정합니다:
# swift-ring-builder account.builder rebalance
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
컨테이너 서버는 개체의 목록을 유지하기 위해 컨테이너 ring을 사용합니다. 그러나 오브젝트의 위치를 추적하지는 않습니다.
/etc/swift 디렉토리를 변경합니다.
container.builder 파일을 기반으로 생성:
# swift-ring-builder container.builder create 10 3 1
주석
이 명령어는 출력값이 없습니다.
Ring을 각 스토리지 노드에 추가:
# swift-ring-builder container.builder \
add --region 1 --zone 1 --ip STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS --port 6001 \
--device DEVICE_NAME --weight DEVICE_WEIGHT
STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS 를 스토리지 노드에서 관리 네트워크를 위한 IP 주소로 변경합니다. DEVICE_NAME 는 동일한 스토리지 노드에서의 스토리지 장치 이름으로 변경합니다. 예를 들어, Storage 노드 설치와 구성 에서 /dev/sdb 스토리지 장치를 사용하고 weight 100을 갖는 첫 번째 스토리지 노드를 사용하는 경우에는 다음과 같습니다:
# swift-ring-builder container.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb --weight 100
해당 명령어를 각 스토리지 노드에서 각 스토리지 장치에 대해 반복합니다. 예제 아키텍처에서는 다음 명령어를 4가지로 변경하여 사용합니다:
# swift-ring-builder container.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6001R10.0.0.51:6001/sdb_"" with 100.0 weight got id 0
# swift-ring-builder container.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6001 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6001R10.0.0.51:6001/sdc_"" with 100.0 weight got id 1
# swift-ring-builder container.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6001 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6001R10.0.0.52:6001/sdb_"" with 100.0 weight got id 2
# swift-ring-builder container.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6001 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6001R10.0.0.52:6001/sdc_"" with 100.0 weight got id 3
Ring 내용을 확인합니다:
# swift-ring-builder container.builder
container.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6001 10.0.0.51 6001 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6001 10.0.0.51 6001 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6001 10.0.0.52 6001 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6001 10.0.0.52 6001 sdc 100.00 0 -100.00
Ring을 재조정합니다:
# swift-ring-builder container.builder rebalance
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
오브젝트 서버는 로컬 장치상에 오브젝트 위치 리스트를 유지하는 오브젝트 ring을 사용합니다.
/etc/swift 디렉토리를 변경합니다.
object.builder 파일을 기반으로 생성:
# swift-ring-builder object.builder create 10 3 1
주석
이 명령어는 출력값이 없습니다.
Ring을 각 스토리지 노드에 추가:
# swift-ring-builder object.builder \
add --region 1 --zone 1 --ip STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS --port 6000 \
--device DEVICE_NAME --weight DEVICE_WEIGHT
STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS 를 스토리지 노드에서 관리 네트워크를 위한 IP 주소로 변경합니다. DEVICE_NAME 는 동일한 스토리지 노드에서의 스토리지 장치 이름으로 변경합니다. 예를 들어, Storage 노드 설치와 구성 에서 /dev/sdb 스토리지 장치를 사용하고 weight 100을 갖는 첫 번째 스토리지 노드를 사용하는 경우에는 다음과 같습니다:
# swift-ring-builder object.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6000 --device sdb --weight 100
해당 명령어를 각 스토리지 노드에서 각 스토리지 장치에 대해 반복합니다. 예제 아키텍처에서는 다음 명령어를 4가지로 변경하여 사용합니다:
# swift-ring-builder object.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6000 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6000R10.0.0.51:6000/sdb_"" with 100.0 weight got id 0
# swift-ring-builder object.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6000 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6000R10.0.0.51:6000/sdc_"" with 100.0 weight got id 1
# swift-ring-builder object.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6000 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6000R10.0.0.52:6000/sdb_"" with 100.0 weight got id 2
# swift-ring-builder object.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6000 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6000R10.0.0.52:6000/sdc_"" with 100.0 weight got id 3
Ring 내용을 확인합니다:
# swift-ring-builder object.builder
object.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6000 10.0.0.51 6000 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6000 10.0.0.51 6000 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6000 10.0.0.52 6000 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6000 10.0.0.52 6000 sdc 100.00 0 -100.00
Ring을 재조정합니다:
# swift-ring-builder object.builder rebalance
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
모든 스토리지 노드와 프록시 서비스가 작동 중인 노드에서 /etc/swift 디렉토리에 있는 account.ring.gz, container.ring.gz, object.ring.gz 을 복사합니다.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.