forked from vitalif/vitastor
Compare commits
460 Commits
master
...
eventloop-
Author | SHA1 | Date | |
---|---|---|---|
194f7e0187 | |||
10216a5fb5 | |||
3932eb7ff6 | |||
69cbe7bbb2 | |||
4950a1636c | |||
2eb20dff28 | |||
59f0b0427c | |||
124162ad38 | |||
391c92af1a | |||
c3d8fdd855 | |||
9ccf3af97b | |||
568a209f0d | |||
b151013201 | |||
4a763725fe | |||
b8d83cd7f4 | |||
2e9ee2fe20 | |||
508ae852e4 | |||
97ee400505 | |||
5ee4894fab | |||
125dcafb11 | |||
9f44cf71df | |||
df3c63ca7f | |||
be66edd09f | |||
ccbc0c5928 | |||
78ca4538bf | |||
86b5760ec1 | |||
27f3803d2f | |||
2ead06e126 | |||
a5d5559f8e | |||
e8e7ba8fde | |||
6fd831a299 | |||
069808dfce | |||
bcefa42bc0 | |||
4636e02d43 | |||
e4c7d1c147 | |||
a4677f3e69 | |||
7cbf207d65 | |||
7c9711af20 | |||
33ef701464 | |||
61ededa230 | |||
d9d90d3183 | |||
9dbcdbcec9 | |||
a147f7e7dc | |||
0e6bf66734 | |||
ab822d3050 | |||
d5366a0767 | |||
40b8a8b0da | |||
5c5119aba4 | |||
4edda88903 | |||
80dda3ca94 | |||
c8decb32e8 | |||
4995592e61 | |||
d9f9b0bca5 | |||
d0396267d0 | |||
b46d5db115 | |||
ecd92655fe | |||
383712148b | |||
42d40153ff | |||
561b36a4c1 | |||
685af019f5 | |||
a31592d131 | |||
28b0a2597d | |||
de6b345473 | |||
8bf52d6e96 | |||
5623dca02c | |||
abdc207297 | |||
044e621b62 | |||
ba9aabf187 | |||
5c890e4a12 | |||
0b0c2afbce | |||
651c055bd9 | |||
42eebfc1bd | |||
cef98052f5 | |||
7fbb04fdfa | |||
63b85b6bfb | |||
2f5959e3fa | |||
a4a286ed95 | |||
b8009bad5e | |||
9be3d27dc9 | |||
a19d2066c2 | |||
2a8780b4b5 | |||
109f51a015 | |||
8a86c123c3 | |||
b856524e0c | |||
ae3ca7451f | |||
1dbbb0c3f8 | |||
64db31ec10 | |||
76470686b3 | |||
652ca631bb | |||
2105f4b654 | |||
0d01573da3 | |||
d84b84f58d | |||
8cfe705d7a | |||
66c9271cbd | |||
7b37ba921d | |||
262c581400 | |||
ad3b6b7267 | |||
1f6a061283 | |||
fc4d97da10 | |||
c7a4ce7341 | |||
ddea31d86d | |||
156d005412 | |||
7e076c7049 | |||
7de38250ad | |||
9c59d30e83 | |||
5db02cdf6e | |||
8202ee9d74 | |||
5864bd067c | |||
c312557ace | |||
5ce20116d8 | |||
be66791e59 | |||
141cec2383 | |||
1ce4b1b417 | |||
ebf24bac9a | |||
edd9051f81 | |||
662ca86dc0 | |||
a1ca573168 | |||
f69f801ffb | |||
af92cbdfcc | |||
a775db10cc | |||
eafce26049 | |||
625c74294f | |||
ef8c21ad6f | |||
2bb8e8999e | |||
c2e7c28672 | |||
bd22beefb5 | |||
e7038ab99c | |||
b6f75ebcfd | |||
9def199981 | |||
c72e8e649e | |||
8bdb3e8786 | |||
a87e236c70 | |||
16f67cf6f1 | |||
56de4a520d | |||
adca162278 | |||
490b314d72 | |||
9f52074e1e | |||
2b3e877546 | |||
01d55e5420 | |||
f5aa5cfdfe | |||
2826bb9e7e | |||
30d1ad0f66 | |||
79719e44ac | |||
f5626655df | |||
7e2dde2702 | |||
3b0ab317cf | |||
18eb99c494 | |||
4e8a1a8895 | |||
d27a8bdabc | |||
ebd616e42f | |||
b18d296e01 | |||
a03508320e | |||
c9ccc790ec | |||
db2d9c5b3d | |||
09f15f44c9 | |||
c5a58c2e81 | |||
30e7c2ad1e | |||
2e76ceabbe | |||
3df088c207 | |||
d882a19eab | |||
702be3da7a | |||
99533e1c2f | |||
a6cceb43bf | |||
745d89459a | |||
48f023292d | |||
b58bf3ada5 | |||
f18a749324 | |||
6e9307c522 | |||
99adbb9483 | |||
b489a611a9 | |||
c6c0b8957a | |||
5d40d2a459 | |||
f449c28c3b | |||
a6274f58cc | |||
ac29ffea6a | |||
bc06acc153 | |||
fe8e611e23 | |||
7636f9c726 | |||
d5f7005ddd | |||
70d6fcd32a | |||
17caaa59af | |||
2dac6ee38b | |||
8be67a2d5b | |||
9c2132882c | |||
9f25bb059b | |||
ee3094c5e5 | |||
ba9f263b75 | |||
30eaa1a8e6 | |||
6a8daedbe2 | |||
2b96ac0b44 | |||
986cd11705 | |||
b804051eaf | |||
3cc326500e | |||
f848c450a4 | |||
4121c66281 | |||
b3716fbe23 | |||
97f49d7d94 | |||
131de4b790 | |||
ce359c5a69 | |||
521e867b10 | |||
333c54ebbf | |||
58d3da95c8 | |||
4e90e752eb | |||
09342d7189 | |||
eb3e8b8c19 | |||
e2ca3ad99e | |||
dd4b0aed2b | |||
42851a061c | |||
8e0f242d30 | |||
0daa8ea39b | |||
b263d311ef | |||
8720185780 | |||
20584414d8 | |||
306a3db7f3 | |||
5b0aebada4 | |||
d6f0b480c8 | |||
f1f8531fd4 | |||
8d79d59964 | |||
551a209a50 | |||
06cafd7702 | |||
3018352443 | |||
f8edfb4a71 | |||
8239ea2356 | |||
e898335b8d | |||
e7869611fa | |||
e1c2500b60 | |||
42cf3a11df | |||
4d9293f0e9 | |||
7a13f85ae2 | |||
fc219b8602 | |||
989d73f874 | |||
f0630722ce | |||
93b0947720 | |||
9c628646fa | |||
cf476a3b95 | |||
23f9273ba3 | |||
74b88bf8ba | |||
1254d5a0de | |||
f87bece253 | |||
ba85d0ef16 | |||
17a909ea3a | |||
a4dfc220ab | |||
26426dd95e | |||
9f38b7e5c1 | |||
20057defbe | |||
b4e9140755 | |||
413959e75a | |||
8973982570 | |||
990c3ba7eb | |||
1771d2ef36 | |||
d88ab76636 | |||
c010a0aa54 | |||
0d42712d29 | |||
66b438106a | |||
3aef6682fb | |||
8535bccf4c | |||
0487b3b239 | |||
a54ef97f5d | |||
10434a9b2b | |||
c6be194508 | |||
df668286fb | |||
667c5999c9 | |||
8ad63465cd | |||
976290e6a9 | |||
79f1d1969b | |||
918e1f83b0 | |||
abbba6ade4 | |||
21d1171ba4 | |||
![]() |
8f83086889 | ||
ceb18f25db | |||
ed51a89f70 | |||
f59456f22d | |||
ca63cd507d | |||
ea0d72289c | |||
e400a851f4 | |||
0fec7a9fea | |||
b9de2a92a9 | |||
5360a70853 | |||
4c2328eb13 | |||
313daef12d | |||
ad9c12e1b9 | |||
4473eb5512 | |||
6501abc060 | |||
1228403e74 | |||
4eabebd245 | |||
cf60b6818c | |||
1a4a7cdc37 | |||
1b48085e21 | |||
a71847244e | |||
848c2d2722 | |||
86832dc43f | |||
1f6da79463 | |||
9bf57c3760 | |||
a0305b5b4a | |||
1546f8e447 | |||
8ce962b312 | |||
50e56b3b92 | |||
![]() |
b85dab8583 | ||
a12d328793 | |||
c79b38bd26 | |||
44692d148a | |||
ba52359611 | |||
23a9aa93b5 | |||
2412d9e239 | |||
9301c857b1 | |||
3094358ec2 | |||
87f666d2a2 | |||
bd7fe4ef8f | |||
1b3f9a1416 | |||
a7b7354f38 | |||
765befa22f | |||
87b3ab94fe | |||
2c0801f6e4 | |||
fd83fef1d9 | |||
8d1067971b | |||
ae5af04fde | |||
266d038b11 | |||
ff4414d37e | |||
0fa7ecc03f | |||
c29bfe12eb | |||
57bf84ddb2 | |||
dff4879c8c | |||
af9a853db6 | |||
b7a3275af3 | |||
64c5c4ca26 | |||
![]() |
442a9d838d | ||
6366972fe8 | |||
2b863fb715 | |||
3bf4dd5abd | |||
3b84dcaedd | |||
20fbc4a745 | |||
02993ee1dd | |||
3629dbc54d | |||
29284bef40 | |||
6a924d6066 | |||
9fe779a691 | |||
31c2751b9b | |||
c5195666cd | |||
f36d7eb76c | |||
dd7f651de1 | |||
a2994ecd0d | |||
5d3aaf016b | |||
0b097ca3f2 | |||
989675a780 | |||
f8c403ec9e | |||
bfbb85e653 | |||
9ad6822353 | |||
2043b4e374 | |||
de840e6fe3 | |||
b5e04bf809 | |||
8807a1623b | |||
f12855c31b | |||
e75dcc9a71 | |||
88516ab4bd | |||
6221126b4f | |||
6783d4a13c | |||
dcbe1afac3 | |||
0bde28c24a | |||
bb8ca6184e | |||
87310ef7bb | |||
4f4b2dab80 | |||
f70da82317 | |||
e42148f347 | |||
c289584469 | |||
018e89f867 | |||
603dc68f11 | |||
7b12342933 | |||
44bf0f16ee | |||
8840c84572 | |||
5b747c12ec | |||
05f5f46162 | |||
b5604191c8 | |||
e871de27de | |||
f600ce98e2 | |||
57605a5c13 | |||
29bd4561bb | |||
7142460ec8 | |||
d03f19ebe5 | |||
88f9d18be3 | |||
6213fbd8c6 | |||
3aee37eadd | |||
ecfc753e93 | |||
a574f9ad71 | |||
7c235c9103 | |||
e5bb986164 | |||
181795d748 | |||
8cdc38805b | |||
0cd455d17f | |||
32ba653ba6 | |||
231d4b15fc | |||
9dc4d5fd7b | |||
e58538fa47 | |||
11ac9e7024 | |||
511bc3df1c | |||
a64f0d1f73 | |||
ec5f7c6b87 | |||
3ebed9a749 | |||
eab67a6e8f | |||
20993d9b7a | |||
5cf9b343c0 | |||
79ae0aadcd | |||
605afc3583 | |||
c0681d8242 | |||
763e77b4f4 | |||
19426aa4c5 | |||
08f586bcec | |||
f1cd87473a | |||
1bd8d2da56 | |||
a7396d2baf | |||
e98a38810d | |||
28c4324c36 | |||
31ec3fa8f5 | |||
e4fa26f60a | |||
59ae27f9e5 | |||
2c6a301d9b | |||
01558349f8 | |||
36f4717d0d | |||
babaf2a0ce | |||
5773f1a375 | |||
57222a9f79 | |||
61ef000c6e | |||
7d5e1cc393 | |||
5e7f27a02d | |||
fd1d8a8520 | |||
c364e14c40 | |||
3ebbfa0428 | |||
aa79d1db1c | |||
a1fecb7eff | |||
ff74b19423 | |||
4cf6dceed7 | |||
38b8963330 | |||
77167e2920 | |||
5af23672d0 | |||
6bf1f539a6 | |||
4eab26f968 | |||
86243b7101 | |||
![]() |
dc92851322 | ||
02d1f16bbd | |||
fc413038d1 | |||
1bc0b5aab3 | |||
5e934264cf | |||
f20564b44b | |||
b3c15db331 | |||
685bcd6ef9 | |||
3eb389b321 | |||
3d16cde23c | |||
c6406d67fc | |||
f87964861d | |||
62a4f45160 | |||
7048228678 | |||
ea73857450 | |||
6cfe38ec04 | |||
7ae5766fdb | |||
f882c7dd87 | |||
26dd863c8d | |||
2ae859fbc6 | |||
f6cd9f9153 | |||
8389c0f33b | |||
9db2196aef | |||
8d6ae662fe |
@@ -22,7 +22,7 @@ RUN apt-get update
|
||||
RUN apt-get -y install etcd qemu-system-x86 qemu-block-extra qemu-utils fio libasan5 \
|
||||
liburing1 liburing-dev libgoogle-perftools-dev devscripts libjerasure-dev cmake libibverbs-dev libisal-dev
|
||||
RUN apt-get -y build-dep fio qemu=`dpkg -s qemu-system-x86|grep ^Version:|awk '{print $2}'`
|
||||
RUN apt-get -y install jq lp-solve sudo
|
||||
RUN apt-get update && apt-get -y install jq lp-solve sudo nfs-common fdisk parted
|
||||
RUN apt-get --download-only source fio qemu=`dpkg -s qemu-system-x86|grep ^Version:|awk '{print $2}'`
|
||||
|
||||
RUN set -ex; \
|
||||
|
@@ -16,6 +16,7 @@ env:
|
||||
BUILDENV_IMAGE: git.yourcmc.ru/vitalif/vitastor/buildenv
|
||||
TEST_IMAGE: git.yourcmc.ru/vitalif/vitastor/test
|
||||
OSD_ARGS: '--etcd_quick_timeout 2000'
|
||||
USE_RAMDISK: 1
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}
|
||||
@@ -64,6 +65,13 @@ jobs:
|
||||
# leak sanitizer sometimes crashes
|
||||
- run: cd /root/vitastor/build && ASAN_OPTIONS=detect_leaks=0 make -j16 test
|
||||
|
||||
npm_lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- run: cd /root/vitastor/mon && npm run lint
|
||||
|
||||
test_add_osd:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -190,6 +198,24 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_etcd_fail_antietcd:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 10
|
||||
run: ANTIETCD=1 /root/vitastor/tests/test_etcd_fail.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_interrupted_rebalance:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -262,6 +288,24 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_create_halfhost:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_create_halfhost.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_failure_domain:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -370,6 +414,24 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_rm_degraded:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_rm_degraded.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_snapshot_chain:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -532,6 +594,42 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_dd:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_dd.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_root_node:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_root_node.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_switch_primary:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -640,6 +738,24 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_heal_antietcd:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 10
|
||||
run: ANTIETCD=1 /root/vitastor/tests/test_heal.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_heal_csum_32k_dmj:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -748,6 +864,150 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_resize:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_resize.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_resize_auto:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_resize_auto.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_snapshot_pool2:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_snapshot_pool2.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_osd_tags:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_osd_tags.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_enospc:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_enospc.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_enospc_xor:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: SCHEME=xor /root/vitastor/tests/test_enospc.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_enospc_imm:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: IMMEDIATE_COMMIT=1 /root/vitastor/tests/test_enospc.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_enospc_imm_xor:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: IMMEDIATE_COMMIT=1 SCHEME=xor /root/vitastor/tests/test_enospc.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_scrub:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -856,3 +1116,21 @@ jobs:
|
||||
echo ""
|
||||
done
|
||||
|
||||
test_nfs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
container: ${{env.TEST_IMAGE}}:${{github.sha}}
|
||||
steps:
|
||||
- name: Run test
|
||||
id: test
|
||||
timeout-minutes: 3
|
||||
run: /root/vitastor/tests/test_nfs.sh
|
||||
- name: Print logs
|
||||
if: always() && steps.test.outcome == 'failure'
|
||||
run: |
|
||||
for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do
|
||||
echo "-------- $i --------"
|
||||
cat $i
|
||||
echo ""
|
||||
done
|
||||
|
||||
|
@@ -34,6 +34,10 @@ for my $line (<>)
|
||||
{
|
||||
$test_name .= '_imm';
|
||||
}
|
||||
elsif ($1 eq 'ANTIETCD')
|
||||
{
|
||||
$test_name .= '_antietcd';
|
||||
}
|
||||
else
|
||||
{
|
||||
$test_name .= '_'.lc($1).'_'.$2;
|
||||
|
13
.gitignore
vendored
13
.gitignore
vendored
@@ -3,16 +3,3 @@
|
||||
package-lock.json
|
||||
fio
|
||||
qemu
|
||||
osd
|
||||
stub_osd
|
||||
stub_uring_osd
|
||||
stub_bench
|
||||
osd_test
|
||||
osd_peering_pg_test
|
||||
dump_journal
|
||||
nbd_proxy
|
||||
rm_inode
|
||||
test_allocator
|
||||
test_blockstore
|
||||
test_shit
|
||||
osd_rmw_test
|
||||
|
@@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(vitastor)
|
||||
|
||||
set(VERSION "1.4.4")
|
||||
set(VITASTOR_VERSION "1.11.0")
|
||||
|
||||
add_subdirectory(src)
|
||||
|
18
README-ru.md
18
README-ru.md
@@ -1,4 +1,4 @@
|
||||
## Vitastor
|
||||
# Vitastor
|
||||
|
||||
[Read English version](README.md)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
Вернём былую скорость кластерному блочному хранилищу!
|
||||
|
||||
Vitastor - распределённая блочная SDS (программная СХД), прямой аналог Ceph RBD и
|
||||
внутренних СХД популярных облачных провайдеров. Однако, в отличие от них, Vitastor
|
||||
Vitastor - распределённая блочная и файловая SDS (программная СХД), прямой аналог Ceph RBD и CephFS,
|
||||
а также внутренних СХД популярных облачных провайдеров. Однако, в отличие от них, Vitastor
|
||||
быстрый и при этом простой. Только пока маленький :-).
|
||||
|
||||
Vitastor архитектурно похож на Ceph, что означает атомарность и строгую консистентность,
|
||||
@@ -19,10 +19,10 @@ Vitastor нацелен в первую очередь на SSD и SSD+HDD кл
|
||||
TCP и RDMA и на хорошем железе может достигать задержки 4 КБ чтения и записи на уровне ~0.1 мс,
|
||||
что примерно в 10 раз быстрее, чем Ceph и другие популярные программные СХД.
|
||||
|
||||
Vitastor поддерживает QEMU-драйвер, протоколы NBD и NFS, драйверы OpenStack, Proxmox, Kubernetes.
|
||||
Vitastor поддерживает QEMU-драйвер, протоколы NBD и NFS, драйверы OpenStack, OpenNebula, Proxmox, Kubernetes.
|
||||
Другие драйверы могут также быть легко реализованы.
|
||||
|
||||
Подробности смотрите в документации по ссылкам ниже.
|
||||
Подробности смотрите в документации по ссылкам. Можете начать отсюда: [Быстрый старт](docs/intro/quickstart.ru.md).
|
||||
|
||||
## Презентации и записи докладов
|
||||
|
||||
@@ -41,7 +41,9 @@ Vitastor поддерживает QEMU-драйвер, протоколы NBD и
|
||||
- [Автор и лицензия](docs/intro/author.ru.md)
|
||||
- Установка
|
||||
- [Пакеты](docs/installation/packages.ru.md)
|
||||
- [Docker](docs/installation/docker.ru.md)
|
||||
- [Proxmox](docs/installation/proxmox.ru.md)
|
||||
- [OpenNebula](docs/installation/opennebula.ru.md)
|
||||
- [OpenStack](docs/installation/openstack.ru.md)
|
||||
- [Kubernetes CSI](docs/installation/kubernetes.ru.md)
|
||||
- [Сборка из исходных кодов](docs/installation/source.ru.md)
|
||||
@@ -50,7 +52,7 @@ Vitastor поддерживает QEMU-драйвер, протоколы NBD и
|
||||
- Параметры
|
||||
- [Общие](docs/config/common.ru.md)
|
||||
- [Сетевые](docs/config/network.ru.md)
|
||||
- [Клиентский код](docs/config/client.en.md)
|
||||
- [Клиентский код](docs/config/client.ru.md)
|
||||
- [Глобальные дисковые параметры](docs/config/layout-cluster.ru.md)
|
||||
- [Дисковые параметры OSD](docs/config/layout-osd.ru.md)
|
||||
- [Прочие параметры OSD](docs/config/osd.ru.md)
|
||||
@@ -63,11 +65,13 @@ Vitastor поддерживает QEMU-драйвер, протоколы NBD и
|
||||
- [fio](docs/usage/fio.ru.md) для тестов производительности
|
||||
- [NBD](docs/usage/nbd.ru.md) для монтирования ядром
|
||||
- [QEMU и qemu-img](docs/usage/qemu.ru.md)
|
||||
- [NFS](docs/usage/nfs.ru.md)-прокси для VMWare и подобных
|
||||
- [NFS](docs/usage/nfs.ru.md) кластерная файловая система и псевдо-ФС прокси
|
||||
- [Администрирование](docs/usage/admin.ru.md)
|
||||
- Производительность
|
||||
- [Понимание сути производительности](docs/performance/understanding.ru.md)
|
||||
- [Теоретический максимум](docs/performance/theoretical.ru.md)
|
||||
- [Пример сравнения с Ceph](docs/performance/comparison1.ru.md)
|
||||
- [Более новый тест Vitastor 1.3.1](docs/performance/bench2.ru.md)
|
||||
|
||||
## Автор и лицензия
|
||||
|
||||
|
16
README.md
16
README.md
@@ -6,9 +6,9 @@
|
||||
|
||||
Make Clustered Block Storage Fast Again.
|
||||
|
||||
Vitastor is a distributed block SDS, direct replacement of Ceph RBD and internal SDS's
|
||||
of public clouds. However, in contrast to them, Vitastor is fast and simple at the same time.
|
||||
The only thing is it's slightly young :-).
|
||||
Vitastor is a distributed block and file SDS, direct replacement of Ceph RBD and CephFS,
|
||||
and also internal SDS's of public clouds. However, in contrast to them, Vitastor is fast
|
||||
and simple at the same time. The only thing is it's slightly young :-).
|
||||
|
||||
Vitastor is architecturally similar to Ceph which means strong consistency,
|
||||
primary-replication, symmetric clustering and automatic data distribution over any
|
||||
@@ -19,10 +19,10 @@ supports TCP and RDMA and may achieve 4 KB read and write latency as low as ~0.1
|
||||
with proper hardware which is ~10 times faster than other popular SDS's like Ceph
|
||||
or internal systems of public clouds.
|
||||
|
||||
Vitastor supports QEMU, NBD, NFS protocols, OpenStack, Proxmox, Kubernetes drivers.
|
||||
Vitastor supports QEMU, NBD, NFS protocols, OpenStack, OpenNebula, Proxmox, Kubernetes drivers.
|
||||
More drivers may be created easily.
|
||||
|
||||
Read more details below in the documentation.
|
||||
Read more details in the documentation. You can start from here: [Quick Start](docs/intro/quickstart.en.md).
|
||||
|
||||
## Talks and presentations
|
||||
|
||||
@@ -41,7 +41,9 @@ Read more details below in the documentation.
|
||||
- [Author and license](docs/intro/author.en.md)
|
||||
- Installation
|
||||
- [Packages](docs/installation/packages.en.md)
|
||||
- [Docker](docs/installation/docker.en.md)
|
||||
- [Proxmox](docs/installation/proxmox.en.md)
|
||||
- [OpenNebula](docs/installation/opennebula.en.md)
|
||||
- [OpenStack](docs/installation/openstack.en.md)
|
||||
- [Kubernetes CSI](docs/installation/kubernetes.en.md)
|
||||
- [Building from Source](docs/installation/source.en.md)
|
||||
@@ -63,11 +65,13 @@ Read more details below in the documentation.
|
||||
- [fio](docs/usage/fio.en.md) for benchmarks
|
||||
- [NBD](docs/usage/nbd.en.md) for kernel mounts
|
||||
- [QEMU and qemu-img](docs/usage/qemu.en.md)
|
||||
- [NFS](docs/usage/nfs.en.md) emulator for VMWare and similar
|
||||
- [NFS](docs/usage/nfs.en.md) clustered file system and pseudo-FS proxy
|
||||
- [Administration](docs/usage/admin.en.md)
|
||||
- Performance
|
||||
- [Understanding storage performance](docs/performance/understanding.en.md)
|
||||
- [Theoretical performance](docs/performance/theoretical.en.md)
|
||||
- [Example comparison with Ceph](docs/performance/comparison1.en.md)
|
||||
- [Newer benchmark of Vitastor 1.3.1](docs/performance/bench2.en.md)
|
||||
|
||||
## Author and License
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
gcc -I. -E -o fio_headers.i src/fio_headers.h
|
||||
gcc -I. -E -o fio_headers.i src/util/fio_headers.h
|
||||
|
||||
rm -rf fio-copy
|
||||
for i in `grep -Po 'fio/[^"]+' fio_headers.i | sort | uniq`; do
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#cd b/qemu; make qapi
|
||||
|
||||
gcc -I qemu/b/qemu `pkg-config glib-2.0 --cflags` \
|
||||
-I qemu/include -E -o qemu_driver.i src/qemu_driver.c
|
||||
-I qemu/include -E -o qemu_driver.i src/client/qemu_driver.c
|
||||
|
||||
rm -rf qemu-copy
|
||||
for i in `grep -Po 'qemu/[^"]+' qemu_driver.i | sort | uniq`; do
|
||||
|
@@ -22,6 +22,8 @@ RUN apt-get update && \
|
||||
(echo "APT::Install-Recommends false;" > /etc/apt/apt.conf) && \
|
||||
apt-get update && \
|
||||
apt-get install -y e2fsprogs xfsprogs kmod iproute2 \
|
||||
# NFS mount dependencies
|
||||
nfs-common netbase \
|
||||
# dependencies of qemu-storage-daemon
|
||||
libnuma1 liburing2 libglib2.0-0 libfuse3-3 libaio1 libzstd1 libnettle8 \
|
||||
libgmp10 libhogweed6 libp11-kit0 libidn2-0 libunistring2 libtasn1-6 libpcre2-8-0 libffi8 && \
|
||||
|
@@ -1,9 +1,9 @@
|
||||
VERSION ?= v1.4.4
|
||||
VITASTOR_VERSION ?= v1.11.0
|
||||
|
||||
all: build push
|
||||
|
||||
build:
|
||||
@docker build --rm -t vitalif/vitastor-csi:$(VERSION) .
|
||||
@docker build --rm -t vitalif/vitastor-csi:$(VITASTOR_VERSION) .
|
||||
|
||||
push:
|
||||
@docker push vitalif/vitastor-csi:$(VERSION)
|
||||
@docker push vitalif/vitastor-csi:$(VITASTOR_VERSION)
|
||||
|
@@ -49,7 +49,7 @@ spec:
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: vitalif/vitastor-csi:v1.4.4
|
||||
image: vitalif/vitastor-csi:v1.11.0
|
||||
args:
|
||||
- "--node=$(NODE_ID)"
|
||||
- "--endpoint=$(CSI_ENDPOINT)"
|
||||
|
@@ -121,7 +121,7 @@ spec:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
image: vitalif/vitastor-csi:v1.4.4
|
||||
image: vitalif/vitastor-csi:v1.11.0
|
||||
args:
|
||||
- "--node=$(NODE_ID)"
|
||||
- "--endpoint=$(CSI_ENDPOINT)"
|
||||
|
@@ -9,8 +9,16 @@ metadata:
|
||||
provisioner: csi.vitastor.io
|
||||
volumeBindingMode: Immediate
|
||||
parameters:
|
||||
etcdVolumePrefix: ""
|
||||
poolId: "1"
|
||||
# CSI driver can create block-based volumes and VitastorFS-based volumes
|
||||
# only VitastorFS-based volumes and raw block volumes (without FS) support ReadWriteMany mode
|
||||
# set this parameter to VitastorFS metadata volume name to use VitastorFS
|
||||
# if unset, block-based volumes will be created
|
||||
vitastorfs: ""
|
||||
# for block-based storage classes, pool ID may be either a string (name) or a number (ID)
|
||||
# for vitastorFS-based storage classes it must be a string - name of the default pool for FS data
|
||||
poolId: "testpool"
|
||||
# volume name prefix for block-based storage classes or NFS subdirectory (including /) for FS-based volumes
|
||||
volumePrefix: ""
|
||||
# you can choose other configuration file if you have it in the config map
|
||||
# different etcd URLs and prefixes should also be put in the config
|
||||
#configPath: "/etc/vitastor/vitastor.conf"
|
||||
|
25
csi/deploy/example-storage-class-fs.yaml
Normal file
25
csi/deploy/example-storage-class-fs.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
namespace: vitastor-system
|
||||
name: vitastor
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
provisioner: csi.vitastor.io
|
||||
volumeBindingMode: Immediate
|
||||
parameters:
|
||||
# CSI driver can create block-based volumes and VitastorFS-based volumes
|
||||
# only VitastorFS-based volumes and raw block volumes (without FS) support ReadWriteMany mode
|
||||
# set this parameter to VitastorFS metadata volume name to use VitastorFS
|
||||
# if unset, block-based volumes will be created
|
||||
vitastorfs: "testfs"
|
||||
# for block-based storage classes, pool ID may be either a string (name) or a number (ID)
|
||||
# for vitastorFS-based storage classes it must be a string - name of the default pool for FS data
|
||||
poolId: "testpool"
|
||||
# volume name prefix for block-based storage classes or NFS subdirectory (including /) for FS-based volumes
|
||||
volumePrefix: "k8s/"
|
||||
# you can choose other configuration file if you have it in the config map
|
||||
# different etcd URLs and prefixes should also be put in the config
|
||||
#configPath: "/etc/vitastor/vitastor.conf"
|
||||
allowVolumeExpansion: true
|
@@ -3,10 +3,10 @@ module vitastor.io/csi
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/container-storage-interface/spec v1.4.0
|
||||
github.com/container-storage-interface/spec v1.8.0
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
|
||||
github.com/kubernetes-csi/csi-lib-utils v0.9.1
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb
|
||||
golang.org/x/net v0.7.0
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
google.golang.org/grpc v1.33.1
|
||||
google.golang.org/protobuf v1.24.0
|
||||
|
31
csi/go.sum
31
csi/go.sum
@@ -41,8 +41,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
|
||||
github.com/container-storage-interface/spec v1.4.0 h1:ozAshSKxpJnYUfmkpZCTYyF/4MYeYlhdXbAvPvfGmkg=
|
||||
github.com/container-storage-interface/spec v1.4.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
|
||||
github.com/container-storage-interface/spec v1.8.0 h1:D0vhF3PLIZwlwZEf2eNbpujGCNwspwTYf2idJRJx4xI=
|
||||
github.com/container-storage-interface/spec v1.8.0/go.mod h1:ROLik+GhPslwwWRNFF1KasPzroNARibH2rfz1rkg4H0=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -182,6 +182,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
@@ -195,6 +196,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -213,6 +215,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -228,8 +231,10 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -240,6 +245,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -259,13 +265,22 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -286,8 +301,10 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@@ -5,7 +5,7 @@ package vitastor
|
||||
|
||||
const (
|
||||
vitastorCSIDriverName = "csi.vitastor.io"
|
||||
vitastorCSIDriverVersion = "1.4.4"
|
||||
vitastorCSIDriverVersion = "1.11.0"
|
||||
)
|
||||
|
||||
// Config struct fills the parameters of request or user input
|
||||
|
@@ -8,11 +8,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"bytes"
|
||||
"strconv"
|
||||
"time"
|
||||
"os"
|
||||
"os/exec"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
|
||||
@@ -70,9 +67,10 @@ func GetConnectionParams(params map[string]string) (map[string]string, error)
|
||||
{
|
||||
configPath = "/etc/vitastor/vitastor.conf"
|
||||
}
|
||||
else
|
||||
ctxVars["configPath"] = configPath
|
||||
if (params["vitastorfs"] != "")
|
||||
{
|
||||
ctxVars["configPath"] = configPath
|
||||
ctxVars["vitastorfs"] = params["vitastorfs"]
|
||||
}
|
||||
config := make(map[string]interface{})
|
||||
configFD, err := os.Open(configPath)
|
||||
@@ -114,22 +112,6 @@ func GetConnectionParams(params map[string]string) (map[string]string, error)
|
||||
return ctxVars, nil
|
||||
}
|
||||
|
||||
func system(program string, args ...string) ([]byte, []byte, error)
|
||||
{
|
||||
klog.Infof("Running "+program+" "+strings.Join(args, " "))
|
||||
c := exec.Command(program, args...)
|
||||
var stdout, stderr bytes.Buffer
|
||||
c.Stdout, c.Stderr = &stdout, &stderr
|
||||
err := c.Run()
|
||||
if (err != nil)
|
||||
{
|
||||
stdoutStr, stderrStr := string(stdout.Bytes()), string(stderr.Bytes())
|
||||
klog.Errorf(program+" "+strings.Join(args, " ")+" failed: %s, status %s\n", stdoutStr+stderrStr, err)
|
||||
return nil, nil, status.Error(codes.Internal, stdoutStr+stderrStr+" (status "+err.Error()+")")
|
||||
}
|
||||
return stdout.Bytes(), stderr.Bytes(), nil
|
||||
}
|
||||
|
||||
func invokeCLI(ctxVars map[string]string, args []string) ([]byte, error)
|
||||
{
|
||||
if (ctxVars["configPath"] != "")
|
||||
@@ -158,27 +140,57 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
||||
return nil, status.Error(codes.InvalidArgument, "volume capabilities is a required field")
|
||||
}
|
||||
|
||||
etcdVolumePrefix := req.Parameters["etcdVolumePrefix"]
|
||||
poolId, _ := strconv.ParseUint(req.Parameters["poolId"], 10, 64)
|
||||
if (poolId == 0)
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "poolId is missing in storage class configuration")
|
||||
}
|
||||
|
||||
volName := etcdVolumePrefix + req.GetName()
|
||||
volSize := 1 * GB
|
||||
if capRange := req.GetCapacityRange(); capRange != nil
|
||||
{
|
||||
volSize = ((capRange.GetRequiredBytes() + MB - 1) / MB) * MB
|
||||
}
|
||||
|
||||
ctxVars, err := GetConnectionParams(req.Parameters)
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
|
||||
args := []string{ "create", volName, "-s", fmt.Sprintf("%v", volSize), "--pool", fmt.Sprintf("%v", poolId) }
|
||||
err = cs.checkCaps(volumeCapabilities, ctxVars["vitastorfs"] != "")
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pool := req.Parameters["poolId"]
|
||||
if (pool == "")
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "poolId is missing in storage class configuration")
|
||||
}
|
||||
volumePrefix := req.Parameters["volumePrefix"]
|
||||
if (volumePrefix == "")
|
||||
{
|
||||
// Old name
|
||||
volumePrefix = req.Parameters["etcdVolumePrefix"]
|
||||
}
|
||||
volName := volumePrefix + req.GetName()
|
||||
volSize := 1 * GB
|
||||
if capRange := req.GetCapacityRange(); capRange != nil
|
||||
{
|
||||
volSize = ((capRange.GetRequiredBytes() + MB - 1) / MB) * MB
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
// Nothing to create, subdirectories are created during mounting
|
||||
// FIXME: It would be cool to support quotas some day and set it here
|
||||
if (req.VolumeContentSource.GetSnapshot() != nil)
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "VitastorFS doesn't support snapshots")
|
||||
}
|
||||
ctxVars["name"] = volName
|
||||
ctxVars["pool"] = pool
|
||||
volumeIdJson, _ := json.Marshal(ctxVars)
|
||||
return &csi.CreateVolumeResponse{
|
||||
Volume: &csi.Volume{
|
||||
// Ugly, but VolumeContext isn't passed to DeleteVolume :-(
|
||||
VolumeId: string(volumeIdJson),
|
||||
CapacityBytes: volSize,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
args := []string{ "create", volName, "-s", fmt.Sprintf("%v", volSize), "--pool", pool }
|
||||
|
||||
// Support creation from snapshot
|
||||
var src *csi.VolumeContentSource
|
||||
@@ -261,6 +273,12 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
// FIXME: Delete FS subdirectory
|
||||
return &csi.DeleteVolumeResponse{}, nil
|
||||
}
|
||||
|
||||
_, err = invokeCLI(ctxVars, []string{ "rm", volName })
|
||||
if (err != nil)
|
||||
{
|
||||
@@ -295,19 +313,72 @@ func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "volumeId is nil")
|
||||
}
|
||||
volVars := make(map[string]string)
|
||||
err := json.Unmarshal([]byte(volumeID), &volVars)
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, status.Error(codes.Internal, "volume ID not in JSON format")
|
||||
}
|
||||
ctxVars, err := GetConnectionParams(volVars)
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
|
||||
volumeCapabilities := req.GetVolumeCapabilities()
|
||||
if (volumeCapabilities == nil)
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "volumeCapabilities is nil")
|
||||
}
|
||||
|
||||
err = cs.checkCaps(volumeCapabilities, ctxVars["vitastorfs"] != "")
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &csi.ValidateVolumeCapabilitiesResponse{
|
||||
Confirmed: &csi.ValidateVolumeCapabilitiesResponse_Confirmed{
|
||||
VolumeCapabilities: req.VolumeCapabilities,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (cs *ControllerServer) checkCaps(volumeCapabilities []*csi.VolumeCapability, fs bool) error
|
||||
{
|
||||
var volumeCapabilityAccessModes []*csi.VolumeCapability_AccessMode
|
||||
for _, mode := range []csi.VolumeCapability_AccessMode_Mode{
|
||||
csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
|
||||
csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER,
|
||||
csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY,
|
||||
csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY,
|
||||
csi.VolumeCapability_AccessMode_SINGLE_NODE_SINGLE_WRITER,
|
||||
csi.VolumeCapability_AccessMode_SINGLE_NODE_MULTI_WRITER,
|
||||
} {
|
||||
volumeCapabilityAccessModes = append(volumeCapabilityAccessModes, &csi.VolumeCapability_AccessMode{Mode: mode})
|
||||
}
|
||||
for _, capability := range volumeCapabilities
|
||||
{
|
||||
if (capability.GetBlock() != nil)
|
||||
{
|
||||
if (fs)
|
||||
{
|
||||
return status.Errorf(codes.InvalidArgument, "%v not supported with FS-based volumes", capability)
|
||||
}
|
||||
for _, mode := range []csi.VolumeCapability_AccessMode_Mode{
|
||||
csi.VolumeCapability_AccessMode_MULTI_NODE_SINGLE_WRITER,
|
||||
csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER,
|
||||
} {
|
||||
volumeCapabilityAccessModes = append(volumeCapabilityAccessModes, &csi.VolumeCapability_AccessMode{Mode: mode})
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (fs)
|
||||
{
|
||||
// All access modes including RWX are supported with FS-based volumes
|
||||
return nil
|
||||
}
|
||||
|
||||
capabilitySupport := false
|
||||
for _, capability := range volumeCapabilities
|
||||
@@ -323,14 +394,10 @@ func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req
|
||||
|
||||
if (!capabilitySupport)
|
||||
{
|
||||
return nil, status.Errorf(codes.NotFound, "%v not supported", req.GetVolumeCapabilities())
|
||||
return status.Errorf(codes.InvalidArgument, "%v not supported", volumeCapabilities)
|
||||
}
|
||||
|
||||
return &csi.ValidateVolumeCapabilitiesResponse{
|
||||
Confirmed: &csi.ValidateVolumeCapabilitiesResponse_Confirmed{
|
||||
VolumeCapabilities: req.VolumeCapabilities,
|
||||
},
|
||||
}, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListVolumes returns a list of volumes
|
||||
@@ -419,6 +486,12 @@ func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
|
||||
{
|
||||
return nil, status.Error(codes.Internal, "volume ID not in JSON format")
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "VitastorFS doesn't support snapshots")
|
||||
}
|
||||
|
||||
volName := ctxVars["name"]
|
||||
|
||||
// Create image using vitastor-cli
|
||||
@@ -477,6 +550,11 @@ func (cs *ControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteS
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "VitastorFS doesn't support snapshots")
|
||||
}
|
||||
|
||||
_, err = invokeCLI(ctxVars, []string{ "rm", volName+"@"+snapName })
|
||||
if (err != nil)
|
||||
{
|
||||
@@ -508,6 +586,11 @@ func (cs *ControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnap
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
return nil, status.Error(codes.InvalidArgument, "VitastorFS doesn't support snapshots")
|
||||
}
|
||||
|
||||
inodeCfg, err := invokeList(ctxVars, volName+"@*", false)
|
||||
if (err != nil)
|
||||
{
|
||||
@@ -571,6 +654,16 @@ func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if (ctxVars["vitastorfs"] != "")
|
||||
{
|
||||
// Nothing to change
|
||||
// FIXME: Support quotas and change quota here
|
||||
return &csi.ControllerExpandVolumeResponse{
|
||||
CapacityBytes: req.CapacityRange.RequiredBytes,
|
||||
NodeExpansionRequired: false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
inodeCfg, err := invokeList(ctxVars, volName, true)
|
||||
if (err != nil)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
342
csi/src/utils.go
Normal file
342
csi/src/utils.go
Normal file
@@ -0,0 +1,342 @@
|
||||
// Copyright (c) Vitaliy Filippov, 2019+
|
||||
// License: VNPL-1.1 or GNU GPL-2.0+ (see README.md for details)
|
||||
|
||||
package vitastor
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"k8s.io/klog"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func Contains(list []string, s string) bool
|
||||
{
|
||||
for i := 0; i < len(list); i++
|
||||
{
|
||||
if (list[i] == s)
|
||||
{
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func checkVduseSupport() bool
|
||||
{
|
||||
// Check VDUSE support (vdpa, vduse, virtio-vdpa kernel modules)
|
||||
vduse := true
|
||||
for _, mod := range []string{"vdpa", "vduse", "virtio-vdpa"}
|
||||
{
|
||||
_, err := os.Stat("/sys/module/"+mod)
|
||||
if (err != nil)
|
||||
{
|
||||
if (!errors.Is(err, os.ErrNotExist))
|
||||
{
|
||||
klog.Errorf("failed to check /sys/module/%s: %v", mod, err)
|
||||
}
|
||||
c := exec.Command("/sbin/modprobe", mod)
|
||||
c.Stdout = os.Stderr
|
||||
c.Stderr = os.Stderr
|
||||
err := c.Run()
|
||||
if (err != nil)
|
||||
{
|
||||
klog.Errorf("/sbin/modprobe %s failed: %v", mod, err)
|
||||
vduse = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check that vdpa tool functions
|
||||
if (vduse)
|
||||
{
|
||||
c := exec.Command("/sbin/vdpa", "-j", "dev")
|
||||
c.Stderr = os.Stderr
|
||||
err := c.Run()
|
||||
if (err != nil)
|
||||
{
|
||||
klog.Errorf("/sbin/vdpa -j dev failed: %v", err)
|
||||
vduse = false
|
||||
}
|
||||
}
|
||||
if (!vduse)
|
||||
{
|
||||
klog.Errorf(
|
||||
"Your host apparently has no VDUSE support. VDUSE support disabled, NBD will be used to map devices."+
|
||||
" For VDUSE you need at least Linux 5.15 and the following kernel modules: vdpa, virtio-vdpa, vduse.",
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
klog.Infof("VDUSE support enabled successfully")
|
||||
}
|
||||
return vduse
|
||||
}
|
||||
|
||||
func mapNbd(volName string, ctxVars map[string]string, readonly bool) (string, error)
|
||||
{
|
||||
// Map NBD device
|
||||
// FIXME: Check if already mapped
|
||||
args := []string{
|
||||
"map", "--image", volName,
|
||||
}
|
||||
if (ctxVars["configPath"] != "")
|
||||
{
|
||||
args = append(args, "--config_path", ctxVars["configPath"])
|
||||
}
|
||||
if (readonly)
|
||||
{
|
||||
args = append(args, "--readonly", "1")
|
||||
}
|
||||
stdout, stderr, err := system("/usr/bin/vitastor-nbd", args...)
|
||||
dev := strings.TrimSpace(string(stdout))
|
||||
if (dev == "")
|
||||
{
|
||||
return "", fmt.Errorf("vitastor-nbd did not return the name of NBD device. output: %s", stderr)
|
||||
}
|
||||
klog.Infof("Attached volume %s via NBD as %s", volName, dev)
|
||||
return dev, err
|
||||
}
|
||||
|
||||
func unmapNbd(devicePath string)
|
||||
{
|
||||
// unmap NBD device
|
||||
unmapOut, unmapErr := exec.Command("/usr/bin/vitastor-nbd", "unmap", devicePath).CombinedOutput()
|
||||
if (unmapErr != nil)
|
||||
{
|
||||
klog.Errorf("failed to unmap NBD device %s: %s, error: %v", devicePath, unmapOut, unmapErr)
|
||||
}
|
||||
}
|
||||
|
||||
func findByPidFile(pidFile string) (*os.Process, error)
|
||||
{
|
||||
pidBuf, err := os.ReadFile(pidFile)
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
pid, err := strconv.ParseInt(strings.TrimSpace(string(pidBuf)), 0, 64)
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
proc, err := os.FindProcess(int(pid))
|
||||
if (err != nil)
|
||||
{
|
||||
return nil, err
|
||||
}
|
||||
return proc, nil
|
||||
}
|
||||
|
||||
func killByPidFile(pidFile string) error
|
||||
{
|
||||
klog.Infof("killing process with PID from file %s", pidFile)
|
||||
proc, err := findByPidFile(pidFile)
|
||||
if (err != nil)
|
||||
{
|
||||
return err
|
||||
}
|
||||
return proc.Signal(syscall.SIGTERM)
|
||||
}
|
||||
|
||||
func startStorageDaemon(vdpaId, volName, pidFile, configPath string, readonly bool) error
|
||||
{
|
||||
// Start qemu-storage-daemon
|
||||
blockSpec := map[string]interface{}{
|
||||
"node-name": "disk1",
|
||||
"driver": "vitastor",
|
||||
"image": volName,
|
||||
"cache": map[string]bool{
|
||||
"direct": true,
|
||||
"no-flush": false,
|
||||
},
|
||||
"discard": "unmap",
|
||||
}
|
||||
if (configPath != "")
|
||||
{
|
||||
blockSpec["config-path"] = configPath
|
||||
}
|
||||
blockSpecJson, _ := json.Marshal(blockSpec)
|
||||
writable := "true"
|
||||
if (readonly)
|
||||
{
|
||||
writable = "false"
|
||||
}
|
||||
_, _, err := system(
|
||||
"/usr/bin/qemu-storage-daemon", "--daemonize", "--pidfile", pidFile, "--blockdev", string(blockSpecJson),
|
||||
"--export", "vduse-blk,id="+vdpaId+",node-name=disk1,name="+vdpaId+",num-queues=16,queue-size=128,writable="+writable,
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
func mapVduse(stateDir string, volName string, ctxVars map[string]string, readonly bool) (string, string, error)
|
||||
{
|
||||
// Generate state file
|
||||
stateFd, err := os.CreateTemp(stateDir, "vitastor-vduse-*.json")
|
||||
if (err != nil)
|
||||
{
|
||||
return "", "", err
|
||||
}
|
||||
stateFile := stateFd.Name()
|
||||
stateFd.Close()
|
||||
vdpaId := filepath.Base(stateFile)
|
||||
vdpaId = vdpaId[0:len(vdpaId)-5] // remove ".json"
|
||||
pidFile := stateDir + vdpaId + ".pid"
|
||||
// Map VDUSE device via qemu-storage-daemon
|
||||
err = startStorageDaemon(vdpaId, volName, pidFile, ctxVars["configPath"], readonly)
|
||||
if (err == nil)
|
||||
{
|
||||
// Add device to VDPA bus
|
||||
_, _, err = system("/sbin/vdpa", "-j", "dev", "add", "name", vdpaId, "mgmtdev", "vduse")
|
||||
if (err == nil)
|
||||
{
|
||||
// Find block device name
|
||||
var matches []string
|
||||
matches, err = filepath.Glob("/sys/bus/vdpa/devices/"+vdpaId+"/virtio*/block/*")
|
||||
if (err == nil && len(matches) == 0)
|
||||
{
|
||||
err = errors.New("/sys/bus/vdpa/devices/"+vdpaId+"/virtio*/block/* is not found")
|
||||
}
|
||||
if (err == nil)
|
||||
{
|
||||
blockdev := "/dev/"+filepath.Base(matches[0])
|
||||
_, err = os.Stat(blockdev)
|
||||
if (err == nil)
|
||||
{
|
||||
// Generate state file
|
||||
stateJSON, _ := json.Marshal(&DeviceState{
|
||||
ConfigPath: ctxVars["configPath"],
|
||||
VdpaId: vdpaId,
|
||||
Image: volName,
|
||||
Blockdev: blockdev,
|
||||
Readonly: readonly,
|
||||
PidFile: pidFile,
|
||||
})
|
||||
err = os.WriteFile(stateFile, stateJSON, 0600)
|
||||
if (err == nil)
|
||||
{
|
||||
klog.Infof("Attached volume %s via VDUSE as %s (VDPA ID %s)", volName, blockdev, vdpaId)
|
||||
return blockdev, vdpaId, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
killErr := killByPidFile(pidFile)
|
||||
if (killErr != nil)
|
||||
{
|
||||
klog.Errorf("Failed to kill started qemu-storage-daemon: %v", killErr)
|
||||
}
|
||||
os.Remove(stateFile)
|
||||
os.Remove(pidFile)
|
||||
}
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
func unmapVduse(stateDir, devicePath string)
|
||||
{
|
||||
if (len(devicePath) < 6 || devicePath[0:6] != "/dev/v")
|
||||
{
|
||||
klog.Errorf("%s does not start with /dev/v", devicePath)
|
||||
return
|
||||
}
|
||||
vduseDev, err := os.Readlink("/sys/block/"+devicePath[5:])
|
||||
if (err != nil)
|
||||
{
|
||||
klog.Errorf("%s is not a symbolic link to VDUSE device (../devices/virtual/vduse/xxx): %v", devicePath, err)
|
||||
return
|
||||
}
|
||||
vdpaId := ""
|
||||
p := strings.Index(vduseDev, "/vduse/")
|
||||
if (p >= 0)
|
||||
{
|
||||
vduseDev = vduseDev[p+7:]
|
||||
p = strings.Index(vduseDev, "/")
|
||||
if (p >= 0)
|
||||
{
|
||||
vdpaId = vduseDev[0:p]
|
||||
}
|
||||
}
|
||||
if (vdpaId == "")
|
||||
{
|
||||
klog.Errorf("%s is not a symbolic link to VDUSE device (../devices/virtual/vduse/xxx), but is %v", devicePath, vduseDev)
|
||||
return
|
||||
}
|
||||
unmapVduseById(stateDir, vdpaId)
|
||||
}
|
||||
|
||||
func unmapVduseById(stateDir, vdpaId string)
|
||||
{
|
||||
_, err := os.Stat("/sys/bus/vdpa/devices/"+vdpaId)
|
||||
if (err != nil)
|
||||
{
|
||||
klog.Errorf("failed to stat /sys/bus/vdpa/devices/"+vdpaId+": %v", err)
|
||||
}
|
||||
else
|
||||
{
|
||||
_, _, _ = system("/sbin/vdpa", "-j", "dev", "del", vdpaId)
|
||||
}
|
||||
stateFile := stateDir + vdpaId + ".json"
|
||||
os.Remove(stateFile)
|
||||
pidFile := stateDir + vdpaId + ".pid"
|
||||
_, err = os.Stat(pidFile)
|
||||
if (os.IsNotExist(err))
|
||||
{
|
||||
// ok, already killed
|
||||
}
|
||||
else if (err != nil)
|
||||
{
|
||||
klog.Errorf("Failed to stat %v: %v", pidFile, err)
|
||||
return
|
||||
}
|
||||
else
|
||||
{
|
||||
err = killByPidFile(pidFile)
|
||||
if (err != nil)
|
||||
{
|
||||
klog.Errorf("Failed to kill started qemu-storage-daemon: %v", err)
|
||||
}
|
||||
os.Remove(pidFile)
|
||||
}
|
||||
}
|
||||
|
||||
func system(program string, args ...string) ([]byte, []byte, error)
|
||||
{
|
||||
klog.Infof("Running "+program+" "+strings.Join(args, " "))
|
||||
c := exec.Command(program, args...)
|
||||
var stdout, stderr bytes.Buffer
|
||||
c.Stdout, c.Stderr = &stdout, &stderr
|
||||
err := c.Run()
|
||||
if (err != nil)
|
||||
{
|
||||
stdoutStr, stderrStr := string(stdout.Bytes()), string(stderr.Bytes())
|
||||
klog.Errorf(program+" "+strings.Join(args, " ")+" failed: %s\nOutput:\n%s", err, stdoutStr+stderrStr)
|
||||
return nil, nil, status.Error(codes.Internal, stdoutStr+stderrStr+" (status "+err.Error()+")")
|
||||
}
|
||||
return stdout.Bytes(), stderr.Bytes(), nil
|
||||
}
|
||||
|
||||
func systemCombined(program string, args ...string) ([]byte, error)
|
||||
{
|
||||
klog.Infof("Running "+program+" "+strings.Join(args, " "))
|
||||
c := exec.Command(program, args...)
|
||||
var out bytes.Buffer
|
||||
c.Stdout, c.Stderr = &out, &out
|
||||
err := c.Run()
|
||||
if (err != nil)
|
||||
{
|
||||
outStr := string(out.Bytes())
|
||||
klog.Errorf(program+" "+strings.Join(args, " ")+" failed: %s, status %s\n", outStr, err)
|
||||
return nil, status.Error(codes.Internal, outStr+" (status "+err.Error()+")")
|
||||
}
|
||||
return out.Bytes(), nil
|
||||
}
|
2
debian/build-vitastor-bookworm.sh
vendored
2
debian/build-vitastor-bookworm.sh
vendored
@@ -3,5 +3,5 @@
|
||||
cat < vitastor.Dockerfile > ../Dockerfile
|
||||
cd ..
|
||||
mkdir -p packages
|
||||
sudo podman build --build-arg REL=bookworm -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
sudo podman build --build-arg DISTRO=debian --build-arg REL=bookworm -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
rm Dockerfile
|
||||
|
2
debian/build-vitastor-bullseye.sh
vendored
2
debian/build-vitastor-bullseye.sh
vendored
@@ -3,5 +3,5 @@
|
||||
cat < vitastor.Dockerfile > ../Dockerfile
|
||||
cd ..
|
||||
mkdir -p packages
|
||||
sudo podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
sudo podman build --build-arg DISTRO=debian --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
rm Dockerfile
|
||||
|
2
debian/build-vitastor-buster.sh
vendored
2
debian/build-vitastor-buster.sh
vendored
@@ -3,5 +3,5 @@
|
||||
cat < vitastor.Dockerfile > ../Dockerfile
|
||||
cd ..
|
||||
mkdir -p packages
|
||||
sudo podman build --build-arg REL=buster -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
sudo podman build --build-arg DISTRO=debian --build-arg REL=buster -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
rm Dockerfile
|
||||
|
7
debian/build-vitastor-ubuntu-jammy.sh
vendored
Executable file
7
debian/build-vitastor-ubuntu-jammy.sh
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat < vitastor.Dockerfile > ../Dockerfile
|
||||
cd ..
|
||||
mkdir -p packages
|
||||
sudo podman build --build-arg DISTRO=ubuntu --build-arg REL=jammy -v `pwd`/packages:/root/packages -f Dockerfile .
|
||||
rm Dockerfile
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
||||
vitastor (1.4.4-1) unstable; urgency=medium
|
||||
vitastor (1.11.0-1) unstable; urgency=medium
|
||||
|
||||
* Bugfixes
|
||||
|
||||
|
17
debian/control
vendored
17
debian/control
vendored
@@ -2,7 +2,10 @@ Source: vitastor
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Vitaliy Filippov <vitalif@yourcmc.ru>
|
||||
Build-Depends: debhelper, liburing-dev (>= 0.6), g++ (>= 8), libstdc++6 (>= 8), linux-libc-dev, libgoogle-perftools-dev, libjerasure-dev, libgf-complete-dev, libibverbs-dev, libisal-dev, cmake, pkg-config
|
||||
Build-Depends: debhelper, liburing-dev (>= 0.6), g++ (>= 8), libstdc++6 (>= 8),
|
||||
linux-libc-dev, libgoogle-perftools-dev, libjerasure-dev, libgf-complete-dev,
|
||||
libibverbs-dev, libisal-dev, cmake, pkg-config, libnl-3-dev, libnl-genl-3-dev,
|
||||
node-bindings <!nocheck>, node-gyp, node-nan
|
||||
Standards-Version: 4.5.0
|
||||
Homepage: https://vitastor.io/
|
||||
Rules-Requires-Root: no
|
||||
@@ -53,3 +56,15 @@ Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, vitastor-client (= ${binary:Version})
|
||||
Description: Vitastor Proxmox Virtual Environment storage plugin
|
||||
Vitastor storage plugin for Proxmox Virtual Environment.
|
||||
|
||||
Package: vitastor-opennebula
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, vitastor-client, patch, python3, jq
|
||||
Description: Vitastor OpenNebula storage plugin
|
||||
Vitastor storage plugin for OpenNebula.
|
||||
|
||||
Package: node-vitastor
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, node-bindings
|
||||
Description: Node.js bindings for Vitastor client
|
||||
Node.js native bindings for the Vitastor client library (vitastor-client).
|
||||
|
9
debian/libvirt.Dockerfile
vendored
9
debian/libvirt.Dockerfile
vendored
@@ -1,13 +1,14 @@
|
||||
# Build patched libvirt for Debian Buster or Bullseye/Sid inside a container
|
||||
# cd ..; podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/libvirt.Dockerfile .
|
||||
# cd ..; podman build --build-arg DISTRO=debian --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/libvirt.Dockerfile .
|
||||
|
||||
ARG DISTRO=
|
||||
ARG REL=
|
||||
FROM debian:$REL
|
||||
FROM $DISTRO:$REL
|
||||
ARG REL=
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN if [ "$REL" = "buster" -o "$REL" = "bullseye" ]; then \
|
||||
RUN if ([ "${DISTRO}" = "debian" ]) && ( [ "${REL}" = "buster" -o "${REL}" = "bullseye" ] ); then \
|
||||
echo "deb http://deb.debian.org/debian $REL-backports main" >> /etc/apt/sources.list; \
|
||||
echo >> /etc/apt/preferences; \
|
||||
echo 'Package: *' >> /etc/apt/preferences; \
|
||||
@@ -23,7 +24,7 @@ RUN apt-get -y build-dep libvirt0
|
||||
RUN apt-get -y install libglusterfs-dev
|
||||
RUN apt-get --download-only source libvirt
|
||||
|
||||
ADD patches/libvirt-5.0-vitastor.diff patches/libvirt-7.0-vitastor.diff patches/libvirt-7.5-vitastor.diff patches/libvirt-7.6-vitastor.diff /root
|
||||
ADD patches/libvirt-5.0-vitastor.diff patches/libvirt-7.0-vitastor.diff patches/libvirt-7.5-vitastor.diff patches/libvirt-7.6-vitastor.diff patches/libvirt-8.0-vitastor.diff /root
|
||||
RUN set -e; \
|
||||
mkdir -p /root/packages/libvirt-$REL; \
|
||||
rm -rf /root/packages/libvirt-$REL/*; \
|
||||
|
1
debian/node-vitastor.install
vendored
Normal file
1
debian/node-vitastor.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/lib/x86_64-linux-gnu/nodejs/vitastor
|
16
debian/patched-qemu.Dockerfile
vendored
16
debian/patched-qemu.Dockerfile
vendored
@@ -1,8 +1,10 @@
|
||||
# Build patched QEMU for Debian inside a container
|
||||
# cd ..; podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/patched-qemu.Dockerfile .
|
||||
|
||||
ARG DISTRO=debian
|
||||
ARG REL=
|
||||
FROM debian:$REL
|
||||
FROM $DISTRO:$REL
|
||||
ARG DISTRO=debian
|
||||
ARG REL=
|
||||
|
||||
WORKDIR /root
|
||||
@@ -20,14 +22,14 @@ RUN if [ "$REL" = "buster" -o "$REL" = "bullseye" -o "$REL" = "bookworm" ]; then
|
||||
echo 'APT::Install-Suggests false;' >> /etc/apt/apt.conf
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install fio liburing-dev libgoogle-perftools-dev devscripts
|
||||
RUN apt-get -y build-dep qemu
|
||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Moscow apt-get -y install fio liburing-dev libgoogle-perftools-dev devscripts
|
||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Moscow apt-get -y build-dep qemu
|
||||
# To build a custom version
|
||||
#RUN cp /root/packages/qemu-orig/* /root
|
||||
RUN apt-get --download-only source qemu
|
||||
|
||||
ADD patches /root/vitastor/patches
|
||||
ADD src/qemu_driver.c /root/vitastor/src/qemu_driver.c
|
||||
ADD src/client/qemu_driver.c /root/qemu_driver.c
|
||||
|
||||
#RUN set -e; \
|
||||
# apt-get install -y wget; \
|
||||
@@ -38,9 +40,9 @@ ADD src/qemu_driver.c /root/vitastor/src/qemu_driver.c
|
||||
# apt-get install -y vitastor-client vitastor-client-dev quilt
|
||||
|
||||
RUN set -e; \
|
||||
dpkg -i /root/packages/vitastor-$REL/vitastor-client_*.deb /root/packages/vitastor-$REL/vitastor-client-dev_*.deb; \
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Europe/Moscow apt-get -y install /root/packages/vitastor-$REL/vitastor-client_*.deb /root/packages/vitastor-$REL/vitastor-client-dev_*.deb; \
|
||||
apt-get update; \
|
||||
apt-get install -y quilt; \
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Europe/Moscow apt-get -y install quilt; \
|
||||
mkdir -p /root/packages/qemu-$REL; \
|
||||
rm -rf /root/packages/qemu-$REL/*; \
|
||||
cd /root/packages/qemu-$REL; \
|
||||
@@ -52,7 +54,7 @@ RUN set -e; \
|
||||
cd /root/packages/qemu-$REL/qemu-*/; \
|
||||
quilt push -a; \
|
||||
quilt add block/vitastor.c; \
|
||||
cp /root/vitastor/src/qemu_driver.c block/vitastor.c; \
|
||||
cp /root/qemu_driver.c block/vitastor.c; \
|
||||
quilt refresh; \
|
||||
V=$(head -n1 debian/changelog | perl -pe 's/5\.2\+dfsg-9/5.2+dfsg-11/; s/^.*\((.*?)(~bpo[\d\+]*)?\).*$/$1/')+vitastor4; \
|
||||
if [ "$REL" = bullseye ]; then V=${V}bullseye; fi; \
|
||||
|
8
debian/rules
vendored
8
debian/rules
vendored
@@ -4,6 +4,14 @@ export DH_VERBOSE = 1
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_install:
|
||||
perl -pe 's!prefix=/usr!prefix='`pwd`'/debian/tmp/usr!' < obj-x86_64-linux-gnu/src/client/vitastor.pc > node-binding/vitastor.pc
|
||||
cd node-binding && PKG_CONFIG_PATH=./ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 npm install --unsafe-perm || exit 1
|
||||
mkdir -p debian/tmp/usr/lib/x86_64-linux-gnu/nodejs/vitastor/build/Release
|
||||
cp -v node-binding/package.json node-binding/index.js node-binding/addon.cc node-binding/addon.h node-binding/client.cc node-binding/client.h debian/tmp/usr/lib/x86_64-linux-gnu/nodejs/vitastor
|
||||
cp -v node-binding/build/Release/addon.node debian/tmp/usr/lib/x86_64-linux-gnu/nodejs/vitastor/build/Release
|
||||
dh_install
|
||||
|
||||
override_dh_installdeb:
|
||||
cat debian/fio_version >> debian/vitastor-fio.substvars
|
||||
[ -f debian/qemu_version ] && (cat debian/qemu_version >> debian/vitastor-qemu.substvars) || true
|
||||
|
2
debian/vitastor-client.install
vendored
2
debian/vitastor-client.install
vendored
@@ -3,4 +3,6 @@ usr/bin/vitastor-cli
|
||||
usr/bin/vitastor-rm
|
||||
usr/bin/vitastor-nbd
|
||||
usr/bin/vitastor-nfs
|
||||
usr/bin/vitastor-kv
|
||||
usr/bin/vitastor-kv-stress
|
||||
usr/lib/*/libvitastor*.so*
|
||||
|
5
debian/vitastor-mon.install
vendored
5
debian/vitastor-mon.install
vendored
@@ -1,2 +1,3 @@
|
||||
mon usr/lib/vitastor
|
||||
mon/vitastor-mon.service /lib/systemd/system
|
||||
mon usr/lib/vitastor/
|
||||
mon/scripts/make-etcd usr/lib/vitastor/mon
|
||||
mon/scripts/vitastor-mon.service /lib/systemd/system
|
||||
|
2
debian/vitastor-mon.postinst
vendored
2
debian/vitastor-mon.postinst
vendored
@@ -6,4 +6,6 @@ if [ "$1" = "configure" ]; then
|
||||
addgroup --system --quiet vitastor
|
||||
adduser --system --quiet --ingroup vitastor --no-create-home --home /nonexistent vitastor
|
||||
mkdir -p /etc/vitastor
|
||||
mkdir -p /var/lib/vitastor
|
||||
chown vitastor:vitastor /var/lib/vitastor
|
||||
fi
|
||||
|
3
debian/vitastor-opennebula.install
vendored
Normal file
3
debian/vitastor-opennebula.install
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
opennebula/remotes var/lib/one/
|
||||
opennebula/sudoers.d etc/
|
||||
opennebula/install.sh var/lib/one/remotes/datastore/vitastor/
|
7
debian/vitastor-opennebula.postinst
vendored
Normal file
7
debian/vitastor-opennebula.postinst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
/var/lib/one/remotes/datastore/vitastor/install.sh
|
||||
fi
|
4
debian/vitastor-opennebula.triggers
vendored
Normal file
4
debian/vitastor-opennebula.triggers
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
interest /var/lib/one/remotes/datastore/downloader.sh
|
||||
interest /etc/one/oned.conf
|
||||
interest /etc/one/vmm_exec/vmm_execrc
|
||||
interest /etc/apparmor.d/local/abstractions/libvirt-qemu
|
6
debian/vitastor-osd.install
vendored
6
debian/vitastor-osd.install
vendored
@@ -1,6 +1,6 @@
|
||||
usr/bin/vitastor-osd
|
||||
usr/bin/vitastor-disk
|
||||
usr/bin/vitastor-dump-journal
|
||||
mon/vitastor-osd@.service /lib/systemd/system
|
||||
mon/vitastor.target /lib/systemd/system
|
||||
mon/90-vitastor.rules /lib/udev/rules.d
|
||||
mon/scripts/vitastor-osd@.service /lib/systemd/system
|
||||
mon/scripts/vitastor.target /lib/systemd/system
|
||||
mon/scripts/90-vitastor.rules /lib/udev/rules.d
|
||||
|
46
debian/vitastor.Dockerfile
vendored
46
debian/vitastor.Dockerfile
vendored
@@ -1,29 +1,31 @@
|
||||
# Build Vitastor packages for Debian inside a container
|
||||
# cd ..; podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/vitastor.Dockerfile .
|
||||
# cd ..; podman build --build-arg DISTRO=debian --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/vitastor.Dockerfile .
|
||||
|
||||
ARG DISTRO=debian
|
||||
ARG REL=
|
||||
FROM debian:$REL
|
||||
FROM $DISTRO:$REL
|
||||
ARG DISTRO=debian
|
||||
ARG REL=
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN if [ "$REL" = "buster" -o "$REL" = "bullseye" ]; then \
|
||||
echo "deb http://deb.debian.org/debian $REL-backports main" >> /etc/apt/sources.list; \
|
||||
echo >> /etc/apt/preferences; \
|
||||
echo 'Package: *' >> /etc/apt/preferences; \
|
||||
echo "Pin: release a=$REL-backports" >> /etc/apt/preferences; \
|
||||
echo 'Pin-Priority: 500' >> /etc/apt/preferences; \
|
||||
RUN set -e -x; \
|
||||
if [ "$REL" = "buster" ]; then \
|
||||
apt-get update; \
|
||||
apt-get -y install wget; \
|
||||
wget https://vitastor.io/debian/pubkey.gpg -O /etc/apt/trusted.gpg.d/vitastor.gpg; \
|
||||
echo "deb https://vitastor.io/debian $REL main" >> /etc/apt/sources.list; \
|
||||
fi; \
|
||||
grep '^deb ' /etc/apt/sources.list | perl -pe 's/^deb/deb-src/' >> /etc/apt/sources.list; \
|
||||
perl -i -pe 's/Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources || true; \
|
||||
echo 'APT::Install-Recommends false;' >> /etc/apt/apt.conf; \
|
||||
echo 'APT::Install-Suggests false;' >> /etc/apt/apt.conf
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install fio liburing-dev libgoogle-perftools-dev devscripts
|
||||
RUN apt-get -y build-dep fio
|
||||
RUN apt-get --download-only source fio
|
||||
RUN apt-get update && apt-get -y install libjerasure-dev cmake libibverbs-dev libisal-dev
|
||||
RUN apt-get update && \
|
||||
apt-get -y install fio liburing-dev libgoogle-perftools-dev devscripts libjerasure-dev cmake \
|
||||
libibverbs-dev librdmacm-dev libisal-dev libnl-3-dev libnl-genl-3-dev curl nodejs npm node-nan node-bindings && \
|
||||
apt-get -y build-dep fio && \
|
||||
apt-get --download-only source fio
|
||||
|
||||
ADD . /root/vitastor
|
||||
RUN set -e -x; \
|
||||
@@ -35,8 +37,10 @@ RUN set -e -x; \
|
||||
mkdir -p /root/packages/vitastor-$REL; \
|
||||
rm -rf /root/packages/vitastor-$REL/*; \
|
||||
cd /root/packages/vitastor-$REL; \
|
||||
cp -r /root/vitastor vitastor-1.4.4; \
|
||||
cd vitastor-1.4.4; \
|
||||
FULLVER=$(head -n1 /root/vitastor/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
||||
VER=${FULLVER%%-*}; \
|
||||
cp -r /root/vitastor vitastor-$VER; \
|
||||
cd vitastor-$VER; \
|
||||
ln -s /root/fio-build/fio-*/ ./fio; \
|
||||
FIO=$(head -n1 fio/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
||||
ls /usr/include/linux/raw.h || cp ./debian/raw.h /usr/include/linux/raw.h; \
|
||||
@@ -48,10 +52,14 @@ RUN set -e -x; \
|
||||
echo fio-headers.patch >> debian/patches/series; \
|
||||
rm -rf a b; \
|
||||
echo "dep:fio=$FIO" > debian/fio_version; \
|
||||
cd /root/packages/vitastor-$REL/vitastor-$VER; \
|
||||
mkdir mon/node_modules; \
|
||||
cd mon/node_modules; \
|
||||
curl -s https://git.yourcmc.ru/vitalif/antietcd/archive/master.tar.gz | tar -zx; \
|
||||
curl -s https://git.yourcmc.ru/vitalif/tinyraft/archive/master.tar.gz | tar -zx; \
|
||||
cd /root/packages/vitastor-$REL; \
|
||||
tar --sort=name --mtime='2020-01-01' --owner=0 --group=0 --exclude=debian -cJf vitastor_1.4.4.orig.tar.xz vitastor-1.4.4; \
|
||||
cd vitastor-1.4.4; \
|
||||
V=$(head -n1 debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
||||
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D $REL -v "$V""$REL" "Rebuild for $REL"; \
|
||||
tar --sort=name --mtime='2020-01-01' --owner=0 --group=0 --exclude=debian -cJf vitastor_$VER.orig.tar.xz vitastor-$VER; \
|
||||
cd vitastor-$VER; \
|
||||
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D $REL -v "$FULLVER""$REL" "Rebuild for $REL"; \
|
||||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto -sa; \
|
||||
rm -rf /root/packages/vitastor-$REL/vitastor-*/
|
||||
|
@@ -1,9 +1,11 @@
|
||||
# Build Docker image with Vitastor packages
|
||||
|
||||
FROM debian:bullseye
|
||||
FROM debian:bookworm
|
||||
|
||||
ADD vitastor.list /etc/apt/sources.list.d
|
||||
ADD vitastor.gpg /etc/apt/trusted.gpg.d
|
||||
ADD vitastor.pref /etc/apt/preferences.d
|
||||
ADD apt.conf /etc/apt/
|
||||
RUN apt-get update && apt-get -y install vitastor qemu-system-x86 qemu-system-common && apt-get clean
|
||||
ADD etc/apt /etc/apt/
|
||||
RUN apt-get update && apt-get -y install vitastor qemu-system-x86 qemu-system-common qemu-block-extra qemu-utils jq nfs-common && apt-get clean
|
||||
ADD sleep.sh /usr/bin/
|
||||
ADD install.sh /usr/bin/
|
||||
ADD scripts /opt/scripts/
|
||||
ADD etc /etc/
|
||||
RUN ln -s /usr/lib/vitastor/mon/make-etcd /usr/bin/make-etcd
|
||||
|
9
docker/Makefile
Normal file
9
docker/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
VITASTOR_VERSION ?= v1.11.0
|
||||
|
||||
all: build push
|
||||
|
||||
build:
|
||||
@docker build --rm -t vitalif/vitastor:$(VITASTOR_VERSION) .
|
||||
|
||||
push:
|
||||
@docker push vitalif/vitastor:$(VITASTOR_VERSION)
|
1
docker/etc/apt/sources.list.d/vitastor.list
Normal file
1
docker/etc/apt/sources.list.d/vitastor.list
Normal file
@@ -0,0 +1 @@
|
||||
deb http://vitastor.io/debian bookworm main
|
27
docker/etc/systemd/system/vitastor-etcd.service
Normal file
27
docker/etc/systemd/system/vitastor-etcd.service
Normal file
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Containerized etcd for Vitastor
|
||||
After=network-online.target local-fs.target time-sync.target docker.service vitastor-host.service
|
||||
Wants=network-online.target local-fs.target time-sync.target docker.service vitastor-host.service
|
||||
PartOf=vitastor.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
Environment=GOGC=50
|
||||
EnvironmentFile=/etc/vitastor/docker.conf
|
||||
EnvironmentFile=/etc/vitastor/etcd.conf
|
||||
SyslogIdentifier=etcd
|
||||
ExecStart=bash -c 'docker run --rm -i -v /var/lib/vitastor/etcd:/data \
|
||||
--log-driver none --network host $CONTAINER_OPTIONS --name vitastor-etcd \
|
||||
$ETCD_IMAGE /usr/local/bin/etcd --name "$ETCD_NAME" --data-dir /data \
|
||||
--snapshot-count 10000 --advertise-client-urls http://$ETCD_IP:2379 --listen-client-urls http://$ETCD_IP:2379 \
|
||||
--initial-advertise-peer-urls http://$ETCD_IP:2380 --listen-peer-urls http://$ETCD_IP:2380 \
|
||||
--initial-cluster-token vitastor-etcd-1 --initial-cluster "$ETCD_INITIAL_CLUSTER" \
|
||||
--initial-cluster-state new --max-txn-ops=100000 --max-request-bytes=104857600 \
|
||||
--auto-compaction-retention=10 --auto-compaction-mode=revision'
|
||||
ExecStop=docker stop vitastor-etcd
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
23
docker/etc/systemd/system/vitastor-host.service
Normal file
23
docker/etc/systemd/system/vitastor-host.service
Normal file
@@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Empty container for running Vitastor commands
|
||||
After=network-online.target local-fs.target time-sync.target docker.service
|
||||
Wants=network-online.target local-fs.target time-sync.target docker.service
|
||||
PartOf=vitastor.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
EnvironmentFile=/etc/vitastor/docker.conf
|
||||
ExecStart=bash -c 'docker run --rm -i -v /etc/vitastor:/etc/vitastor -v /dev:/dev \
|
||||
--privileged --log-driver none --network host --name vitastor vitastor:$VITASTOR_VERSION \
|
||||
sleep.sh'
|
||||
ExecStartPost=udevadm trigger
|
||||
ExecStop=docker stop vitastor
|
||||
WorkingDirectory=/
|
||||
PrivateTmp=false
|
||||
TasksMax=infinity
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
23
docker/etc/systemd/system/vitastor-mon.service
Normal file
23
docker/etc/systemd/system/vitastor-mon.service
Normal file
@@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Containerized Vitastor monitor
|
||||
After=network-online.target local-fs.target time-sync.target docker.service
|
||||
Wants=network-online.target local-fs.target time-sync.target docker.service
|
||||
PartOf=vitastor.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
EnvironmentFile=/etc/vitastor/docker.conf
|
||||
SyslogIdentifier=vitastor-mon
|
||||
ExecStart=bash -c 'docker run --rm -i -v /etc/vitastor:/etc/vitastor -v /var/lib/vitastor:/var/lib/vitastor -v /dev:/dev \
|
||||
--log-driver none --network host $CONTAINER_OPTIONS --name vitastor-mon vitastor:$VITASTOR_VERSION \
|
||||
node /usr/lib/vitastor/mon/mon-main.js'
|
||||
ExecStop=docker stop vitastor-mon
|
||||
WorkingDirectory=/
|
||||
PrivateTmp=false
|
||||
TasksMax=infinity
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
27
docker/etc/systemd/system/vitastor-osd@.service
Normal file
27
docker/etc/systemd/system/vitastor-osd@.service
Normal file
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Containerized Vitastor object storage daemon osd.%i
|
||||
After=network-online.target local-fs.target time-sync.target docker.service vitastor-host.service
|
||||
Wants=network-online.target local-fs.target time-sync.target docker.service vitastor-host.service
|
||||
PartOf=vitastor.target
|
||||
|
||||
[Service]
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
LimitMEMLOCK=infinity
|
||||
EnvironmentFile=/etc/vitastor/docker.conf
|
||||
SyslogIdentifier=vitastor-osd%i
|
||||
ExecStart=bash -c 'docker run --rm -i -v /etc/vitastor:/etc/vitastor -v /dev:/dev \
|
||||
$(for i in $(ls /dev/vitastor/osd%i-*); do echo --device $i:$i; done) \
|
||||
--log-driver none --network host --ulimit nofile=1048576 --ulimit memlock=-1 $CONTAINER_OPTIONS --name vitastor-osd%i \
|
||||
vitastor:$VITASTOR_VERSION vitastor-disk exec-osd /dev/vitastor/osd%i-data'
|
||||
ExecStartPre=+docker exec vitastor vitastor-disk pre-exec /dev/vitastor/osd%i-data
|
||||
ExecStop=docker stop vitastor-etcd%i
|
||||
WorkingDirectory=/
|
||||
PrivateTmp=false
|
||||
TasksMax=infinity
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=vitastor.target
|
7
docker/etc/udev/rules.d/90-vitastor.rules
Normal file
7
docker/etc/udev/rules.d/90-vitastor.rules
Normal file
@@ -0,0 +1,7 @@
|
||||
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e7009fac-a5a1-4d72-af72-53de13059903", \
|
||||
OWNER="vitastor", GROUP="vitastor", \
|
||||
IMPORT{program}="/usr/bin/docker exec vitastor vitastor-disk udev $devnode", \
|
||||
SYMLINK+="vitastor/$env{VITASTOR_ALIAS}"
|
||||
|
||||
ENV{VITASTOR_OSD_NUM}!="", ACTION=="add", RUN{program}+="/usr/bin/systemctl enable --now --no-block vitastor-osd@$env{VITASTOR_OSD_NUM}"
|
||||
ENV{VITASTOR_OSD_NUM}!="", ACTION=="remove", RUN{program}+="/usr/bin/systemctl disable --now --no-block vitastor-osd@$env{VITASTOR_OSD_NUM}"
|
11
docker/etc/vitastor/docker.conf
Normal file
11
docker/etc/vitastor/docker.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Configuration file for containerized Vitastor installation
|
||||
# (non-Kubernetes, with systemd and udev-based orchestration)
|
||||
#
|
||||
|
||||
# Desired Vitastor version
|
||||
VITASTOR_VERSION=1.11.0
|
||||
|
||||
# Additional arguments for all containers
|
||||
# For example, you may want to specify a custom logging driver here
|
||||
CONTAINER_OPTIONS=""
|
4
docker/etc/vitastor/etcd.conf
Normal file
4
docker/etc/vitastor/etcd.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
ETCD_IMAGE=quay.io/coreos/etcd:v3.5.18
|
||||
ETCD_NAME=""
|
||||
ETCD_IP=""
|
||||
ETCD_INITIAL_CLUSTER=""
|
2
docker/etc/vitastor/vitastor.conf
Normal file
2
docker/etc/vitastor/vitastor.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
9
docker/install.sh
Executable file
9
docker/install.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cp -urv /etc/default /host-etc/
|
||||
cp -urv /etc/systemd /host-etc/
|
||||
cp -urv /etc/udev /host-etc/
|
||||
cp -urnv /etc/vitastor /host-etc/
|
||||
cp -urnv /opt/scripts/* /host-bin/
|
3
docker/scripts/vitastor-cli
Executable file
3
docker/scripts/vitastor-cli
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -it vitastor vitastor-cli "$@"
|
3
docker/scripts/vitastor-disk
Executable file
3
docker/scripts/vitastor-disk
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -it vitastor vitastor-disk "$@"
|
3
docker/scripts/vitastor-fio
Executable file
3
docker/scripts/vitastor-fio
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -it vitastor fio "$@"
|
3
docker/scripts/vitastor-nbd
Executable file
3
docker/scripts/vitastor-nbd
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -it vitastor vitastor-nbd "$@"
|
3
docker/sleep.sh
Executable file
3
docker/sleep.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
while :; do sleep infinity; done
|
@@ -1 +0,0 @@
|
||||
deb http://vitastor.io/debian bullseye main
|
@@ -13,7 +13,7 @@ Vitastor configuration consists of:
|
||||
- [Separate OSD settings](config/pool.en.md#osd-settings)
|
||||
- [Inode configuration](config/inode.en.md) i.e. image metadata like name, size and parent reference
|
||||
|
||||
Configuration parameters can be set in 3 places:
|
||||
Configuration parameters can be set in 4 places:
|
||||
- Configuration file (`/etc/vitastor/vitastor.conf` or other path)
|
||||
- etcd key `/vitastor/config/global`. Most variables can be set there, but etcd
|
||||
connection parameters should obviously be set in the configuration file.
|
||||
|
@@ -14,7 +14,7 @@
|
||||
- [Настроек инодов](config/inode.ru.md), т.е. метаданных образов, таких, как имя, размер и ссылки на
|
||||
родительский образ
|
||||
|
||||
Параметры конфигурации могут задаваться в 3 местах:
|
||||
Параметры конфигурации могут задаваться в 4 местах:
|
||||
- Файле конфигурации (`/etc/vitastor/vitastor.conf` или по другому пути)
|
||||
- Ключе в etcd `/vitastor/config/global`. Большая часть параметров может
|
||||
задаваться там, кроме, естественно, самих параметров соединения с etcd,
|
||||
|
@@ -9,6 +9,10 @@
|
||||
These parameters apply only to Vitastor clients (QEMU, fio, NBD and so on) and
|
||||
affect their interaction with the cluster.
|
||||
|
||||
- [client_iothread_count](#client_iothread_count)
|
||||
- [client_retry_interval](#client_retry_interval)
|
||||
- [client_eio_retry_interval](#client_eio_retry_interval)
|
||||
- [client_retry_enospc](#client_retry_enospc)
|
||||
- [client_max_dirty_bytes](#client_max_dirty_bytes)
|
||||
- [client_max_dirty_ops](#client_max_dirty_ops)
|
||||
- [client_enable_writeback](#client_enable_writeback)
|
||||
@@ -18,6 +22,53 @@ affect their interaction with the cluster.
|
||||
- [nbd_timeout](#nbd_timeout)
|
||||
- [nbd_max_devices](#nbd_max_devices)
|
||||
- [nbd_max_part](#nbd_max_part)
|
||||
- [osd_nearfull_ratio](#osd_nearfull_ratio)
|
||||
|
||||
## client_iothread_count
|
||||
|
||||
- Type: integer
|
||||
- Default: 0
|
||||
|
||||
Number of separate threads for handling TCP network I/O at client library
|
||||
side. Enabling 4 threads usually allows to increase peak performance of each
|
||||
client from approx. 2-3 to 7-8 GByte/s linear read/write and from approx.
|
||||
100-150 to 400 thousand iops, but at the same time it increases latency.
|
||||
Latency increase depends on CPU: with CPU power saving disabled latency
|
||||
only increases by ~10 us (equivalent to Q=1 iops decrease from 10500 to 9500),
|
||||
with CPU power saving enabled it may be as high as 500 us (equivalent to Q=1
|
||||
iops decrease from 2000 to 1000). RDMA isn't affected by this option.
|
||||
|
||||
It's recommended to enable client I/O threads if you don't use RDMA and want
|
||||
to increase peak client performance.
|
||||
|
||||
## client_retry_interval
|
||||
|
||||
- Type: milliseconds
|
||||
- Default: 50
|
||||
- Minimum: 10
|
||||
- Can be changed online: yes
|
||||
|
||||
Retry time for I/O requests failed due to inactive PGs or network
|
||||
connectivity errors.
|
||||
|
||||
## client_eio_retry_interval
|
||||
|
||||
- Type: milliseconds
|
||||
- Default: 1000
|
||||
- Can be changed online: yes
|
||||
|
||||
Retry time for I/O requests failed due to data corruption or unfinished
|
||||
EC object deletions (has_incomplete PG state). 0 disables such retries
|
||||
and clients are not blocked and just get EIO error code instead.
|
||||
|
||||
## client_retry_enospc
|
||||
|
||||
- Type: boolean
|
||||
- Default: true
|
||||
- Can be changed online: yes
|
||||
|
||||
Retry writes on out of space errors to wait until some space is freed on
|
||||
OSDs.
|
||||
|
||||
## client_max_dirty_bytes
|
||||
|
||||
@@ -135,3 +186,18 @@ Maximum number of NBD devices in the system. This value is passed as
|
||||
Maximum number of partitions per NBD device. This value is passed as
|
||||
`max_part` parameter for the nbd kernel module when vitastor-nbd autoloads it.
|
||||
Note that (nbds_max)*(1+max_part) usually can't exceed 256.
|
||||
|
||||
## osd_nearfull_ratio
|
||||
|
||||
- Type: number
|
||||
- Default: 0.95
|
||||
- Can be changed online: yes
|
||||
|
||||
Ratio of used space on OSD to treat it as "almost full" in vitastor-cli status output.
|
||||
|
||||
Remember that some client writes may hang or complete with an error if even
|
||||
just one OSD becomes 100 % full!
|
||||
|
||||
However, unlike in Ceph, 100 % full Vitastor OSDs don't crash (in Ceph they're
|
||||
unable to start at all), so you'll be able to recover from "out of space" errors
|
||||
without destroying and recreating OSDs.
|
||||
|
@@ -9,6 +9,10 @@
|
||||
Данные параметры применяются только к клиентам Vitastor (QEMU, fio, NBD и т.п.) и
|
||||
затрагивают логику их работы с кластером.
|
||||
|
||||
- [client_iothread_count](#client_iothread_count)
|
||||
- [client_retry_interval](#client_retry_interval)
|
||||
- [client_eio_retry_interval](#client_eio_retry_interval)
|
||||
- [client_retry_enospc](#client_retry_enospc)
|
||||
- [client_max_dirty_bytes](#client_max_dirty_bytes)
|
||||
- [client_max_dirty_ops](#client_max_dirty_ops)
|
||||
- [client_enable_writeback](#client_enable_writeback)
|
||||
@@ -18,6 +22,55 @@
|
||||
- [nbd_timeout](#nbd_timeout)
|
||||
- [nbd_max_devices](#nbd_max_devices)
|
||||
- [nbd_max_part](#nbd_max_part)
|
||||
- [osd_nearfull_ratio](#osd_nearfull_ratio)
|
||||
|
||||
## client_iothread_count
|
||||
|
||||
- Тип: целое число
|
||||
- Значение по умолчанию: 0
|
||||
|
||||
Число отдельных потоков для обработки ввода-вывода через TCP сеть на стороне
|
||||
клиентской библиотеки. Включение 4 потоков обычно позволяет поднять пиковую
|
||||
производительность каждого клиента примерно с 2-3 до 7-8 Гбайт/с линейного
|
||||
чтения/записи и примерно с 100-150 до 400 тысяч операций ввода-вывода в
|
||||
секунду, но ухудшает задержку. Увеличение задержки зависит от процессора:
|
||||
при отключённом энергосбережении CPU это всего ~10 микросекунд (равносильно
|
||||
падению iops с Q=1 с 10500 до 9500), а при включённом это может быть
|
||||
и 500 микросекунд (равносильно падению iops с Q=1 с 2000 до 1000). На работу
|
||||
RDMA данная опция не влияет.
|
||||
|
||||
Рекомендуется включать клиентские потоки ввода-вывода, если вы не используете
|
||||
RDMA и хотите повысить пиковую производительность клиентов.
|
||||
|
||||
## client_retry_interval
|
||||
|
||||
- Тип: миллисекунды
|
||||
- Значение по умолчанию: 50
|
||||
- Минимальное значение: 10
|
||||
- Можно менять на лету: да
|
||||
|
||||
Время повтора запросов ввода-вывода, неудачных из-за неактивных PG или
|
||||
ошибок сети.
|
||||
|
||||
## client_eio_retry_interval
|
||||
|
||||
- Тип: миллисекунды
|
||||
- Значение по умолчанию: 1000
|
||||
- Можно менять на лету: да
|
||||
|
||||
Время повтора запросов ввода-вывода, неудачных из-за повреждения данных
|
||||
или незавершённых удалений EC-объектов (состояния PG has_incomplete).
|
||||
0 отключает повторы таких запросов и клиенты не блокируются, а вместо
|
||||
этого просто получают код ошибки EIO.
|
||||
|
||||
## client_retry_enospc
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: true
|
||||
- Можно менять на лету: да
|
||||
|
||||
Повторять запросы записи, завершившиеся с ошибками нехватки места, т.е.
|
||||
ожидать, пока на OSD не освободится место.
|
||||
|
||||
## client_max_dirty_bytes
|
||||
|
||||
@@ -135,3 +188,20 @@
|
||||
Максимальное число разделов на одном NBD-устройстве. Данное значение передаётся
|
||||
модулю ядра nbd как параметр `max_part`, когда его загружает vitastor-nbd.
|
||||
Имейте в виду, что (nbds_max)*(1+max_part) обычно не может превышать 256.
|
||||
|
||||
## osd_nearfull_ratio
|
||||
|
||||
- Тип: число
|
||||
- Значение по умолчанию: 0.95
|
||||
- Можно менять на лету: да
|
||||
|
||||
Доля занятого места на OSD, начиная с которой он считается "почти заполненным" в
|
||||
выводе vitastor-cli status.
|
||||
|
||||
Помните, что часть клиентских запросов может зависнуть или завершиться с ошибкой,
|
||||
если на 100 % заполнится хотя бы 1 OSD!
|
||||
|
||||
Однако, в отличие от Ceph, заполненные на 100 % OSD Vitastor не падают (в Ceph
|
||||
заполненные на 100% OSD вообще не могут стартовать), так что вы сможете
|
||||
восстановить работу кластера после ошибок отсутствия свободного места
|
||||
без уничтожения и пересоздания OSD.
|
||||
|
@@ -56,14 +56,24 @@ Can't be smaller than the OSD data device sector.
|
||||
## immediate_commit
|
||||
|
||||
- Type: string
|
||||
- Default: false
|
||||
- Default: all
|
||||
|
||||
Another parameter which is really important for performance.
|
||||
One of "none", "all" or "small". Global value, may be overriden [at pool level](pool.en.md#immediate_commit).
|
||||
|
||||
This parameter is also really important for performance.
|
||||
|
||||
TLDR: default "all" is optimal for server-grade SSDs with supercapacitor-based
|
||||
power loss protection (nonvolatile write-through cache) and also for most HDDs.
|
||||
"none" or "small" should be only selected if you use desktop SSDs without
|
||||
capacitors or drives with slow write-back cache that can't be disabled. Check
|
||||
immediate_commit of your OSDs in [ls-osd](../usage/cli.en.md#ls-osd).
|
||||
|
||||
Detailed explanation:
|
||||
|
||||
Desktop SSDs are very fast (100000+ iops) for simple random writes
|
||||
without cache flush. However, they are really slow (only around 1000 iops)
|
||||
if you try to fsync() each write, that is, when you want to guarantee that
|
||||
each change gets immediately persisted to the physical media.
|
||||
if you try to fsync() each write, that is, if you want to guarantee that
|
||||
each change gets actually persisted to the physical media.
|
||||
|
||||
Server-grade SSDs with "Advanced/Enhanced Power Loss Protection" or with
|
||||
"Supercapacitor-based Power Loss Protection", on the other hand, are equally
|
||||
@@ -75,8 +85,8 @@ really slow when used with desktop SSDs. Vitastor, however, can also
|
||||
efficiently utilize desktop SSDs by postponing fsync until the client calls
|
||||
it explicitly.
|
||||
|
||||
This is what this parameter regulates. When it's set to "all" the whole
|
||||
Vitastor cluster commits each change to disks immediately and clients just
|
||||
This is what this parameter regulates. When it's set to "all" Vitastor
|
||||
cluster commits each change to disks immediately and clients just
|
||||
ignore fsyncs because they know for sure that they're unneeded. This reduces
|
||||
the amount of network roundtrips performed by clients and improves
|
||||
performance. So it's always better to use server grade SSDs with
|
||||
@@ -96,12 +106,8 @@ SSD cache or "media-cache" - for example, a lot of Seagate EXOS drives have
|
||||
it (they have internal SSD cache even though it's not stated in datasheets).
|
||||
|
||||
Setting this parameter to "all" or "small" in OSD parameters requires enabling
|
||||
[disable_journal_fsync](layout-osd.en.yml#disable_journal_fsync) and
|
||||
[disable_meta_fsync](layout-osd.en.yml#disable_meta_fsync), setting it to
|
||||
"all" also requires enabling [disable_data_fsync](layout-osd.en.yml#disable_data_fsync).
|
||||
|
||||
TLDR: For optimal performance, set immediate_commit to "all" if you only use
|
||||
SSDs with supercapacitor-based power loss protection (nonvolatile
|
||||
write-through cache) for both data and journals in the whole Vitastor
|
||||
cluster. Set it to "small" if you only use such SSDs for journals. Leave
|
||||
empty if your drives have write-back cache.
|
||||
[disable_journal_fsync](layout-osd.en.md#disable_journal_fsync) and
|
||||
[disable_meta_fsync](layout-osd.en.md#disable_meta_fsync), setting it to
|
||||
"all" also requires enabling [disable_data_fsync](layout-osd.en.md#disable_data_fsync).
|
||||
vitastor-disk tried to do that by default, first checking/disabling drive cache.
|
||||
If it can't disable drive cache, OSD get initialized with "none".
|
||||
|
@@ -57,9 +57,18 @@ amplification) и эффективность распределения нагр
|
||||
## immediate_commit
|
||||
|
||||
- Тип: строка
|
||||
- Значение по умолчанию: false
|
||||
- Значение по умолчанию: all
|
||||
|
||||
Ещё один важный для производительности параметр.
|
||||
Одно из значений "none", "small" или "all". Глобальное значение, может быть
|
||||
переопределено [на уровне пула](pool.ru.md#immediate_commit).
|
||||
|
||||
Данный параметр тоже важен для производительности.
|
||||
|
||||
Вкратце: значение по умолчанию "all" оптимально для всех серверных SSD с
|
||||
суперконденсаторами и также для большинства HDD. "none" и "small" имеет смысл
|
||||
устанавливать только при использовании SSD настольного класса без
|
||||
суперконденсаторов или дисков с медленным неотключаемым кэшем записи.
|
||||
Проверьте настройку immediate_commit своих OSD в выводе команды [ls-osd](../usage/cli.ru.md#ls-osd).
|
||||
|
||||
Модели SSD для настольных компьютеров очень быстрые (100000+ операций в
|
||||
секунду) при простой случайной записи без сбросов кэша. Однако они очень
|
||||
@@ -80,7 +89,7 @@ Power Loss Protection" - одинаково быстрые и со сбросо
|
||||
эффективно утилизировать настольные SSD.
|
||||
|
||||
Данный параметр влияет как раз на это. Когда он установлен в значение "all",
|
||||
весь кластер Vitastor мгновенно фиксирует каждое изменение на физические
|
||||
кластер Vitastor мгновенно фиксирует каждое изменение на физические
|
||||
носители и клиенты могут просто игнорировать запросы fsync, т.к. они точно
|
||||
знают, что fsync-и не нужны. Это уменьшает число необходимых обращений к OSD
|
||||
по сети и улучшает производительность. Поэтому даже с Vitastor лучше всегда
|
||||
@@ -103,13 +112,6 @@ HDD-дисках с внутренним SSD или "медиа" кэшем - н
|
||||
указано в спецификациях).
|
||||
|
||||
Указание "all" или "small" в настройках / командной строке OSD требует
|
||||
включения [disable_journal_fsync](layout-osd.ru.yml#disable_journal_fsync) и
|
||||
[disable_meta_fsync](layout-osd.ru.yml#disable_meta_fsync), значение "all"
|
||||
также требует включения [disable_data_fsync](layout-osd.ru.yml#disable_data_fsync).
|
||||
|
||||
Итого, вкратце: для оптимальной производительности установите
|
||||
immediate_commit в значение "all", если вы используете в кластере только SSD
|
||||
с суперконденсаторами и для данных, и для журналов. Если вы используете
|
||||
такие SSD для всех журналов, но не для данных - можете установить параметр
|
||||
в "small". Если и какие-то из дисков журналов имеют волатильный кэш записи -
|
||||
оставьте параметр пустым.
|
||||
включения [disable_journal_fsync](layout-osd.ru.md#disable_journal_fsync) и
|
||||
[disable_meta_fsync](layout-osd.ru.md#disable_meta_fsync), значение "all"
|
||||
также требует включения [disable_data_fsync](layout-osd.ru.md#disable_data_fsync).
|
||||
|
@@ -118,12 +118,13 @@ Physical block size of the journal device. Must be a multiple of
|
||||
- Type: boolean
|
||||
- Default: false
|
||||
|
||||
Do not issue fsyncs to the data device, i.e. do not flush its cache.
|
||||
Safe ONLY if your data device has write-through cache. If you disable
|
||||
the cache yourself using `hdparm` or `scsi_disk/cache_type` then make sure
|
||||
that the cache disable command is run every time before starting Vitastor
|
||||
OSD, for example, in the systemd unit. See also `immediate_commit` option
|
||||
for the instructions to disable cache and how to benefit from it.
|
||||
Do not issue fsyncs to the data device, i.e. do not force it to flush cache.
|
||||
Safe ONLY if your data device has write-through cache or if write-back
|
||||
cache is disabled. If you disable drive cache manually with `hdparm` or
|
||||
writing to `/sys/.../scsi_disk/cache_type` then make sure that you do it
|
||||
every time before starting Vitastor OSD (vitastor-disk does it automatically).
|
||||
See also [immediate_commit](layout-cluster.en.md#immediate_commit)
|
||||
for information about how to benefit from disabled cache.
|
||||
|
||||
## disable_meta_fsync
|
||||
|
||||
@@ -171,8 +172,7 @@ size, it actually has to write the whole 4 KB sector.
|
||||
|
||||
Because of this it can actually be beneficial to use SSDs which work well
|
||||
with 512 byte sectors and use 512 byte disk_alignment, journal_block_size
|
||||
and meta_block_size. But the only SSD that may fit into this category is
|
||||
Intel Optane (probably, not tested yet).
|
||||
and meta_block_size. But at the moment, no such SSDs are known...
|
||||
|
||||
Clients don't need to be aware of disk_alignment, so it's not required to
|
||||
put a modified value into etcd key /vitastor/config/global.
|
||||
|
@@ -122,13 +122,14 @@ SSD-диске, иначе производительность пострада
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: false
|
||||
|
||||
Не отправлять fsync-и устройству данных, т.е. не сбрасывать его кэш.
|
||||
Не отправлять fsync-и устройству данных, т.е. не заставлять его сбрасывать кэш.
|
||||
Безопасно, ТОЛЬКО если ваше устройство данных имеет кэш со сквозной
|
||||
записью (write-through). Если вы отключаете кэш через `hdparm` или
|
||||
`scsi_disk/cache_type`, то удостоверьтесь, что команда отключения кэша
|
||||
выполняется перед каждым запуском Vitastor OSD, например, в systemd unit-е.
|
||||
Смотрите также опцию `immediate_commit` для инструкций по отключению кэша
|
||||
и о том, как из этого извлечь выгоду.
|
||||
записью (write-through) или если кэш с отложенной записью (write-back) отключён.
|
||||
Если вы отключаете кэш вручную через `hdparm` или запись в `/sys/.../scsi_disk/cache_type`,
|
||||
то удостоверьтесь, что вы делаете это каждый раз перед запуском Vitastor OSD
|
||||
(vitastor-disk делает это автоматически). Смотрите также опцию
|
||||
[immediate_commit](layout-cluster.ru.md#immediate_commit) для информации о том,
|
||||
как извлечь выгоду из отключённого кэша.
|
||||
|
||||
## disable_meta_fsync
|
||||
|
||||
@@ -179,9 +180,8 @@ SSD и HDD диски используют 4 КБ физические сект
|
||||
|
||||
Поэтому, на самом деле, может быть выгодно найти SSD, хорошо работающие с
|
||||
меньшими, 512-байтными, блоками и использовать 512-байтные disk_alignment,
|
||||
journal_block_size и meta_block_size. Однако единственные SSD, которые
|
||||
теоретически могут попасть в эту категорию - это Intel Optane (но и это
|
||||
пока не проверялось автором).
|
||||
journal_block_size и meta_block_size. Однако на данный момент такие SSD
|
||||
не известны...
|
||||
|
||||
Клиентам не обязательно знать про disk_alignment, так что помещать значение
|
||||
этого параметра в etcd в /vitastor/config/global не нужно.
|
||||
|
@@ -8,6 +8,14 @@
|
||||
|
||||
These parameters only apply to Monitors.
|
||||
|
||||
- [use_antietcd](#use_antietcd)
|
||||
- [enable_prometheus](#enable_prometheus)
|
||||
- [mon_http_port](#mon_http_port)
|
||||
- [mon_http_ip](#mon_http_ip)
|
||||
- [mon_https_cert](#mon_https_cert)
|
||||
- [mon_https_key](#mon_https_key)
|
||||
- [mon_https_client_auth](#mon_https_client_auth)
|
||||
- [mon_https_ca](#mon_https_ca)
|
||||
- [etcd_mon_ttl](#etcd_mon_ttl)
|
||||
- [etcd_mon_timeout](#etcd_mon_timeout)
|
||||
- [etcd_mon_retries](#etcd_mon_retries)
|
||||
@@ -15,6 +23,89 @@ These parameters only apply to Monitors.
|
||||
- [mon_stats_timeout](#mon_stats_timeout)
|
||||
- [osd_out_time](#osd_out_time)
|
||||
- [placement_levels](#placement_levels)
|
||||
- [use_old_pg_combinator](#use_old_pg_combinator)
|
||||
- [osd_backfillfull_ratio](#osd_backfillfull_ratio)
|
||||
|
||||
## use_antietcd
|
||||
|
||||
- Type: boolean
|
||||
- Default: false
|
||||
|
||||
Enable experimental built-in etcd replacement (clustered key-value database):
|
||||
[antietcd](https://git.yourcmc.ru/vitalif/antietcd/).
|
||||
|
||||
When set to true, monitor runs internal antietcd automatically if it finds
|
||||
a network interface with an IP address matching one of addresses in the
|
||||
`etcd_address` configuration option (in `/etc/vitastor/vitastor.conf` or in
|
||||
the monitor command line). If there are multiple matching addresses, it also
|
||||
checks `antietcd_port` and antietcd is started for address with matching port.
|
||||
By default, antietcd accepts connection on the selected IP address, but it
|
||||
can also be overridden manually in the `antietcd_ip` option.
|
||||
|
||||
When antietcd is started, monitor stores cluster metadata itself and exposes
|
||||
a etcd-compatible REST API. On disk, these metadata are stored in
|
||||
`/var/lib/vitastor/mon_2379.json.gz` (can be overridden in antietcd_data_file
|
||||
or antietcd_data_dir options). All other antietcd parameters
|
||||
(see [here](https://git.yourcmc.ru/vitalif/antietcd/)) except node_id,
|
||||
cluster, cluster_key, persist_filter, stale_read can also be set in
|
||||
Vitastor configuration with `antietcd_` prefix.
|
||||
|
||||
You can dump/load data to or from antietcd using Antietcd `anticli` tool:
|
||||
|
||||
```
|
||||
npm exec anticli -e http://etcd:2379/v3 get --prefix '' --no-temp > dump.json
|
||||
npm exec anticli -e http://antietcd:2379/v3 load < dump.json
|
||||
```
|
||||
|
||||
## enable_prometheus
|
||||
|
||||
- Type: boolean
|
||||
- Default: true
|
||||
|
||||
Enable built-in Prometheus metrics exporter at mon_http_port (8060 by default).
|
||||
|
||||
Note that only the active (master) monitor exposes metrics, others return
|
||||
HTTP 503. So you should add all monitor URLs to your Prometheus job configuration.
|
||||
|
||||
Grafana dashboard suitable for this exporter is here: [Vitastor-Grafana-6+.json](../../mon/scripts/Vitastor-Grafana-6+.json).
|
||||
|
||||
## mon_http_port
|
||||
|
||||
- Type: integer
|
||||
- Default: 8060
|
||||
|
||||
HTTP port for monitors to listen on (including metrics exporter)
|
||||
|
||||
## mon_http_ip
|
||||
|
||||
- Type: string
|
||||
|
||||
IP address for monitors to listen on (all addresses by default)
|
||||
|
||||
## mon_https_cert
|
||||
|
||||
- Type: string
|
||||
|
||||
Path to PEM SSL certificate file for monitor to listen using HTTPS
|
||||
|
||||
## mon_https_key
|
||||
|
||||
- Type: string
|
||||
|
||||
Path to PEM SSL private key file for monitor to listen using HTTPS
|
||||
|
||||
## mon_https_client_auth
|
||||
|
||||
- Type: boolean
|
||||
- Default: false
|
||||
|
||||
Enable HTTPS client certificate-based authorization for monitor connections
|
||||
|
||||
## mon_https_ca
|
||||
|
||||
- Type: string
|
||||
|
||||
Path to CA certificate for client HTTPS authorization
|
||||
|
||||
## etcd_mon_ttl
|
||||
|
||||
@@ -77,3 +168,26 @@ values. Smaller priority means higher level in tree. For example,
|
||||
levels are always predefined and can't be removed. If one of them is not
|
||||
present in the configuration, then it is defined with the default priority
|
||||
(100 for "host", 101 for "osd").
|
||||
|
||||
## use_old_pg_combinator
|
||||
|
||||
- Type: boolean
|
||||
- Default: false
|
||||
|
||||
Use the old PG combination generator which doesn't support [level_placement](pool.en.md#level_placement)
|
||||
and [raw_placement](pool.en.md#raw_placement) for pools which don't use this features.
|
||||
|
||||
## osd_backfillfull_ratio
|
||||
|
||||
- Type: number
|
||||
- Default: 0.99
|
||||
|
||||
Monitors try to prevent OSDs becoming 100% full during rebalance or recovery by
|
||||
calculating how much space will be occupied on every OSD after all rebalance
|
||||
and recovery operations finish, and pausing rebalance and recovery if that
|
||||
amount of space exceeds OSD capacity multiplied by the value of this
|
||||
configuration parameter.
|
||||
|
||||
Future used space is calculated by summing space used by all user data blocks
|
||||
(objects) in all PGs placed on a specific OSD, even if some of these objects
|
||||
currently reside on a different set of OSDs.
|
||||
|
@@ -8,6 +8,14 @@
|
||||
|
||||
Данные параметры используются только мониторами Vitastor.
|
||||
|
||||
- [use_antietcd](#use_antietcd)
|
||||
- [enable_prometheus](#enable_prometheus)
|
||||
- [mon_http_port](#mon_http_port)
|
||||
- [mon_http_ip](#mon_http_ip)
|
||||
- [mon_https_cert](#mon_https_cert)
|
||||
- [mon_https_key](#mon_https_key)
|
||||
- [mon_https_client_auth](#mon_https_client_auth)
|
||||
- [mon_https_ca](#mon_https_ca)
|
||||
- [etcd_mon_ttl](#etcd_mon_ttl)
|
||||
- [etcd_mon_timeout](#etcd_mon_timeout)
|
||||
- [etcd_mon_retries](#etcd_mon_retries)
|
||||
@@ -15,6 +23,91 @@
|
||||
- [mon_stats_timeout](#mon_stats_timeout)
|
||||
- [osd_out_time](#osd_out_time)
|
||||
- [placement_levels](#placement_levels)
|
||||
- [use_old_pg_combinator](#use_old_pg_combinator)
|
||||
- [osd_backfillfull_ratio](#osd_backfillfull_ratio)
|
||||
|
||||
## use_antietcd
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: false
|
||||
|
||||
Включить экспериментальный встроенный заменитель etcd (кластерную БД ключ-значение):
|
||||
[antietcd](https://git.yourcmc.ru/vitalif/antietcd/).
|
||||
|
||||
Если параметр установлен в true, монитор запускает antietcd автоматически,
|
||||
если обнаруживает сетевой интерфейс с одним из адресов, указанных в опции
|
||||
конфигурации `etcd_address` (в `/etc/vitastor/vitastor.conf` или в опциях
|
||||
командной строки монитора). Если таких адресов несколько, также проверяется
|
||||
опция `antietcd_port` и antietcd запускается для адреса с соответствующим
|
||||
портом. По умолчанию antietcd принимает подключения по выбранному совпадающему
|
||||
IP, но его также можно определить вручную опцией `antietcd_ip`.
|
||||
|
||||
При запуске antietcd монитор сам хранит центральные метаданные кластера и
|
||||
выставляет etcd-совместимое REST API. На диске эти метаданные хранятся в файле
|
||||
`/var/lib/vitastor/mon_2379.json.gz` (можно переопределить параметрами
|
||||
antietcd_data_file или antietcd_data_dir). Все остальные параметры antietcd
|
||||
(смотрите [по ссылке](https://git.yourcmc.ru/vitalif/antietcd/)), за исключением
|
||||
node_id, cluster, cluster_key, persist_filter, stale_read также можно задавать
|
||||
в конфигурации Vitastor с префиксом `antietcd_`.
|
||||
|
||||
Вы можете выгружать/загружать данные в или из antietcd с помощью его инструмента
|
||||
`anticli`:
|
||||
|
||||
```
|
||||
npm exec anticli -e http://etcd:2379/v3 get --prefix '' --no-temp > dump.json
|
||||
npm exec anticli -e http://antietcd:2379/v3 load < dump.json
|
||||
```
|
||||
|
||||
## enable_prometheus
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: true
|
||||
|
||||
Включить встроенный Prometheus-экспортер метрик на порту mon_http_port (по умолчанию 8060).
|
||||
|
||||
Обратите внимание, что метрики выставляет только активный (главный) монитор, остальные
|
||||
возвращают статус HTTP 503, поэтому вам следует добавлять адреса всех мониторов
|
||||
в задание по сбору метрик Prometheus.
|
||||
|
||||
Дашборд для Grafana, подходящий для этого экспортера: [Vitastor-Grafana-6+.json](../../mon/scripts/Vitastor-Grafana-6+.json).
|
||||
|
||||
## mon_http_port
|
||||
|
||||
- Тип: целое число
|
||||
- Значение по умолчанию: 8060
|
||||
|
||||
Порт, на котором мониторы принимают HTTP-соединения (в том числе для отдачи метрик)
|
||||
|
||||
## mon_http_ip
|
||||
|
||||
- Тип: строка
|
||||
|
||||
IP-адрес, на котором мониторы принимают HTTP-соединения (по умолчанию все адреса)
|
||||
|
||||
## mon_https_cert
|
||||
|
||||
- Тип: строка
|
||||
|
||||
Путь к PEM-файлу SSL-сертификата для монитора, чтобы принимать соединения через HTTPS
|
||||
|
||||
## mon_https_key
|
||||
|
||||
- Тип: строка
|
||||
|
||||
Путь к PEM-файлу секретного SSL-ключа для монитора, чтобы принимать соединения через HTTPS
|
||||
|
||||
## mon_https_client_auth
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: false
|
||||
|
||||
Включить в HTTPS-сервере монитора авторизацию по клиентским сертификатам
|
||||
|
||||
## mon_https_ca
|
||||
|
||||
- Тип: строка
|
||||
|
||||
Путь к удостоверяющему сертификату для авторизации клиентских HTTPS соединений
|
||||
|
||||
## etcd_mon_ttl
|
||||
|
||||
@@ -78,3 +171,27 @@ OSD перед обновлением агрегированной статис
|
||||
"host" и "osd" являются предопределёнными и не могут быть удалены. Если
|
||||
один из них отсутствует в конфигурации, он доопределяется с приоритетом по
|
||||
умолчанию (100 для уровня "host", 101 для "osd").
|
||||
|
||||
## use_old_pg_combinator
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: false
|
||||
|
||||
Использовать старый генератор комбинаций PG, не поддерживающий [level_placement](pool.ru.md#level_placement)
|
||||
и [raw_placement](pool.ru.md#raw_placement) для пулов, которые не используют данные функции.
|
||||
|
||||
## osd_backfillfull_ratio
|
||||
|
||||
- Тип: число
|
||||
- Значение по умолчанию: 0.99
|
||||
|
||||
Мониторы стараются предотвратить 100% заполнение OSD в процессе ребаланса
|
||||
или восстановления, рассчитывая, сколько места будет занято на каждом OSD после
|
||||
завершения всех операций ребаланса и восстановления, и приостанавливая
|
||||
ребаланс и восстановление, если рассчитанный объём превышает ёмкость OSD,
|
||||
умноженную на значение данного параметра.
|
||||
|
||||
Будущее занятое место рассчитывается сложением места, занятого всеми
|
||||
пользовательскими блоками данных (объектами) во всех PG, расположенных
|
||||
на конкретном OSD, даже если часть этих объектов в данный момент находится
|
||||
на другом наборе OSD.
|
||||
|
@@ -25,12 +25,11 @@ between clients, OSDs and etcd.
|
||||
- [peer_connect_timeout](#peer_connect_timeout)
|
||||
- [osd_idle_timeout](#osd_idle_timeout)
|
||||
- [osd_ping_timeout](#osd_ping_timeout)
|
||||
- [up_wait_retry_interval](#up_wait_retry_interval)
|
||||
- [max_etcd_attempts](#max_etcd_attempts)
|
||||
- [etcd_quick_timeout](#etcd_quick_timeout)
|
||||
- [etcd_slow_timeout](#etcd_slow_timeout)
|
||||
- [etcd_keepalive_timeout](#etcd_keepalive_timeout)
|
||||
- [etcd_ws_keepalive_timeout](#etcd_ws_keepalive_timeout)
|
||||
- [etcd_ws_keepalive_interval](#etcd_ws_keepalive_interval)
|
||||
|
||||
## tcp_header_buffer_size
|
||||
|
||||
@@ -69,11 +68,17 @@ but they are not connected to the cluster.
|
||||
- Type: string
|
||||
|
||||
RDMA device name to use for Vitastor OSD communications (for example,
|
||||
"rocep5s0f0"). Now Vitastor supports all adapters, even ones without
|
||||
ODP support, like Mellanox ConnectX-3 and non-Mellanox cards.
|
||||
"rocep5s0f0"). If not specified, Vitastor will try to find an RoCE
|
||||
device matching [osd_network](osd.en.md#osd_network), preferring RoCEv2,
|
||||
or choose the first available RDMA device if no RoCE devices are
|
||||
found or if `osd_network` is not specified. Auto-selection is also
|
||||
unsupported with old libibverbs < v32, like in Debian 10 Buster or
|
||||
CentOS 7.
|
||||
|
||||
Versions up to Vitastor 1.2.0 required ODP which is only present in
|
||||
Mellanox ConnectX >= 4. See also [rdma_odp](#rdma_odp).
|
||||
Vitastor supports all adapters, even ones without ODP support, like
|
||||
Mellanox ConnectX-3 and non-Mellanox cards. Versions up to Vitastor
|
||||
1.2.0 required ODP which is only present in Mellanox ConnectX >= 4.
|
||||
See also [rdma_odp](#rdma_odp).
|
||||
|
||||
Run `ibv_devinfo -v` as root to list available RDMA devices and their
|
||||
features.
|
||||
@@ -96,15 +101,17 @@ your device has.
|
||||
## rdma_gid_index
|
||||
|
||||
- Type: integer
|
||||
- Default: 0
|
||||
|
||||
Global address identifier index of the RDMA device to use. Different GID
|
||||
indexes may correspond to different protocols like RoCEv1, RoCEv2 and iWARP.
|
||||
Search for "GID" in `ibv_devinfo -v` output to determine which GID index
|
||||
you need.
|
||||
|
||||
**IMPORTANT:** If you want to use RoCEv2 (as recommended) then the correct
|
||||
rdma_gid_index is usually 1 (IPv6) or 3 (IPv4).
|
||||
If not specified, Vitastor will try to auto-select a RoCEv2 IPv4 GID, then
|
||||
RoCEv2 IPv6 GID, then RoCEv1 IPv4 GID, then RoCEv1 IPv6 GID, then IB GID.
|
||||
GID auto-selection is unsupported with libibverbs < v32.
|
||||
|
||||
A correct rdma_gid_index for RoCEv2 is usually 1 (IPv6) or 3 (IPv4).
|
||||
|
||||
## rdma_mtu
|
||||
|
||||
@@ -212,17 +219,6 @@ Maximum time to wait for OSD keepalive responses. If an OSD doesn't respond
|
||||
within this time, the connection to it is dropped and a reconnection attempt
|
||||
is scheduled.
|
||||
|
||||
## up_wait_retry_interval
|
||||
|
||||
- Type: milliseconds
|
||||
- Default: 50
|
||||
- Minimum: 10
|
||||
- Can be changed online: yes
|
||||
|
||||
OSDs respond to clients with a special error code when they receive I/O
|
||||
requests for a PG that's not synchronized and started. This parameter sets
|
||||
the time for the clients to wait before re-attempting such I/O requests.
|
||||
|
||||
## max_etcd_attempts
|
||||
|
||||
- Type: integer
|
||||
@@ -257,10 +253,10 @@ Timeout for etcd requests which are allowed to wait for some time.
|
||||
Timeout for etcd connection HTTP Keep-Alive. Should be higher than
|
||||
etcd_report_interval to guarantee that keepalive actually works.
|
||||
|
||||
## etcd_ws_keepalive_timeout
|
||||
## etcd_ws_keepalive_interval
|
||||
|
||||
- Type: seconds
|
||||
- Default: 30
|
||||
- Default: 5
|
||||
- Can be changed online: yes
|
||||
|
||||
etcd websocket ping interval required to keep the connection alive and
|
||||
|
@@ -25,12 +25,11 @@
|
||||
- [peer_connect_timeout](#peer_connect_timeout)
|
||||
- [osd_idle_timeout](#osd_idle_timeout)
|
||||
- [osd_ping_timeout](#osd_ping_timeout)
|
||||
- [up_wait_retry_interval](#up_wait_retry_interval)
|
||||
- [max_etcd_attempts](#max_etcd_attempts)
|
||||
- [etcd_quick_timeout](#etcd_quick_timeout)
|
||||
- [etcd_slow_timeout](#etcd_slow_timeout)
|
||||
- [etcd_keepalive_timeout](#etcd_keepalive_timeout)
|
||||
- [etcd_ws_keepalive_timeout](#etcd_ws_keepalive_timeout)
|
||||
- [etcd_ws_keepalive_interval](#etcd_ws_keepalive_interval)
|
||||
|
||||
## tcp_header_buffer_size
|
||||
|
||||
@@ -72,12 +71,17 @@ RDMA может быть нужно только если у клиентов е
|
||||
- Тип: строка
|
||||
|
||||
Название RDMA-устройства для связи с Vitastor OSD (например, "rocep5s0f0").
|
||||
Сейчас Vitastor поддерживает все модели адаптеров, включая те, у которых
|
||||
нет поддержки ODP, то есть вы можете использовать RDMA с ConnectX-3 и
|
||||
картами производства не Mellanox.
|
||||
Если не указано, Vitastor попробует найти RoCE-устройство, соответствующее
|
||||
[osd_network](osd.en.md#osd_network), предпочитая RoCEv2, или выбрать первое
|
||||
попавшееся RDMA-устройство, если RoCE-устройств нет или если сеть `osd_network`
|
||||
не задана. Также автовыбор не поддерживается со старыми версиями библиотеки
|
||||
libibverbs < v32, например в Debian 10 Buster или CentOS 7.
|
||||
|
||||
Версии Vitastor до 1.2.0 включительно требовали ODP, который есть только
|
||||
на Mellanox ConnectX 4 и более новых. См. также [rdma_odp](#rdma_odp).
|
||||
Vitastor поддерживает все модели адаптеров, включая те, у которых
|
||||
нет поддержки ODP, то есть вы можете использовать RDMA с ConnectX-3 и
|
||||
картами производства не Mellanox. Версии Vitastor до 1.2.0 включительно
|
||||
требовали ODP, который есть только на Mellanox ConnectX 4 и более новых.
|
||||
См. также [rdma_odp](#rdma_odp).
|
||||
|
||||
Запустите `ibv_devinfo -v` от имени суперпользователя, чтобы посмотреть
|
||||
список доступных RDMA-устройств, их параметры и возможности.
|
||||
@@ -102,15 +106,18 @@ Control) и ECN (Explicit Congestion Notification).
|
||||
## rdma_gid_index
|
||||
|
||||
- Тип: целое число
|
||||
- Значение по умолчанию: 0
|
||||
|
||||
Номер глобального идентификатора адреса RDMA-устройства, который следует
|
||||
использовать. Разным gid_index могут соответствовать разные протоколы связи:
|
||||
RoCEv1, RoCEv2, iWARP. Чтобы понять, какой нужен вам - смотрите строчки со
|
||||
словом "GID" в выводе команды `ibv_devinfo -v`.
|
||||
|
||||
**ВАЖНО:** Если вы хотите использовать RoCEv2 (как мы и рекомендуем), то
|
||||
правильный rdma_gid_index, как правило, 1 (IPv6) или 3 (IPv4).
|
||||
Если не указан, Vitastor попробует автоматически выбрать сначала GID,
|
||||
соответствующий RoCEv2 IPv4, потом RoCEv2 IPv6, потом RoCEv1 IPv4, потом
|
||||
RoCEv1 IPv6, потом IB. Авто-выбор GID не поддерживается со старыми версиями
|
||||
libibverbs < v32.
|
||||
|
||||
Правильный rdma_gid_index для RoCEv2, как правило, 1 (IPv6) или 3 (IPv4).
|
||||
|
||||
## rdma_mtu
|
||||
|
||||
@@ -221,19 +228,6 @@ OSD в любом случае согласовывают реальное зн
|
||||
Если OSD не отвечает за это время, соединение отключается и производится
|
||||
повторная попытка соединения.
|
||||
|
||||
## up_wait_retry_interval
|
||||
|
||||
- Тип: миллисекунды
|
||||
- Значение по умолчанию: 50
|
||||
- Минимальное значение: 10
|
||||
- Можно менять на лету: да
|
||||
|
||||
Когда OSD получают от клиентов запросы ввода-вывода, относящиеся к не
|
||||
поднятым на данный момент на них PG, либо к PG в процессе синхронизации,
|
||||
они отвечают клиентам специальным кодом ошибки, означающим, что клиент
|
||||
должен некоторое время подождать перед повторением запроса. Именно это время
|
||||
ожидания задаёт данный параметр.
|
||||
|
||||
## max_etcd_attempts
|
||||
|
||||
- Тип: целое число
|
||||
@@ -270,10 +264,10 @@ OSD в любом случае согласовывают реальное зн
|
||||
Таймаут для HTTP Keep-Alive в соединениях к etcd. Должен быть больше, чем
|
||||
etcd_report_interval, чтобы keepalive гарантированно работал.
|
||||
|
||||
## etcd_ws_keepalive_timeout
|
||||
## etcd_ws_keepalive_interval
|
||||
|
||||
- Тип: секунды
|
||||
- Значение по умолчанию: 30
|
||||
- Значение по умолчанию: 5
|
||||
- Можно менять на лету: да
|
||||
|
||||
Интервал проверки живости вебсокет-подключений к etcd.
|
||||
|
@@ -10,6 +10,7 @@ These parameters only apply to OSDs, are not fixed at the moment of OSD drive
|
||||
initialization and can be changed - either with an OSD restart or, for some of
|
||||
them, even without restarting by updating configuration in etcd.
|
||||
|
||||
- [osd_iothread_count](#osd_iothread_count)
|
||||
- [etcd_report_interval](#etcd_report_interval)
|
||||
- [etcd_stats_interval](#etcd_stats_interval)
|
||||
- [run_primary](#run_primary)
|
||||
@@ -61,6 +62,18 @@ them, even without restarting by updating configuration in etcd.
|
||||
- [recovery_tune_sleep_min_us](#recovery_tune_sleep_min_us)
|
||||
- [recovery_tune_sleep_cutoff_us](#recovery_tune_sleep_cutoff_us)
|
||||
|
||||
## osd_iothread_count
|
||||
|
||||
- Type: integer
|
||||
- Default: 0
|
||||
|
||||
TCP network I/O thread count for OSD. When non-zero, a single OSD process
|
||||
may handle more TCP I/O, but at a cost of increased latency because thread
|
||||
switching overhead occurs. RDMA isn't affected by this option.
|
||||
|
||||
Because of latency, instead of enabling OSD I/O threads it's recommended to
|
||||
just create multiple OSDs per disk, or use RDMA.
|
||||
|
||||
## etcd_report_interval
|
||||
|
||||
- Type: seconds
|
||||
|
@@ -11,6 +11,7 @@
|
||||
момент с помощью перезапуска OSD, а некоторые и без перезапуска, с помощью
|
||||
изменения конфигурации в etcd.
|
||||
|
||||
- [osd_iothread_count](#osd_iothread_count)
|
||||
- [etcd_report_interval](#etcd_report_interval)
|
||||
- [etcd_stats_interval](#etcd_stats_interval)
|
||||
- [run_primary](#run_primary)
|
||||
@@ -62,6 +63,19 @@
|
||||
- [recovery_tune_sleep_min_us](#recovery_tune_sleep_min_us)
|
||||
- [recovery_tune_sleep_cutoff_us](#recovery_tune_sleep_cutoff_us)
|
||||
|
||||
## osd_iothread_count
|
||||
|
||||
- Тип: целое число
|
||||
- Значение по умолчанию: 0
|
||||
|
||||
Число отдельных потоков для обработки ввода-вывода через TCP-сеть на
|
||||
стороне OSD. Включение опции позволяет каждому отдельному OSD передавать
|
||||
по сети больше данных, но ухудшает задержку из-за накладных расходов
|
||||
переключения потоков. На работу RDMA опция не влияет.
|
||||
|
||||
Из-за задержек вместо включения потоков ввода-вывода OSD рекомендуется
|
||||
просто создавать по несколько OSD на каждом диске, или использовать RDMA.
|
||||
|
||||
## etcd_report_interval
|
||||
|
||||
- Тип: секунды
|
||||
|
@@ -32,6 +32,8 @@ Parameters:
|
||||
- [pg_minsize](#pg_minsize)
|
||||
- [pg_count](#pg_count)
|
||||
- [failure_domain](#failure_domain)
|
||||
- [level_placement](#level_placement)
|
||||
- [raw_placement](#raw_placement)
|
||||
- [max_osd_combinations](#max_osd_combinations)
|
||||
- [block_size](#block_size)
|
||||
- [bitmap_granularity](#bitmap_granularity)
|
||||
@@ -41,6 +43,7 @@ Parameters:
|
||||
- [osd_tags](#osd_tags)
|
||||
- [primary_affinity_tags](#primary_affinity_tags)
|
||||
- [scrub_interval](#scrub_interval)
|
||||
- [used_for_fs](#used_for_fs)
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -52,7 +55,7 @@ Examples:
|
||||
OSD placement tree is set in a separate etcd key `/vitastor/config/node_placement`
|
||||
in the following JSON format:
|
||||
|
||||
`
|
||||
```
|
||||
{
|
||||
"<node name or OSD number>": {
|
||||
"level": "<level>",
|
||||
@@ -60,7 +63,7 @@ in the following JSON format:
|
||||
},
|
||||
...
|
||||
}
|
||||
`
|
||||
```
|
||||
|
||||
Here, if a node name is a number then it is assumed to refer to an OSD.
|
||||
Level of the OSD is always "osd" and cannot be overriden. You may only
|
||||
@@ -83,7 +86,11 @@ Parent node reference is required for intermediate tree nodes.
|
||||
Separate OSD settings are set in etc keys `/vitastor/config/osd/<number>`
|
||||
in JSON format `{"<key>":<value>}`.
|
||||
|
||||
As of now, two settings are supported:
|
||||
As of now, the following settings are supported:
|
||||
|
||||
- [reweight](#reweight)
|
||||
- [tags](#tags)
|
||||
- [noout](#noout)
|
||||
|
||||
## reweight
|
||||
|
||||
@@ -106,6 +113,14 @@ subsets and then use a specific subset for pool instead of all OSDs.
|
||||
For example you can mark SSD OSDs with tag "ssd" and HDD OSDs with "hdd" and
|
||||
such tags will work as device classes.
|
||||
|
||||
## noout
|
||||
|
||||
- Type: boolean
|
||||
- Default: false
|
||||
|
||||
If set to true, [osd_out_time](monitor.en.md#osd_out_time) is ignored for this
|
||||
OSD and it's never removed from data distribution by the monitor.
|
||||
|
||||
# Pool parameters
|
||||
|
||||
## name
|
||||
@@ -154,6 +169,26 @@ That is, if it becomes impossible to place PG data on at least (pg_minsize)
|
||||
OSDs, PG is deactivated for both read and write. So you know that a fresh
|
||||
write always goes to at least (pg_minsize) OSDs (disks).
|
||||
|
||||
For example, the difference between pg_minsize 2 and 1 in a 3-way replicated
|
||||
pool (pg_size=3) is:
|
||||
- If 2 hosts go down with pg_minsize=2, the pool becomes inactive and remains
|
||||
inactive for [osd_out_time](monitor.en.md#osd_out_time) (10 minutes). After
|
||||
this timeout, the monitor selects replacement hosts/OSDs and the pool comes
|
||||
up and starts to heal. Therefore, if you don't have replacement OSDs, i.e.
|
||||
if you only have 3 hosts with OSDs and 2 of them are down, the pool remains
|
||||
inactive until you add or return at least 1 host (or change failure_domain
|
||||
to "osd").
|
||||
- If 2 hosts go down with pg_minsize=1, the pool only experiences a short
|
||||
I/O pause until the monitor notices that OSDs are down (5-10 seconds with
|
||||
the default [etcd_report_interval](osd.en.md#etcd_report_interval)). After
|
||||
this pause, I/O resumes, but new data is temporarily written in only 1 copy.
|
||||
Then, after osd_out_time, the monitor also selects replacement OSDs and the
|
||||
pool starts to heal.
|
||||
|
||||
So, pg_minsize regulates the number of failures that a pool can tolerate
|
||||
without temporary downtime for [osd_out_time](monitor.en.md#osd_out_time),
|
||||
but at a cost of slightly reduced storage reliability.
|
||||
|
||||
FIXME: pg_minsize behaviour may be changed in the future to only make PGs
|
||||
read-only instead of deactivating them.
|
||||
|
||||
@@ -165,8 +200,8 @@ read-only instead of deactivating them.
|
||||
Number of PGs for this pool. The value should be big enough for the monitor /
|
||||
LP solver to be able to optimize data placement.
|
||||
|
||||
"Enough" is usually around 64-128 PGs per OSD, i.e. you set pg_count for pool
|
||||
to (total OSD count * 100 / pg_size). You can round it to the closest power of 2,
|
||||
"Enough" is usually around 10-100 PGs per OSD, i.e. you set pg_count for pool
|
||||
to (total OSD count * 10 / pg_size). You can round it to the closest power of 2,
|
||||
because it makes it easier to reduce or increase PG count later by dividing or
|
||||
multiplying it by 2.
|
||||
|
||||
@@ -188,6 +223,69 @@ never put on OSDs in the same failure domain (for example, on the same host).
|
||||
So failure domain specifies the unit which failure you are protecting yourself
|
||||
from.
|
||||
|
||||
## level_placement
|
||||
|
||||
- Type: string
|
||||
|
||||
Additional failure domain rules, applied in conjuction with failure_domain.
|
||||
Must be specified in the following form:
|
||||
|
||||
`<placement level>=<sequence of characters>, <level2>=<sequence2>, ...`
|
||||
|
||||
Sequence should be exactly [pg_size](#pg_size) character long. Each character
|
||||
corresponds to an OSD in the PG of this pool. Equal characters mean that
|
||||
corresponding items of the PG should be placed into the same placement tree
|
||||
item at this level. Different characters mean that items should be placed into
|
||||
different items.
|
||||
|
||||
For example, if you want a EC 4+2 pool and you want every 2 chunks to be stored
|
||||
in its own datacenter and you also want each chunk to be stored on a different
|
||||
host, you should set `level_placement` to `dc=112233 host=123456`.
|
||||
|
||||
Or you can set `level_placement` to `dc=112233` and leave `failure_domain` empty,
|
||||
because `host` is the default `failure_domain` and it will be applied anyway.
|
||||
|
||||
Without this rule, it may happen that 3 chunks will be stored on OSDs in the
|
||||
same datacenter, and the data will become inaccessibly if that datacenter goes
|
||||
down in this case.
|
||||
|
||||
Of course, you should group your hosts into datacenters before applying the rule
|
||||
by setting [placement_levels](monitor.en.md#placement_levels) to something like
|
||||
`{"dc":90,"host":100,"osd":110}` and add DCs to [node_placement](#placement-tree),
|
||||
like `{"dc1":{"level":"dc"},"host1":{"parent":"dc1"},...}`.
|
||||
|
||||
## raw_placement
|
||||
|
||||
- Type: string
|
||||
|
||||
Raw PG placement rules, specified in the form of a DSL (domain-specific language).
|
||||
Use only if you really know what you're doing :)
|
||||
|
||||
DSL specification:
|
||||
|
||||
```
|
||||
dsl := item | item ("\n" | ",") items
|
||||
item := "any" | rules
|
||||
rules := rule | rule rules
|
||||
rule := level operator arg
|
||||
level := /\w+/
|
||||
operator := "!=" | "=" | ">" | "?="
|
||||
arg := value | "(" values ")"
|
||||
values := value | value "," values
|
||||
value := item_ref | constant_id
|
||||
item_ref := /\d+/
|
||||
constant_id := /"([^"]+)"/
|
||||
```
|
||||
|
||||
"?=" operator means "preferred". I.e. `dc ?= "meow"` means "prefer datacenter meow
|
||||
for this chunk, but put into another dc if it's unavailable".
|
||||
|
||||
Examples:
|
||||
|
||||
- Simple 3 replicas with failure_domain=host: `any, host!=1, host!=(1,2)`
|
||||
- EC 4+2 in 3 DC: `any, dc=1 host!=1, dc!=1, dc=3 host!=3, dc!=(1,3), dc=5 host!=5`
|
||||
- 1 replica in fixed DC + 2 in random DCs: `dc?=meow, dc!=1, dc!=(1,2)`
|
||||
|
||||
## max_osd_combinations
|
||||
|
||||
- Type: integer
|
||||
@@ -279,6 +377,25 @@ of the OSDs containing a data chunk for a PG.
|
||||
Automatic scrubbing interval for this pool. Overrides
|
||||
[global scrub_interval setting](osd.en.md#scrub_interval).
|
||||
|
||||
## used_for_fs
|
||||
|
||||
- Type: string
|
||||
|
||||
If non-empty, the pool is marked as used for VitastorFS with metadata stored
|
||||
in block image (regular Vitastor volume) named as the value of this pool parameter.
|
||||
|
||||
When a pool is marked as used for VitastorFS, regular block volume creation in it
|
||||
is disabled (vitastor-cli refuses to create images without --force) to protect
|
||||
the user from block volume and FS file ID collisions and data loss.
|
||||
|
||||
[vitastor-nfs](../usage/nfs.ru.md), in its turn, refuses to use pools not marked
|
||||
for the corresponding FS when starting. This also implies that you can use one
|
||||
pool only for one VitastorFS.
|
||||
|
||||
The second thing that is disabled for VitastorFS pools is reporting per-inode space
|
||||
usage statistics in etcd because a FS pool may store a very large number of files
|
||||
and statistics for them all would take a lot of space in etcd.
|
||||
|
||||
# Examples
|
||||
|
||||
## Replicated pool
|
||||
|
@@ -31,6 +31,8 @@
|
||||
- [pg_minsize](#pg_minsize)
|
||||
- [pg_count](#pg_count)
|
||||
- [failure_domain](#failure_domain)
|
||||
- [level_placement](#level_placement)
|
||||
- [raw_placement](#raw_placement)
|
||||
- [max_osd_combinations](#max_osd_combinations)
|
||||
- [block_size](#block_size)
|
||||
- [bitmap_granularity](#bitmap_granularity)
|
||||
@@ -40,6 +42,7 @@
|
||||
- [osd_tags](#osd_tags)
|
||||
- [primary_affinity_tags](#primary_affinity_tags)
|
||||
- [scrub_interval](#scrub_interval)
|
||||
- [used_for_fs](#used_for_fs)
|
||||
|
||||
Примеры:
|
||||
|
||||
@@ -51,7 +54,7 @@
|
||||
Дерево размещения OSD задаётся в отдельном ключе etcd `/vitastor/config/node_placement`
|
||||
в следующем JSON-формате:
|
||||
|
||||
`
|
||||
```
|
||||
{
|
||||
"<имя узла или номер OSD>": {
|
||||
"level": "<уровень>",
|
||||
@@ -59,7 +62,7 @@
|
||||
},
|
||||
...
|
||||
}
|
||||
`
|
||||
```
|
||||
|
||||
Здесь, если название узла - число, считается, что это OSD. Уровень OSD
|
||||
всегда равен "osd" и не может быть переопределён. Для OSD вы можете только
|
||||
@@ -82,10 +85,11 @@
|
||||
Настройки отдельных OSD задаются в ключах etcd `/vitastor/config/osd/<number>`
|
||||
в JSON-формате `{"<key>":<value>}`.
|
||||
|
||||
На данный момент поддерживаются две настройки:
|
||||
На данный момент поддерживаются следующие настройки:
|
||||
|
||||
- [reweight](#reweight)
|
||||
- [tags](#tags)
|
||||
- [noout](#noout)
|
||||
|
||||
## reweight
|
||||
|
||||
@@ -109,6 +113,14 @@
|
||||
всех. Можно, например, пометить SSD OSD тегом "ssd", а HDD тегом "hdd", в
|
||||
этом смысле теги работают аналогично классам устройств.
|
||||
|
||||
## noout
|
||||
|
||||
- Тип: булево (да/нет)
|
||||
- Значение по умолчанию: false
|
||||
|
||||
Если установлено в true, то [osd_out_time](monitor.ru.md#osd_out_time) для этого
|
||||
OSD игнорируется и OSD не удаляется из распределения данных монитором.
|
||||
|
||||
# Параметры
|
||||
|
||||
## name
|
||||
@@ -157,6 +169,26 @@
|
||||
OSD, PG деактивируется на чтение и запись. Иными словами, всегда известно,
|
||||
что новые блоки данных всегда записываются как минимум на pg_minsize дисков.
|
||||
|
||||
Для примера, разница между pg_minsize 2 и 1 в реплицированном пуле с 3 копиями
|
||||
данных (pg_size=3), проявляется следующим образом:
|
||||
- Если 2 сервера отключаются при pg_minsize=2, пул становится неактивным и
|
||||
остаётся неактивным в течение [osd_out_time](monitor.ru.md#osd_out_time)
|
||||
(10 минут), после чего монитор назначает другие OSD/серверы на замену, пул
|
||||
поднимается и начинает восстанавливать недостающие копии данных. Соответственно,
|
||||
если OSD на замену нет - то есть, если у вас всего 3 сервера с OSD и 2 из них
|
||||
недоступны - пул так и остаётся недоступным до тех пор, пока вы не вернёте
|
||||
или не добавите хотя бы 1 сервер (или не переключите failure_domain на "osd").
|
||||
- Если 2 сервера отключаются при pg_minsize=1, ввод-вывод лишь приостанавливается
|
||||
на короткое время, до тех пор, пока монитор не поймёт, что OSD отключены
|
||||
(что занимает 5-10 секунд при стандартном [etcd_report_interval](osd.ru.md#etcd_report_interval)).
|
||||
После этого ввод-вывод восстанавливается, но новые данные временно пишутся
|
||||
всего в 1 копии. Когда же проходит osd_out_time, монитор точно так же назначает
|
||||
другие OSD на замену выбывшим и пул начинает восстанавливать копии данных.
|
||||
|
||||
То есть, pg_minsize регулирует число отказов, которые пул может пережить без
|
||||
временной остановки обслуживания на [osd_out_time](monitor.ru.md#osd_out_time),
|
||||
но ценой немного пониженных гарантий надёжности.
|
||||
|
||||
FIXME: Поведение pg_minsize может быть изменено в будущем с полной деактивации
|
||||
PG на перевод их в режим только для чтения.
|
||||
|
||||
@@ -168,8 +200,8 @@ PG на перевод их в режим только для чтения.
|
||||
Число PG для данного пула. Число должно быть достаточно большим, чтобы монитор
|
||||
мог равномерно распределить по ним данные.
|
||||
|
||||
Обычно это означает примерно 64-128 PG на 1 OSD, т.е. pg_count можно устанавливать
|
||||
равным (общему числу OSD * 100 / pg_size). Значение можно округлить до ближайшей
|
||||
Обычно это означает примерно 10-100 PG на 1 OSD, т.е. pg_count можно устанавливать
|
||||
равным (общему числу OSD * 10 / pg_size). Значение можно округлить до ближайшей
|
||||
степени 2, чтобы потом было легче уменьшать или увеличивать число PG, умножая
|
||||
или деля его на 2.
|
||||
|
||||
@@ -190,6 +222,71 @@ PG в Vitastor эферемерны, то есть вы можете менят
|
||||
Иными словами, домен отказа - это то, от отказа чего вы защищаете себя избыточным
|
||||
хранением.
|
||||
|
||||
## level_placement
|
||||
|
||||
- Тип: строка
|
||||
|
||||
Правила дополнительных доменов отказа, применяемые вместе с failure_domain.
|
||||
Должны задаваться в следующем виде:
|
||||
|
||||
`<уровень>=<последовательность символов>, <уровень2>=<последовательность2>, ...`
|
||||
|
||||
Каждая `<последовательность>` должна состоять ровно из [pg_size](#pg_size) символов.
|
||||
Каждый символ соответствует одному OSD (размещению одной части PG) этого пула.
|
||||
Одинаковые символы означают, что соответствующие части размещаются в один и тот же
|
||||
узел дерева OSD на заданном `<уровне>`. Разные символы означают, что части
|
||||
размещаются в разные узлы.
|
||||
|
||||
Например, если вы хотите сделать пул EC 4+2 и хотите поместить каждые 2 части
|
||||
данных в свой датацентр, и также вы хотите, чтобы каждая часть размещалась на
|
||||
другом хосте, то вы должны задать `level_placement` равным `dc=112233 host=123456`.
|
||||
|
||||
Либо вы просто можете задать `level_placement` равным `dc=112233` и оставить
|
||||
`failure_domain` пустым, т.к. `host` это его значение по умолчанию и оно также
|
||||
применится автоматически.
|
||||
|
||||
Без этого правила может получиться так, что в одном из датацентров окажется
|
||||
3 части данных одной PG и данные окажутся недоступными при временном отключении
|
||||
этого датацентра.
|
||||
|
||||
Естественно, перед установкой правила вам нужно сгруппировать ваши хосты в
|
||||
датацентры, установив [placement_levels](monitor.ru.md#placement_levels) во что-то
|
||||
типа `{"dc":90,"host":100,"osd":110}` и добавив датацентры в [node_placement](#дерево-размещения),
|
||||
примерно так: `{"dc1":{"level":"dc"},"host1":{"parent":"dc1"},...}`.
|
||||
|
||||
## raw_placement
|
||||
|
||||
- Type: string
|
||||
|
||||
Низкоуровневые правила генерации PG в форме DSL (доменно-специфичного языка).
|
||||
Используйте, только если действительно знаете, зачем вам это надо :)
|
||||
|
||||
Спецификация DSL:
|
||||
|
||||
```
|
||||
dsl := item | item ("\n" | ",") items
|
||||
item := "any" | rules
|
||||
rules := rule | rule rules
|
||||
rule := level operator arg
|
||||
level := /\w+/
|
||||
operator := "!=" | "=" | ">" | "?="
|
||||
arg := value | "(" values ")"
|
||||
values := value | value "," values
|
||||
value := item_ref | constant_id
|
||||
item_ref := /\d+/
|
||||
constant_id := /"([^"]+)"/
|
||||
```
|
||||
|
||||
Оператор "?=" означает "предпочитаемый". Т.е. `dc ?= "meow"` означает "предпочитать
|
||||
датацентр meow для этой части данных, но разместить её в другом датацентре, если
|
||||
meow недоступен".
|
||||
|
||||
Примеры:
|
||||
|
||||
- Простые 3 реплики с failure_domain=host: `any, host!=1, host!=(1,2)`
|
||||
- EC 4+2 в 3 датацентрах: `any, dc=1 host!=1, dc!=1, dc=3 host!=3, dc!=(1,3), dc=5 host!=5`
|
||||
- 1 копия в фиксированном ДЦ + 2 в других ДЦ: `dc?=meow, dc!=1, dc!=(1,2)`
|
||||
|
||||
## max_osd_combinations
|
||||
|
||||
- Тип: целое число
|
||||
@@ -286,6 +383,27 @@ OSD с "all".
|
||||
Интервал скраба, то есть, автоматической фоновой проверки данных для данного пула.
|
||||
Переопределяет [глобальную настройку scrub_interval](osd.ru.md#scrub_interval).
|
||||
|
||||
## used_for_fs
|
||||
|
||||
- Type: string
|
||||
|
||||
Если непусто, пул помечается как используемый для файловой системы VitastorFS с
|
||||
метаданными, хранимыми в блочном образе Vitastor с именем, равным значению
|
||||
этого параметра.
|
||||
|
||||
Когда пул помечается как используемый для VitastorFS, создание обычных блочных
|
||||
образов в нём отключается (vitastor-cli отказывается создавать образы без --force),
|
||||
чтобы защитить пользователя от коллизий ID файлов и блочных образов и, таким
|
||||
образом, от потери данных.
|
||||
|
||||
[vitastor-nfs](../usage/nfs.ru.md), в свою очередь, при запуске отказывается
|
||||
использовать для ФС пулы, не выделенные для неё. Это также означает, что один
|
||||
пул может использоваться только для одной VitastorFS.
|
||||
|
||||
Также для ФС-пулов отключается передача статистики в etcd по отдельным инодам,
|
||||
так как ФС-пул может содержать очень много файлов и статистика по ним всем
|
||||
заняла бы очень много места в etcd.
|
||||
|
||||
# Примеры
|
||||
|
||||
## Реплицированный пул
|
||||
|
@@ -1,3 +1,84 @@
|
||||
- name: client_iothread_count
|
||||
type: int
|
||||
default: 0
|
||||
online: false
|
||||
info: |
|
||||
Number of separate threads for handling TCP network I/O at client library
|
||||
side. Enabling 4 threads usually allows to increase peak performance of each
|
||||
client from approx. 2-3 to 7-8 GByte/s linear read/write and from approx.
|
||||
100-150 to 400 thousand iops, but at the same time it increases latency.
|
||||
Latency increase depends on CPU: with CPU power saving disabled latency
|
||||
only increases by ~10 us (equivalent to Q=1 iops decrease from 10500 to 9500),
|
||||
with CPU power saving enabled it may be as high as 500 us (equivalent to Q=1
|
||||
iops decrease from 2000 to 1000). RDMA isn't affected by this option.
|
||||
|
||||
It's recommended to enable client I/O threads if you don't use RDMA and want
|
||||
to increase peak client performance.
|
||||
info_ru: |
|
||||
Число отдельных потоков для обработки ввода-вывода через TCP сеть на стороне
|
||||
клиентской библиотеки. Включение 4 потоков обычно позволяет поднять пиковую
|
||||
производительность каждого клиента примерно с 2-3 до 7-8 Гбайт/с линейного
|
||||
чтения/записи и примерно с 100-150 до 400 тысяч операций ввода-вывода в
|
||||
секунду, но ухудшает задержку. Увеличение задержки зависит от процессора:
|
||||
при отключённом энергосбережении CPU это всего ~10 микросекунд (равносильно
|
||||
падению iops с Q=1 с 10500 до 9500), а при включённом это может быть
|
||||
и 500 микросекунд (равносильно падению iops с Q=1 с 2000 до 1000). На работу
|
||||
RDMA данная опция не влияет.
|
||||
|
||||
Рекомендуется включать клиентские потоки ввода-вывода, если вы не используете
|
||||
RDMA и хотите повысить пиковую производительность клиентов.
|
||||
- name: client_retry_interval
|
||||
type: ms
|
||||
min: 10
|
||||
default: 50
|
||||
online: true
|
||||
info: |
|
||||
Retry time for I/O requests failed due to inactive PGs or network
|
||||
connectivity errors.
|
||||
info_ru: |
|
||||
Время повтора запросов ввода-вывода, неудачных из-за неактивных PG или
|
||||
ошибок сети.
|
||||
- name: client_eio_retry_interval
|
||||
type: ms
|
||||
default: 1000
|
||||
online: true
|
||||
info: |
|
||||
Retry time for I/O requests failed due to data corruption or unfinished
|
||||
EC object deletions (has_incomplete PG state). 0 disables such retries
|
||||
and clients are not blocked and just get EIO error code instead.
|
||||
info_ru: |
|
||||
Время повтора запросов ввода-вывода, неудачных из-за повреждения данных
|
||||
или незавершённых удалений EC-объектов (состояния PG has_incomplete).
|
||||
0 отключает повторы таких запросов и клиенты не блокируются, а вместо
|
||||
этого просто получают код ошибки EIO.
|
||||
- name: client_retry_enospc
|
||||
type: bool
|
||||
default: true
|
||||
online: true
|
||||
info: |
|
||||
Retry writes on out of space errors to wait until some space is freed on
|
||||
OSDs.
|
||||
info_ru: |
|
||||
Повторять запросы записи, завершившиеся с ошибками нехватки места, т.е.
|
||||
ожидать, пока на OSD не освободится место.
|
||||
- name: client_wait_up_timeout
|
||||
type: sec
|
||||
default: 16
|
||||
online: true
|
||||
info: |
|
||||
Wait for this number of seconds until PGs are up when doing operations
|
||||
which require all PGs to be up. Currently only used by object listings
|
||||
in delete and merge-based commands ([vitastor-cli rm](../usage/cli.en.md#rm), merge and so on).
|
||||
|
||||
The default value is calculated as `1 + OSD lease timeout`, which is
|
||||
`1 + etcd_report_interval + max_etcd_attempts*2*etcd_quick_timeout`.
|
||||
info_ru: |
|
||||
Время ожидания поднятия PG при операциях, требующих активности всех PG.
|
||||
В данный момент используется листингами объектов в командах, использующих
|
||||
удаление и слияние ([vitastor-cli rm](../usage/cli.ru.md#rm), merge и подобные).
|
||||
|
||||
Значение по умолчанию вычисляется как `1 + время lease OSD`, равное
|
||||
`1 + etcd_report_interval + max_etcd_attempts*2*etcd_quick_timeout`.
|
||||
- name: client_max_dirty_bytes
|
||||
type: int
|
||||
default: 33554432
|
||||
@@ -166,3 +247,27 @@
|
||||
Максимальное число разделов на одном NBD-устройстве. Данное значение передаётся
|
||||
модулю ядра nbd как параметр `max_part`, когда его загружает vitastor-nbd.
|
||||
Имейте в виду, что (nbds_max)*(1+max_part) обычно не может превышать 256.
|
||||
- name: osd_nearfull_ratio
|
||||
type: float
|
||||
default: 0.95
|
||||
online: true
|
||||
info: |
|
||||
Ratio of used space on OSD to treat it as "almost full" in vitastor-cli status output.
|
||||
|
||||
Remember that some client writes may hang or complete with an error if even
|
||||
just one OSD becomes 100 % full!
|
||||
|
||||
However, unlike in Ceph, 100 % full Vitastor OSDs don't crash (in Ceph they're
|
||||
unable to start at all), so you'll be able to recover from "out of space" errors
|
||||
without destroying and recreating OSDs.
|
||||
info_ru: |
|
||||
Доля занятого места на OSD, начиная с которой он считается "почти заполненным" в
|
||||
выводе vitastor-cli status.
|
||||
|
||||
Помните, что часть клиентских запросов может зависнуть или завершиться с ошибкой,
|
||||
если на 100 % заполнится хотя бы 1 OSD!
|
||||
|
||||
Однако, в отличие от Ceph, заполненные на 100 % OSD Vitastor не падают (в Ceph
|
||||
заполненные на 100% OSD вообще не могут стартовать), так что вы сможете
|
||||
восстановить работу кластера после ошибок отсутствия свободного места
|
||||
без уничтожения и пересоздания OSD.
|
||||
|
@@ -14,8 +14,12 @@
|
||||
|
||||
{{../../installation/packages.en.md}}
|
||||
|
||||
{{../../installation/docker.en.md}}
|
||||
|
||||
{{../../installation/proxmox.en.md}}
|
||||
|
||||
{{../../installation/opennebula.en.md}}
|
||||
|
||||
{{../../installation/openstack.en.md}}
|
||||
|
||||
{{../../installation/kubernetes.en.md}}
|
||||
@@ -56,6 +60,8 @@
|
||||
|
||||
{{../../usage/nfs.en.md}}
|
||||
|
||||
{{../../usage/admin.en.md}}
|
||||
|
||||
## Performance
|
||||
|
||||
{{../../performance/understanding.en.md}}
|
||||
@@ -64,4 +70,6 @@
|
||||
|
||||
{{../../performance/comparison1.en.md}}
|
||||
|
||||
{{../../performance/bench2.en.md}}
|
||||
|
||||
{{../../intro/author.en.md|indent=1}}
|
||||
|
@@ -14,8 +14,12 @@
|
||||
|
||||
{{../../installation/packages.ru.md}}
|
||||
|
||||
{{../../installation/docker.ru.md}}
|
||||
|
||||
{{../../installation/proxmox.ru.md}}
|
||||
|
||||
{{../../installation/opennebula.ru.md}}
|
||||
|
||||
{{../../installation/openstack.ru.md}}
|
||||
|
||||
{{../../installation/kubernetes.ru.md}}
|
||||
@@ -56,6 +60,8 @@
|
||||
|
||||
{{../../usage/nfs.ru.md}}
|
||||
|
||||
{{../../usage/admin.ru.md}}
|
||||
|
||||
## Производительность
|
||||
|
||||
{{../../performance/understanding.ru.md}}
|
||||
@@ -64,4 +70,6 @@
|
||||
|
||||
{{../../performance/comparison1.ru.md}}
|
||||
|
||||
{{../../performance/bench2.ru.md}}
|
||||
|
||||
{{../../intro/author.ru.md|indent=1}}
|
||||
|
@@ -47,14 +47,24 @@
|
||||
Не может быть меньше размера сектора дисков данных OSD.
|
||||
- name: immediate_commit
|
||||
type: string
|
||||
default: false
|
||||
default: all
|
||||
info: |
|
||||
Another parameter which is really important for performance.
|
||||
One of "none", "all" or "small". Global value, may be overriden [at pool level](pool.en.md#immediate_commit).
|
||||
|
||||
This parameter is also really important for performance.
|
||||
|
||||
TLDR: default "all" is optimal for server-grade SSDs with supercapacitor-based
|
||||
power loss protection (nonvolatile write-through cache) and also for most HDDs.
|
||||
"none" or "small" should be only selected if you use desktop SSDs without
|
||||
capacitors or drives with slow write-back cache that can't be disabled. Check
|
||||
immediate_commit of your OSDs in [ls-osd](../usage/cli.en.md#ls-osd).
|
||||
|
||||
Detailed explanation:
|
||||
|
||||
Desktop SSDs are very fast (100000+ iops) for simple random writes
|
||||
without cache flush. However, they are really slow (only around 1000 iops)
|
||||
if you try to fsync() each write, that is, when you want to guarantee that
|
||||
each change gets immediately persisted to the physical media.
|
||||
if you try to fsync() each write, that is, if you want to guarantee that
|
||||
each change gets actually persisted to the physical media.
|
||||
|
||||
Server-grade SSDs with "Advanced/Enhanced Power Loss Protection" or with
|
||||
"Supercapacitor-based Power Loss Protection", on the other hand, are equally
|
||||
@@ -66,8 +76,8 @@
|
||||
efficiently utilize desktop SSDs by postponing fsync until the client calls
|
||||
it explicitly.
|
||||
|
||||
This is what this parameter regulates. When it's set to "all" the whole
|
||||
Vitastor cluster commits each change to disks immediately and clients just
|
||||
This is what this parameter regulates. When it's set to "all" Vitastor
|
||||
cluster commits each change to disks immediately and clients just
|
||||
ignore fsyncs because they know for sure that they're unneeded. This reduces
|
||||
the amount of network roundtrips performed by clients and improves
|
||||
performance. So it's always better to use server grade SSDs with
|
||||
@@ -87,17 +97,22 @@
|
||||
it (they have internal SSD cache even though it's not stated in datasheets).
|
||||
|
||||
Setting this parameter to "all" or "small" in OSD parameters requires enabling
|
||||
[disable_journal_fsync](layout-osd.en.yml#disable_journal_fsync) and
|
||||
[disable_meta_fsync](layout-osd.en.yml#disable_meta_fsync), setting it to
|
||||
"all" also requires enabling [disable_data_fsync](layout-osd.en.yml#disable_data_fsync).
|
||||
|
||||
TLDR: For optimal performance, set immediate_commit to "all" if you only use
|
||||
SSDs with supercapacitor-based power loss protection (nonvolatile
|
||||
write-through cache) for both data and journals in the whole Vitastor
|
||||
cluster. Set it to "small" if you only use such SSDs for journals. Leave
|
||||
empty if your drives have write-back cache.
|
||||
[disable_journal_fsync](layout-osd.en.md#disable_journal_fsync) and
|
||||
[disable_meta_fsync](layout-osd.en.md#disable_meta_fsync), setting it to
|
||||
"all" also requires enabling [disable_data_fsync](layout-osd.en.md#disable_data_fsync).
|
||||
vitastor-disk tried to do that by default, first checking/disabling drive cache.
|
||||
If it can't disable drive cache, OSD get initialized with "none".
|
||||
info_ru: |
|
||||
Ещё один важный для производительности параметр.
|
||||
Одно из значений "none", "small" или "all". Глобальное значение, может быть
|
||||
переопределено [на уровне пула](pool.ru.md#immediate_commit).
|
||||
|
||||
Данный параметр тоже важен для производительности.
|
||||
|
||||
Вкратце: значение по умолчанию "all" оптимально для всех серверных SSD с
|
||||
суперконденсаторами и также для большинства HDD. "none" и "small" имеет смысл
|
||||
устанавливать только при использовании SSD настольного класса без
|
||||
суперконденсаторов или дисков с медленным неотключаемым кэшем записи.
|
||||
Проверьте настройку immediate_commit своих OSD в выводе команды [ls-osd](../usage/cli.ru.md#ls-osd).
|
||||
|
||||
Модели SSD для настольных компьютеров очень быстрые (100000+ операций в
|
||||
секунду) при простой случайной записи без сбросов кэша. Однако они очень
|
||||
@@ -118,7 +133,7 @@
|
||||
эффективно утилизировать настольные SSD.
|
||||
|
||||
Данный параметр влияет как раз на это. Когда он установлен в значение "all",
|
||||
весь кластер Vitastor мгновенно фиксирует каждое изменение на физические
|
||||
кластер Vitastor мгновенно фиксирует каждое изменение на физические
|
||||
носители и клиенты могут просто игнорировать запросы fsync, т.к. они точно
|
||||
знают, что fsync-и не нужны. Это уменьшает число необходимых обращений к OSD
|
||||
по сети и улучшает производительность. Поэтому даже с Vitastor лучше всегда
|
||||
@@ -141,13 +156,6 @@
|
||||
указано в спецификациях).
|
||||
|
||||
Указание "all" или "small" в настройках / командной строке OSD требует
|
||||
включения [disable_journal_fsync](layout-osd.ru.yml#disable_journal_fsync) и
|
||||
[disable_meta_fsync](layout-osd.ru.yml#disable_meta_fsync), значение "all"
|
||||
также требует включения [disable_data_fsync](layout-osd.ru.yml#disable_data_fsync).
|
||||
|
||||
Итого, вкратце: для оптимальной производительности установите
|
||||
immediate_commit в значение "all", если вы используете в кластере только SSD
|
||||
с суперконденсаторами и для данных, и для журналов. Если вы используете
|
||||
такие SSD для всех журналов, но не для данных - можете установить параметр
|
||||
в "small". Если и какие-то из дисков журналов имеют волатильный кэш записи -
|
||||
оставьте параметр пустым.
|
||||
включения [disable_journal_fsync](layout-osd.ru.md#disable_journal_fsync) и
|
||||
[disable_meta_fsync](layout-osd.ru.md#disable_meta_fsync), значение "all"
|
||||
также требует включения [disable_data_fsync](layout-osd.ru.md#disable_data_fsync).
|
||||
|
@@ -110,20 +110,22 @@
|
||||
type: bool
|
||||
default: false
|
||||
info: |
|
||||
Do not issue fsyncs to the data device, i.e. do not flush its cache.
|
||||
Safe ONLY if your data device has write-through cache. If you disable
|
||||
the cache yourself using `hdparm` or `scsi_disk/cache_type` then make sure
|
||||
that the cache disable command is run every time before starting Vitastor
|
||||
OSD, for example, in the systemd unit. See also `immediate_commit` option
|
||||
for the instructions to disable cache and how to benefit from it.
|
||||
Do not issue fsyncs to the data device, i.e. do not force it to flush cache.
|
||||
Safe ONLY if your data device has write-through cache or if write-back
|
||||
cache is disabled. If you disable drive cache manually with `hdparm` or
|
||||
writing to `/sys/.../scsi_disk/cache_type` then make sure that you do it
|
||||
every time before starting Vitastor OSD (vitastor-disk does it automatically).
|
||||
See also [immediate_commit](layout-cluster.en.md#immediate_commit)
|
||||
for information about how to benefit from disabled cache.
|
||||
info_ru: |
|
||||
Не отправлять fsync-и устройству данных, т.е. не сбрасывать его кэш.
|
||||
Не отправлять fsync-и устройству данных, т.е. не заставлять его сбрасывать кэш.
|
||||
Безопасно, ТОЛЬКО если ваше устройство данных имеет кэш со сквозной
|
||||
записью (write-through). Если вы отключаете кэш через `hdparm` или
|
||||
`scsi_disk/cache_type`, то удостоверьтесь, что команда отключения кэша
|
||||
выполняется перед каждым запуском Vitastor OSD, например, в systemd unit-е.
|
||||
Смотрите также опцию `immediate_commit` для инструкций по отключению кэша
|
||||
и о том, как из этого извлечь выгоду.
|
||||
записью (write-through) или если кэш с отложенной записью (write-back) отключён.
|
||||
Если вы отключаете кэш вручную через `hdparm` или запись в `/sys/.../scsi_disk/cache_type`,
|
||||
то удостоверьтесь, что вы делаете это каждый раз перед запуском Vitastor OSD
|
||||
(vitastor-disk делает это автоматически). Смотрите также опцию
|
||||
[immediate_commit](layout-cluster.ru.md#immediate_commit) для информации о том,
|
||||
как извлечь выгоду из отключённого кэша.
|
||||
- name: disable_meta_fsync
|
||||
type: bool
|
||||
default: false
|
||||
@@ -179,8 +181,7 @@
|
||||
|
||||
Because of this it can actually be beneficial to use SSDs which work well
|
||||
with 512 byte sectors and use 512 byte disk_alignment, journal_block_size
|
||||
and meta_block_size. But the only SSD that may fit into this category is
|
||||
Intel Optane (probably, not tested yet).
|
||||
and meta_block_size. But at the moment, no such SSDs are known...
|
||||
|
||||
Clients don't need to be aware of disk_alignment, so it's not required to
|
||||
put a modified value into etcd key /vitastor/config/global.
|
||||
@@ -198,9 +199,8 @@
|
||||
|
||||
Поэтому, на самом деле, может быть выгодно найти SSD, хорошо работающие с
|
||||
меньшими, 512-байтными, блоками и использовать 512-байтные disk_alignment,
|
||||
journal_block_size и meta_block_size. Однако единственные SSD, которые
|
||||
теоретически могут попасть в эту категорию - это Intel Optane (но и это
|
||||
пока не проверялось автором).
|
||||
journal_block_size и meta_block_size. Однако на данный момент такие SSD
|
||||
не известны...
|
||||
|
||||
Клиентам не обязательно знать про disk_alignment, так что помещать значение
|
||||
этого параметра в etcd в /vitastor/config/global не нужно.
|
||||
|
@@ -1,3 +1,103 @@
|
||||
- name: use_antietcd
|
||||
type: bool
|
||||
default: false
|
||||
info: |
|
||||
Enable experimental built-in etcd replacement (clustered key-value database):
|
||||
[antietcd](https://git.yourcmc.ru/vitalif/antietcd/).
|
||||
|
||||
When set to true, monitor runs internal antietcd automatically if it finds
|
||||
a network interface with an IP address matching one of addresses in the
|
||||
`etcd_address` configuration option (in `/etc/vitastor/vitastor.conf` or in
|
||||
the monitor command line). If there are multiple matching addresses, it also
|
||||
checks `antietcd_port` and antietcd is started for address with matching port.
|
||||
By default, antietcd accepts connection on the selected IP address, but it
|
||||
can also be overridden manually in the `antietcd_ip` option.
|
||||
|
||||
When antietcd is started, monitor stores cluster metadata itself and exposes
|
||||
a etcd-compatible REST API. On disk, these metadata are stored in
|
||||
`/var/lib/vitastor/mon_2379.json.gz` (can be overridden in antietcd_data_file
|
||||
or antietcd_data_dir options). All other antietcd parameters
|
||||
(see [here](https://git.yourcmc.ru/vitalif/antietcd/)) except node_id,
|
||||
cluster, cluster_key, persist_filter, stale_read can also be set in
|
||||
Vitastor configuration with `antietcd_` prefix.
|
||||
|
||||
You can dump/load data to or from antietcd using Antietcd `anticli` tool:
|
||||
|
||||
```
|
||||
npm exec anticli -e http://etcd:2379/v3 get --prefix '' --no-temp > dump.json
|
||||
npm exec anticli -e http://antietcd:2379/v3 load < dump.json
|
||||
```
|
||||
info_ru: |
|
||||
Включить экспериментальный встроенный заменитель etcd (кластерную БД ключ-значение):
|
||||
[antietcd](https://git.yourcmc.ru/vitalif/antietcd/).
|
||||
|
||||
Если параметр установлен в true, монитор запускает antietcd автоматически,
|
||||
если обнаруживает сетевой интерфейс с одним из адресов, указанных в опции
|
||||
конфигурации `etcd_address` (в `/etc/vitastor/vitastor.conf` или в опциях
|
||||
командной строки монитора). Если таких адресов несколько, также проверяется
|
||||
опция `antietcd_port` и antietcd запускается для адреса с соответствующим
|
||||
портом. По умолчанию antietcd принимает подключения по выбранному совпадающему
|
||||
IP, но его также можно определить вручную опцией `antietcd_ip`.
|
||||
|
||||
При запуске antietcd монитор сам хранит центральные метаданные кластера и
|
||||
выставляет etcd-совместимое REST API. На диске эти метаданные хранятся в файле
|
||||
`/var/lib/vitastor/mon_2379.json.gz` (можно переопределить параметрами
|
||||
antietcd_data_file или antietcd_data_dir). Все остальные параметры antietcd
|
||||
(смотрите [по ссылке](https://git.yourcmc.ru/vitalif/antietcd/)), за исключением
|
||||
node_id, cluster, cluster_key, persist_filter, stale_read также можно задавать
|
||||
в конфигурации Vitastor с префиксом `antietcd_`.
|
||||
|
||||
Вы можете выгружать/загружать данные в или из antietcd с помощью его инструмента
|
||||
`anticli`:
|
||||
|
||||
```
|
||||
npm exec anticli -e http://etcd:2379/v3 get --prefix '' --no-temp > dump.json
|
||||
npm exec anticli -e http://antietcd:2379/v3 load < dump.json
|
||||
```
|
||||
- name: enable_prometheus
|
||||
type: bool
|
||||
default: true
|
||||
info: |
|
||||
Enable built-in Prometheus metrics exporter at mon_http_port (8060 by default).
|
||||
|
||||
Note that only the active (master) monitor exposes metrics, others return
|
||||
HTTP 503. So you should add all monitor URLs to your Prometheus job configuration.
|
||||
|
||||
Grafana dashboard suitable for this exporter is here: [Vitastor-Grafana-6+.json](../../mon/scripts/Vitastor-Grafana-6+.json).
|
||||
info_ru: |
|
||||
Включить встроенный Prometheus-экспортер метрик на порту mon_http_port (по умолчанию 8060).
|
||||
|
||||
Обратите внимание, что метрики выставляет только активный (главный) монитор, остальные
|
||||
возвращают статус HTTP 503, поэтому вам следует добавлять адреса всех мониторов
|
||||
в задание по сбору метрик Prometheus.
|
||||
|
||||
Дашборд для Grafana, подходящий для этого экспортера: [Vitastor-Grafana-6+.json](../../mon/scripts/Vitastor-Grafana-6+.json).
|
||||
- name: mon_http_port
|
||||
type: int
|
||||
default: 8060
|
||||
info: HTTP port for monitors to listen on (including metrics exporter)
|
||||
info_ru: Порт, на котором мониторы принимают HTTP-соединения (в том числе для отдачи метрик)
|
||||
- name: mon_http_ip
|
||||
type: string
|
||||
info: IP address for monitors to listen on (all addresses by default)
|
||||
info_ru: IP-адрес, на котором мониторы принимают HTTP-соединения (по умолчанию все адреса)
|
||||
- name: mon_https_cert
|
||||
type: string
|
||||
info: Path to PEM SSL certificate file for monitor to listen using HTTPS
|
||||
info_ru: Путь к PEM-файлу SSL-сертификата для монитора, чтобы принимать соединения через HTTPS
|
||||
- name: mon_https_key
|
||||
type: string
|
||||
info: Path to PEM SSL private key file for monitor to listen using HTTPS
|
||||
info_ru: Путь к PEM-файлу секретного SSL-ключа для монитора, чтобы принимать соединения через HTTPS
|
||||
- name: mon_https_client_auth
|
||||
type: bool
|
||||
default: false
|
||||
info: Enable HTTPS client certificate-based authorization for monitor connections
|
||||
info_ru: Включить в HTTPS-сервере монитора авторизацию по клиентским сертификатам
|
||||
- name: mon_https_ca
|
||||
type: string
|
||||
info: Path to CA certificate for client HTTPS authorization
|
||||
info_ru: Путь к удостоверяющему сертификату для авторизации клиентских HTTPS соединений
|
||||
- name: etcd_mon_ttl
|
||||
type: sec
|
||||
min: 5
|
||||
@@ -63,3 +163,36 @@
|
||||
"host" и "osd" являются предопределёнными и не могут быть удалены. Если
|
||||
один из них отсутствует в конфигурации, он доопределяется с приоритетом по
|
||||
умолчанию (100 для уровня "host", 101 для "osd").
|
||||
- name: use_old_pg_combinator
|
||||
type: bool
|
||||
default: false
|
||||
info: |
|
||||
Use the old PG combination generator which doesn't support [level_placement](pool.en.md#level_placement)
|
||||
and [raw_placement](pool.en.md#raw_placement) for pools which don't use this features.
|
||||
info_ru: |
|
||||
Использовать старый генератор комбинаций PG, не поддерживающий [level_placement](pool.ru.md#level_placement)
|
||||
и [raw_placement](pool.ru.md#raw_placement) для пулов, которые не используют данные функции.
|
||||
- name: osd_backfillfull_ratio
|
||||
type: float
|
||||
default: 0.99
|
||||
info: |
|
||||
Monitors try to prevent OSDs becoming 100% full during rebalance or recovery by
|
||||
calculating how much space will be occupied on every OSD after all rebalance
|
||||
and recovery operations finish, and pausing rebalance and recovery if that
|
||||
amount of space exceeds OSD capacity multiplied by the value of this
|
||||
configuration parameter.
|
||||
|
||||
Future used space is calculated by summing space used by all user data blocks
|
||||
(objects) in all PGs placed on a specific OSD, even if some of these objects
|
||||
currently reside on a different set of OSDs.
|
||||
info_ru: |
|
||||
Мониторы стараются предотвратить 100% заполнение OSD в процессе ребаланса
|
||||
или восстановления, рассчитывая, сколько места будет занято на каждом OSD после
|
||||
завершения всех операций ребаланса и восстановления, и приостанавливая
|
||||
ребаланс и восстановление, если рассчитанный объём превышает ёмкость OSD,
|
||||
умноженную на значение данного параметра.
|
||||
|
||||
Будущее занятое место рассчитывается сложением места, занятого всеми
|
||||
пользовательскими блоками данных (объектами) во всех PG, расположенных
|
||||
на конкретном OSD, даже если часть этих объектов в данный момент находится
|
||||
на другом наборе OSD.
|
||||
|
@@ -48,11 +48,17 @@
|
||||
type: string
|
||||
info: |
|
||||
RDMA device name to use for Vitastor OSD communications (for example,
|
||||
"rocep5s0f0"). Now Vitastor supports all adapters, even ones without
|
||||
ODP support, like Mellanox ConnectX-3 and non-Mellanox cards.
|
||||
"rocep5s0f0"). If not specified, Vitastor will try to find an RoCE
|
||||
device matching [osd_network](osd.en.md#osd_network), preferring RoCEv2,
|
||||
or choose the first available RDMA device if no RoCE devices are
|
||||
found or if `osd_network` is not specified. Auto-selection is also
|
||||
unsupported with old libibverbs < v32, like in Debian 10 Buster or
|
||||
CentOS 7.
|
||||
|
||||
Versions up to Vitastor 1.2.0 required ODP which is only present in
|
||||
Mellanox ConnectX >= 4. See also [rdma_odp](#rdma_odp).
|
||||
Vitastor supports all adapters, even ones without ODP support, like
|
||||
Mellanox ConnectX-3 and non-Mellanox cards. Versions up to Vitastor
|
||||
1.2.0 required ODP which is only present in Mellanox ConnectX >= 4.
|
||||
See also [rdma_odp](#rdma_odp).
|
||||
|
||||
Run `ibv_devinfo -v` as root to list available RDMA devices and their
|
||||
features.
|
||||
@@ -64,12 +70,17 @@
|
||||
PFC (Priority Flow Control) and ECN (Explicit Congestion Notification).
|
||||
info_ru: |
|
||||
Название RDMA-устройства для связи с Vitastor OSD (например, "rocep5s0f0").
|
||||
Сейчас Vitastor поддерживает все модели адаптеров, включая те, у которых
|
||||
нет поддержки ODP, то есть вы можете использовать RDMA с ConnectX-3 и
|
||||
картами производства не Mellanox.
|
||||
Если не указано, Vitastor попробует найти RoCE-устройство, соответствующее
|
||||
[osd_network](osd.en.md#osd_network), предпочитая RoCEv2, или выбрать первое
|
||||
попавшееся RDMA-устройство, если RoCE-устройств нет или если сеть `osd_network`
|
||||
не задана. Также автовыбор не поддерживается со старыми версиями библиотеки
|
||||
libibverbs < v32, например в Debian 10 Buster или CentOS 7.
|
||||
|
||||
Версии Vitastor до 1.2.0 включительно требовали ODP, который есть только
|
||||
на Mellanox ConnectX 4 и более новых. См. также [rdma_odp](#rdma_odp).
|
||||
Vitastor поддерживает все модели адаптеров, включая те, у которых
|
||||
нет поддержки ODP, то есть вы можете использовать RDMA с ConnectX-3 и
|
||||
картами производства не Mellanox. Версии Vitastor до 1.2.0 включительно
|
||||
требовали ODP, который есть только на Mellanox ConnectX 4 и более новых.
|
||||
См. также [rdma_odp](#rdma_odp).
|
||||
|
||||
Запустите `ibv_devinfo -v` от имени суперпользователя, чтобы посмотреть
|
||||
список доступных RDMA-устройств, их параметры и возможности.
|
||||
@@ -94,23 +105,29 @@
|
||||
`ibv_devinfo -v`.
|
||||
- name: rdma_gid_index
|
||||
type: int
|
||||
default: 0
|
||||
info: |
|
||||
Global address identifier index of the RDMA device to use. Different GID
|
||||
indexes may correspond to different protocols like RoCEv1, RoCEv2 and iWARP.
|
||||
Search for "GID" in `ibv_devinfo -v` output to determine which GID index
|
||||
you need.
|
||||
|
||||
**IMPORTANT:** If you want to use RoCEv2 (as recommended) then the correct
|
||||
rdma_gid_index is usually 1 (IPv6) or 3 (IPv4).
|
||||
If not specified, Vitastor will try to auto-select a RoCEv2 IPv4 GID, then
|
||||
RoCEv2 IPv6 GID, then RoCEv1 IPv4 GID, then RoCEv1 IPv6 GID, then IB GID.
|
||||
GID auto-selection is unsupported with libibverbs < v32.
|
||||
|
||||
A correct rdma_gid_index for RoCEv2 is usually 1 (IPv6) or 3 (IPv4).
|
||||
info_ru: |
|
||||
Номер глобального идентификатора адреса RDMA-устройства, который следует
|
||||
использовать. Разным gid_index могут соответствовать разные протоколы связи:
|
||||
RoCEv1, RoCEv2, iWARP. Чтобы понять, какой нужен вам - смотрите строчки со
|
||||
словом "GID" в выводе команды `ibv_devinfo -v`.
|
||||
|
||||
**ВАЖНО:** Если вы хотите использовать RoCEv2 (как мы и рекомендуем), то
|
||||
правильный rdma_gid_index, как правило, 1 (IPv6) или 3 (IPv4).
|
||||
Если не указан, Vitastor попробует автоматически выбрать сначала GID,
|
||||
соответствующий RoCEv2 IPv4, потом RoCEv2 IPv6, потом RoCEv1 IPv4, потом
|
||||
RoCEv1 IPv6, потом IB. Авто-выбор GID не поддерживается со старыми версиями
|
||||
libibverbs < v32.
|
||||
|
||||
Правильный rdma_gid_index для RoCEv2, как правило, 1 (IPv6) или 3 (IPv4).
|
||||
- name: rdma_mtu
|
||||
type: int
|
||||
default: 4096
|
||||
@@ -243,21 +260,6 @@
|
||||
Максимальное время ожидания ответа на запрос проверки состояния соединения.
|
||||
Если OSD не отвечает за это время, соединение отключается и производится
|
||||
повторная попытка соединения.
|
||||
- name: up_wait_retry_interval
|
||||
type: ms
|
||||
min: 10
|
||||
default: 50
|
||||
online: true
|
||||
info: |
|
||||
OSDs respond to clients with a special error code when they receive I/O
|
||||
requests for a PG that's not synchronized and started. This parameter sets
|
||||
the time for the clients to wait before re-attempting such I/O requests.
|
||||
info_ru: |
|
||||
Когда OSD получают от клиентов запросы ввода-вывода, относящиеся к не
|
||||
поднятым на данный момент на них PG, либо к PG в процессе синхронизации,
|
||||
они отвечают клиентам специальным кодом ошибки, означающим, что клиент
|
||||
должен некоторое время подождать перед повторением запроса. Именно это время
|
||||
ожидания задаёт данный параметр.
|
||||
- name: max_etcd_attempts
|
||||
type: int
|
||||
default: 5
|
||||
@@ -295,9 +297,9 @@
|
||||
info_ru: |
|
||||
Таймаут для HTTP Keep-Alive в соединениях к etcd. Должен быть больше, чем
|
||||
etcd_report_interval, чтобы keepalive гарантированно работал.
|
||||
- name: etcd_ws_keepalive_timeout
|
||||
- name: etcd_ws_keepalive_interval
|
||||
type: sec
|
||||
default: 30
|
||||
default: 5
|
||||
online: true
|
||||
info: |
|
||||
etcd websocket ping interval required to keep the connection alive and
|
||||
|
@@ -1,3 +1,21 @@
|
||||
- name: osd_iothread_count
|
||||
type: int
|
||||
default: 0
|
||||
info: |
|
||||
TCP network I/O thread count for OSD. When non-zero, a single OSD process
|
||||
may handle more TCP I/O, but at a cost of increased latency because thread
|
||||
switching overhead occurs. RDMA isn't affected by this option.
|
||||
|
||||
Because of latency, instead of enabling OSD I/O threads it's recommended to
|
||||
just create multiple OSDs per disk, or use RDMA.
|
||||
info_ru: |
|
||||
Число отдельных потоков для обработки ввода-вывода через TCP-сеть на
|
||||
стороне OSD. Включение опции позволяет каждому отдельному OSD передавать
|
||||
по сети больше данных, но ухудшает задержку из-за накладных расходов
|
||||
переключения потоков. На работу RDMA опция не влияет.
|
||||
|
||||
Из-за задержек вместо включения потоков ввода-вывода OSD рекомендуется
|
||||
просто создавать по несколько OSD на каждом диске, или использовать RDMA.
|
||||
- name: etcd_report_interval
|
||||
type: sec
|
||||
default: 5
|
||||
|
60
docs/installation/docker.en.md
Normal file
60
docs/installation/docker.en.md
Normal file
@@ -0,0 +1,60 @@
|
||||
[Documentation](../../README.md#documentation) → Installation → Dockerized Installation
|
||||
|
||||
-----
|
||||
|
||||
[Читать на русском](docker.ru.md)
|
||||
|
||||
# Dockerized Installation
|
||||
|
||||
Vitastor may be installed in Docker/Podman. In such setups etcd, monitors and OSD
|
||||
all run in containers, but everything else looks as close as possible to a usual
|
||||
setup with packages:
|
||||
- host network is used
|
||||
- auto-start is implemented through udev and systemd
|
||||
- logs are written to journald (not docker json log files)
|
||||
- command-line wrapper scripts are installed to the host system to call vitastor-disk,
|
||||
vitastor-cli and others through the container
|
||||
|
||||
Such installations may be useful when it's impossible or inconvenient to install
|
||||
Vitastor from packages, for example, in exotic Linux distributions.
|
||||
|
||||
If you don't want just a simple containerized installation, you can also take a look
|
||||
at Vitastor Kubernetes operator: https://github.com/Antilles7227/vitastor-operator
|
||||
|
||||
## Installing Containers
|
||||
|
||||
The instruction is very simple.
|
||||
|
||||
1. Download a Docker image of the desired version: \
|
||||
`docker pull vitastor:1.10.2`
|
||||
2. Install scripts to the host system: \
|
||||
`docker run --rm -it -v /etc:/host-etc -v /usr/bin:/host-bin vitastor:1.10.2 install.sh`
|
||||
3. Reload udev rules: \
|
||||
`udevadm control --reload-rules`
|
||||
|
||||
And you can return to [Quick Start](../intro/quickstart.en.md).
|
||||
|
||||
## Upgrading Containers
|
||||
|
||||
First make sure to check the topic [Upgrading Vitastor](../usage/admin.en.md#upgrading-vitastor)
|
||||
to figure out if you need any additional steps.
|
||||
|
||||
Then, to upgrade a containerized installation, you just need to change the `VITASTOR_VERSION`
|
||||
option in `/etc/vitastor/docker.conf` and restart all Vitastor services:
|
||||
|
||||
`systemctl restart vitastor.target`
|
||||
|
||||
## QEMU
|
||||
|
||||
Vitastor Docker image also contains QEMU, qemu-img and qemu-storage-daemon built with Vitastor support.
|
||||
|
||||
However, running QEMU in Docker is harder to setup and it depends on the used virtualization UI
|
||||
(OpenNebula, Proxmox and so on). Some of them also required patched Libvirt.
|
||||
|
||||
That's why containerized installation of Vitastor doesn't contain a ready-made QEMU setup and it's
|
||||
recommended to install QEMU from packages or build it manually.
|
||||
|
||||
## fio
|
||||
|
||||
Vitastor Docker image also contains fio and installs a wrapper called `vitastor-fio` to use it from
|
||||
the host system.
|
60
docs/installation/docker.ru.md
Normal file
60
docs/installation/docker.ru.md
Normal file
@@ -0,0 +1,60 @@
|
||||
[Документация](../../README-ru.md#документация) → Установка → Установка в Docker
|
||||
|
||||
-----
|
||||
|
||||
[Read in English](docker.en.md)
|
||||
|
||||
# Установка в Docker
|
||||
|
||||
Vitastor можно установить в Docker/Podman. При этом etcd, мониторы и OSD запускаются
|
||||
в контейнерах, но всё остальное выглядит максимально приближенно к установке из пакетов:
|
||||
- используется сеть хост-системы
|
||||
- для автозапуска используются udev и systemd
|
||||
- журналы записываются в journald (не в json-файлы журналов docker)
|
||||
- в хост-систему устанавливаются обёртки для вызова консольных инструментов vitastor-disk,
|
||||
vitastor-cli и других через контейнер
|
||||
|
||||
Такая установка полезна тогда, когда установка из пакетов невозможна или неудобна,
|
||||
например, в нестандартных Linux-дистрибутивах.
|
||||
|
||||
Если вам нужна не просто контейнеризованная инсталляция, вы также можете обратить внимание
|
||||
на Vitastor Kubernetes-оператор: https://github.com/Antilles7227/vitastor-operator
|
||||
|
||||
## Установка контейнеров
|
||||
|
||||
Инструкция по установке максимально простая.
|
||||
|
||||
1. Скачайте Docker-образ желаемой версии: \
|
||||
`docker pull vitastor:1.10.2`
|
||||
2. Установите скрипты в хост-систему командой: \
|
||||
`docker run --rm -it -v /etc:/host-etc -v /usr/bin:/host-bin vitastor:1.10.2 install.sh`
|
||||
3. Перезагрузите правила udev: \
|
||||
`udevadm control --reload-rules`
|
||||
|
||||
После этого вы можете возвращаться к разделу [Быстрый старт](../intro/quickstart.ru.md).
|
||||
|
||||
## Обновление контейнеров
|
||||
|
||||
Сначала обязательно проверьте раздел [Обновление Vitastor](../usage/admin.ru.md#обновление-vitastor),
|
||||
чтобы понять, не требуются ли вам какие-то дополнительные действия.
|
||||
|
||||
После этого для обновления Docker-инсталляции вам нужно просто поменять опцию `VITASTOR_VERSION`
|
||||
в файле `/etc/vitastor/docker.conf` и перезапустить все сервисы Vitastor командой:
|
||||
|
||||
`systemctl restart vitastor.target`
|
||||
|
||||
## QEMU
|
||||
|
||||
В Docker-образ также входят QEMU, qemu-img и qemu-storage-daemon, собранные с поддержкой Vitastor.
|
||||
|
||||
Однако настроить запуск QEMU в Docker сложнее и способ запуска зависит от используемого интерфейса
|
||||
виртуализации (OpenNebula, Proxmox и т.п.). Также для OpenNebula, например, требуется патченый
|
||||
Libvirt.
|
||||
|
||||
Поэтому по умолчанию Docker-сборка пока что не включает в себя готового способа запуска QEMU
|
||||
и QEMU рекомендуется устанавливать из пакетов или собирать самостоятельно.
|
||||
|
||||
## fio
|
||||
|
||||
fio также входит в Docker-контейнер vitastor, и в хост-систему устанавливается обёртка `vitastor-fio`
|
||||
для запуска fio в контейнер.
|
@@ -6,9 +6,18 @@
|
||||
|
||||
# Kubernetes CSI
|
||||
|
||||
Vitastor has a CSI plugin for Kubernetes which supports RWO (and block RWX) volumes.
|
||||
Vitastor has a CSI plugin for Kubernetes which supports block-based and VitastorFS-based volumes.
|
||||
|
||||
To deploy it, take manifests from [csi/deploy/](../../csi/deploy/) directory, put your
|
||||
Block-based volumes may be formatted and mounted with a normal FS (ext4 or xfs). Such volumes
|
||||
only support RWO (ReadWriteOnce) mode.
|
||||
|
||||
Block-based volumes may also be left without FS and attached into the container as a block
|
||||
device. Such volumes also support RWX (ReadWriteMany) mode.
|
||||
|
||||
VitastorFS-based volumes use a clustered file system and support FS-based RWX (ReadWriteMany)
|
||||
mode. However, such volumes don't support quotas and snapshots.
|
||||
|
||||
To deploy the CSI plugin, take manifests from [csi/deploy/](../../csi/deploy/) directory, put your
|
||||
Vitastor configuration in [001-csi-config-map.yaml](../../csi/deploy/001-csi-config-map.yaml),
|
||||
configure storage class in [009-storage-class.yaml](../../csi/deploy/009-storage-class.yaml)
|
||||
and apply all `NNN-*.yaml` manifests to your Kubernetes installation:
|
||||
@@ -23,16 +32,16 @@ After that you'll be able to create PersistentVolumes.
|
||||
kernel modules enabled (vdpa, vduse, virtio-vdpa). If your distribution doesn't
|
||||
have them pre-built - build them yourself ([instructions](../usage/qemu.en.md#vduse)),
|
||||
I promise it's worth it :-). When VDUSE is unavailable, CSI driver uses [NBD](../usage/nbd.en.md)
|
||||
to map Vitastor devices. NBD is slower and prone to timeout issues: if Vitastor
|
||||
cluster becomes unresponsible for more than [nbd_timeout](../config/client.en.md#nbd_timeout),
|
||||
the NBD device detaches and breaks pods using it.
|
||||
to map Vitastor devices. NBD is slower and, with kernels older than 5.19, unmountable
|
||||
if the cluster becomes unresponsible.
|
||||
|
||||
## Features
|
||||
|
||||
Vitastor CSI supports:
|
||||
- Kubernetes starting with 1.20 (or 1.17 for older vitastor-csi <= 1.1.0)
|
||||
- Filesystem RWO (ReadWriteOnce) volumes. Example: [PVC](../../csi/deploy/example-pvc.yaml), [pod](../../csi/deploy/example-test-pod.yaml)
|
||||
- Block-based FS-formatted RWO (ReadWriteOnce) volumes. Example: [PVC](../../csi/deploy/example-pvc.yaml), [pod](../../csi/deploy/example-test-pod.yaml)
|
||||
- Raw block RWX (ReadWriteMany) volumes. Example: [PVC](../../csi/deploy/example-pvc-block.yaml), [pod](../../csi/deploy/example-test-pod-block.yaml)
|
||||
- VitastorFS-based volumes RWX (ReadWriteMany) volumes. Example: [storage class](../../csi/deploy/example-storage-class-fs.yaml)
|
||||
- Volume expansion
|
||||
- Volume snapshots. Example: [snapshot class](../../csi/deploy/example-snapshot-class.yaml), [snapshot](../../csi/deploy/example-snapshot.yaml), [clone](../../csi/deploy/example-snapshot-clone.yaml)
|
||||
- [VDUSE](../usage/qemu.en.md#vduse) (preferred) and [NBD](../usage/nbd.en.md) device mapping methods
|
||||
|
@@ -6,7 +6,17 @@
|
||||
|
||||
# Kubernetes CSI
|
||||
|
||||
У Vitastor есть CSI-плагин для Kubernetes, поддерживающий RWO, а также блочные RWX, тома.
|
||||
У Vitastor есть CSI-плагин для Kubernetes, поддерживающий блочные тома и тома на основе
|
||||
кластерной ФС VitastorFS.
|
||||
|
||||
Блочные тома могут быть отформатированы и примонтированы со стандартной ФС (ext4 или xfs).
|
||||
Такие тома поддерживают только режим RWO (ReadWriteOnce, одновременный доступ с одного узла).
|
||||
|
||||
Блочные тома также могут не форматироваться и подключаться в контейнер в виде блочного устройства.
|
||||
В таком случае их можно подключать в режиме RWX (ReadWriteMany, одновременный доступ с многих узлов).
|
||||
|
||||
Тома на основе VitastorFS используют кластерную ФС и поэтому также поддерживают режим RWX
|
||||
(ReadWriteMany). Однако, такие тома не поддерживают ограничение размера и снимки.
|
||||
|
||||
Для установки возьмите манифесты из директории [csi/deploy/](../../csi/deploy/), поместите
|
||||
вашу конфигурацию подключения к Vitastor в [csi/deploy/001-csi-config-map.yaml](../../csi/deploy/001-csi-config-map.yaml),
|
||||
@@ -33,6 +43,7 @@ CSI-плагин Vitastor поддерживает:
|
||||
- Версии Kubernetes, начиная с 1.20 (или с 1.17 для более старых vitastor-csi <= 1.1.0)
|
||||
- Файловые RWO (ReadWriteOnce) тома. Пример: [PVC](../../csi/deploy/example-pvc.yaml), [под](../../csi/deploy/example-test-pod.yaml)
|
||||
- Сырые блочные RWX (ReadWriteMany) тома. Пример: [PVC](../../csi/deploy/example-pvc-block.yaml), [под](../../csi/deploy/example-test-pod-block.yaml)
|
||||
- Основанные на VitastorFS RWX (ReadWriteMany) тома. Пример: [класс хранения](../../csi/deploy/example-storage-class-fs.yaml)
|
||||
- Расширение размера томов
|
||||
- Снимки томов. Пример: [класс снимков](../../csi/deploy/example-snapshot-class.yaml), [снимок](../../csi/deploy/example-snapshot.yaml), [клон снимка](../../csi/deploy/example-snapshot-clone.yaml)
|
||||
- Способы подключения устройств [VDUSE](../usage/qemu.ru.md#vduse) (предпочитаемый) и [NBD](../usage/nbd.ru.md)
|
||||
|
186
docs/installation/opennebula.en.md
Normal file
186
docs/installation/opennebula.en.md
Normal file
@@ -0,0 +1,186 @@
|
||||
[Documentation](../../README.md#documentation) → Installation → OpenNebula
|
||||
|
||||
-----
|
||||
|
||||
[Читать на русском](opennebula.ru.md)
|
||||
|
||||
# OpenNebula
|
||||
|
||||
## Automatic Installation
|
||||
|
||||
OpenNebula plugin is packaged as `vitastor-opennebula` Debian and RPM package since Vitastor 1.9.0. So:
|
||||
|
||||
- Run `apt-get install vitastor-opennebula` or `yum install vitastor-opennebula` after installing OpenNebula on all nodes
|
||||
- Check that it prints "OK, Vitastor OpenNebula patches successfully applied" or "OK, Vitastor OpenNebula patches are already applied"
|
||||
- If it does not, refer to [Manual Installation](#manual-installation) and apply configuration file changes manually
|
||||
- Make sure that Vitastor patched versions of QEMU and libvirt are installed
|
||||
(`dpkg -l qemu-system-x86`, `dpkg -l | grep libvirt`, `rpm -qa | grep qemu`, `rpm -qa | grep qemu`, `rpm -qa | grep libvirt-libs` should show "vitastor" in version names)
|
||||
- [Block VM access to Vitastor cluster](#block-vm-access-to-vitastor-cluster)
|
||||
|
||||
## Manual Installation
|
||||
|
||||
Install OpenNebula. Then, on each node:
|
||||
|
||||
- Copy [opennebula/remotes](../../opennebula/remotes) into `/var/lib/one` recursively: `cp -r opennebula/remotes /var/lib/one/`
|
||||
- Copy [opennebula/sudoers.d](../../opennebula/sudoers.d) to `/etc`: `cp -r opennebula/sudoers.d /etc/`
|
||||
- Apply [downloader-vitastor.sh.diff](../../opennebula/remotes/datastore/vitastor/downloader-vitastor.sh.diff) to `/var/lib/one/remotes/datastore/downloader.sh`:
|
||||
`patch /var/lib/one/remotes/datastore/downloader.sh < opennebula/remotes/datastore/vitastor/downloader-vitastor.sh.diff` - or read the patch and apply the same change manually
|
||||
- Add `kvm-vitastor` to `LIVE_DISK_SNAPSHOTS` in `/etc/one/vmm_exec/vmm_execrc`
|
||||
- If on Debian or Ubuntu (and AppArmor is used), add Vitastor config file path(s) to `/etc/apparmor.d/local/abstractions/libvirt-qemu`: for example,
|
||||
`echo ' "/etc/vitastor/vitastor.conf" r,' >> /etc/apparmor.d/local/abstractions/libvirt-qemu`
|
||||
- Apply changes to `/etc/one/oned.conf`
|
||||
|
||||
### oned.conf changes
|
||||
|
||||
1. Add deploy script override in kvm VM_MAD: add `-l deploy.vitastor` to ARGUMENTS.
|
||||
|
||||
```diff
|
||||
VM_MAD = [
|
||||
NAME = "kvm",
|
||||
SUNSTONE_NAME = "KVM",
|
||||
EXECUTABLE = "one_vmm_exec",
|
||||
- ARGUMENTS = "-t 15 -r 0 kvm -p",
|
||||
+ ARGUMENTS = "-t 15 -r 0 kvm -p -l deploy=deploy.vitastor",
|
||||
DEFAULT = "vmm_exec/vmm_exec_kvm.conf",
|
||||
TYPE = "kvm",
|
||||
KEEP_SNAPSHOTS = "yes",
|
||||
LIVE_RESIZE = "yes",
|
||||
SUPPORT_SHAREABLE = "yes",
|
||||
IMPORTED_VMS_ACTIONS = "terminate, terminate-hard, hold, release, suspend,
|
||||
resume, delete, reboot, reboot-hard, resched, unresched, disk-attach,
|
||||
disk-detach, nic-attach, nic-detach, snapshot-create, snapshot-delete,
|
||||
resize, updateconf, update"
|
||||
]
|
||||
```
|
||||
|
||||
Optional: if you also want to save VM RAM checkpoints to Vitastor, use
|
||||
`-l deploy=deploy.vitastor,save=save.vitastor,restore=restore.vitastor`
|
||||
instead of just `-l deploy=deploy.vitastor`.
|
||||
|
||||
2. Add `vitastor` to TM_MAD.ARGUMENTS and DATASTORE_MAD.ARGUMENTS:
|
||||
|
||||
```diff
|
||||
TM_MAD = [
|
||||
EXECUTABLE = "one_tm",
|
||||
- ARGUMENTS = "-t 15 -d dummy,lvm,shared,fs_lvm,fs_lvm_ssh,qcow2,ssh,ceph,dev,vcenter,iscsi_libvirt"
|
||||
+ ARGUMENTS = "-t 15 -d dummy,lvm,shared,fs_lvm,fs_lvm_ssh,qcow2,ssh,ceph,vitastor,dev,vcenter,iscsi_libvirt"
|
||||
]
|
||||
|
||||
DATASTORE_MAD = [
|
||||
EXECUTABLE = "one_datastore",
|
||||
- ARGUMENTS = "-t 15 -d dummy,fs,lvm,ceph,dev,iscsi_libvirt,vcenter,restic,rsync -s shared,ssh,ceph,fs_lvm,fs_lvm_ssh,qcow2,vcenter"
|
||||
+ ARGUMENTS = "-t 15 -d dummy,fs,lvm,ceph,vitastor,dev,iscsi_libvirt,vcenter,restic,rsync -s shared,ssh,ceph,vitastor,fs_lvm,fs_lvm_ssh,qcow2,vcenter"
|
||||
]
|
||||
```
|
||||
|
||||
3. Add INHERIT_DATASTORE_ATTR for two Vitastor attributes:
|
||||
|
||||
```
|
||||
INHERIT_DATASTORE_ATTR = "VITASTOR_CONF"
|
||||
INHERIT_DATASTORE_ATTR = "IMAGE_PREFIX"
|
||||
```
|
||||
|
||||
4. Add TM_MAD_CONF and DS_MAD_CONF for Vitastor:
|
||||
|
||||
```
|
||||
TM_MAD_CONF = [
|
||||
NAME = "vitastor", LN_TARGET = "NONE", CLONE_TARGET = "SELF", SHARED = "YES",
|
||||
DS_MIGRATE = "NO", DRIVER = "raw", ALLOW_ORPHANS="format",
|
||||
TM_MAD_SYSTEM = "ssh,shared", LN_TARGET_SSH = "SYSTEM", CLONE_TARGET_SSH = "SYSTEM",
|
||||
DISK_TYPE_SSH = "FILE", LN_TARGET_SHARED = "NONE",
|
||||
CLONE_TARGET_SHARED = "SELF", DISK_TYPE_SHARED = "FILE"
|
||||
]
|
||||
|
||||
DS_MAD_CONF = [
|
||||
NAME = "vitastor",
|
||||
REQUIRED_ATTRS = "DISK_TYPE,BRIDGE_LIST",
|
||||
PERSISTENT_ONLY = "NO",
|
||||
MARKETPLACE_ACTIONS = "export"
|
||||
]
|
||||
```
|
||||
|
||||
## Create Datastores
|
||||
|
||||
Example Image and System Datastore definitions:
|
||||
[opennebula/vitastor-imageds.conf](../../opennebula/vitastor-imageds.conf) and
|
||||
[opennebula/vitastor-systemds.conf](../../opennebula/vitastor-systemds.conf).
|
||||
|
||||
Change parameters to your will:
|
||||
|
||||
- POOL_NAME is Vitastor pool name to store images.
|
||||
- IMAGE_PREFIX is a string prepended to all Vitastor image names.
|
||||
- BRIDGE_LIST is a list of hosts with access to Vitastor cluster, mostly used for image (not system) datastore operations.
|
||||
- VITASTOR_CONF is the path to cluster configuration. Note that it should be also added to `/etc/apparmor.d/local/abstractions/libvirt-qemu` if you use AppArmor.
|
||||
- STAGING_DIR is a temporary directory used when importing external images. Should have free space sufficient for downloading external images.
|
||||
|
||||
Then create datastores using `onedatastore create vitastor-imageds.conf` and `onedatastore create vitastor-systemds.conf` (or use UI).
|
||||
|
||||
## Block VM access to Vitastor cluster
|
||||
|
||||
Vitastor doesn't support any authentication yet, so you MUST block VM guest access to the Vitastor cluster at the network level.
|
||||
|
||||
If you use VLAN networking for VMs - make sure you use different VLANs for VMs and hypervisor/storage network and
|
||||
block access between them using your firewall/switch configuration.
|
||||
|
||||
If you use something more stupid like bridged networking, you probably have to use manual firewall/iptables setup
|
||||
to only allow access to Vitastor from hypervisor IPs.
|
||||
|
||||
Also you need to switch network to "Bridged & Security Groups" and enable IP spoofing filters in OpenNebula.
|
||||
Problem is that OpenNebula's IP spoofing filter doesn't affect local interfaces of the hypervisor i.e. when
|
||||
it's enabled a VM can't talk to other VMs or to the outer world using a spoofed IP, but it CAN talk to the
|
||||
hypervisor if it takes an IP from its subnet. To fix that you also need some more iptables.
|
||||
|
||||
So the complete "stupid" bridged network filter setup could look like the following
|
||||
(here `10.0.3.0/24` is the VM subnet and `10.0.2.0/24` is the hypervisor subnet):
|
||||
|
||||
```
|
||||
# Allow incoming traffic from physical device
|
||||
iptables -A INPUT -m physdev --physdev-in eth0 -j ACCEPT
|
||||
# Do not allow incoming traffic from VMs, but not from VM subnet
|
||||
iptables -A INPUT ! -s 10.0.3.0/24 -i onebr0 -j DROP
|
||||
# Drop traffic from VMs to hypervisor/storage subnet
|
||||
iptables -I FORWARD 1 -s 10.0.3.0/24 -d 10.0.2.0/24 -j DROP
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
The OpenNebula plugin includes quite a bit of bash scripts, so here's their description to get an idea about what they actually do.
|
||||
|
||||
| Script | Action | How to Test |
|
||||
| ----------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| vmm/kvm/deploy.vitastor | Start a VM | Create and start a VM with Vitastor disk(s): persistent / non-persistent / volatile. |
|
||||
| vmm/kvm/save.vitastor | Save VM memory checkpoint | Stop a VM using "Stop" command. |
|
||||
| vmm/kvm/restore.vitastor| Restore VM memory checkpoint | Start a VM back after stopping it. |
|
||||
| datastore/clone | Copy an image as persistent | Create a VM template and instantiate it as persistent. |
|
||||
| datastore/cp | Import an external image | Import a VM template with images from Marketplace. |
|
||||
| datastore/export | Export an image as URL | Probably: export a VM template with images to Marketplace. |
|
||||
| datastore/mkfs | Create an image with FS | Storage → Images → Create → Type: Datablock, Location: Empty disk image, Filesystem: Not empty. |
|
||||
| datastore/monitor | Monitor used space in image datastore | Check reported used/free space in image datastore list. |
|
||||
| datastore/rm | Remove a persistent image | Storage → Images → Select an image → Delete. |
|
||||
| datastore/snap_delete | Delete a snapshot of a persistent image | Storage → Images → Select an image → Select a snapshot → Delete; <br> To create an image with snapshot: attach a persistent image to a VM; create a snapshot; detach the image. |
|
||||
| datastore/snap_flatten | Revert an image to snapshot and delete other snapshots | Storage → Images → Select an image → Select a snapshot → Flatten. |
|
||||
| datastore/snap_revert | Revert an image to snapshot | Storage → Images → Select an image → Select a snapshot → Revert. |
|
||||
| datastore/stat | Get virtual size of an image in MB | No idea. Seems to be unused both in Vitastor and Ceph datastores. |
|
||||
| tm/clone | Clone a non-persistent image to a VM disk | Attach a non-persistent image to a VM. |
|
||||
| tm/context | Generate a contextualisation VM disk | Create a VM with enabled contextualisation (default). Common host FS-based version is used in Vitastor and Ceph datastores. |
|
||||
| tm/cpds | Copy a VM disk / its snapshot to an image | Select a VM → Select a disk → Optionally select a snapshot → Save as. |
|
||||
| tm/delete | Delete a cloned or volatile VM disk | Detach a volatile disk or a non-persistent image from a VM. |
|
||||
| tm/failmigrate | Handle live migration failure | No action. Script is empty in Vitastor and Ceph. In other datastores, should roll back actions done by tm/premigrate. |
|
||||
| tm/ln | Attach a persistent image to a VM | No action. Script is empty in Vitastor and Ceph. |
|
||||
| tm/mkimage | Create a volatile disk, maybe with FS | Attach a volatile disk to a VM, with or without file system. |
|
||||
| tm/mkswap | Create a volatile swap disk | Attach a volatile disk to a VM, formatted as swap. |
|
||||
| tm/monitor | Monitor used space in system datastore | Check reported used/free space in system datastore list. |
|
||||
| tm/mv | Move a migrated VM disk between hosts | Migrate a VM between hosts. In Vitastor and Ceph datastores, doesn't do any storage action. |
|
||||
| tm/mvds | Detach a persistent image from a VM | No action. The opposite of tm/ln. Script is empty in Vitastor and Ceph. In other datastores, script may copy the image from VM host back to the datastore. |
|
||||
| tm/postbackup | Executed after backup | Seems that the script just removes temporary files after backup. Perform a VM backup and check that temporary files are cleaned up. |
|
||||
| tm/postbackup_live | Executed after backup of a running VM | Same as tm/postbackup, but for a running VM. |
|
||||
| tm/postmigrate | Executed after VM live migration | No action. Only executed for system datastore, so the script tries to call other TMs for other disks. Except that, the script does nothing in Vitastor and Ceph datastores. |
|
||||
| tm/prebackup | Actual backup script: backup VM disks | Set up "rsync" backup datastore → Backup a VM to it. |
|
||||
| tm/prebackup_live | Backup VM disks of a running VM | Same as tm/prebackup, but also does fsfreeze/thaw. So perform a live backup, restore it and check that disks are consistent. |
|
||||
| tm/premigrate | Executed before live migration | No action. Only executed for system datastore, so the script tries to call other TMs for other disks. Except that, the script does nothing in Vitastor and Ceph datastores. |
|
||||
| tm/resize | Resize a VM disk | Select a VM → Select a non-persistent disk → Resize. |
|
||||
| tm/restore | Restore VM disks from backup | Set up "rsync" backup datastore → Backup a VM to it → Restore it back. |
|
||||
| tm/snap_create | Create a VM disk snapshot | Select a VM → Select a disk → Create snapshot. |
|
||||
| tm/snap_create_live | Create a VM disk snapshot for a live VM | Select a running VM → Select a disk → Create snapshot. |
|
||||
| tm/snap_delete | Delete a VM disk snapshot | Select a VM → Select a disk → Select a snapshot → Delete. |
|
||||
| tm/snap_revert | Revert a VM disk to a snapshot | Select a VM → Select a disk → Select a snapshot → Revert. |
|
189
docs/installation/opennebula.ru.md
Normal file
189
docs/installation/opennebula.ru.md
Normal file
@@ -0,0 +1,189 @@
|
||||
[Документация](../../README-ru.md#документация) → Установка → OpenNebula
|
||||
|
||||
-----
|
||||
|
||||
[Read in English](opennebula.en.md)
|
||||
|
||||
# OpenNebula
|
||||
|
||||
## Автоматическая установка
|
||||
|
||||
Плагин OpenNebula Vitastor распространяется как Debian и RPM пакет `vitastor-opennebula`, начиная с версии Vitastor 1.9.0. Так что:
|
||||
|
||||
- Запустите `apt-get install vitastor-opennebula` или `yum install vitastor-opennebula` после установки OpenNebula на всех серверах
|
||||
- Проверьте, что он выводит "OK, Vitastor OpenNebula patches successfully applied" или "OK, Vitastor OpenNebula patches are already applied" в процессе установки
|
||||
- Если сообщение не выведено, пройдите по шагам инструкцию [Ручная установка](#ручная-установка) и примените правки файлов конфигурации вручную
|
||||
- Удостоверьтесь, что установлены версии QEMU и libvirt с изменениями Vitastor
|
||||
(`dpkg -l qemu-system-x86`, `dpkg -l | grep libvirt`, `rpm -qa | grep qemu`, `rpm -qa | grep qemu`, `rpm -qa | grep libvirt-libs` должны показывать "vitastor" в номере версии)
|
||||
- [Заблокируйте доступ виртуальных машин в Vitastor](#блокировка-доступа-вм-в-vitastor)
|
||||
|
||||
## Ручная установка
|
||||
|
||||
Сначала установите саму OpenNebula. После этого, на каждом сервере:
|
||||
|
||||
- Скопируйте директорию [opennebula/remotes](../../opennebula/remotes) в `/var/lib/one`: `cp -r opennebula/remotes /var/lib/one/`
|
||||
- Скопируйте директорию [opennebula/sudoers.d](../../opennebula/sudoers.d) в `/etc`: `cp -r opennebula/sudoers.d /etc/`
|
||||
- Примените патч [downloader-vitastor.sh.diff](../../opennebula/remotes/datastore/vitastor/downloader-vitastor.sh.diff) к `/var/lib/one/remotes/datastore/downloader.sh`:
|
||||
`patch /var/lib/one/remotes/datastore/downloader.sh < opennebula/remotes/datastore/vitastor/downloader-vitastor.sh.diff` - либо прочитайте патч и примените изменение вручную
|
||||
- Добавьте `kvm-vitastor` в список `LIVE_DISK_SNAPSHOTS` в файле `/etc/one/vmm_exec/vmm_execrc`
|
||||
- Если вы используете Debian или Ubuntu (и AppArmor), добавьте пути к файлу(ам) конфигурации Vitastor в файл `/etc/apparmor.d/local/abstractions/libvirt-qemu`: например,
|
||||
`echo ' "/etc/vitastor/vitastor.conf" r,' >> /etc/apparmor.d/local/abstractions/libvirt-qemu`
|
||||
- Примените изменения `/etc/one/oned.conf`
|
||||
|
||||
### Изменения oned.conf
|
||||
|
||||
1. Добавьте переопределение скрипта deploy в VM_MAD kvm, добавив `-l deploy.vitastor` в `ARGUMENTS`:
|
||||
|
||||
```diff
|
||||
VM_MAD = [
|
||||
NAME = "kvm",
|
||||
SUNSTONE_NAME = "KVM",
|
||||
EXECUTABLE = "one_vmm_exec",
|
||||
- ARGUMENTS = "-t 15 -r 0 kvm -p",
|
||||
+ ARGUMENTS = "-t 15 -r 0 kvm -p -l deploy=deploy.vitastor",
|
||||
DEFAULT = "vmm_exec/vmm_exec_kvm.conf",
|
||||
TYPE = "kvm",
|
||||
KEEP_SNAPSHOTS = "yes",
|
||||
LIVE_RESIZE = "yes",
|
||||
SUPPORT_SHAREABLE = "yes",
|
||||
IMPORTED_VMS_ACTIONS = "terminate, terminate-hard, hold, release, suspend,
|
||||
resume, delete, reboot, reboot-hard, resched, unresched, disk-attach,
|
||||
disk-detach, nic-attach, nic-detach, snapshot-create, snapshot-delete,
|
||||
resize, updateconf, update"
|
||||
]
|
||||
```
|
||||
|
||||
Опционально: если вы хотите также сохранять снимки памяти ВМ в Vitastor, добавьте
|
||||
`-l deploy=deploy.vitastor,save=save.vitastor,restore=restore.vitastor`
|
||||
вместо просто `-l deploy=deploy.vitastor`.
|
||||
|
||||
2. Добавьте `vitastor` в значения TM_MAD.ARGUMENTS и DATASTORE_MAD.ARGUMENTS:
|
||||
|
||||
```diff
|
||||
TM_MAD = [
|
||||
EXECUTABLE = "one_tm",
|
||||
- ARGUMENTS = "-t 15 -d dummy,lvm,shared,fs_lvm,fs_lvm_ssh,qcow2,ssh,ceph,dev,vcenter,iscsi_libvirt"
|
||||
+ ARGUMENTS = "-t 15 -d dummy,lvm,shared,fs_lvm,fs_lvm_ssh,qcow2,ssh,ceph,vitastor,dev,vcenter,iscsi_libvirt"
|
||||
]
|
||||
|
||||
DATASTORE_MAD = [
|
||||
EXECUTABLE = "one_datastore",
|
||||
- ARGUMENTS = "-t 15 -d dummy,fs,lvm,ceph,dev,iscsi_libvirt,vcenter,restic,rsync -s shared,ssh,ceph,fs_lvm,fs_lvm_ssh,qcow2,vcenter"
|
||||
+ ARGUMENTS = "-t 15 -d dummy,fs,lvm,ceph,vitastor,dev,iscsi_libvirt,vcenter,restic,rsync -s shared,ssh,ceph,vitastor,fs_lvm,fs_lvm_ssh,qcow2,vcenter"
|
||||
]
|
||||
```
|
||||
|
||||
3. Добавьте строчки с INHERIT_DATASTORE_ATTR для двух атрибутов Vitastor-хранилищ:
|
||||
|
||||
```
|
||||
INHERIT_DATASTORE_ATTR = "VITASTOR_CONF"
|
||||
INHERIT_DATASTORE_ATTR = "IMAGE_PREFIX"
|
||||
```
|
||||
|
||||
4. Добавьте TM_MAD_CONF и DS_MAD_CONF для Vitastor:
|
||||
|
||||
```
|
||||
TM_MAD_CONF = [
|
||||
NAME = "vitastor", LN_TARGET = "NONE", CLONE_TARGET = "SELF", SHARED = "YES",
|
||||
DS_MIGRATE = "NO", DRIVER = "raw", ALLOW_ORPHANS="format",
|
||||
TM_MAD_SYSTEM = "ssh,shared", LN_TARGET_SSH = "SYSTEM", CLONE_TARGET_SSH = "SYSTEM",
|
||||
DISK_TYPE_SSH = "FILE", LN_TARGET_SHARED = "NONE",
|
||||
CLONE_TARGET_SHARED = "SELF", DISK_TYPE_SHARED = "FILE"
|
||||
]
|
||||
|
||||
DS_MAD_CONF = [
|
||||
NAME = "vitastor",
|
||||
REQUIRED_ATTRS = "DISK_TYPE,BRIDGE_LIST",
|
||||
PERSISTENT_ONLY = "NO",
|
||||
MARKETPLACE_ACTIONS = "export"
|
||||
]
|
||||
```
|
||||
|
||||
## Создайте хранилища
|
||||
|
||||
Примеры настроек хранилищ образов (image) и дисков ВМ (system):
|
||||
[opennebula/vitastor-imageds.conf](../../opennebula/vitastor-imageds.conf) и
|
||||
[opennebula/vitastor-systemds.conf](../../opennebula/vitastor-systemds.conf).
|
||||
|
||||
Скопируйте настройки и поменяйте следующие параметры так, как вам необходимо:
|
||||
|
||||
- POOL_NAME - имя пула Vitastor для сохранения образов дисков.
|
||||
- IMAGE_PREFIX - строка, добавляемая в начало имён образов дисков.
|
||||
- BRIDGE_LIST - список серверов с доступом к кластеру Vitastor, используемых для операций с хранилищем образов (image, не system).
|
||||
- VITASTOR_CONF - путь к конфигурации Vitastor. Имейте в виду, что этот путь также надо добавить в `/etc/apparmor.d/local/abstractions/libvirt-qemu`, если вы используете AppArmor.
|
||||
- STAGING_DIR - путь к временному каталогу, используемому при импорте внешних образов. Должен иметь достаточно свободного места, чтобы вмещать скачанные образы.
|
||||
|
||||
После этого создайте хранилища с помощью команд `onedatastore create vitastor-imageds.conf` и `onedatastore create vitastor-systemds.conf` (либо через UI).
|
||||
|
||||
## Блокировка доступа ВМ в Vitastor
|
||||
|
||||
Vitastor пока не поддерживает никакую аутентификацию, так что вы ДОЛЖНЫ заблокировать доступ гостевых ВМ
|
||||
в кластер Vitastor на сетевом уровне.
|
||||
|
||||
Если вы используете VLAN-сети для ВМ - удостоверьтесь, что ВМ и гипервизор/сеть хранения помещены в разные
|
||||
изолированные друг от друга VLAN-ы.
|
||||
|
||||
Если вы используете что-то более примитивное, например, мосты (bridge), вам, скорее всего, придётся вручную
|
||||
настроить iptables / межсетевой экран, чтобы разрешить доступ к Vitastor только с IP гипервизоров.
|
||||
|
||||
Также в этом случае нужно будет переключить обычные мосты на "Bridged & Security Groups" и включить фильтр
|
||||
спуфинга IP в OpenNebula. Правда, реализация этого фильтра пока не полная, и она не блокирует доступ к
|
||||
локальным интерфейсам гипервизора. То есть, включённый фильтр спуфинга IP запрещает ВМ отправлять трафик
|
||||
с чужими IP к другим ВМ или во внешний мир, но не запрещает отправлять его напрямую гипервизору. Чтобы
|
||||
исправить это, тоже нужны дополнительные правила iptables.
|
||||
|
||||
Таким образом, более-менее полная блокировка при использовании простой сети на сетевых мостах может
|
||||
выглядеть так (здесь `10.0.3.0/24` - подсеть ВМ, `10.0.2.0/24` - подсеть гипервизора):
|
||||
|
||||
```
|
||||
# Разрешаем входящий трафик с физического устройства
|
||||
iptables -A INPUT -m physdev --physdev-in eth0 -j ACCEPT
|
||||
# Запрещаем трафик со всех ВМ, но с IP не из подсети ВМ
|
||||
iptables -A INPUT ! -s 10.0.3.0/24 -i onebr0 -j DROP
|
||||
# Запрещаем трафик от ВМ к сети гипервизора
|
||||
iptables -I FORWARD 1 -s 10.0.3.0/24 -d 10.0.2.0/24 -j DROP
|
||||
```
|
||||
|
||||
## Тестирование
|
||||
|
||||
Плагин OpenNebula по большей части состоит из bash-скриптов, и чтобы было понятнее, что они
|
||||
вообще делают - ниже приведены описания процедур, которыми можно протестировать каждый из них.
|
||||
|
||||
| Скрипт | Описание | Как протестировать |
|
||||
| ----------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| vmm/kvm/deploy.vitastor | Запустить виртуальную машину | Создайте и запустите виртуальную машину с дисками Vitastor: постоянным / непостоянным / волатильным (временным). |
|
||||
| vmm/kvm/save.vitastor | Сохранить снимок памяти ВМ | Остановите виртуальную машину командой "Остановить". |
|
||||
| vmm/kvm/restore.vitastor| Восстановить снимок памяти ВМ | Запустите ВМ после остановки обратно. |
|
||||
| datastore/clone | Скопировать образ как "постоянный" | Создайте шаблон ВМ и создайте из него постоянную ВМ. |
|
||||
| datastore/cp | Импортировать внешний образ | Импортируйте шаблон ВМ с образами дисков из Магазина OpenNebula. |
|
||||
| datastore/export | Экспортировать образ как URL | Вероятно: экспортируйте шаблон ВМ с образами в Магазин. |
|
||||
| datastore/mkfs | Создать образ с файловой системой | Хранилище → Образы → Создать → Тип: базовый блок данных, Расположение: пустой образ диска, Файловая система: любая непустая. |
|
||||
| datastore/monitor | Вывод статистики места в хранилище образов | Проверьте статистику свободного/занятого места в списке хранилищ образов. |
|
||||
| datastore/rm | Удалить "постоянный" образ | Хранилище → Образы → Выберите образ → Удалить. |
|
||||
| datastore/snap_delete | Удалить снимок "постоянного" образа | Хранилище → Образы → Выберите образ → Выберите снимок → Удалить; <br> Чтобы создать образ со снимком: подключите постоянный образ к ВМ, создайте снимок, отключите образ. |
|
||||
| datastore/snap_flatten | Откатить образ к снимку, удалив другие снимки | Хранилище → Образы → Выберите образ → Выберите снимок → "Выровнять" (flatten). |
|
||||
| datastore/snap_revert | Откатить образ к снимку | Хранилище → Образы → Выберите образ → Выберите снимок → Откатить. |
|
||||
| datastore/stat | Показать виртуальный размер образа в МБ | Неизвестно. По-видимому, в плагинах Vitastor и Ceph не используется. |
|
||||
| tm/clone | Клонировать "непостоянный" образ в диск ВМ | Подключите "непостоянный" образ к ВМ. |
|
||||
| tm/context | Создать диск контекстуализации ВМ | Создайте ВМ с контекстуализацией, как обычно. Но тестировать особенно нечего: в плагинах Vitastor и Ceph образ контекста хранится в локальной ФС гипервизора. |
|
||||
| tm/cpds | Копировать диск ВМ/его снимок в новый образ | Выберите ВМ → Выберите диск → Опционально выберите снимок → "Сохранить как". |
|
||||
| tm/delete | Удалить диск-клон или волатильный диск ВМ | Отключите волатильный или не-постоянный диск от ВМ. |
|
||||
| tm/failmigrate | Обработать неудачную миграцию | Тестировать нечего. Скрипт пуст в плагинах Vitastor и Ceph. В других плагинах скрипт должен откатывать действия tm/premigrate. |
|
||||
| tm/ln | Подключить "постоянный" образ к ВМ | Тестировать нечего. Скрипт пуст в плагинах Vitastor и Ceph. |
|
||||
| tm/mkimage | Создать волатильный диск, без или с ФС | Подключите волатильный диск к ВМ, с или без файловой системы. |
|
||||
| tm/mkswap | Создать волатильный диск подкачки | Подключите волатильный диск к ВМ, форматированный как диск подкачки (swap). |
|
||||
| tm/monitor | Вывод статистики места в хранилище дисков ВМ | Проверьте статистику свободного/занятого места в списке хранилищ дисков ВМ. |
|
||||
| tm/mv | Мигрировать диск ВМ между хостами | Мигрируйте ВМ между серверами. Правда, с точки зрения хранилища в плагинах Vitastor и Ceph этот скрипт ничего не делает. |
|
||||
| tm/mvds | Отключить "постоянный" образ от ВМ | Тестировать нечего. Скрипт пуст в плагинах Vitastor и Ceph. В целом же скрипт обратный к tm/ln и в других хранилищах он может, например, копировать образ ВМ с диска гипервизора обратно в хранилище. |
|
||||
| tm/postbackup | Выполняется после бэкапа | По-видимому, скрипт просто удаляет временные файлы после резервного копирования. Так что можно провести его и проверить, что на серверах не осталось временных файлов. |
|
||||
| tm/postbackup_live | Выполняется после бэкапа запущенной ВМ | То же, что tm/postbackup, но для запущенной ВМ. |
|
||||
| tm/postmigrate | Выполняется после миграции ВМ | Тестировать нечего. Однако, OpenNebula запускает скрипт только для системного хранилища, поэтому он вызывает аналогичные скрипты для хранилищ других дисков той же ВМ. Помимо этого в плагинах Vitastor и Ceph скрипт ничего не делает. |
|
||||
| tm/prebackup | Выполнить резервное копирование дисков ВМ | Создайте хранилище резервных копий типа "rsync" → Забэкапьте в него ВМ. |
|
||||
| tm/prebackup_live | То же самое для запущенной ВМ | То же, что tm/prebackup, но запускает fsfreeze/thaw (остановку доступа к дискам). Так что смысл теста - проведите резервное копирование и проверьте, что данные скопировались консистентно. |
|
||||
| tm/premigrate | Выполняется перед миграцией ВМ | Тестировать нечего. Аналогично tm/postmigrate запускается только для системного хранилища. |
|
||||
| tm/resize | Изменить размер диска ВМ | Выберите ВМ → Выберите непостоянный диск → Измените его размер. |
|
||||
| tm/restore | Восстановить диски ВМ из бэкапа | Создайте хранилище резервных копий → Забэкапьте в него ВМ → Восстановите её обратно. |
|
||||
| tm/snap_create | Создать снимок диска ВМ | Выберите ВМ → Выберите диск → Создайте снимок. |
|
||||
| tm/snap_create_live | Создать снимок диска запущенной ВМ | Выберите запущенную ВМ → Выберите диск → Создайте снимок. |
|
||||
| tm/snap_delete | Удалить снимок диска ВМ | Выберите ВМ → Выберите диск → Выберите снимок → Удалить. |
|
||||
| tm/snap_revert | Откатить диск ВМ к снимку | Выберите ВМ → Выберите диск → Выберите снимок → Откатить. |
|
@@ -14,10 +14,9 @@
|
||||
- Debian 12 (Bookworm/Sid): `deb https://vitastor.io/debian bookworm main`
|
||||
- Debian 11 (Bullseye): `deb https://vitastor.io/debian bullseye main`
|
||||
- Debian 10 (Buster): `deb https://vitastor.io/debian buster main`
|
||||
- Ubuntu 22.04 (Jammy): `deb https://vitastor.io/debian jammy main`
|
||||
- Add `-oldstable` to bookworm/bullseye/buster in this line to install the last
|
||||
stable version from 0.9.x branch instead of 1.x
|
||||
- For Debian 10 (Buster) also enable backports repository:
|
||||
`deb http://deb.debian.org/debian buster-backports main`
|
||||
- Install packages: `apt update; apt install vitastor lp-solve etcd linux-image-amd64 qemu-system-x86`
|
||||
|
||||
## CentOS
|
||||
|
@@ -14,10 +14,9 @@
|
||||
- Debian 12 (Bookworm/Sid): `deb https://vitastor.io/debian bookworm main`
|
||||
- Debian 11 (Bullseye): `deb https://vitastor.io/debian bullseye main`
|
||||
- Debian 10 (Buster): `deb https://vitastor.io/debian buster main`
|
||||
- Ubuntu 22.04 (Jammy): `deb https://vitastor.io/debian jammy main`
|
||||
- Добавьте `-oldstable` к слову bookworm/bullseye/buster в этой строке, чтобы
|
||||
установить последнюю стабильную версию из ветки 0.9.x вместо 1.x
|
||||
- Для Debian 10 (Buster) также включите репозиторий backports:
|
||||
`deb http://deb.debian.org/debian buster-backports main`
|
||||
- Установите пакеты: `apt update; apt install vitastor lp-solve etcd linux-image-amd64 qemu-system-x86`
|
||||
|
||||
## CentOS
|
||||
|
@@ -17,10 +17,10 @@ To enable Vitastor support in Proxmox Virtual Environment (6.4-8.1 are supported
|
||||
- Restart pvedaemon: `systemctl restart pvedaemon`
|
||||
|
||||
`/etc/pve/storage.cfg` example (the only required option is vitastor_pool, all others
|
||||
are listed below with their default values):
|
||||
are listed below with their default values; `vitastor_ssd` is Proxmox storage pool id):
|
||||
|
||||
```
|
||||
vitastor: vitastor
|
||||
vitastor: vitastor_ssd
|
||||
# pool to put new images into
|
||||
vitastor_pool testpool
|
||||
# path to the configuration file
|
||||
|
@@ -16,10 +16,10 @@
|
||||
- Перезапустите демон Proxmox: `systemctl restart pvedaemon`
|
||||
|
||||
Пример `/etc/pve/storage.cfg` (единственная обязательная опция - vitastor_pool, все остальные
|
||||
перечислены внизу для понимания значений по умолчанию):
|
||||
перечислены внизу для понимания значений по умолчанию; `vitastor_ssd` - имя хранилища в Proxmox):
|
||||
|
||||
```
|
||||
vitastor: vitastor
|
||||
vitastor: vitastor_ssd
|
||||
# Пул, в который будут помещаться образы дисков
|
||||
vitastor_pool testpool
|
||||
# Путь к файлу конфигурации
|
||||
|
@@ -41,7 +41,7 @@ It's recommended to build the QEMU driver (qemu_driver.c) in-tree, as a part of
|
||||
QEMU build process. To do that:
|
||||
- Install vitastor client library headers (from source or from vitastor-client-dev package)
|
||||
- Take a corresponding patch from `patches/qemu-*-vitastor.patch` and apply it to QEMU source
|
||||
- Copy `src/qemu_driver.c` to QEMU source directory as `block/vitastor.c`
|
||||
- Copy `src/client/qemu_driver.c` to QEMU source directory as `block/vitastor.c`
|
||||
- Build QEMU as usual
|
||||
|
||||
But it is also possible to build it out-of-tree. To do that:
|
||||
|
@@ -41,7 +41,7 @@ cmake .. && make -j8 install
|
||||
Драйвер QEMU (qemu_driver.c) рекомендуется собирать вместе с самим QEMU. Для этого:
|
||||
- Установите заголовки клиентской библиотеки Vitastor (из исходников или из пакета vitastor-client-dev)
|
||||
- Возьмите соответствующий патч из `patches/qemu-*-vitastor.patch` и примените его к исходникам QEMU
|
||||
- Скопируйте [src/qemu_driver.c](../../src/qemu_driver.c) в директорию исходников QEMU как `block/vitastor.c`
|
||||
- Скопируйте [src/client/qemu_driver.c](../../src/client/qemu_driver.c) в директорию исходников QEMU как `block/vitastor.c`
|
||||
- Соберите QEMU как обычно
|
||||
|
||||
Однако в целях отладки драйвер также можно собирать отдельно от QEMU. Для этого:
|
||||
|
@@ -6,19 +6,151 @@
|
||||
|
||||
# Architecture
|
||||
|
||||
- [Server-side components](#server-side-components)
|
||||
- [Basic concepts](#basic-concepts)
|
||||
- [Client-side components](#client-side-components)
|
||||
- [Additional utilities](#additional-utilities)
|
||||
- [Overall read/write process](#overall-read-write-process)
|
||||
- [Nuances of request handling](#nuances-of-request-handling)
|
||||
- [Similarities to Ceph](#similarities-to-ceph)
|
||||
- [Differences from Ceph](#differences-from-ceph)
|
||||
- [Implementation Principles](#implementation-principles)
|
||||
|
||||
## Server-side components
|
||||
|
||||
- **OSD** (Object Storage Daemon) is a process that directly works with the disk, stores data
|
||||
and serves read/write requests. One OSD serves one disk (or one partition). OSDs talk to etcd
|
||||
and to each other — they receive cluster state from etcd, and send read/write requests for
|
||||
secondary copies of data to other OSDs.
|
||||
- **etcd** — clustered key/value database, used as a reliable storage for configuration
|
||||
and high-level cluster state. Etcd is the component that prevents splitbrain in the cluster.
|
||||
Data blocks are not stored in etcd, etcd doesn't participate in data write or read path.
|
||||
- **Монитор** — a separate node.js based daemon which monitors the cluster, calculates
|
||||
required configuration changes and saves them to etcd, thus commanding OSDs to apply these
|
||||
changes. Monitor also aggregates cluster statistics. OSD don't talk to monitor, monitor
|
||||
only sends and receives data from etcd.
|
||||
|
||||
## Basic concepts
|
||||
|
||||
- OSD (Object Storage Daemon) is a process that stores data and serves read/write requests.
|
||||
- PG (Placement Group) is a "shard" of the cluster, group of data stored on one set of replicas.
|
||||
- Pool is a container for data that has equal redundancy scheme and placement rules.
|
||||
- Monitor is a separate daemon that watches cluster state and handles failures.
|
||||
- Failure Domain is a group of OSDs that you allow to fail. It's "host" by default.
|
||||
- Placement Tree groups OSDs in a hierarchy to later split them into Failure Domains.
|
||||
- **Pool** is a container for data that has equal redundancy scheme and disk placement rules.
|
||||
- **PG (Placement Group)** is a "shard" of the cluster, subdivision unit that has its own
|
||||
set of OSDs for data storage.
|
||||
- **Failure Domain** is a group of OSDs, from the simultaneous failure of which you are
|
||||
protected by Vitastor. Default failure domain is "host" (server), but you choose a
|
||||
larger (for example, a rack of servers) or smaller (a single drive) failure domain
|
||||
for every pool.
|
||||
- **Placement Tree** (similar to Ceph CRUSH Tree) groups OSDs in a hierarchy to later
|
||||
split them into Failure Domains.
|
||||
|
||||
## Client-side components
|
||||
|
||||
- **Client library** encapsulates client I/O logic. Client library connects to etcd and to all OSDs,
|
||||
receives cluster state from etcd, sends read and write requests directly to all OSDs. Due
|
||||
to the symmetric distributed architecture, all data blocks (each 128 KB by default) are placed
|
||||
to different OSDs, but clients always know where each data block is stored and connect directly
|
||||
to the right OSD.
|
||||
|
||||
All other client-side components are based on the client library:
|
||||
|
||||
- **[vitastor-cli](../usage/cli.en.md)** — command-line utility for cluster management.
|
||||
Allows to view cluster state, manage pools and images, i.e. create, modify and remove
|
||||
virtual disks, their snapshots and clones.
|
||||
- **[QEMU driver](../usage/qemu.en.md)** — pluggable QEMU module allowing QEMU/KVM virtual
|
||||
machines work with virtual Vitastor disks directly from userspace through the client library,
|
||||
without the need to attach disks as kernel block devices. However, if you want to attach
|
||||
disks, you can also do that with the same driver and [VDUSE](../usage/qemu.en.md#vduse).
|
||||
- **[vitastor-nbd](../usage/nbd.en.md)** — utility that allows to attach Vitastor disks as
|
||||
kernel block devices using NBD (Network Block Device), which works more like "BUSE"
|
||||
(Block Device In Userspace). Vitastor doesn't have Linux kernel modules for the same task
|
||||
(at least by now). NBD is an older, non-recommended way to attach disks — you should use
|
||||
VDUSE whenever you can.
|
||||
- **[CSI driver](../installation/kubernetes.en.md)** — driver for attaching Vitastor images
|
||||
and VitastorFS subdirectories as Kubernetes persistent volumes. Block-based CSI uses
|
||||
VDUSE (when available) or NBD — images are attached as kernel block devices and mounted
|
||||
into containers. FS-based CSI uses **[vitastor-nfs](../usage/nfs.en.md)**.
|
||||
- **Drivers for Proxmox, OpenStack and so on** — pluggable modules for corresponding systems,
|
||||
allowing to use Vitastor as storage in them.
|
||||
- **[vitastor-nfs](../usage/nfs.en.md)** — NFS 3.0 server allowing export of two file system variants:
|
||||
the first is a simplified pseudo-FS for file-based access to Vitastor block images (for non-QEMU
|
||||
hypervisors with NFS support), the second is **VitastorFS**, full-featured clustered POSIX FS.
|
||||
Both variants support parallel access from multiple vitastor-nfs servers. In fact, you are
|
||||
not required to setup separate NFS servers at all and use vitastor-nfs mount command on every
|
||||
client node — it starts the NFS server and mounts the FS locally.
|
||||
- **[fio driver](../usage/fio.en.md)** — pluggable module for fio disk benchmarking tool for
|
||||
running performance tests on your Vitastor cluster.
|
||||
- **vitastor-kv** — client for a key-value DB working over shared block volumes (usual
|
||||
vitastor images). VitastorFS metadata is stored in vitastor-kv.
|
||||
|
||||
## Additional utilities
|
||||
|
||||
- **vitastor-disk** — a Vitastor OSD disk management tool. You can create, remove,
|
||||
resize and move OSD partitions with it.
|
||||
|
||||
## Overall read/write process
|
||||
|
||||
- Vitastor stores virtual disks, also named "images" or "inodes".
|
||||
- Each image is stored in some pool. Pool specifies storage parameters such as redundancy
|
||||
scheme (replication or EC — erasure codes, i.e. error correction codes), failure domain
|
||||
and restrictions on OSD selection for image data placement. See [Pool configuration](../config/pool.en.md) for details.
|
||||
- Each image is split into objects/blocks of fixed size, equal to [block_size](../config/layout-cluster.en.md#block_size)
|
||||
(128 KB by default), multiplied by data part count for EC or 1 for replicas. That is,
|
||||
if a pool uses EC 4+2 coding scheme (4 data parts + 2 parity parts), then, with the
|
||||
default block_size, images are split into 512 KB objects.
|
||||
- Client read/write requests are split into parts at object boundaries.
|
||||
- Each object is mapped to a PG number it belongs to, by simply taking a remainder of
|
||||
division of its offset by PG count of the image's pool.
|
||||
- Client reads primary OSD for all PGs from etcd. Primary OSD for each PG is assigned
|
||||
by the monitor during cluster operation, along with the full PG OSD set.
|
||||
- If not already connected, client connects to primary OSDs of all PGs involved in a
|
||||
read/write request and sends parts of the request to them.
|
||||
- If a primary OSD is unavailable, client retries connection attempts indefinitely
|
||||
either until it becomes available or until the monitor assigns another OSD as primary
|
||||
for that PG.
|
||||
- Client also retries requests if the primary OSD replies with error code EPIPE, meaning
|
||||
that the PG is inactive at this OSD at the moment - for example, when the primary OSD
|
||||
is switched, or if the primary OSD itself loses connection to replicas during request
|
||||
handling.
|
||||
- Primary OSD determines where the parts of the object are stored. By default, all objects
|
||||
are assumed to be stored at the target OSD set of a PG, but some of them may be present
|
||||
at a different OSD set if they are degraded or moved, or if the data rebalancing process
|
||||
is active. OSDs doesn't do any network requests, if calculates locations of all objects
|
||||
during PG activation and stores it in memory.
|
||||
- Primary OSD handles the request locally when it can - for example, when it's a read
|
||||
from a replicated pool or when it's a read from a EC pool involving only one data part
|
||||
stored on the OSD's local disk.
|
||||
- When a request requires reads or writes to additional OSDs, primary OSD uses already
|
||||
established connections to secondary OSDs of the PG to execute these requests. This happens
|
||||
in parallel to local disk operations. All such connections are guaranteed to be already
|
||||
established when the PG is active, and if any of them is dropped, PG is restarted and
|
||||
all current read/write operations to it fail with EPIPE error and are retried by clients.
|
||||
- After completing all secondary read/write requests, primary OSD sends the response to
|
||||
the client.
|
||||
|
||||
### Nuances of request handling
|
||||
|
||||
- If a pool uses erasure codes and some of the OSDs are unavailable, primary OSDs recover
|
||||
data from the remaining parts during read.
|
||||
- Each object has a version number. During write, primary OSD first determines the current
|
||||
version of the object. As primary OSD usually stores the object or its part itself, most
|
||||
of the time version is read from the memory of the OSD itself. However, if primary OSD
|
||||
doesn't contain parts of the object, it requests the version number from a secondary OSD
|
||||
which has that part. Such request still doesn't involve reading from the disk though,
|
||||
because object metadata, including version number, is always stored in OSD memory.
|
||||
- If a pool uses erasure codes, partial writes of an object require reading other parts of
|
||||
it from secondary OSDs or from the local disk of the primary OSD itself. This is called
|
||||
"read-modify-write" process.
|
||||
- If a pool uses erasure codes, two-phase write process is used to get rid of the Write Hole
|
||||
problem: first a new version of object parts is written to all secondary OSDs without
|
||||
removing the previous version, and then, after receiving successful write confirmations
|
||||
from all OSDs, new version is committed and the old one is allowed to be removed.
|
||||
- In a pool doesn't use immediate_commit mode, then write requests sent by clients aren't
|
||||
treated as committed to physical media instantly. Clients have to send separate type of
|
||||
requests (SYNC) to commit changes, and before it isn't sent, new versions of data are
|
||||
allowed to be lost if some OSDs die. Thus, when immediate_commit is disabled, clients
|
||||
store copies of all write requests in memory and repeat them from there when the
|
||||
connection to primary OSD is lost. This in-memory copy is removed after a successful
|
||||
SYNC, and to prevent excessive memory usage, clients also do an automatic SYNC
|
||||
every [client_dirty_limit](../config/network.en.md#client_dirty_limit) written bytes.
|
||||
|
||||
## Similarities to Ceph
|
||||
|
||||
@@ -87,5 +219,5 @@
|
||||
- Deleting images in a degraded cluster may currently lead to objects reappearing
|
||||
after dead OSDs come back, and in case of erasure-coded pools, they may even
|
||||
reappear as incomplete. Just repeat the removal request again in this case.
|
||||
This problem will be fixed in the nearest future, the fix is already implemented
|
||||
in the "epoch-deletions" branch.
|
||||
This problem will be fixed in the future, along with the metadata disk storage
|
||||
format update.
|
||||
|
@@ -11,6 +11,7 @@
|
||||
- [Серверные компоненты](#серверные-компоненты)
|
||||
- [Базовые понятия](#базовые-понятия)
|
||||
- [Клиентские компоненты](#клиентские-компоненты)
|
||||
- [Дополнительные утилиты](#дополнительные-утилиты)
|
||||
- [Общий процесс записи и чтения](#общий-процесс-записи-и-чтения)
|
||||
- [Особенности обработки запросов](#особенности-обработки-запросов)
|
||||
- [Схожесть с Ceph](#схожесть-с-ceph)
|
||||
@@ -23,8 +24,8 @@
|
||||
Один OSD управляет одним диском (или разделом). OSD общаются с etcd и друг с другом — от etcd они
|
||||
получают состояние кластера, а друг другу передают запросы записи и чтения вторичных копий данных.
|
||||
- **etcd** — кластерная key/value база данных, используется для хранения настроек и верхнеуровневого
|
||||
состояния кластера, а также предотвращения разделения сознания. Блоки данных в etcd не хранятся,
|
||||
в обработке клиентских запросов чтения и записи etcd не участвует.
|
||||
состояния кластера, а также предотвращения разделения сознания (splitbrain). Блоки данных в etcd не
|
||||
хранятся, в обработке клиентских запросов чтения и записи etcd не участвует.
|
||||
- **Монитор** — отдельный демон на node.js, рассчитывающий необходимые изменения в конфигурацию
|
||||
кластера, сохраняющий эту информацию в etcd и таким образом командующий OSD применить эти изменения.
|
||||
Также агрегирует статистику. Контактирует только с etcd, OSD с монитором не общаются.
|
||||
@@ -34,40 +35,56 @@
|
||||
- **Пул (Pool)** — контейнер для данных, имеющих одну и ту же схему избыточности и правила распределения по OSD.
|
||||
- **PG (Placement Group)** — "шард", единица деления пулов в кластере, которой назначается свой набор
|
||||
OSD для хранения данных (копий или частей объектов).
|
||||
- **Домен отказа (Failure Domain)** — группа OSD, одновременное падение которых рассматривается
|
||||
как вероятное. По умолчанию это "host" (сервер).
|
||||
- **Домен отказа (Failure Domain)** — группа OSD, от одновременного падения которых должен защищать
|
||||
Vitastor. По умолчанию домен отказа — "host" (сервер), но вы можете установить для пула как больший
|
||||
домен отказа (например, стойку серверов), так и меньший (например, отдельный диск).
|
||||
- **Дерево распределения** (Placement Tree, в Ceph CRUSH Tree) — иерархическая группировка OSD
|
||||
в узлы, которые далее можно использовать как домены отказа.
|
||||
|
||||
## Клиентские компоненты
|
||||
|
||||
- **Клиентская библиотека** — инкапсулирует логику на стороне клиента. Соединяются с etcd и со всеми OSD,
|
||||
от etcd получают состояние кластера, команды чтения и записи отправляют на все OSD напрямую.
|
||||
- **Клиентская библиотека** — инкапсулирует логику на стороне клиента. Соединяется с etcd и со всеми OSD,
|
||||
от etcd получает состояние кластера, команды чтения и записи отправляет на все OSD напрямую.
|
||||
В силу архитектуры все отдельные блоки данных (по умолчанию по 128 КБ) располагается на разных
|
||||
OSD, но клиент устроен так, что всегда точно знает, к какому OSD обращаться, и подключается
|
||||
к нему напрямую.
|
||||
|
||||
На базе клиентской библиотеки реализованы все остальные клиенты:
|
||||
|
||||
- **vitastor-cli** — утилита командной строки для управления кластером. В данный момент позволяет
|
||||
просматривать общее состояние кластера и управлять образами — т.е. создавать, менять и удалять
|
||||
виртуальные диски, их снимки и клоны.
|
||||
- **Драйвер QEMU** — подключаемый модуль QEMU, позволяющий QEMU/KVM виртуальным машинам работать
|
||||
с виртуальными дисками Vitastor напрямую из пространства пользователя с помощью клиентской
|
||||
библиотеки, без необходимости отображения дисков в виде блочных устройств. Тот же драйвер
|
||||
позволяет подключать диски в систему через [VDUSE](../usage/qemu.ru.md#vduse).
|
||||
- **vitastor-nbd** — утилита, позволяющая монтировать образы Vitastor в виде блочных устройств
|
||||
с помощью NBD (Network Block Device), на самом деле скорее работающего как "BUSE"
|
||||
(Block Device In Userspace). Модуля ядра Linux для выполнения той же задачи в Vitastor нет
|
||||
(по крайней мере, пока).
|
||||
- **CSI драйвер** — драйвер для подключения Vitastor-образов в виде персистентных томов (PV) Kubernetes.
|
||||
Работает через vitastor-nbd — образы отражаются в виде блочных устройств и монтируются
|
||||
в контейнеры.
|
||||
- **[vitastor-cli](../usage/cli.ru.md)** — утилита командной строки для управления кластером.
|
||||
Позволяет просматривать общее состояние кластера, управлять пулами и образами — то есть
|
||||
создавать, менять и удалять виртуальные диски, их снимки и клоны.
|
||||
- **[Драйвер QEMU](../usage/qemu.ru.md)** — подключаемый модуль QEMU, позволяющий QEMU/KVM
|
||||
виртуальным машинам работать с виртуальными дисками Vitastor напрямую из пространства пользователя
|
||||
с помощью клиентской библиотеки, без необходимости подключения дисков в виде блочных устройств
|
||||
Linux. Если, однако, вы хотите подключать диски в виде блочных устройств, то вы тоже можете
|
||||
сделать это с помощью того же самого драйвера и [VDUSE](../usage/qemu.ru.md#vduse).
|
||||
- **[vitastor-nbd](../usage/nbd.ru.md)** — утилита, позволяющая монтировать образы Vitastor
|
||||
в виде блочных устройств с помощью NBD (Network Block Device), на самом деле скорее работающего
|
||||
как "BUSE" (Block Device In Userspace). Модуля ядра Linux для выполнения той же задачи в
|
||||
Vitastor нет (по крайней мере, пока). NBD — более старый и нерекомендуемый способ подключения
|
||||
дисков — вам следует использовать VDUSE всегда, когда это возможно.
|
||||
- **[CSI драйвер](../installation/kubernetes.ru.md)** — драйвер для подключения Vitastor-образов
|
||||
и поддиректорий VitastorFS в виде персистентных томов (PV) Kubernetes. Блочный CSI работает через
|
||||
VDUSE (когда это возможно) или через NBD — образы отражаются в виде блочных устройств и монтируются
|
||||
в контейнеры. Файловый CSI использует **[vitastor-nfs](../usage/nfs.ru.md)**.
|
||||
- **Драйвера Proxmox, OpenStack и т.п.** — подключаемые модули для соответствующих систем,
|
||||
позволяющие использовать Vitastor как хранилище в оных.
|
||||
- **vitastor-nfs** — утилита, предоставляющая файловый доступ к образам в кластере Vitastor
|
||||
по протоколу NFS 3.0. Предназначена для гипервизоров, не основанных на QEMU и Linux, но при
|
||||
этом поддерживающих NFS.
|
||||
- **[vitastor-nfs](../usage/nfs.ru.md)** — NFS 3.0 сервер, предоставляющий два варианта файловой системы:
|
||||
первая — упрощённая для файлового доступа к блочным образам (для не-QEMU гипервизоров, поддерживающих NFS),
|
||||
вторая — VitastorFS, полноценная кластерная POSIX ФС. Оба варианта поддерживают параллельный
|
||||
доступ с нескольких vitastor-nfs серверов. На самом деле можно вообще не выделять
|
||||
отдельные NFS-серверы, а вместо этого использовать команду vitastor-nfs mount, запускающую
|
||||
NFS-сервер прямо на клиентской машине и монтирующую ФС локально.
|
||||
- **[Драйвер fio](../usage/fio.ru.md)** — подключаемый модуль для утилиты тестирования
|
||||
производительности дисков fio, позволяющий тестировать Vitastor-кластеры.
|
||||
- **vitastor-kv** — клиент для key-value базы данных, работающей поверх разделяемого блочного
|
||||
образа (обычного блочного образа vitastor). Метаданные VitastorFS хранятся именно в vitastor-kv.
|
||||
|
||||
## Дополнительные утилиты
|
||||
|
||||
- **vitastor-disk** — утилита для разметки дисков под Vitastor OSD. С её помощью можно
|
||||
создавать, удалять, менять размеры или перемещать разделы OSD.
|
||||
|
||||
## Общий процесс записи и чтения
|
||||
|
||||
@@ -98,16 +115,22 @@
|
||||
находиться на других OSD, если эти объекты деградированы или перемещены, или идёт процесс
|
||||
ребаланса. Запросы для проверки по сети не отправляются, информация о местоположении всех
|
||||
объектов рассчитывается первичным OSD при активации PG и хранится в памяти.
|
||||
- Первичный OSD соединяется (если ещё не соединён) с вторичными OSD, на которых располагаются
|
||||
части объекта, и отправляет им запросы чтения/записи, а также читает/пишет из/в своё локальное
|
||||
хранилище, если сам входит в набор.
|
||||
- Когда это возможно, первичный OSD обрабатывает запрос локально. Например, так происходит
|
||||
при чтениях объектов из пулов с репликацией или при чтении из EC пула, затрагивающего
|
||||
только часть, хранимую на диске самого первичного OSD.
|
||||
- Когда запрос требует записи или чтения с вторичных OSD, первичный OSD использует заранее
|
||||
установленные соединения с ними для выполнения этих запросов. Это происходит параллельно
|
||||
локальным операциям чтения/записи с диска самого OSD. Так как соединения к вторичным OSD PG
|
||||
устанавливаются при её запуске, то они уже гарантированно установлены, когда PG активна,
|
||||
и если любое из этих соединений отключается, PG перезапускается, а все текущие запросы чтения
|
||||
и записи в неё завершаются с ошибкой EPIPE, после чего повторяются клиентами.
|
||||
- После завершения всех вторичных операций чтения/записи первичный OSD отправляет ответ клиенту.
|
||||
|
||||
### Особенности обработки запросов
|
||||
|
||||
- Если в пуле используются коды коррекции ошибок и при этом часть OSD недоступна, первичный
|
||||
OSD при чтении восстанавливает данные из оставшихся частей.
|
||||
- Каждый объект имеет номер версии. При записи объекта первичный OSD сначала читает из номер
|
||||
- Каждый объект имеет номер версии. При записи объекта первичный OSD сначала получает номер
|
||||
версии объекта. Так как первичный OSD обычно сам хранит копию или часть объекта, номер
|
||||
версии обычно читается из памяти самого OSD. Однако, если ни одна часть обновляемого объекта
|
||||
не находится на первичном OSD, для получения номера версии он обращается к одному из вторичных
|
||||
@@ -115,20 +138,20 @@
|
||||
так как метаданные объектов, включая номер версии, все OSD хранят в памяти.
|
||||
- Если в пуле используются коды коррекции ошибок, перед частичной записью объекта для вычисления
|
||||
чётности зачастую требуется чтение частей объекта с вторичных OSD или с локального диска
|
||||
самого первичного OSD.
|
||||
- Также, если в пуле используются коды коррекции ошибок, для закрытия Write Hole применяется
|
||||
самого первичного OSD. Это называется процессом "чтение-модификация-запись" (read-modify-write).
|
||||
- Если в пуле используются коды коррекции ошибок, для закрытия Write Hole применяется
|
||||
двухфазный алгоритм записи: сначала на все вторичные OSD записывается новая версия частей
|
||||
объекта, но при этом старая версия не удаляется, а потом, после получения подтверждения
|
||||
успешной записи от всех вторичных OSD, новая версия фиксируется и разрешается удаление старой.
|
||||
- Если в кластере не включён режим immediate_commit, то запросы записи, отправляемые клиентами,
|
||||
- Если в пуле не включён режим immediate_commit, то запросы записи, отправляемые клиентами,
|
||||
не считаются зафиксированными на физических накопителях сразу. Для фиксации данных клиенты
|
||||
должны отдельно отправлять запросы SYNC (отдельный от чтения и записи вид запроса),
|
||||
а пока такой запрос не отправлен, считается, что записанные данные могут исчезнуть,
|
||||
если соответствующий OSD упадёт. Поэтому, когда режим immediate_commit отключён, все
|
||||
запросы записи клиенты копируют в памяти и при потере соединения и повторном соединении
|
||||
с OSD повторяют из памяти. Скопированные в память данные удаляются при успешном fsync,
|
||||
с OSD повторяют из памяти. Скопированные в память данные удаляются при успешном SYNC,
|
||||
а чтобы хранение этих данных не приводило к чрезмерному потреблению памяти, клиенты
|
||||
автоматически выполняют fsync каждые [client_dirty_limit](../config/network.ru.md#client_dirty_limit)
|
||||
автоматически выполняют SYNC каждые [client_dirty_limit](../config/network.ru.md#client_dirty_limit)
|
||||
записанных байт.
|
||||
|
||||
## Схожесть с Ceph
|
||||
@@ -205,5 +228,5 @@
|
||||
- Удаление образов в деградированном кластере может в данный момент приводить к повторному
|
||||
"появлению" удалённых объектов после поднятия отключённых OSD, причём в случае EC-пулов,
|
||||
объекты могут появиться в виде "неполных". Если вы столкнётесь с такой ситуацией, просто
|
||||
повторите запрос удаления. Исправление этой проблемы уже реализовано в ветке "epoch-deletions"
|
||||
и вскоре будет включено в релиз.
|
||||
повторите запрос удаления. Данная проблема будет исправлена в будущем вместе с обновлением
|
||||
дискового формата хранения метаданных.
|
||||
|
@@ -13,7 +13,7 @@
|
||||
## Server-side features
|
||||
|
||||
- Basic part: highly-available block storage with symmetric clustering and no SPOF
|
||||
- [Performance](../performance/comparison1.en.md) ;-D
|
||||
- [Performance](../performance/bench2.en.md) ;-D
|
||||
- [Multiple redundancy schemes](../config/pool.en.md#scheme): Replication, XOR n+1, Reed-Solomon erasure codes
|
||||
based on jerasure and ISA-L libraries with any number of data and parity drives in a group
|
||||
- Configuration via simple JSON data structures in etcd (parameters, pools and images)
|
||||
@@ -33,9 +33,17 @@
|
||||
- [Checksums](../config/layout-osd.en.md#data_csum_type)
|
||||
- [Client write-back cache](../config/client.en.md#client_enable_writeback)
|
||||
- [Intelligent recovery auto-tuning](../config/osd.en.md#recovery_tune_interval)
|
||||
- [Clustered file system](../usage/nfs.en.md#vitastorfs)
|
||||
- [Experimental internal etcd replacement - antietcd](../config/monitor.en.md#use_antietcd)
|
||||
- [Built-in Prometheus metric exporter](../config/monitor.en.md#enable_prometheus)
|
||||
- [NFS RDMA support](../usage/nfs.en.md#rdma) (probably also usable for GPUDirect)
|
||||
|
||||
## Plugins and tools
|
||||
|
||||
- [Proxmox storage plugin and packages](../installation/proxmox.en.md)
|
||||
- [OpenNebula storage plugin](../installation/opennebula.en.md)
|
||||
- [CSI plugin for Kubernetes](../installation/kubernetes.en.md)
|
||||
- [OpenStack support: Cinder driver, Nova and libvirt patches](../installation/openstack.en.md)
|
||||
- [Debian and CentOS packages](../installation/packages.en.md)
|
||||
- [Image management CLI (vitastor-cli)](../usage/cli.en.md)
|
||||
- [Disk management CLI (vitastor-disk)](../usage/disk.en.md)
|
||||
@@ -43,20 +51,15 @@
|
||||
- [Native QEMU driver](../usage/qemu.en.md)
|
||||
- [Loadable fio engine for benchmarks](../usage/fio.en.md)
|
||||
- [NBD proxy for kernel mounts](../usage/nbd.en.md)
|
||||
- [CSI plugin for Kubernetes](../installation/kubernetes.en.md)
|
||||
- [OpenStack support: Cinder driver, Nova and libvirt patches](../installation/openstack.en.md)
|
||||
- [Proxmox storage plugin and packages](../installation/proxmox.en.md)
|
||||
- [Simplified NFS proxy for file-based image access emulation (suitable for VMWare)](../usage/nfs.en.md)
|
||||
- [Simplified NFS proxy for file-based image access emulation (suitable for VMWare)](../usage/nfs.en.md#pseudo-fs)
|
||||
|
||||
## Roadmap
|
||||
|
||||
The following features are planned for the future:
|
||||
|
||||
- File system
|
||||
- Control plane optimisation
|
||||
- Other administrative tools
|
||||
- Web GUI
|
||||
- OpenNebula plugin
|
||||
- iSCSI and NVMeoF gateways
|
||||
- Multi-threaded client
|
||||
- Faster failover
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user