mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 01:16:31 -05:00
Compare commits
641 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
855a062b81 | ||
|
|
8350e7bb0f | ||
|
|
47e439ddff | ||
|
|
487305a760 | ||
|
|
4e8ed5cdbd | ||
|
|
83f3bee5d0 | ||
|
|
029c3940fe | ||
|
|
ccf095a6f8 | ||
|
|
5871fd4da3 | ||
|
|
4054832c7e | ||
|
|
7275872c80 | ||
|
|
e27d221793 | ||
|
|
819bb75eaa | ||
|
|
7878bc3d3d | ||
|
|
8a5b2adb75 | ||
|
|
a0d6bc288a | ||
|
|
20e081d5ac | ||
|
|
4a9871d087 | ||
|
|
25c86bc1e7 | ||
|
|
cc18ed39c6 | ||
|
|
f775075bc5 | ||
|
|
3b8c8c10e7 | ||
|
|
88c54f041e | ||
|
|
a39fb132f8 | ||
|
|
8fe9331f42 | ||
|
|
2a60279674 | ||
|
|
6ae014d6ed | ||
|
|
143813a90e | ||
|
|
9f24ca00d1 | ||
|
|
8589327114 | ||
|
|
93c39d5526 | ||
|
|
0d2f466b11 | ||
|
|
3d7a722ab2 | ||
|
|
969cb5ca31 | ||
|
|
97419fb67f | ||
|
|
94c7d3ef9a | ||
|
|
ec71f519b0 | ||
|
|
91761768a0 | ||
|
|
0ad0913ef2 | ||
|
|
dcb3c7db37 | ||
|
|
a7a85a259c | ||
|
|
68b94bfdf5 | ||
|
|
e42876e620 | ||
|
|
0b930b8a31 | ||
|
|
70947d4054 | ||
|
|
5b402fc462 | ||
|
|
edb3cacb77 | ||
|
|
31570ae473 | ||
|
|
426f6dc0bc | ||
|
|
eb75cef0fe | ||
|
|
66ae70481c | ||
|
|
baa833f13c | ||
|
|
2a2b876fef | ||
|
|
6f74455864 | ||
|
|
99a79b7049 | ||
|
|
28aae9d289 | ||
|
|
158865f10e | ||
|
|
aa8445e7a9 | ||
|
|
720073d80d | ||
|
|
316a9cf135 | ||
|
|
57e15416ae | ||
|
|
d210e95997 | ||
|
|
087781cee9 | ||
|
|
c2be8536bf | ||
|
|
8f0bc80774 | ||
|
|
bff4bb237b | ||
|
|
7decc78c97 | ||
|
|
11b17d7d04 | ||
|
|
cd8b331a30 | ||
|
|
e7135d101b | ||
|
|
d5e18adb95 | ||
|
|
0138b48023 | ||
|
|
6b8d3e23a0 | ||
|
|
f80e93e9d3 | ||
|
|
b023939c6b | ||
|
|
0440d74fb5 | ||
|
|
a6a1cec115 | ||
|
|
1aa6d2b787 | ||
|
|
fbc2107735 | ||
|
|
b070cbb894 | ||
|
|
608e78f3a6 | ||
|
|
5b0a8e0c8e | ||
|
|
46dbfa9b08 | ||
|
|
7662b80023 | ||
|
|
ce7d29f178 | ||
|
|
13267085d1 | ||
|
|
099f3c7429 | ||
|
|
a92b19d9c2 | ||
|
|
69967b1262 | ||
|
|
190efbefb2 | ||
|
|
3c155e925d | ||
|
|
5f68fda7ae | ||
|
|
bcc06e10c6 | ||
|
|
149b408c38 | ||
|
|
bcfd2734b6 | ||
|
|
fba3f74538 | ||
|
|
222136f1e7 | ||
|
|
1a5b28ad38 | ||
|
|
e481b5f207 | ||
|
|
5b615a0e02 | ||
|
|
819b843163 | ||
|
|
c6951393e8 | ||
|
|
c2d46f4039 | ||
|
|
89b1f47c33 | ||
|
|
2852b09d47 | ||
|
|
8e66b42ceb | ||
|
|
929ba5cebe | ||
|
|
2a4335ef7d | ||
|
|
601064dde7 | ||
|
|
ecb12ee92c | ||
|
|
d0194c3aff | ||
|
|
0771f91a53 | ||
|
|
3f3e7d4483 | ||
|
|
bdc2da9a94 | ||
|
|
7361c104a5 | ||
|
|
73d7394519 | ||
|
|
65e2d93426 | ||
|
|
ce699dd9f8 | ||
|
|
d92d296bcd | ||
|
|
209b902301 | ||
|
|
4320f0d6b6 | ||
|
|
5d9b1aee00 | ||
|
|
bfe5ee7643 | ||
|
|
de00981504 | ||
|
|
8b9858ffdc | ||
|
|
215aed17e7 | ||
|
|
78abc2c7b7 | ||
|
|
918a6a192b | ||
|
|
8a687d5f54 | ||
|
|
7bc302678e | ||
|
|
c1bcd6a24f | ||
|
|
9f48c87dd4 | ||
|
|
d7e06271d9 | ||
|
|
3bddc127f0 | ||
|
|
08863cd740 | ||
|
|
f902527a56 | ||
|
|
33340f1ede | ||
|
|
2f47d407ba | ||
|
|
15048ff14f | ||
|
|
787fc020e6 | ||
|
|
badff9d548 | ||
|
|
902c19b668 | ||
|
|
b64c28b537 | ||
|
|
6b5b0098c7 | ||
|
|
31f44958a3 | ||
|
|
1073c97e0a | ||
|
|
03545f1685 | ||
|
|
d8ea998eb2 | ||
|
|
b762ab9e73 | ||
|
|
1b0fa3eb46 | ||
|
|
2952ce4341 | ||
|
|
71f0735ef7 | ||
|
|
e103590f21 | ||
|
|
17b24c8d21 | ||
|
|
b14f703d2b | ||
|
|
bc564e7465 | ||
|
|
2b784748e3 | ||
|
|
4a616558ec | ||
|
|
62ae6c3552 | ||
|
|
873a5561e4 | ||
|
|
eae9402223 | ||
|
|
b9703737fa | ||
|
|
b718b25b0f | ||
|
|
0e94163371 | ||
|
|
9c985612ea | ||
|
|
b379e514fb | ||
|
|
7ba5f63d2d | ||
|
|
fe2a07fc78 | ||
|
|
76dd3d28ea | ||
|
|
34ac9a08e0 | ||
|
|
78337d7b70 | ||
|
|
9db5dc5ed1 | ||
|
|
e8726ce95a | ||
|
|
6971bd58c9 | ||
|
|
d6b0786eca | ||
|
|
5beb465d42 | ||
|
|
19a5bd781f | ||
|
|
5827c967a3 | ||
|
|
1c9e5df479 | ||
|
|
db94550cd7 | ||
|
|
12c41ff1d1 | ||
|
|
b113accaad | ||
|
|
c9fbc058ef | ||
|
|
918d849739 | ||
|
|
f4be0b54d0 | ||
|
|
6dd1f6c27a | ||
|
|
c09b850047 | ||
|
|
b82ee5ff56 | ||
|
|
31710bc1f3 | ||
|
|
5e4cca1fe3 | ||
|
|
74647cda14 | ||
|
|
595461f725 | ||
|
|
305d1bce36 | ||
|
|
9ec2457147 | ||
|
|
9226f87ad1 | ||
|
|
f9819266e7 | ||
|
|
ea955eedc7 | ||
|
|
2fd94baa05 | ||
|
|
a0c7d69067 | ||
|
|
be3957f939 | ||
|
|
8ed0224e41 | ||
|
|
b5a8ef7c33 | ||
|
|
11fee73ec4 | ||
|
|
5381d0a1ee | ||
|
|
bb0e1bb006 | ||
|
|
e9621ead4c | ||
|
|
d96eecfd60 | ||
|
|
719bc5a3d5 | ||
|
|
930f0dbbcb | ||
|
|
93a64a3710 | ||
|
|
0b64fb2eae | ||
|
|
8f27c393d6 | ||
|
|
27329c6f8c | ||
|
|
fc9fde000f | ||
|
|
ec1daddc8e | ||
|
|
0ce89aa35d | ||
|
|
44575b21b1 | ||
|
|
b383cbc4ba | ||
|
|
05e29ae701 | ||
|
|
8142ec08a0 | ||
|
|
dfe0bf19e3 | ||
|
|
586b0a3fd5 | ||
|
|
a6ffe53202 | ||
|
|
79308a2041 | ||
|
|
b991d5e6c8 | ||
|
|
6cd217ec2b | ||
|
|
40569fff2f | ||
|
|
f3caf1dbf1 | ||
|
|
da58c1a997 | ||
|
|
ee47fdf723 | ||
|
|
5acd43c9e5 | ||
|
|
e39c21a4c5 | ||
|
|
82089165b5 | ||
|
|
b9d0dcd173 | ||
|
|
472c85a4fb | ||
|
|
327c0e7aac | ||
|
|
e5d5c512b8 | ||
|
|
6613eb5776 | ||
|
|
90fa3792ef | ||
|
|
136f648cb5 | ||
|
|
80b58e66d5 | ||
|
|
2774a6488f | ||
|
|
f8319361a3 | ||
|
|
f6d07dfa10 | ||
|
|
82be7b07b3 | ||
|
|
395291bd9a | ||
|
|
cea7ce7f0a | ||
|
|
793782fa2d | ||
|
|
3288c8cc8c | ||
|
|
ef5c5471dc | ||
|
|
8d63a85b76 | ||
|
|
85d50456d7 | ||
|
|
49f53a2732 | ||
|
|
457c5b7ec2 | ||
|
|
3571052504 | ||
|
|
0277da9178 | ||
|
|
e0c0ea3dcc | ||
|
|
69a1ed1125 | ||
|
|
e0e3618240 | ||
|
|
c7ab4e9db9 | ||
|
|
c5f6d3c574 | ||
|
|
f2bb36120c | ||
|
|
b5cc5eb007 | ||
|
|
39e810564f | ||
|
|
67638a6638 | ||
|
|
75b0c834e6 | ||
|
|
7930ff82df | ||
|
|
237c9f0497 | ||
|
|
31718bdc4f | ||
|
|
e1574faa36 | ||
|
|
4aef405259 | ||
|
|
95ac8d7b51 | ||
|
|
e58eb16768 | ||
|
|
0410fbc399 | ||
|
|
31661e13bd | ||
|
|
33d96adbce | ||
|
|
65e1eac061 | ||
|
|
fa81c20ee6 | ||
|
|
fcb6a5ca91 | ||
|
|
2a73074faa | ||
|
|
35abfd81e1 | ||
|
|
c7b8068e36 | ||
|
|
527bd69129 | ||
|
|
dee434f09b | ||
|
|
0c80cd7dea | ||
|
|
4fdfc8a923 | ||
|
|
69a459ee43 | ||
|
|
f9b31db1a7 | ||
|
|
76e8ae2498 | ||
|
|
f75827281f | ||
|
|
d4dc5a7339 | ||
|
|
9e5f51fa5b | ||
|
|
35977dadc9 | ||
|
|
3bd3eff451 | ||
|
|
7b2007e503 | ||
|
|
932b5e567e | ||
|
|
6a69a09cc7 | ||
|
|
de809dda5e | ||
|
|
a4a8e817b4 | ||
|
|
21ca93f8c1 | ||
|
|
64271ac429 | ||
|
|
8396d3aaa1 | ||
|
|
f25fbd0c1b | ||
|
|
26956bfa71 | ||
|
|
1123b3eca0 | ||
|
|
78e87549ca | ||
|
|
0416366e2d | ||
|
|
4f286a2faa | ||
|
|
30f78a4190 | ||
|
|
6583897fcf | ||
|
|
0e2d31d9db | ||
|
|
ebb199de3d | ||
|
|
abcdd688dd | ||
|
|
31fc380609 | ||
|
|
b60979f293 | ||
|
|
9bd2f68046 | ||
|
|
3759c9356b | ||
|
|
76ed8d643a | ||
|
|
697ab3056e | ||
|
|
f85c014c1c | ||
|
|
c192fe8982 | ||
|
|
fd65dbd9ea | ||
|
|
7250521e66 | ||
|
|
e43bdda22b | ||
|
|
46a09a380a | ||
|
|
5ed6a29db2 | ||
|
|
b9974b7873 | ||
|
|
306f847689 | ||
|
|
eba07d2173 | ||
|
|
453fb20d83 | ||
|
|
88442cb10c | ||
|
|
c1a78092c4 | ||
|
|
03d82a71f4 | ||
|
|
df4667ffd5 | ||
|
|
0ebe2e1e5e | ||
|
|
3f4d7e15fa | ||
|
|
048d0c14b1 | ||
|
|
4d97df38ce | ||
|
|
d3e67b2fdf | ||
|
|
e74b03a062 | ||
|
|
46ebce4e3c | ||
|
|
d4184b9aee | ||
|
|
ae703ce68c | ||
|
|
9d842b0dfb | ||
|
|
0c030c024e | ||
|
|
63c81dedf3 | ||
|
|
a745a05d4e | ||
|
|
c410b11162 | ||
|
|
335f2619fd | ||
|
|
8c456ee354 | ||
|
|
3ff07a8297 | ||
|
|
de7c06a01b | ||
|
|
ed7f9aa9f9 | ||
|
|
ddc445ee18 | ||
|
|
5c24968e6d | ||
|
|
e5ca862a37 | ||
|
|
ecb26a6aee | ||
|
|
4c51acaf29 | ||
|
|
6fa2c44caf | ||
|
|
77fa2bdfca | ||
|
|
7d434954e8 | ||
|
|
ac1797be96 | ||
|
|
4d61b726be | ||
|
|
5b0e1bcd6b | ||
|
|
7f6ef3b4cd | ||
|
|
71ffb94019 | ||
|
|
93eadd73f0 | ||
|
|
48d97dae31 | ||
|
|
11bf37d61b | ||
|
|
5d2f3c7b16 | ||
|
|
7e2a8eab7d | ||
|
|
17591ad932 | ||
|
|
b5d507fbe9 | ||
|
|
f855bf4d82 | ||
|
|
15831064a1 | ||
|
|
6d4c4925f4 | ||
|
|
dd04cbde7c | ||
|
|
cc91392803 | ||
|
|
b4634578ba | ||
|
|
a89b6f3126 | ||
|
|
24a8464fc0 | ||
|
|
fdce9738e8 | ||
|
|
b3dc7e55c1 | ||
|
|
576873f0f9 | ||
|
|
3c88559379 | ||
|
|
7ab8aa69c4 | ||
|
|
3c1a8c3e7f | ||
|
|
1e7c9d9226 | ||
|
|
9acce63c79 | ||
|
|
4402be51a0 | ||
|
|
3b79e21c2f | ||
|
|
d5d999f11d | ||
|
|
3dfab5232c | ||
|
|
036b099eae | ||
|
|
65e6564e13 | ||
|
|
b959f0056e | ||
|
|
4423c8c895 | ||
|
|
ef6fa54ee2 | ||
|
|
fa0a77f84c | ||
|
|
e5246cc309 | ||
|
|
d592cccffb | ||
|
|
d4ae953137 | ||
|
|
9ef9155ccf | ||
|
|
db34e93936 | ||
|
|
e241b9b43d | ||
|
|
b8ffdbd1f7 | ||
|
|
175649e236 | ||
|
|
55f0644004 | ||
|
|
608393867a | ||
|
|
3185e1bf34 | ||
|
|
bd856b456b | ||
|
|
9c6e3952c5 | ||
|
|
4ec28b4b58 | ||
|
|
87977f28f4 | ||
|
|
c1fa9e23b6 | ||
|
|
fd09e72816 | ||
|
|
f48e406d52 | ||
|
|
f9626f6e3e | ||
|
|
a8ffcec127 | ||
|
|
caeb3a9d1b | ||
|
|
091e44afed | ||
|
|
712b54ec98 | ||
|
|
8707c588a0 | ||
|
|
3c1772d478 | ||
|
|
e946af060e | ||
|
|
59f3086841 | ||
|
|
05778a9a46 | ||
|
|
9c93cbfcaa | ||
|
|
8c9a91c93b | ||
|
|
35b4d4b2ed | ||
|
|
fa8913a759 | ||
|
|
cdd8798227 | ||
|
|
180f7edc2f | ||
|
|
39e55d3002 | ||
|
|
30417d57a5 | ||
|
|
daf713820e | ||
|
|
2bf74bc66f | ||
|
|
f453a72369 | ||
|
|
349c18a0a8 | ||
|
|
1015e2a6c5 | ||
|
|
9255157519 | ||
|
|
5be2d16904 | ||
|
|
6c8bee76fa | ||
|
|
7eaec5ca70 | ||
|
|
f09091a4e4 | ||
|
|
45833e9f1f | ||
|
|
039b5c2c28 | ||
|
|
3d23853de7 | ||
|
|
7b7a2d5d00 | ||
|
|
3f0c194a2f | ||
|
|
661e539f45 | ||
|
|
bb1a08e950 | ||
|
|
cd4e06a215 | ||
|
|
170759e83c | ||
|
|
6b3b60bf87 | ||
|
|
03831386f0 | ||
|
|
1c3f695d5a | ||
|
|
4defb748e8 | ||
|
|
e44fb81da2 | ||
|
|
c66ea18715 | ||
|
|
eebb3943e5 | ||
|
|
b4a694bb10 | ||
|
|
3e4f79180e | ||
|
|
dac999e693 | ||
|
|
74a62a8d82 | ||
|
|
5434a900ce | ||
|
|
86a9064a68 | ||
|
|
84297fc6dc | ||
|
|
19173754ec | ||
|
|
c4d509438f | ||
|
|
f818d9426b | ||
|
|
413e46251e | ||
|
|
97b13557fe | ||
|
|
3a3152a36f | ||
|
|
2b71f5727e | ||
|
|
6491de0eaa | ||
|
|
f518a1ba18 | ||
|
|
8562e4f28e | ||
|
|
c4511e28bc | ||
|
|
f3c3265116 | ||
|
|
acdf29ac09 | ||
|
|
6c85573d12 | ||
|
|
f67bf49c91 | ||
|
|
b3fdc8d6a5 | ||
|
|
6b46e08a1f | ||
|
|
0ca7c65049 | ||
|
|
3878c0e2e6 | ||
|
|
76124cff00 | ||
|
|
05884d7aa0 | ||
|
|
02413b756c | ||
|
|
c79f82bc99 | ||
|
|
47b321d97c | ||
|
|
1b1ae7cce9 | ||
|
|
e191127b0d | ||
|
|
7afed76f06 | ||
|
|
9a2ea26a62 | ||
|
|
4ebdfe8c8f | ||
|
|
821756371c | ||
|
|
9621655a10 | ||
|
|
a7a8ac48c3 | ||
|
|
0051c58231 | ||
|
|
7aff21e3a9 | ||
|
|
6ed860eac3 | ||
|
|
b668bcb96b | ||
|
|
d49a45c43f | ||
|
|
2bf0fcf97c | ||
|
|
4da1ab072b | ||
|
|
07f7247fce | ||
|
|
a470109321 | ||
|
|
180278fbb4 | ||
|
|
19297d6c3d | ||
|
|
ad6ddafd05 | ||
|
|
ebe2bbe76c | ||
|
|
1b2f619852 | ||
|
|
3a8c5917fd | ||
|
|
ff0a4a444a | ||
|
|
f17b502652 | ||
|
|
bbcdb72a9f | ||
|
|
8de159289a | ||
|
|
760e0660c8 | ||
|
|
effc3be9c2 | ||
|
|
d6b51d61e7 | ||
|
|
f627f3be80 | ||
|
|
e51a29927a | ||
|
|
5edf0b2c03 | ||
|
|
4bbfdc43d9 | ||
|
|
dcb7327f15 | ||
|
|
056a037761 | ||
|
|
aa53e9f4b7 | ||
|
|
8fb52b974b | ||
|
|
afc643d923 | ||
|
|
3484965b89 | ||
|
|
452adbd8d9 | ||
|
|
579a939b9b | ||
|
|
06f4aa027f | ||
|
|
133e527643 | ||
|
|
3c3d20601b | ||
|
|
00b4cbafd0 | ||
|
|
49d5e685c9 | ||
|
|
8ab9d88a90 | ||
|
|
de61039072 | ||
|
|
2848c25a6d | ||
|
|
4a5422b81d | ||
|
|
95f30fe3ae | ||
|
|
44bce00aef | ||
|
|
818bb61e3b | ||
|
|
52f7c2184f | ||
|
|
d6d1d6d3cd | ||
|
|
d7c6a27c6d | ||
|
|
34103b65ec | ||
|
|
bb401e2e3f | ||
|
|
8e2b9c03b5 | ||
|
|
1a3099d7f5 | ||
|
|
1929b0b6b0 | ||
|
|
255a54a10a | ||
|
|
2db72e0e7e | ||
|
|
b94f7a952c | ||
|
|
fd2dc7810f | ||
|
|
2dbb25acbd | ||
|
|
e43964523f | ||
|
|
22495abe9e | ||
|
|
807f2f6690 | ||
|
|
9e1652673d | ||
|
|
bc686928ec | ||
|
|
f40b2decdb | ||
|
|
bbd3c23cd2 | ||
|
|
76998613da | ||
|
|
7a7dacc6db | ||
|
|
5795b9706e | ||
|
|
1e63403bf2 | ||
|
|
6cb3d86f66 | ||
|
|
810851da37 | ||
|
|
f8abcd666f | ||
|
|
dd8e3bfcb0 | ||
|
|
04df1f7b26 | ||
|
|
f1bc02f52a | ||
|
|
abfa6fde28 | ||
|
|
108915254e | ||
|
|
44d23c16ff | ||
|
|
c08a571d88 | ||
|
|
557dcda9cd | ||
|
|
1b8bf8dfd0 | ||
|
|
599a4fbb42 | ||
|
|
d67cdd8b9d | ||
|
|
d773f21c1e | ||
|
|
58fece3584 | ||
|
|
185df4bd2e | ||
|
|
2c6b7badb7 | ||
|
|
6a4d2dfd6d | ||
|
|
493e0118f3 | ||
|
|
9005af10ad | ||
|
|
eae20ea043 | ||
|
|
0df28e936f | ||
|
|
87313c2bfd | ||
|
|
2c92381686 | ||
|
|
d3ce39c8bd | ||
|
|
9b8e4a8845 | ||
|
|
e381e74ee6 | ||
|
|
99530c9946 | ||
|
|
639167efba | ||
|
|
6bebf4dd09 | ||
|
|
5c1cf8560a | ||
|
|
ab72f1cfc8 | ||
|
|
38f78154f9 | ||
|
|
c5b3fdc615 | ||
|
|
8bb22f2f7c | ||
|
|
d5fb4279e3 | ||
|
|
60316a5eda | ||
|
|
033ce93d5b | ||
|
|
ec9ddb474a | ||
|
|
16b08201a4 | ||
|
|
4a37e3fece | ||
|
|
d9c5e0c9b2 | ||
|
|
e82755197f | ||
|
|
c724b47189 | ||
|
|
8a727975ab | ||
|
|
fb051e02c7 | ||
|
|
76ce1cbb16 | ||
|
|
2e71602267 | ||
|
|
275063d23c | ||
|
|
54602422dd | ||
|
|
d735eb7736 | ||
|
|
03a8c76106 | ||
|
|
1227a8c45e | ||
|
|
03a8927571 | ||
|
|
25e8436534 | ||
|
|
bba98c3e63 | ||
|
|
2fc38017a8 | ||
|
|
fcf85b4b7c | ||
|
|
c88f7697b3 | ||
|
|
d0fb6d2ac3 | ||
|
|
cf515b82b2 | ||
|
|
4016f0974a | ||
|
|
6e2e11d9b1 | ||
|
|
3f70a21efe | ||
|
|
a73e970b50 | ||
|
|
ea37d5a38b | ||
|
|
af0b3c8451 | ||
|
|
b7dcf8659e | ||
|
|
71684faded | ||
|
|
3f280486bd |
205 changed files with 120577 additions and 24811 deletions
85
.github/workflows/build.yml
vendored
85
.github/workflows/build.yml
vendored
|
|
@ -16,16 +16,55 @@ jobs:
|
|||
- run: brew install automake
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
- run: cd raid/test && make all test
|
||||
- run: make all -j$(sysctl -n hw.ncpu)
|
||||
- run: make dist check
|
||||
build-linux:
|
||||
runs-on: ubuntu-26.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
linux-main-modules-zfs-$(uname -r) \
|
||||
zfsutils-linux
|
||||
sudo modprobe zfs
|
||||
sudo zfs version
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all -j$(nproc)
|
||||
- run: make snapcheck_btrfs
|
||||
- run: make snapcheck_zfs
|
||||
- run: make distcheck -j$(nproc)
|
||||
build-arm32:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
libc6-dev-armhf-cross \
|
||||
qemu-user
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
- run: |
|
||||
CC=arm-linux-gnueabihf-gcc \
|
||||
CFLAGS="-O2 -march=armv7-a -mfpu=neon -mfloat-abi=hard" \
|
||||
TARGET_RUNNER="qemu-arm -cpu cortex-a15 -L /usr/arm-linux-gnueabihf" \
|
||||
./configure \
|
||||
--build="$(./config.guess)" \
|
||||
--host=arm-linux-gnueabihf \
|
||||
--enable-warning-as-error
|
||||
- run: make all -j$(nproc)
|
||||
- run: |
|
||||
file snapraid
|
||||
arm-linux-gnueabihf-readelf -h snapraid
|
||||
- run: |
|
||||
qemu-arm \
|
||||
-cpu cortex-a15 \
|
||||
-L /usr/arm-linux-gnueabihf \
|
||||
./snapraid -V
|
||||
- run: make check SHORTCHECK=1
|
||||
build-win:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
|
|
@ -40,6 +79,36 @@ jobs:
|
|||
install: mingw-w64-x86_64-gcc autoconf automake make
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
|
||||
- run: make all -j$(nproc)
|
||||
- run: make snapcheck_ntfs
|
||||
- run: make dist check
|
||||
build-freebsd:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: vmactions/freebsd-vm@v1
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y autoconf automake
|
||||
run: |
|
||||
autoreconf -i
|
||||
./configure --enable-warning-as-error
|
||||
make all -j$(sysctl -n hw.ncpu)
|
||||
make dist check
|
||||
build-musl:
|
||||
runs-on: ubuntu-latest
|
||||
container: alpine:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
git \
|
||||
linux-headers
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all -j$(nproc)
|
||||
- run: make dist check
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -36,6 +36,8 @@ install-sh
|
|||
missing
|
||||
stamp-h1
|
||||
.dirstamp
|
||||
linux/
|
||||
windows/
|
||||
|
||||
# objects
|
||||
snapraid
|
||||
|
|
|
|||
148
AGENTS.md
Normal file
148
AGENTS.md
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
# SnapRAID Development Guide
|
||||
|
||||
This document provides guidance for agentic coding agents working on the SnapRAID codebase.
|
||||
|
||||
## Project Structure
|
||||
|
||||
### Core Source Files (`cmdline/`)
|
||||
|
||||
The CLI is organized into focused C modules:
|
||||
|
||||
| Modules | Purpose |
|
||||
|---|---|
|
||||
| `main.c`, `snapraid.h` / `snapraid.c` | Program entry points, option parsing, and CLI command dispatch |
|
||||
| `state.h` / `state.c` | Global state (`snapraid_state`), config file parsing, and content file read/write |
|
||||
| `elem.h` / `elem.c` | Core data model (files, links, dirs, disks, parity, filters) and filter logic |
|
||||
| `scan.c`, `import.h` / `import.c` | Multi-threaded directory scanner and file-move hash importer |
|
||||
| `search.h` / `search.c`, `locate.h` / `locate.c` | Path pattern matching and file lookup / path location commands |
|
||||
| `io.h` / `io.c` | Parallel read-ahead and write-behind I/O queue management |
|
||||
| `parity.h` / `parity.c` | Parity file operations supporting split parity files |
|
||||
| `handle.h` / `handle.c` | File handles abstraction for data disk I/O with POSIX fadvise settings |
|
||||
| `bw.h` / `bw.c` | Bandwidth token-bucket rate limiter |
|
||||
| `stream.h` / `stream.c` | Buffered stream abstraction with CRC32 integrity checks |
|
||||
| `sync.c`, `scrub.c`, `check.c`, `status.c` | CLI commands for core operations (synchronize, integrity scrub, check, health status) |
|
||||
| `pool.c`, `dup.c`, `list.c`, `touch.c`, `rehash.c` | CLI commands for pooling layouts, finding duplicates, listing files, updating tracking/hashes |
|
||||
| `device.c`, `dry.c` | Disk device geometry/UUID querying, and dry-run execution simulation |
|
||||
| `murmur3.c`, `spooky2.c`, `museair.c` (and tests) | Non-cryptographic hash implementations (MurmurHash3, SpookyHash, MuseAir) and tests |
|
||||
| `support.h` / `support.c`, `app.h` | Locks, logging, thread wrappers, global constants |
|
||||
| `str.h` / `str.c` | Path/string utilities |
|
||||
| `memory.h` / `memory.c` | Safe memory allocation and tracking helpers |
|
||||
| `util.h` / `util.c` | Low-level utilities (CRC32 calculations, numeric formatting, hash helpers) |
|
||||
| `unixapp.c`, `mingwapp.c` | Platform-specific implementations of system info, process management, and services |
|
||||
| `thermal.h` / `thermal.c` | Temperature monitoring to prevent hardware overheating |
|
||||
| `selftest.c`, `speed.c` | Self-test command (`test`) and CPU RAID parity performance benchmark (`-T`) |
|
||||
| `mktest.c`, `mkstream.c` | Standalone test utility tools for recovery and stream validation |
|
||||
|
||||
### OS Abstraction Files (`os/`)
|
||||
|
||||
The platform abstraction layer is separated into `os/`. Note that `os/` acts as a library layer, so having unused functions (e.g., platform helper functions not currently invoked by the main CLI application) is expected.
|
||||
|
||||
| Module | Purpose |
|
||||
|--------|---------|
|
||||
| `os.h` | Core OS-independent interface declarations (syslog, signals, execution, threads, mutexes) |
|
||||
| `portable.h` | Platform detection macros and compatibility definitions |
|
||||
| `unix.c/h` | UNIX implementation of OS abstraction layer (fork, exec, signals, thread primitives) |
|
||||
| `mingw.c/h` | Windows implementation of OS abstraction layer (process creation, registry, thread primitives) |
|
||||
|
||||
### Key Data Structures
|
||||
|
||||
| Struct | Defined in | Description |
|
||||
|---|---|---|
|
||||
| `snapraid_state` | `state.h` | Global program state: all disks, parity levels, filter list, options, hash kind, progress |
|
||||
| `snapraid_option` | `state.h` | Runtime options (force flags, sort order, IO advise mode, bandwidth limit, etc.) |
|
||||
| `snapraid_disk` | `elem.h` | One data disk: name, mount dir, device id, UUID, file/link/dir hash tables and lists, parity extent tree |
|
||||
| `snapraid_file` | `elem.h` | A tracked file: sub-path, size, mtime, inode, block vector |
|
||||
| `snapraid_block` | `elem.h` | One parity block: state (`BLK/CHG/REP/DELETED/EMPTY`) + hash |
|
||||
| `snapraid_extent` | `elem.h` | Contiguous run of file blocks mapped to contiguous parity positions |
|
||||
| `snapraid_filter` | `elem.h` | One include/exclude rule: pattern, root scope, `is_disk`, `is_abs`, `is_dir`, direction |
|
||||
| `snapraid_parity` | `elem.h` | One parity level: up to `SPLIT_MAX=8` split files, total/free blocks |
|
||||
| `snapraid_io` | `io.h` | Parallel I/O controller: buffer pool, worker threads for each disk |
|
||||
| `snapraid_worker` | `io.h` | One I/O thread: reads or writes one disk at a time using a task ring buffer |
|
||||
|
||||
### Block States
|
||||
|
||||
| Constant | Value | Meaning |
|
||||
|---|---|---|
|
||||
| `BLOCK_STATE_EMPTY` | 0 | No file mapped here; parity position is zero-filled |
|
||||
| `BLOCK_STATE_BLK` | 1 | File block with valid hash and up-to-date parity |
|
||||
| `BLOCK_STATE_CHG` | 2 | File block changed; hash may be old (pre-sync); parity not yet updated |
|
||||
| `BLOCK_STATE_REP` | 3 | File block hashed (from copy heuristic); parity not yet updated |
|
||||
| `BLOCK_STATE_DELETED` | 4 | File deleted; block retains old hash for parity recovery; parity not yet zeroed |
|
||||
| `BLOCK_STATE_REBUILD` | 5 | File block with valid hash; parity untrusted, rebuild in place without reallocation |
|
||||
|
||||
### Crash-Recovery Invariants
|
||||
|
||||
SnapRAID is designed to recover from an interruption, including `SIGKILL`, at any point. It achieves this by reading recovery data from multiple snapshots, checking file metadata when reading, and validating data with hashes. Account for this design before treating a non-atomic transition or mixed snapshot lifecycle as an integrity defect.
|
||||
|
||||
### Build System
|
||||
|
||||
- `configure.ac`: Autoconf script (detects systemd vs BSD init)
|
||||
- `Makefile.am`: Source file lists, dependencies, install hooks (including rules for generating documentation)
|
||||
- `uncrustify.cfg`: Code formatting rules for main application source files
|
||||
- `linux.cfg`: Code formatting rules for `raid/` directory and its subdirectories
|
||||
- Run `make doc` to regenerate all manual pages (`*.1`) and text manuals (`*.txt`)
|
||||
- Always use parallel compilation with `make -j$(nproc)` instead of plain `make`
|
||||
- Create temporary files and directories under `/tmp/snapraid/`.
|
||||
- Both Linux and Windows builds are out-of-tree in dedicated subdirectories (`linux/` and `windows/`) in the project directory, keeping the root directory clean:
|
||||
- Linux build:
|
||||
`mkdir -p linux && (cd linux && ../configure && make -j$(nproc))`
|
||||
Subsequent Linux rebuilds: `(cd linux && make -j$(nproc))`
|
||||
- Windows x64 cross-compilation:
|
||||
`mkdir -p windows && (cd windows && ../configure.windows-x64 && make -j$(nproc))`
|
||||
Subsequent Windows rebuilds: `(cd windows && make -j$(nproc))`
|
||||
- The Windows build needs to be tested only when modifying Windows-specific code (e.g., `os/mingw.*`, `cmdline/mingwapp.c`, or Windows-specific `#ifdef` paths)
|
||||
|
||||
## Code Style Guidelines
|
||||
|
||||
#### Design Simplicity
|
||||
|
||||
- **Simplicity First**: Always prefer the simplest and cleanest implementation that fully satisfies the demonstrated requirements. Do not introduce extra state, abstractions, conditions, or defensive handling unless a concrete requirement or verified failure mode needs them. When replacing existing logic, preserve its narrow established semantics instead of broadening it through inferred state from unrelated subsystems.
|
||||
- **Smallest Necessary Change** Harmless existing behavior or artifacts do not justify refactoring. Always make the smallest change necessary to satisfy the requirement.
|
||||
|
||||
#### Code Style
|
||||
|
||||
- **Language**: The codebase uses **C99 standard** (not C11/C++)
|
||||
- **Format**: Enforce via `uncrustify -c uncrustify.cfg --no-backup *.c *.h` (or `uncrustify -c linux.cfg --no-backup *.c *.h` for `raid/` directory and subdirectories)
|
||||
- **Naming**: Snake_case for functions, UPPER_CASE for macros/constants
|
||||
- **Indentation**: Tabs for indentation, no alignment (existing codebase style)
|
||||
- **Comments**: Use `/** ... */` for multiline top comments preceding declarations and `/* ... */` for multiline comments within code. Use `/* first letter lowercase */` for single-line inline notes.
|
||||
- **Critical Comments**: Always add a comment at non-obvious critical points, especially around data-integrity invariants, crash recovery, fallback behavior, concurrency, and fatal versus best-effort error handling. Explain why the logic is required, not merely what the code does.
|
||||
- **Headers**: All `.h` files have include guards (`#ifndef NAME_H`)
|
||||
- **Preferences**: Use 0 instead of NULL and '\0'
|
||||
- **Preferences**: Use prefix ++variable and --variable instead of postfix variable++ and variable-- where both are equivalent
|
||||
- **Safety Checks**: Avoid adding safety checks for conditions that never happen
|
||||
- **Type Casts**: Avoid type casts unless strictly necessary for compilation with -Werror and unavoidable by other mean
|
||||
- **Stack Over Heap**: Prefer stack-allocated fixed-size buffers over dynamic memory allocation (`malloc`/`free`) whenever the upper bound is small, fixed, and known at compile time.
|
||||
- **Commit Messages**: Every time a change is done, a single line commit description should be provided for that change
|
||||
- **Git Commits**: Never commit changes to git.
|
||||
|
||||
#### Error Handling & Memory Management
|
||||
|
||||
- **Return codes**: `0` means no-error; `< 0` means error; positive for specific results
|
||||
- **Logging**: Use `log_fatal()`, `log_tag()`, `msg_info()`, `msg_progress()`, `msg_verbose()` from `support.h`
|
||||
- **Tag Escaping**: When emitting structured tags with `log_tag()`, always wrap file paths, directory paths, link targets, disk names, filter patterns, and arbitrary string fields with `esc_tag()` to prevent colons (e.g., Windows drive letters `C:`), backslashes, or newlines from breaking colon-delimited tag parsing.
|
||||
- **Allocation**: Always use custom `malloc_nofail()`, `calloc_nofail()`, `nalloc_nofail()`, or `strdup_nofail()` wrappers (which handle OOM by aborting)
|
||||
- **Path Manipulation**: Never use standard unsafe string functions (`strcpy`, `strcat`, `strcmp`) on paths. Always use the platform-correct, size-bounded wrappers in `support.h` (e.g., `pathcpy()`, `pathcat()`, `pathcmp()`, `pathslash()`).
|
||||
- **TommyDS Iteration**: For `tommy_list`, iterate using:
|
||||
`tommy_node* node = list.head; while (node) { void* obj = node->data; ... node = node->next; }`
|
||||
Or use callback iteration helpers: `tommy_list_foreach()`, `tommy_list_foreach_arg()`, `tommy_hashdyn_foreach()`, etc.
|
||||
- **Cleanup**: Use `goto` pattern for cleanup in complex functions when appropriate
|
||||
- **Fatal paths**: Use `exit(EXIT_FAILURE)` for unrecoverable errors; `os_abort()` for internal inconsistencies
|
||||
- **Exit Code & Logging Invariants**:
|
||||
- `log_fatal()`: Any invocation of `log_fatal()` represents an unrecoverable failure and must force a non-zero exit code upon termination.
|
||||
- `log_error()`: Whenever `log_error()` is called with a hardware error (`is_hw(err)`), it must force a non-zero exit code upon termination.
|
||||
|
||||
#### Threading
|
||||
|
||||
- **Compile-time guard**: `#if HAVE_THREAD` wraps all thread-specific code
|
||||
- **Mutexes**: Always use the custom `thread_mutex_init/destroy/lock/unlock()` wrappers
|
||||
- **IO workers**: The `snapraid_io` / `snapraid_worker` infrastructure handles parallel disk I/O via a pool of reader and writer threads
|
||||
|
||||
#### Testing Changes
|
||||
|
||||
- Never run `make check` because it's too expansive
|
||||
- Run `./linux/snapraid test` for the regression test
|
||||
- The `test` and `selftest` suites (in `cmdline/selftest.c` and `./linux/snapraid test`) must be strictly memory-only without creating files or performing filesystem I/O
|
||||
- If running the speed benchmark (`./linux/snapraid -T`), always use `--speed-test-period 100` (e.g. `./linux/snapraid -T --speed-test-period 100`) to run it faster
|
||||
- The Windows build needs to be tested only when modifying Windows-specific code
|
||||
- Verify error paths and recovery scenarios (the test suite covers aborted sync, UUID changes, disk failures)
|
||||
42
CHECKSUMS
42
CHECKSUMS
|
|
@ -203,6 +203,42 @@ eaac4391c89650c7fe9fd263a31533bbf6d06b0c28eb4ee21590e9472aaa5f79 snapraid-14.7-
|
|||
dce8b1345b04cf99ec8fc41fd0c5ed9ea38e64050077a7fb12a03b21e35deef9 snapraid-14.7-windows-x64.zip
|
||||
3ff33a921ac22672eb8267eb5c52721fbd3de35fb2bb373a6056ba4281a800b4 snapraid-14.7-windows-x86.zip
|
||||
e0d8178b2d6b4ab8302001eddd10f09bbbdf744020bff2f0576b405a0c96e294 snapraid-14.7-x86_64-1_am.txz
|
||||
bdf649024f6bcbf40261bc848dd6f9739152b0bbb1b074b3d88ef3dee00fe241 snapraid-14.8.tar.gz
|
||||
51fc7419aa281229e9d5181eadd3bb0160f5bc925de44819e0bc5187ba9164d0 snapraid-14.8-1-x86_64.pkg.tar.zst
|
||||
da67aabf0b334dbb4f564fa111e2825351b3263b4d6585fa68342d0cc0868457 snapraid-14.8-1.x86_64.rpm
|
||||
ec96896837f5ffd4ae1f7de01b4472e92bc7b3451d2c882b1d73a5b5fa5fcda8 snapraid-14.8-windows-x64.zip
|
||||
b12594951cb8060e8e0d9d26c00c8ebaa37dcd0c08edb7cc530c6b483d7b9d73 snapraid-14.8-windows-x86.zip
|
||||
bf59b701c1db4ffe0e8ed991b5849d2e83b3ab3d390b433246d38f70f5a37520 snapraid-14.8-x86_64-1_am.txz
|
||||
40c216979d9d9853248060497341f74feaa07c8ae15927b6b14972c4f9d143d5 snapraid-14.9.tar.gz
|
||||
e11c452e2adec376e6fcaee9ff2ec4de4e943c35690229c9c67056c5eaed52a1 snapraid-14.9-1-x86_64.pkg.tar.zst
|
||||
3f6d5f6238190ab40f12e5c5573c6796d61db90183259dc45bee1b57eda32ce9 snapraid-14.9-1.x86_64.rpm
|
||||
84af790cd25c8f2d773386bca7320cb5cf81706f850eb1fda33d4b9ff4e0d692 snapraid-14.9-windows-x64.zip
|
||||
7ec39de0cf7cabd09061bfc54848084b4505e77b27556850fc53cb5f23080003 snapraid-14.9-windows-x86.zip
|
||||
40cee688cb1a322810eaac4e3655313c0075b791e18783bec2588084a9e47f09 snapraid-14.9-x86_64-1_am.txz
|
||||
27be09151c8e779019da7d9e0501b03f56ae83da489cdaf5cd85463075cec9a2 snapraid-14.10.tar.gz
|
||||
6f5a31ee04649c9b2b7b0612619f401f160c4f1a4a56947ff50381cc6036b8cc snapraid-14.10-1-x86_64.pkg.tar.zst
|
||||
461778095cd40e9ef1231999dd4924499c1f6cab23e233ab811f37e29b81aefe snapraid-14.10-1.x86_64.rpm
|
||||
6e8892175bfe240ae7828d513342180a249511a2d5baf8c003ae8b2bb82e0f46 snapraid-14.10-windows-x64.zip
|
||||
1ec0572359fb31f2827702d792db0bdf6a95161eb9e2a6deff2bdc7e1f5b794b snapraid-14.10-windows-x86.zip
|
||||
6930d629c73b5307ec32277310ed13887b1bd051e30dc41c75b4752040032d1c snapraid-14.10-x86_64-1_am.txz
|
||||
ceba44e15566386d923d6895ecab81f7437848b03a4cf9585c02d3636197ce19 snapraid-15.0.tar.gz
|
||||
9d55d0308ce41beb29956b59f9d2e32d419c930118266d3e08b15f658119f4fb snapraid-15.0-1-x86_64.pkg.tar.zst
|
||||
ad66c0b4c016775c9a759adf2a5202bebb357d319b0063b9cf68befde9a67363 snapraid-15.0-1.x86_64.rpm
|
||||
704706c21b432719c4da8cd237c1f26327af89c86604dc339a38d63574004a22 snapraid-15.0-windows-x64.zip
|
||||
58b3ed90307e41b7a6e862d2dc070204c98b5c3ac24718e2fb9fe03e275bc2ce snapraid-15.0-windows-x86.zip
|
||||
9483df5a39a8b59c32433331ac92a4eef54dcff4722694a5bc5e89bcefb6b3b0 snapraid-15.0-x86_64-1_am.txz
|
||||
fb2d6a9cf9c8ea30c6962f4a48764dc9012fe61d6e23f40a8d959dadea02278b snapraid-15.1.tar.gz
|
||||
5e627e08caa8d7647fd40e5288b8d59846d1f3d65d586bae74a57cd99a23f497 snapraid-15.1-1-x86_64.pkg.tar.zst
|
||||
8922234dd566c876b17cbaadad6a22690d05240250455e504513906d933e16dd snapraid-15.1-1.x86_64.rpm
|
||||
64849f463986d0d80b948dbb07e9af6402bed230a9cf17dbd1110199aca56486 snapraid-15.1-windows-x64.zip
|
||||
f7be230f7849d89941a280dc8c2cc6e158844e0fe6f00adbb6aa9ac0f65322b8 snapraid-15.1-windows-x86.zip
|
||||
4dbd01ab2582a74fab4d7ee8f9b11966d4188fba9eedcd31fcc0a5588cd0c702 snapraid-15.1-x86_64-1_am.txz
|
||||
0740169f66c506c29846a5aef57d2b11ffe5c354c5bb0ba260f2b5f328f985c5 snapraid-15.2.tar.gz
|
||||
208a5d99c94889e2357f0211d716bababcfb8289907167220563f734fb936e96 snapraid-15.2-1-x86_64.pkg.tar.zst
|
||||
f1c37fa43beea8445858520a5cd514198d8c0c0ac5a5ab588adcd02e872ee681 snapraid-15.2-1.x86_64.rpm
|
||||
882334e5102b418ace0753f9335a99783fc784e149429c29911247b56f04e438 snapraid-15.2-windows-x64.zip
|
||||
942157645a532e2a280ca404625476c42591436f2292491b1faedb9d48efd07e snapraid-15.2-windows-x86.zip
|
||||
7bb455cb77586dd2d90f6868c66dd9cdf6774aa89c099f1026a851407ac7adac snapraid-15.2-x86_64-1_am.txz
|
||||
128b5b0f80a6a0911e77ed3b5d9d81529f5ea1d8fffbb5112e3af3467d80464a snapraid_14.0-1_amd64.deb
|
||||
b9c41ae2e8edbc413abd3172b7ed2da2cba7fa0e631d0f47fc1dafccf7c6e92c snapraid_14.1-1_amd64.deb
|
||||
e6456b926bb053d34645e31e5e3d8363e952c9869e873eb348abb1149598d331 snapraid_14.2-1_amd64.deb
|
||||
|
|
@ -211,3 +247,9 @@ bfbec7200f96d6ce23bfd6ae43fb2764fe26c9480c5c478b3bb6bb90dd707a07 snapraid_14.3-
|
|||
3ff971ba7da0336e3f86fef7218437e680649abcbd6a60607aee946f7ac99695 snapraid_14.5-1_amd64.deb
|
||||
b71b556da4be6263a904fb8ac489933875467adbb920dd3911e54d87e9637ca3 snapraid_14.6-1_amd64.deb
|
||||
35b156fc4d5c34339eed7e7d73e22a76e646879ecf6846b5ca20f7992ff55640 snapraid_14.7-1_amd64.deb
|
||||
c0e00a25b9bce40ff74f5a55401c3bfedac1881fd99aaa90a692f5858d417f7d snapraid_14.8-1_amd64.deb
|
||||
09064689a64d965ac33ee89fb8b2cc14dfec0745f2b3b86a78f377fc353b7e07 snapraid_14.9-1_amd64.deb
|
||||
15f5fd9f639912c94daae9d75d3567b7a3fc0e18475880f972acd8d8e9e0992c snapraid_14.10-1_amd64.deb
|
||||
845091e7eeb2495fc3899dc6e8fab2c3fe7a5945f345c767a7603dab90e2cb84 snapraid_15.0-1_amd64.deb
|
||||
974cd45fc8f44d5642b49bd9b30e81aca2bcd7689877f9fa73d1e58d3f1b5bda snapraid_15.1-1_amd64.deb
|
||||
9c78f158347cc0340ed5c9877724bb4f3b5e5fb48b43332ee7e0e7b6a63642d9 snapraid_15.2-1_amd64.deb
|
||||
|
|
|
|||
22
GNUmakefile
Normal file
22
GNUmakefile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# If Makefile exists (generated by ./configure in this directory), delegate
|
||||
# directly to it so that in-tree builds work normally as if this file were absent.
|
||||
# Otherwise, redirect all targets to linux/Makefile for out-of-tree builds.
|
||||
# Named GNUmakefile so it takes precedence in GNU Make without conflicting with
|
||||
# Makefile on case-insensitive filesystems (Windows/macOS).
|
||||
ifeq ($(wildcard Makefile),Makefile)
|
||||
include Makefile
|
||||
else ifeq ($(wildcard linux/Makefile),linux/Makefile)
|
||||
all:
|
||||
$(MAKE) -C linux $@
|
||||
|
||||
doc:
|
||||
$(MAKE) -C linux $@
|
||||
cp -a linux/doc/*.1 linux/doc/*.txt doc/
|
||||
|
||||
.DEFAULT:
|
||||
$(MAKE) -C linux $@
|
||||
|
||||
.PHONY: all doc
|
||||
else
|
||||
$(error SnapRAID is not configured. Run './configure')
|
||||
endif
|
||||
94
HISTORY
94
HISTORY
|
|
@ -1,6 +1,100 @@
|
|||
SnapRAID HISTORY
|
||||
================
|
||||
|
||||
15.2 2026/11
|
||||
============
|
||||
* Avoid creating a redundant Windows Job Object when SnapRAID is
|
||||
already running inside an existing job (such as under SnapRAID
|
||||
Daemon). This prevents potential execution failures of child
|
||||
processes (such as smartctl) on systems where nested job objects are
|
||||
not supported.
|
||||
* Skip disks on network or virtual filesystems (such as NFS, CIFS,
|
||||
FUSE, or tmpfs) in device operations like 'up', 'down', 'smart',
|
||||
and 'probe' on Linux, instead of failing with an error. If no
|
||||
physical device remains, the operation completes successfully with
|
||||
an informational message.
|
||||
|
||||
15.1 2026/10
|
||||
============
|
||||
* Add synthetic device IDs on Linux, allowing SnapRAID Daemon to
|
||||
preserve history for devices without unique hardware IDs while
|
||||
they remain connected within the same boot.
|
||||
* Fix a failed internal inconsistency check when '--gui-touch-before'
|
||||
is used before the first sync when no content file exists yet.
|
||||
Also ensure that commands that can save the content file ('touch',
|
||||
'scrub', 'rehash', 'rewrite') fail with a clear error message if the
|
||||
array has not been synced yet. This fix is required by
|
||||
SnapRAID-Daemon.
|
||||
* Make test and doc variables in Makefile.am compatible with BSD make,
|
||||
allowing builds, tests, and documentation generation on BSD systems
|
||||
without requiring GNU make.
|
||||
|
||||
15.0 2026/10
|
||||
============
|
||||
* Added support for automated filesystem snapshots to ensure data
|
||||
consistency and improve recovery reliability.
|
||||
When the 'snapshot' option is enabled, SnapRAID transparently manages
|
||||
filesystem snapshots during operations, requiring no changes to the
|
||||
existing user workflow or file management.
|
||||
Supported on Btrfs, Bcachefs, and ZFS in Linux, and on NTFS in
|
||||
Windows.
|
||||
This ensures that 'scrub', 'check', and 'fix' operations utilize a
|
||||
frozen point-in-time reference for data disks, eliminating
|
||||
mismatches caused by concurrent live filesystem modifications.
|
||||
The use of snapshots significantly improves recovery success by
|
||||
preserving access to files that were updated or deleted after the
|
||||
last parity computation.
|
||||
* Implemented AVX-512BW (Byte and Word) support for parity generation
|
||||
and data recovery, optimizing performance on modern architectures
|
||||
like Intel Sapphire Rapids and AMD Zen 4/5.
|
||||
By scaling to 512-bit ZMM registers, the implementation now processes
|
||||
64 bytes per iteration, effectively doubling the data width of the
|
||||
previous AVX2 routines.
|
||||
* Implemented AArch64 (ARM64) and AArch32 (ARM32) NEON support for
|
||||
parity generation and data recovery, significantly improving
|
||||
performance on ARM-based platforms.
|
||||
* Improved the chances of a successful recovery after an interrupted
|
||||
sync. This is achieved by removing the sync optimization of not
|
||||
recomputing the parity if the input data matches the expected hash.
|
||||
While only the specific sync immediately following an interruption
|
||||
will be slower, this change preserves hash data in the content file
|
||||
to ensure a better fix during disk failures and allows the --import
|
||||
option to remain functional even after an incomplete sync.
|
||||
* Skip spin-up and spin-down operations for non-rotational devices
|
||||
(like SSDs and NVMe drives) on Linux and Windows.
|
||||
* Added --with-smartctl, --with-zfs, --with-zpool, --with-bcachefs
|
||||
configure options to allow pinning the absolute path of each tool at
|
||||
build time. When not specified, the existing runtime discovery
|
||||
behaviour is preserved. Primarily intended for NixOS and other
|
||||
non-FHS systems.
|
||||
* Removed the 512 TiB limitation on hard disk size (when using the
|
||||
default 256 KiB blocks).
|
||||
* Added support for a custom info options tag `[info: ...]` in the
|
||||
`smartctl` configuration option. This allows replacing the default
|
||||
`-a` command line argument used to retrieve SMART attributes with a
|
||||
customized set of arguments, enabling better support for RAID
|
||||
controllers and USB enclosures.
|
||||
* Added support for specifying case-insensitive SMART attribute names
|
||||
(instead of only numeric IDs) in the `smartignore` configuration
|
||||
option.
|
||||
* Added support for filesystems where only specific files fail to
|
||||
report a 64-bit inode number (such as ReFS when 128-bit file IDs
|
||||
cannot be mapped), allowing SnapRAID to continue processing those
|
||||
individual files without inodes.
|
||||
* Removed the dependency on the 'libblkid' library.
|
||||
|
||||
14.10 2026/08
|
||||
=============
|
||||
* Enable lock file support on Windows to prevent concurrent runs.
|
||||
|
||||
14.9 2026/07
|
||||
============
|
||||
* Fix a regression when both the '--gui-touch-before' and
|
||||
'--gui-threshold' options are selected at the same time, which may
|
||||
prevent the thresholds from working correctly. Now, the content file
|
||||
is unconditionally saved before scanning for differences if any touch
|
||||
is performed.
|
||||
|
||||
14.8 2026/06
|
||||
============
|
||||
* Avoid spinning up standby disks on Windows in some machines during
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Copyright (c) 2010, Andrea Mazzoleni. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
|
|
|||
782
Makefile.am
782
Makefile.am
File diff suppressed because it is too large
Load diff
139
TODO
139
TODO
|
|
@ -3,35 +3,91 @@ SnapRAID TODO
|
|||
|
||||
This is the list of TODO items for SnapRAID.
|
||||
|
||||
- Next
|
||||
16.x Releases
|
||||
=============
|
||||
|
||||
* Use a memory mapped file to read the content file
|
||||
* Support a `[power_control: off]` tag in `smartctl` options to disable power
|
||||
management (`up` and `down`) on specific disks (e.g. for SAS drives that
|
||||
fail to wake up on write). Emit an attribute tag in probe for snapraid-daemon.
|
||||
|
||||
* Integration with MergeFS ?
|
||||
* Enable MuseAir and disable random seed
|
||||
|
||||
* Evaluate use of syscall getdents64() instead of readdir(): https://linux.die.net/man/2/getdents64
|
||||
* Add a new 'restore' command, similar to 'fix', that recovers a whole disk
|
||||
using the same multithreaded approach as sync/scrub.
|
||||
|
||||
* Check Reliability Test
|
||||
* Use statx() instead of lstat() when scanning directories.
|
||||
|
||||
* Integration with MergerFS ?
|
||||
|
||||
* Restore ownership and permissions, at least in Unix.
|
||||
|
||||
* Restore directory timestamps.
|
||||
|
||||
* Check Reliability Test. We can derive Failure probability from MBTF
|
||||
https://github.com/linuxhw/SMART
|
||||
https://github.com/linuxhw/EnterpriseDrive
|
||||
|
||||
* Support BTRFS subvolumes. Keep track of the subvolumeid, along with the inode,
|
||||
and use it when searching/comparing inodes.
|
||||
The value 0 can be used for the root volume, like a normal filesystem.
|
||||
See: https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil
|
||||
Check also that other tools are doing:
|
||||
See: https://github.com/automorphism88/snapraid-btrfs
|
||||
See: https://github.com/dim-geo/btrfssnapraid
|
||||
* Check Scrutiny Thresholds
|
||||
https://github.com/Starosdev/scrutiny/tree/master/webapp/backend/pkg/thresholds
|
||||
|
||||
* Check updates to smartctl drivedb.h
|
||||
https://github.com/smartmontools/smartmontools/commits/master/smartmontools/drivedb.h
|
||||
|
||||
* A "dependents" output option to [--test-fmt file|disk|path|dependents] for LIST.
|
||||
Example, snapraid LIST --test-fmt dependents >FileList_with_dependents.txt
|
||||
The goal is a filelist that, for every file, includes full paths to the dependent files
|
||||
on other data disks needed to repair that file (in addition to the parity data).
|
||||
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/6e872fdae0/
|
||||
|
||||
I created a thread about it here: https://sourceforge.net/p/snapraid/discussion/1677233/thread/6e872fdae0/
|
||||
Future
|
||||
======
|
||||
|
||||
- Major
|
||||
|
||||
* Optimize `sync` on Btrfs by using `btrfs send -p <prev> <curr> --no-data`
|
||||
to identify modified files and extent offsets, avoiding a full filesystem
|
||||
metadata scan. Parity recomputation still reads from the latest snapshot.
|
||||
Store the Btrfs snapshot generation (and UUID) in the content file to verify
|
||||
that the parent snapshot strictly matches the content state before diffing,
|
||||
falling back to a full scan if mismatched.
|
||||
|
||||
* Size-Based Checkpointing (autosave) using a write-ahead log (WAL).
|
||||
Instead of writing the full content file periodically (autosave), write incremental
|
||||
updates to companion `.wal` files. Use the existing bit-efficient `STREAM`
|
||||
abstraction (`cmdline/stream.h`) for the WAL. For each synced block entry,
|
||||
the stream writes: target disk index (`disk_idx`), block state (`state`),
|
||||
block position (`block_idx`), and the newly computed block hash (`hash`).
|
||||
This automatically provides:
|
||||
- Variable-length binary integer packing (`sputb32`/`sputb64`), reducing the average
|
||||
record size to ~20 bytes.
|
||||
- Built-in stream buffering for batched writes to prevent mechanical disk seeks,
|
||||
with periodic `ssync()` flushes (calling fdatasync internally).
|
||||
- Out-of-the-box support for atomic mirrored writes to multiple content directories
|
||||
via `sopen_multi_write()`.
|
||||
- Built-in block-level CRC integrity protection.
|
||||
Perform a full checkpoint (writing the content file and truncating the WAL)
|
||||
only when the WAL file size exceeds a threshold (e.g., 50 MB).
|
||||
|
||||
- Minor
|
||||
|
||||
* Emergency Memory Reserve for Graceful OOM Shutdown.
|
||||
Pre-allocate a small emergency memory reserve buffer (e.g., 10 MB) at program
|
||||
startup. Modify `malloc_nofail` (and related memory allocators in `memory.c`)
|
||||
so that if an allocation fails (returns NULL), the emergency buffer is freed
|
||||
to give the system breathing room. Then, trigger a graceful shutdown by
|
||||
stopping active I/O threads and calling `state_write()` to save the content
|
||||
file (preserving progress up to the last synced block) before calling `os_abort()`.
|
||||
|
||||
* Time-Based Content File Loading.
|
||||
On startup, read the modification time (mtime) of all configured content files,
|
||||
and sort the loading list to try loading the newest one first.
|
||||
This resolves the inconsistency window during sequential renames on crashes.
|
||||
If the newest file is corrupt, the existing load loop naturally falls back to the
|
||||
next newest.
|
||||
|
||||
* Add a new scrub option for checking recent blocks. Like -n, --newer-than.
|
||||
Working the opposite of -o-, --older-than
|
||||
|
||||
* Add a new -u, --filter-updated command that filters files
|
||||
with a different timestamp, to be able to restore only them to the previous state.
|
||||
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/e26e787d/
|
||||
|
|
@ -61,22 +117,11 @@ See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/a1683dd9/?limi
|
|||
* Add markdown support for output
|
||||
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/661cce8b/
|
||||
|
||||
* Add ZFS support for SMART and UUID.
|
||||
See latest messages at: https://sourceforge.net/p/snapraid/discussion/1677233/thread/42defa3b/
|
||||
|
||||
* Change all the paths printed in the terminal as relative and not absolute.
|
||||
https://sourceforge.net/p/snapraid/discussion/1677233/thread/648955ec/ (Leifi in diff)
|
||||
https://sourceforge.net/p/snapraid/discussion/1677233/thread/5b6ef1b9/ (Miles in check + filter)
|
||||
Partially done. Now you can control it with --test-fmt
|
||||
|
||||
* Add ReFS support with 128 bit inode
|
||||
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/2be14f63/
|
||||
https://github.com/Microsoft/Windows-driver-samples/blob/master/filesys/miniFilter/avscan/filter/utility.h
|
||||
https://github.com/Microsoft/Windows-driver-samples/blob/master/filesys/miniFilter/avscan/filter/utility.c
|
||||
https://github.com/Microsoft/Windows-driver-samples/blob/master/filesys/miniFilter/delete/delete.c
|
||||
Partially done. Until the inodes are less than 64 bit, everything works.
|
||||
If a 128 bit inode is found, it aborts with "Invalid inode number! Is this ReFS?"
|
||||
|
||||
* When a disk is replaced, and SnapRAID detects this by a UUID change, we could clear the
|
||||
scrub information for that disk.
|
||||
https://sourceforge.net/p/snapraid/discussion/1677233/thread/ee87901b/
|
||||
|
|
@ -102,10 +147,6 @@ In fact, it makes sense as it's a good way to control the cache on the file,
|
|||
so, despite the name, that usage could be common for not temporary files.
|
||||
https://sourceforge.net/p/snapraid/discussion/1677233/thread/57d40108/
|
||||
|
||||
* Restore ownership and permissions, at least in Unix.
|
||||
|
||||
* Restore directory timestamps.
|
||||
|
||||
* Add an option for dup to list only duplicates with different names.
|
||||
This supposing that if a file has the same name, it's intentionally duplicated.
|
||||
|
||||
|
|
@ -129,10 +170,22 @@ This 'init' will work also without a content file, and parity files.
|
|||
Instead 'sync' will require all of them.
|
||||
This will also help when running with the parity filesystem unmounted.
|
||||
|
||||
* Rename sync->backup and fix->restore. It seems to me a naming expressing
|
||||
* Rename sync->backup and fix->restore/recover. It seems to me a naming expressing
|
||||
better the meaning of the commands. But not yet sure.
|
||||
|
||||
- Pooling
|
||||
|
||||
Rejected TODO
|
||||
=============
|
||||
|
||||
This is a list of rejected TODO items.
|
||||
|
||||
* Parallel hashes using vector instructions. See the 'parallel_hashes' branch.
|
||||
- Only Spooky2 can be effectively parallelized because vector instructions
|
||||
cannot efficiently perform 64x64->128 bit multiplications.
|
||||
best murmur3 spooky2 spk2sse spk2avx metro museair musesse museavx
|
||||
hash spooky2 6163 17570 24227 *34519* 20612 *27894* 10648 19827
|
||||
- This small speed increase occurs only in the best-case scenario when AVX is present
|
||||
and the number of disks is divisible by 4.
|
||||
|
||||
* Add a new "commit" command to move changes from the pool to the array.
|
||||
It should:
|
||||
|
|
@ -146,8 +199,7 @@ but kept in the same disk of the array.
|
|||
- Detect deletes, and move file in the array to a "/trash/" directory
|
||||
of the same disk. For safety no real deletion is done.
|
||||
File with the same name will get an extra extension like ".1", ".2".
|
||||
|
||||
- Major
|
||||
- MergerFS is anyway better
|
||||
|
||||
* Allocate parity minimizing concurrent use of it
|
||||
Each parity allocation should check for a parity
|
||||
|
|
@ -159,11 +211,15 @@ See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/1797bf7d/
|
|||
enough parity, as the benefit of existing parity is maximized.
|
||||
- Possible increase of fragmentation of parity allocation
|
||||
- No real benefit when the array is filled
|
||||
- Slowing down operation that have to check the whole array.
|
||||
10 disk at 10% utilization, will use the full parity, requiring to
|
||||
read and write it completly. Essentially doubling the amount of data
|
||||
needed to be read or written.
|
||||
- Rotating disks are faster at low sector addresses, allocating high
|
||||
parity will slow down disks that could be instead faster.
|
||||
|
||||
Rejected TODO
|
||||
=============
|
||||
|
||||
This is a list of rejected TODO items.
|
||||
* Use a memory mapped file to read the content file
|
||||
- Tried. No speed gain.
|
||||
|
||||
* Allow multiple parity files and to coexist with data
|
||||
in the same disk.
|
||||
|
|
@ -216,17 +272,6 @@ splitting.
|
|||
the number of hash for each file to three.
|
||||
- No way to handle block import.
|
||||
|
||||
* Create a filesystem snapshot at every sync, and use it in all the other commands
|
||||
automatically.
|
||||
At the next sync, drop the old snapshot and create a new one.
|
||||
This should help recovering, because we'll have the exact copy used by sync.
|
||||
This feature can be enabled with a specific option, and available
|
||||
in Windows using Shadow Copy, and in Linux using Btrfs, and in a generic
|
||||
Unix using ZFS.
|
||||
See Jens's Windows script at: http://sourceforge.net/p/snapraid/discussion/1677233/thread/a1707211/
|
||||
Note that a difference between Windows and Unix is that in Windows old snapshots
|
||||
are automatically deleted.
|
||||
|
||||
* Checks if splitting hash/parity computation in 4K pages
|
||||
can improve speed in sync. That should increase cache locality,
|
||||
because we read the data two times for hash and parity,
|
||||
|
|
|
|||
14
autover.sh
14
autover.sh
|
|
@ -1,19 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
if [ -f .version ]; then
|
||||
SRCDIR="${srcdir:-$(dirname "$0")}"
|
||||
|
||||
if [ -f "$SRCDIR/.version" ]; then
|
||||
# Get version from the .version file
|
||||
VERSION=$(cat .version)
|
||||
VERSION=$(cat "$SRCDIR/.version")
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ] && [ -d .git ]; then
|
||||
if [ -z "$VERSION" ] && [ -e "$SRCDIR/.git" ]; then
|
||||
# Get version from git tags, removing the 'v' prefix
|
||||
VERSION=$(git describe --match 'v*' 2>/dev/null | sed 's/^v//')
|
||||
VERSION=$(git -C "$SRCDIR" describe --match 'v*' 2>/dev/null | sed 's/^v//')
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ] && [ -d .git ]; then
|
||||
if [ -z "$VERSION" ] && [ -e "$SRCDIR/.git" ]; then
|
||||
# Fall back to short commit hash
|
||||
VERSION=0-$(git rev-parse --short HEAD 2>/dev/null)
|
||||
VERSION=0-$(git -C "$SRCDIR" rev-parse --short HEAD 2>/dev/null)
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
|
|
|
|||
|
|
@ -1,308 +1,31 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
// Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
#ifndef __PORTABLE_H
|
||||
#define __PORTABLE_H
|
||||
#ifndef APP_H
|
||||
#define APP_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h" /* Use " to include first in the same directory of this file */
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/* Config */
|
||||
|
||||
#ifdef __MINGW32__
|
||||
/**
|
||||
* Enable the GNU printf functions instead of using the MSVCRT ones.
|
||||
*
|
||||
* Note that this is the default if _POSIX is also defined.
|
||||
* To disable it you have to set it to 0.
|
||||
*/
|
||||
#define __USE_MINGW_ANSI_STDIO 1
|
||||
|
||||
/**
|
||||
* Define the MSVCRT version targeting Windows Vista.
|
||||
*/
|
||||
#define __MSVCRT_VERSION__ 0x0600
|
||||
|
||||
/**
|
||||
* Include Windows Vista headers.
|
||||
*
|
||||
* Like for InitializeCriticalSection().
|
||||
*/
|
||||
#define _WIN32_WINNT 0x600
|
||||
|
||||
/**
|
||||
* Undef as it clashes with windows.h declarations
|
||||
*/
|
||||
#undef DATADIR
|
||||
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Specify the format attribute for printf.
|
||||
*/
|
||||
#ifdef __MINGW32__
|
||||
#if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO == 1
|
||||
#define attribute_printf gnu_printf /* GNU format */
|
||||
#else
|
||||
#define attribute_printf ms_printf /* MSVCRT format */
|
||||
#endif
|
||||
#else
|
||||
#define attribute_printf printf /* GNU format is the default one */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Compiler extension
|
||||
*/
|
||||
#ifndef __always_inline
|
||||
#define __always_inline inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
#ifndef __noreturn
|
||||
#define __noreturn __attribute__((noreturn))
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Architecture for inline assembly.
|
||||
*/
|
||||
#if HAVE_ASSEMBLY
|
||||
#if defined(__i386__)
|
||||
#define CONFIG_X86 1
|
||||
#define CONFIG_X86_32 1
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define CONFIG_X86 1
|
||||
#define CONFIG_X86_64 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Includes some platform specific headers.
|
||||
*/
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_VFS_H
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_FILE_H
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LINUX_FS_H
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LINUX_FIEMAP_H
|
||||
#include <linux/fiemap.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_BLKID_BLKID_H
|
||||
#include <blkid/blkid.h>
|
||||
#if HAVE_BLKID_DEVNO_TO_DEVNAME && HAVE_BLKID_GET_TAG_VALUE
|
||||
#define HAVE_BLKID 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Includes some standard headers.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* On many systems (e.g., Darwin), `stdio.h' is a prerequisite. */
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#else
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_MACH_MACH_TIME_H
|
||||
#include <mach/mach_time.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
#define dirent direct
|
||||
#define NAMLEN(dirent) (dirent)->d_namlen
|
||||
#if HAVE_SYS_NDIR_H
|
||||
#include <sys/ndir.h>
|
||||
#endif
|
||||
#if HAVE_SYS_DIR_H
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
#if HAVE_NDIR_H
|
||||
#include <ndir.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_MKDEV
|
||||
#include <sys/mkdev.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MATH_H
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_EXECINFO_H
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <DiskArbitration/DiskArbitration.h>
|
||||
#include <mach-o/dyld.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_IO_H
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GETOPT_LONG
|
||||
#define SWITCH_GETOPT_LONG(a, b) a
|
||||
#else
|
||||
#define SWITCH_GETOPT_LONG(a, b) b
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enables lock file support.
|
||||
*/
|
||||
#if HAVE_FLOCK && HAVE_FTRUNCATE
|
||||
#define HAVE_LOCKFILE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Includes specific support for Windows or Linux.
|
||||
*/
|
||||
#ifdef __MINGW32__
|
||||
#include "mingw.h"
|
||||
#else
|
||||
#include "unix.h"
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* os */
|
||||
|
||||
/**
|
||||
* Default paths.
|
||||
*/
|
||||
void os_default_conf(char* dst, size_t dst_size, const char* argv0);
|
||||
|
||||
/**
|
||||
* Get the os_tick counter value.
|
||||
*
|
||||
* Note that the frequency is unspecified, because the time measure
|
||||
* is meant to be used to compare the ratio between usage times.
|
||||
*/
|
||||
uint64_t os_tick(void);
|
||||
|
||||
/**
|
||||
* Get the os_tick counter value in millisecond.
|
||||
*/
|
||||
uint64_t os_tick_ms(void);
|
||||
|
||||
/**
|
||||
* Initializes the system.
|
||||
*/
|
||||
void os_init(int opt);
|
||||
|
||||
/**
|
||||
* Deinitialize the system.
|
||||
*/
|
||||
void os_done(void);
|
||||
|
||||
/**
|
||||
* Abort the process with a stacktrace.
|
||||
*/
|
||||
void os_abort(void) __noreturn;
|
||||
|
||||
/**
|
||||
* Clear the screen.
|
||||
*/
|
||||
void os_clear(void);
|
||||
|
||||
/**
|
||||
* Global variable to identify if Ctrl+C is pressed.
|
||||
*/
|
||||
extern volatile int global_interrupt;
|
||||
|
||||
/****************************************************************************/
|
||||
/* app */
|
||||
#include "os/os.h"
|
||||
|
||||
/**
|
||||
* Include list support to have tommy_node.
|
||||
*/
|
||||
#include "tommyds/tommylist.h"
|
||||
|
||||
#define STATIC_ASSERT(name, cond) typedef char static_assert_ ## name[(cond) ? 1 : -1]
|
||||
|
||||
#define EDATA (-1) /**< Silent data corruption. */
|
||||
#define EINTERNAL EFAULT /**< Internal assertion failed. */
|
||||
#define ESOFT EINVAL /**< Software error, like permission denied. */
|
||||
#define EUSER EINVAL /**< Invalid value specified by the user. */
|
||||
#define EEXTERNAL EINVAL /**< Invalid external interface behaviour. */
|
||||
#define ECONTENT EINVAL /**< Invalid content file. */
|
||||
#define EENVIRONMENT EINVAL /**< Invalid physical environment, like temperature too high. */
|
||||
#define ESYSLOG EINVAL /**< Syslog error. */
|
||||
|
||||
/**
|
||||
* Basic block position type.
|
||||
* With 32 bits and 128k blocks you can address 256 TB.
|
||||
*/
|
||||
typedef uint32_t block_off_t;
|
||||
typedef uint64_t block_off_t;
|
||||
|
||||
/**
|
||||
* Basic data position type.
|
||||
|
|
@ -322,35 +45,28 @@ static inline int hardlink(const char* a, const char* b)
|
|||
* Get the device UUID.
|
||||
* Return 0 on success.
|
||||
*/
|
||||
int devuuid(uint64_t device, const char* path, char* uuid, size_t size);
|
||||
int devuuid(uint64_t device_id, const char* device_path, char* uuid, size_t size);
|
||||
|
||||
/**
|
||||
* Physical offset not yet read.
|
||||
* Filesystem identity for directory boundary checks.
|
||||
*/
|
||||
#define FILEPHY_UNREAD_OFFSET 0
|
||||
struct fsidentity {
|
||||
uint64_t device; /**< Device identifier (st_dev). */
|
||||
uint64_t mnt_id; /**< Mount identifier (stx_mnt_id or 0). */
|
||||
uint64_t subvol; /**< Subvolume identifier (stx_subvol or 0). */
|
||||
};
|
||||
|
||||
/**
|
||||
* Special value returned when the file-system doesn't report any offset for unknown reason.
|
||||
* Get the filesystem identity of a path.
|
||||
*
|
||||
* The caller already provides the normal stat information.
|
||||
* This function must NOT repeat lstat()/stat() for normal metadata.
|
||||
*
|
||||
* mnt_id and subvol are set to zero when unavailable.
|
||||
*
|
||||
* Return 0 on success, -1 on error.
|
||||
*/
|
||||
#define FILEPHY_UNREPORTED_OFFSET 1
|
||||
|
||||
/**
|
||||
* Special value returned when the file doesn't have a real offset.
|
||||
* For example, because it's stored in the NTFS MFT.
|
||||
*/
|
||||
#define FILEPHY_WITHOUT_OFFSET 2
|
||||
|
||||
/**
|
||||
* Value indicating real offsets. All offsets greater or equal at this one are real.
|
||||
*/
|
||||
#define FILEPHY_REAL_OFFSET 3
|
||||
|
||||
/**
|
||||
* Get the physical address of the specified file.
|
||||
* This is expected to be just a hint and not necessarily correct or unique.
|
||||
* Return 0 on success.
|
||||
*/
|
||||
int filephy(const char* path, uint64_t size, uint64_t* physical);
|
||||
int fsidentity(const char* path, const struct stat* st, struct fsidentity* identity);
|
||||
|
||||
/**
|
||||
* Check if the underline file-system support persistent inodes.
|
||||
|
|
@ -358,6 +74,145 @@ int filephy(const char* path, uint64_t size, uint64_t* physical);
|
|||
*/
|
||||
int fsinfo(const char* path, int* has_persistent_inode, int* has_syncronized_hardlinks, uint64_t* total_space, uint64_t* free_space, char* fstype, size_t fstype_size, char* fslabel, size_t fslabel_size);
|
||||
|
||||
/**
|
||||
* Where snapshot are accessible
|
||||
*/
|
||||
#define SNAPSHOT_CONTAINER ".snapraid"
|
||||
|
||||
/**
|
||||
* Snapshots names
|
||||
*/
|
||||
#define SNAPSHOT_PENDING "pending"
|
||||
#define SNAPSHOT_STABLE "stable"
|
||||
#define SNAPSHOT_SCAN "scan"
|
||||
#define SNAPSHOT_RETIRING_SUFFIX ".retiring"
|
||||
|
||||
/**
|
||||
* Snapshots context
|
||||
*/
|
||||
struct fssnapshot_struct {
|
||||
/**
|
||||
* Filesystem magic number
|
||||
* 0 if no snapshot support
|
||||
*/
|
||||
uint32_t magic;
|
||||
|
||||
/**
|
||||
* Root directory of the volume/dataset mountpoint.
|
||||
* It ALWAYS terminates with /
|
||||
* - Btrfs/Bcachefs: subvolume root (canonical path via realpath)
|
||||
* - ZFS: dataset mountpoint (canonical path via realpath)
|
||||
* - Windows: volume mountpoint (via GetVolumePathName)
|
||||
*/
|
||||
char root_dir[PATH_MAX];
|
||||
|
||||
/**
|
||||
* Directory where snapshots are accessible as subdirectories.
|
||||
* It ALWAYS terminates with /
|
||||
* - Btrfs/Bcachefs: real directory (e.g. <root>/.snapraid/)
|
||||
* - ZFS: virtual directory (e.g. <root>/.zfs/snapshot/)
|
||||
* - Windows: symlink container directory (e.g. <root>/.snapraid/)
|
||||
*/
|
||||
char snapshot_dir[PATH_MAX];
|
||||
|
||||
/**
|
||||
* Data directory relative to root_dir in snapshots.
|
||||
*
|
||||
* It NEVER starts with '/'.
|
||||
* It is empty if the configured data directory is exactly root_dir.
|
||||
* If non-empty, it ALWAYS terminates with '/'.
|
||||
* - Unix: relative suffix computed from the realpath() canonical representation
|
||||
* - Windows: relative suffix computed from the GetFullPathNameW() absolute representation without resolving reparse points
|
||||
*/
|
||||
char sub_dir[PATH_MAX];
|
||||
|
||||
/*
|
||||
* Dataset name for ZFS (e.g. "pool/data")
|
||||
* or VolumeName in Windows (e.g. "\\?\Volume{guid}\").
|
||||
* Empty string for filesystems where not applicable.
|
||||
*/
|
||||
char dataset[PATH_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize snapshot context from an arbitrary path.
|
||||
*
|
||||
* @param dir Path inside the filesystem (must end with '/')
|
||||
* @param fss Output snapshot context
|
||||
* @return 0 on success, 1 if snapshots are unsupported, -1 on failure
|
||||
*/
|
||||
int fssnapshot_mount(const char* dir, struct fssnapshot_struct* fss);
|
||||
|
||||
/**
|
||||
* Unmount the snapshots.
|
||||
*
|
||||
* Required in Windows to remove the temporary symlinks.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
*/
|
||||
void fssnapshot_unmount(const struct fssnapshot_struct* fss);
|
||||
|
||||
/**
|
||||
* Stat the snapshot directory.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param name Snapshot name
|
||||
* @param st Set the stat info
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_stat(struct fssnapshot_struct* fss, const char* name, struct stat* st);
|
||||
|
||||
/**
|
||||
* Create a snapshot of the filesystem root/dataset.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param name Snapshot name
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_create(const struct fssnapshot_struct* fss, const char* name);
|
||||
|
||||
/**
|
||||
* Delete a snapshot.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param name Snapshot name
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_delete(const struct fssnapshot_struct* fss, const char* name);
|
||||
|
||||
/**
|
||||
* Rename a snapshot.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param old_name Existing snapshot name
|
||||
* @param new_name New snapshot name
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_rename(const struct fssnapshot_struct* fss, const char* old_name, const char* new_name);
|
||||
|
||||
/**
|
||||
* Replace a snapshot while preserving the previous destination until the new one is published.
|
||||
*
|
||||
* An interrupted replacement is recovered automatically by fssnapshot_mount().
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param old_name Existing source snapshot name
|
||||
* @param new_name Destination snapshot name
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_replace(struct fssnapshot_struct* fss, const char* old_name, const char* new_name);
|
||||
|
||||
/**
|
||||
* Get the path where a logical snapshot is accessible.
|
||||
*
|
||||
* @param fss Snapshot context
|
||||
* @param name Logical snapshot name
|
||||
* @param path Output path
|
||||
* @param path_size Size of path
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int fssnapshot_path(const struct fssnapshot_struct* fss, const char* name, char* path, size_t path_size);
|
||||
|
||||
/**
|
||||
* Log file.
|
||||
*
|
||||
|
|
@ -373,16 +228,13 @@ extern FILE* stdlog;
|
|||
extern int exit_success;
|
||||
extern int exit_failure;
|
||||
extern int exit_sync_needed;
|
||||
extern int exit_degraded;
|
||||
#undef EXIT_SUCCESS
|
||||
#undef EXIT_FAILURE
|
||||
#define EXIT_SUCCESS exit_success
|
||||
#define EXIT_FAILURE exit_failure
|
||||
#define EXIT_SYNC_NEEDED exit_sync_needed
|
||||
|
||||
/**
|
||||
* Fill memory with pseudo-random values.
|
||||
*/
|
||||
int randomize(void* ptr, size_t size);
|
||||
#define EXIT_DEGRADED exit_degraded
|
||||
|
||||
/**
|
||||
* Standard SMART attributes.
|
||||
|
|
@ -405,7 +257,7 @@ int randomize(void* ptr, size_t size);
|
|||
*/
|
||||
#define SMART_FLAGS 256
|
||||
|
||||
/*
|
||||
/**
|
||||
* Counts command, transport, or controller-level errors reported by the device.
|
||||
* These reflect failed I/O operations not directly caused by media defects
|
||||
* (for example interface, firmware, or power-related errors).
|
||||
|
|
@ -414,7 +266,7 @@ int randomize(void* ptr, size_t size);
|
|||
*/
|
||||
#define SMART_ERROR_PROTOCOL 257
|
||||
|
||||
/*
|
||||
/**
|
||||
* Counts media-level errors where data could not be reliably read or written.
|
||||
* These indicate actual storage surface or flash failures and may imply data loss.
|
||||
* This counter is cumulative and never resets to zero, even if the underlying
|
||||
|
|
@ -481,9 +333,22 @@ int randomize(void* ptr, size_t size);
|
|||
#define SMARTCTL_FLAG_SELFERROR_LOGGED (1 << 7) /**< The device self-test log contains records of errors. */
|
||||
|
||||
/**
|
||||
* SMART max attribute length.
|
||||
* SMART max attribute name or value length.
|
||||
*/
|
||||
#define SMART_MAX 64
|
||||
#define SMART_MAX 128
|
||||
|
||||
/**
|
||||
* Max smartctl custom option length.
|
||||
*/
|
||||
#define SMARTCTL_MAX 512
|
||||
|
||||
/**
|
||||
* Smart ignore structure.
|
||||
*/
|
||||
struct smartignore_struct {
|
||||
int attr_index; /**< 0 if not set */
|
||||
char attr_name[SMART_MAX]; /**< Empty if not set */
|
||||
};
|
||||
|
||||
/**
|
||||
* Value for unassigned SMART attribute.
|
||||
|
|
@ -502,7 +367,7 @@ int randomize(void* ptr, size_t size);
|
|||
#define SMART_ATTR_WHEN_FAILED_NEVER 64
|
||||
|
||||
struct smart_attr {
|
||||
char name[128]; /**< SMART attribute name. */
|
||||
char name[SMART_MAX]; /**< SMART attribute name. */
|
||||
uint64_t raw; /**< SMART attributes raw. It can be SMART_UNASSIGNED. */
|
||||
uint64_t norm; /**< SMART attributes normalized. It can be SMART_UNASSIGNED even if raw is not. */
|
||||
uint64_t worst; /**< SMART attributes worst. It can be SMART_UNASSIGNED even if raw/norm is not. */
|
||||
|
|
@ -517,20 +382,19 @@ struct smart_attr {
|
|||
#define POWER_ACTIVE 1
|
||||
#define POWER_UNKNOWN -1
|
||||
|
||||
/**
|
||||
* Device info entry.
|
||||
*/
|
||||
struct devinfo_struct {
|
||||
uint64_t device; /**< Device ID. */
|
||||
char name[PATH_MAX]; /**< Name of the disk combined with the split index if any */
|
||||
char mount[PATH_MAX]; /**< Mount point or other contained directory. */
|
||||
char smartctl[PATH_MAX]; /**< Options for smartctl. */
|
||||
int smartignore[SMART_IGNORE_MAX]; /**< Attribues to ignore */
|
||||
char smartctl[SMARTCTL_MAX]; /**< Custom option for smartctl. Empty means auto. */
|
||||
char smartctl_info[SMARTCTL_MAX]; /**< Info options for smartctl. Empty means -a. */
|
||||
struct smartignore_struct smartignore[SMART_IGNORE_MAX]; /**< Attributes to ignore */
|
||||
char file[PATH_MAX]; /**< File device. */
|
||||
#ifdef _WIN32
|
||||
char wfile[PATH_MAX]; /**< File device in Windows format. Like \\.\PhysicalDriveX, or \\?\Volume{X}. */
|
||||
#endif
|
||||
struct devinfo_struct* parent; /**< Pointer at the parent if any. */
|
||||
int is_array; /**< 1 if this is an array disk (data or parity), 0 if extra disk. */
|
||||
struct devinfo_struct* split; /**< Pointer at first split if this one is not the first. */
|
||||
struct smart_attr smart[SMART_COUNT]; /**< All smart values. */
|
||||
uint64_t info[INFO_COUNT]; /**< Informational attributes not related to SMART telemetry. */
|
||||
|
|
@ -557,12 +421,22 @@ void device_name_set(devinfo_t* dev, const char* name, int index);
|
|||
#define DEVICE_DOWNIFUP 5
|
||||
|
||||
/**
|
||||
* Query all the "high" level devices with the specified operation,
|
||||
* and produces a list of "low" level devices to operate on.
|
||||
* Sync filesystems associated with the "high" level devices.
|
||||
* Return 0 on success, -1 on error.
|
||||
*/
|
||||
int devsync(tommy_list* high);
|
||||
|
||||
/**
|
||||
* Query all the "high" level devices and produce a list of "low" level devices.
|
||||
*
|
||||
* The passed "low" device list must be already initialized.
|
||||
*/
|
||||
int devquery(tommy_list* high, tommy_list* low, int operation);
|
||||
int devquery(tommy_list* high, tommy_list* low);
|
||||
|
||||
/**
|
||||
* Execute an operation on the "low" level devices.
|
||||
*/
|
||||
int devrun(tommy_list* low, int operation);
|
||||
|
||||
/**
|
||||
* Fill with fake data the device list.
|
||||
|
|
@ -586,16 +460,63 @@ int ambient_temperature(void);
|
|||
*/
|
||||
#define WINDOWS_SPACEHOLDER_SIZE (256 * 1024 * 1024)
|
||||
|
||||
/****************************************************************************/
|
||||
/* app */
|
||||
|
||||
/**
|
||||
* Generic errors
|
||||
* Initializes the application.
|
||||
*/
|
||||
#define EINTERNAL EFAULT /**< Internal assertion failed. */
|
||||
#define EDATA EIO /**< Silent data corruption. */
|
||||
#define ESOFT EINVAL /**< Software error, like permission denied. */
|
||||
#define EUSER EINVAL /**< Invalid value specified by the user. */
|
||||
#define EEXTERNAL EINVAL /**< Invalid external interface behaviour. */
|
||||
#define ECONTENT EINVAL /**< Invalid content file. */
|
||||
#define EENVIRONMENT EINVAL /**< Invalid physical environment, like temperature too high. */
|
||||
void app_init(void);
|
||||
|
||||
/**
|
||||
* Deinitializes the application.
|
||||
*/
|
||||
void app_done(void);
|
||||
|
||||
/**
|
||||
* Default paths.
|
||||
*/
|
||||
void app_default_conf(char* dst, size_t dst_size, const char* argv0);
|
||||
|
||||
/**
|
||||
* Signal handler.
|
||||
*/
|
||||
void app_signal_handler(int signum);
|
||||
|
||||
/****************************************************************************/
|
||||
/* machine */
|
||||
|
||||
#define MACHINEINFO_MAX 256
|
||||
|
||||
/**
|
||||
* Host machine and CPU information.
|
||||
*/
|
||||
struct machineinfo_struct {
|
||||
char cpu_brand[MACHINEINFO_MAX]; /**< CPU model brand name. */
|
||||
char cpu_vendor[MACHINEINFO_MAX]; /**< CPU vendor string (e.g. GenuineIntel, AuthenticAMD). */
|
||||
char cpu_arch[MACHINEINFO_MAX]; /**< CPU architecture string. */
|
||||
char cpu_clock[MACHINEINFO_MAX]; /**< CPU clock frequency description. */
|
||||
unsigned cpu_family; /**< CPU family id. */
|
||||
unsigned cpu_model; /**< CPU model id. */
|
||||
unsigned cpu_stepping; /**< CPU stepping id. */
|
||||
unsigned cpu_cores_physical; /**< Number of physical CPU cores (0 if unavailable). */
|
||||
unsigned cpu_cores_logical; /**< Number of logical CPU threads (0 if unavailable). */
|
||||
uint64_t cache_l1_data; /**< L1 data cache in bytes (0 if unavailable). */
|
||||
uint64_t cache_l1_instruction; /**< L1 instruction cache in bytes (0 if unavailable). */
|
||||
uint64_t cache_l2; /**< L2 cache in bytes (0 if unavailable). */
|
||||
uint64_t cache_l3; /**< L3 cache in bytes (0 if unavailable). */
|
||||
uint64_t memory_total_bytes; /**< Total system RAM in bytes (0 if unavailable). */
|
||||
uint32_t memory_page_size; /**< Page size in bytes (0 if unavailable). */
|
||||
char os_name[MACHINEINFO_MAX]; /**< Operating system name and kernel version. */
|
||||
char os_distribution[MACHINEINFO_MAX]; /**< Operating system distribution name. */
|
||||
char system_model[MACHINEINFO_MAX]; /**< Motherboard or system model name. */
|
||||
char hypervisor[MACHINEINFO_MAX]; /**< Hypervisor name (empty if bare metal). */
|
||||
};
|
||||
|
||||
/**
|
||||
* Query host machine information.
|
||||
*/
|
||||
void machineinfo(struct machineinfo_struct* info);
|
||||
|
||||
#endif
|
||||
|
||||
56
cmdline/bw.c
56
cmdline/bw.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "bw.h"
|
||||
|
||||
|
|
@ -10,6 +10,18 @@ void bw_init(struct snapraid_bw* bw, uint64_t limit)
|
|||
bw->limit = limit;
|
||||
bw->total = 0;
|
||||
bw->start = os_tick_ms();
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_init(&bw->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
void bw_done(struct snapraid_bw* bw)
|
||||
{
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_destroy(&bw->lock);
|
||||
#else
|
||||
(void)bw;
|
||||
#endif
|
||||
}
|
||||
|
||||
void bw_limit(struct snapraid_bw* bw, uint64_t bytes)
|
||||
|
|
@ -17,17 +29,47 @@ void bw_limit(struct snapraid_bw* bw, uint64_t bytes)
|
|||
if (!bw || bw->limit == 0)
|
||||
return;
|
||||
|
||||
uint64_t elapsed = os_tick_ms() - bw->start;
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_lock(&bw->lock);
|
||||
#endif
|
||||
|
||||
uint64_t start = bw->start;
|
||||
uint64_t now = os_tick_ms();
|
||||
uint64_t elapsed = now - start;
|
||||
uint64_t done;
|
||||
uint64_t eta;
|
||||
|
||||
done = __atomic_fetch_add(&bw->total, bytes, __ATOMIC_SEQ_CST);
|
||||
bw->total += bytes;
|
||||
done = bw->total;
|
||||
|
||||
eta = done * 1000 / bw->limit;
|
||||
eta = (done / bw->limit) * 1000 + (done % bw->limit) * 1000 / bw->limit;
|
||||
|
||||
if (eta > elapsed) {
|
||||
eta -= elapsed;
|
||||
usleep(eta * 1000);
|
||||
/*
|
||||
* To prevent accumulating unlimited credit during long pauses
|
||||
* (such as CPU-bound hashing or metadata scanning), we cap the
|
||||
* maximum accumulated credit to 10 seconds.
|
||||
* If the elapsed time is more than 10 seconds ahead of the target ETA,
|
||||
* we advance the start time to align the credit to exactly 10 seconds.
|
||||
*/
|
||||
if (elapsed > eta + 10000) {
|
||||
bw->start = now - eta - 10000;
|
||||
elapsed = eta + 10000;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sleep inside the lock to serialize delays across all worker threads.
|
||||
*
|
||||
* When multiple threads perform IO in parallel, holding the lock
|
||||
* during sleep ensures each thread only sleeps for its own incremental
|
||||
* delay, while waiting threads wait on the mutex and accurately measure
|
||||
* the elapsed time once they acquire the lock.
|
||||
*/
|
||||
if (eta > elapsed) {
|
||||
os_usleep((eta - elapsed) * 1000);
|
||||
}
|
||||
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_unlock(&bw->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
12
cmdline/bw.h
12
cmdline/bw.h
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#ifndef __BW_H
|
||||
#define __BW_H
|
||||
#ifndef BW_H
|
||||
#define BW_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
@ -14,6 +14,9 @@ struct snapraid_bw {
|
|||
uint64_t limit; /**< Bandwidth limit in bytes per second */
|
||||
uint64_t total; /**< Remaining bytes allowed in current second */
|
||||
uint64_t start; /**< Time when to reset the bandwidth counter */
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_t lock; /**< Mutex protecting bw fields */
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -21,6 +24,11 @@ struct snapraid_bw {
|
|||
*/
|
||||
void bw_init(struct snapraid_bw* bw, uint64_t limit);
|
||||
|
||||
/**
|
||||
* Destroy the bandwidth limit
|
||||
*/
|
||||
void bw_done(struct snapraid_bw* bw);
|
||||
|
||||
/**
|
||||
* Limit IO bandwidth to stay within the configured limit.
|
||||
* If no limit is set, returns immediately.
|
||||
|
|
|
|||
2266
cmdline/check.c
2266
cmdline/check.c
File diff suppressed because it is too large
Load diff
317
cmdline/device.c
317
cmdline/device.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2015 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "state.h"
|
||||
|
|
@ -43,12 +43,12 @@ void device_name_set(devinfo_t* dev, const char* name, int index)
|
|||
*/
|
||||
#define SMART_MEASURES 256
|
||||
|
||||
/*
|
||||
/**
|
||||
* Divider for SMART attribute 5
|
||||
*/
|
||||
static unsigned SMART_5_STEP = 1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Failure rate for 30 days, for a disk
|
||||
* with SMART attribute 5 at a given value.
|
||||
*/
|
||||
|
|
@ -107,12 +107,12 @@ static double SMART_5_R[SMART_MEASURES] = {
|
|||
0.4249,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Divider for SMART attribute 187
|
||||
*/
|
||||
static unsigned SMART_187_STEP = 1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Failure rate for 30 days, for a disk
|
||||
* with SMART attribute 187 at a given value.
|
||||
*/
|
||||
|
|
@ -171,12 +171,12 @@ static double SMART_187_R[SMART_MEASURES] = {
|
|||
3.4520,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Divider for SMART attribute 188
|
||||
*/
|
||||
static unsigned SMART_188_STEP = 1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Failure rate for 30 days, for a disk
|
||||
* with SMART attribute 188 at a given value.
|
||||
*/
|
||||
|
|
@ -235,12 +235,12 @@ static double SMART_188_R[SMART_MEASURES] = {
|
|||
1.3731,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Divider for SMART attribute 197
|
||||
*/
|
||||
static unsigned SMART_197_STEP = 1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Failure rate for 30 days, for a disk
|
||||
* with SMART attribute 197 at a given value.
|
||||
*/
|
||||
|
|
@ -299,12 +299,12 @@ static double SMART_197_R[SMART_MEASURES] = {
|
|||
4.1131,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Divider for SMART attribute 198
|
||||
*/
|
||||
static unsigned SMART_198_STEP = 1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Failure rate for 30 days, for a disk
|
||||
* with SMART attribute 198 at a given value.
|
||||
*/
|
||||
|
|
@ -413,15 +413,17 @@ static double smart_afr(devinfo_t* devinfo)
|
|||
}
|
||||
|
||||
if (smart[187].raw != SMART_UNASSIGNED) {
|
||||
/* with some disks, only the lower 16 bits are significant */
|
||||
/* See: http://web.archive.org/web/20130507072056/http://media.kingston.com/support/downloads/MKP_306_SMART_attribute.pdf */
|
||||
/*
|
||||
* With some disks, only the lower 16 bits are significant
|
||||
* See: http://web.archive.org/web/20130507072056/http://media.kingston.com/support/downloads/MKP_306_SMART_attribute.pdf
|
||||
*/
|
||||
double r = smart_afr_value(SMART_187_R, SMART_187_STEP, smart[187].raw & mask16);
|
||||
if (afr < r)
|
||||
afr = r;
|
||||
}
|
||||
|
||||
if (
|
||||
/**
|
||||
/*
|
||||
* Don't check Command_Timeout (188) for Seagate disks.
|
||||
*
|
||||
* It's reported by users that for Archive SMR (Shingled Magnetic Recording)
|
||||
|
|
@ -430,8 +432,10 @@ static double smart_afr(devinfo_t* devinfo)
|
|||
*/
|
||||
strncmp(devinfo->model, "ST", 2) != 0 && smart[188].raw != SMART_UNASSIGNED
|
||||
) {
|
||||
/* with Seagate disks, there are three different 16 bits value reported */
|
||||
/* the lowest one is the most significant */
|
||||
/*
|
||||
* With Seagate disks, there are three different 16 bits value reported
|
||||
* the lowest one is the most significant
|
||||
*/
|
||||
double r = smart_afr_value(SMART_188_R, SMART_188_STEP, smart[188].raw & mask16);
|
||||
if (afr < r)
|
||||
afr = r;
|
||||
|
|
@ -468,9 +472,9 @@ static double poisson_prob_at_least_one_failure(double rate)
|
|||
* Probability of having data loss in a RAID system with the specified ::redundancy
|
||||
* supposing the specified ::array_failure_rate, and ::replace_rate.
|
||||
*/
|
||||
static double raid_prob_of_one_or_more_failures(double array_failure_rate, double replace_rate, unsigned n, unsigned redundancy)
|
||||
static double raid_prob_of_one_or_more_failures(double array_failure_rate, double replace_rate, size_t n, size_t redundancy)
|
||||
{
|
||||
unsigned i;
|
||||
size_t i;
|
||||
double MTBF;
|
||||
double MTTR;
|
||||
double MTTDL;
|
||||
|
|
@ -488,12 +492,16 @@ static double raid_prob_of_one_or_more_failures(double array_failure_rate, doubl
|
|||
if (array_failure_rate == 0)
|
||||
return 0;
|
||||
|
||||
/* get the Mean Time Between Failure of a single disk */
|
||||
/* from the array failure rate */
|
||||
/*
|
||||
* Get the Mean Time Between Failure of a single disk
|
||||
* from the array failure rate
|
||||
*/
|
||||
MTBF = n / array_failure_rate;
|
||||
|
||||
/* get the Mean Time Between Repair (the time that a failed disk is replaced) */
|
||||
/* from the repair rate */
|
||||
/*
|
||||
* Get the Mean Time Between Repair (the time that a failed disk is replaced)
|
||||
* from the repair rate
|
||||
*/
|
||||
MTTR = 1.0 / replace_rate;
|
||||
|
||||
/* use the approximated MTTDL equation */
|
||||
|
|
@ -525,14 +533,45 @@ static void state_info_log(devinfo_t* devinfo)
|
|||
log_tag("attr:%s:%s:rotationrate:%" PRIu64 "\n", devinfo->file, devinfo->name, devinfo->info[INFO_ROTATION_RATE]);
|
||||
}
|
||||
|
||||
static void state_smart_ignore(struct snapraid_state* state, devinfo_t* devinfo)
|
||||
static void smart_attr_clear(struct smart_attr* attr)
|
||||
{
|
||||
attr->raw = SMART_UNASSIGNED;
|
||||
attr->norm = SMART_UNASSIGNED;
|
||||
attr->worst = SMART_UNASSIGNED;
|
||||
attr->thresh = SMART_UNASSIGNED;
|
||||
}
|
||||
|
||||
void state_smart_ignore(struct snapraid_state* state, devinfo_t* devinfo)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
/* clear attributes to ignore */
|
||||
for (int i = 0; i < SMART_IGNORE_MAX; ++i) {
|
||||
if (state->smartignore[i] < 256)
|
||||
devinfo->smart[state->smartignore[i]].raw = SMART_UNASSIGNED;
|
||||
if (devinfo->smartignore[i] < 256)
|
||||
devinfo->smart[devinfo->smartignore[i]].raw = SMART_UNASSIGNED;
|
||||
for (i = 0; i < SMART_IGNORE_MAX; ++i) {
|
||||
/* global ignore */
|
||||
if (state->smartignore[i].attr_index > 0 && state->smartignore[i].attr_index < 256) {
|
||||
smart_attr_clear(&devinfo->smart[state->smartignore[i].attr_index]);
|
||||
}
|
||||
if (state->smartignore[i].attr_name[0] != 0) {
|
||||
for (j = 0; j < SMART_COUNT; ++j) {
|
||||
if (devinfo->smart[j].name[0] != 0
|
||||
&& strcasecmp(devinfo->smart[j].name, state->smartignore[i].attr_name) == 0) {
|
||||
smart_attr_clear(&devinfo->smart[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* devinfo ignore */
|
||||
if (devinfo->smartignore[i].attr_index > 0 && devinfo->smartignore[i].attr_index < 256) {
|
||||
smart_attr_clear(&devinfo->smart[devinfo->smartignore[i].attr_index]);
|
||||
}
|
||||
if (devinfo->smartignore[i].attr_name[0] != 0) {
|
||||
for (j = 0; j < SMART_COUNT; ++j) {
|
||||
if (devinfo->smart[j].name[0] != 0
|
||||
&& strcasecmp(devinfo->smart[j].name, devinfo->smartignore[i].attr_name) == 0) {
|
||||
smart_attr_clear(&devinfo->smart[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -575,9 +614,9 @@ static void state_smart_log(devinfo_t* devinfo, double afr)
|
|||
else if (attr->flags & SMART_ATTR_WHEN_FAILED_NEVER)
|
||||
when_failed = "never";
|
||||
|
||||
char norm[64] = { 0 };
|
||||
char worst[64] = { 0 };
|
||||
char thresh[64] = { 0 };
|
||||
char norm[SMART_MAX] = { 0 };
|
||||
char worst[SMART_MAX] = { 0 };
|
||||
char thresh[SMART_MAX] = { 0 };
|
||||
|
||||
if (attr->norm != SMART_UNASSIGNED)
|
||||
snprintf(norm, sizeof(norm), "%" PRIu64, attr->norm);
|
||||
|
|
@ -595,13 +634,13 @@ static void state_smart_log(devinfo_t* devinfo, double afr)
|
|||
log_tag("attr:%s:%s:temperature:%d\n", devinfo->file, devinfo->name, temp);
|
||||
}
|
||||
|
||||
static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* low)
|
||||
static void state_smart(struct snapraid_state* state, size_t n, tommy_list* low)
|
||||
{
|
||||
tommy_node* i;
|
||||
unsigned j;
|
||||
size_t device_pad;
|
||||
size_t serial_pad;
|
||||
int have_parent;
|
||||
int have_array;
|
||||
double array_failure_rate;
|
||||
double p_at_least_one_failure;
|
||||
int make_it_fail = 0;
|
||||
|
|
@ -610,7 +649,7 @@ static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* lo
|
|||
/* compute lengths for padding */
|
||||
device_pad = 0;
|
||||
serial_pad = 0;
|
||||
have_parent = 0;
|
||||
have_array = 0;
|
||||
for (i = tommy_list_head(low); i != 0; i = i->next) {
|
||||
size_t len;
|
||||
devinfo_t* devinfo = i->data;
|
||||
|
|
@ -623,8 +662,8 @@ static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* lo
|
|||
if (len > serial_pad)
|
||||
serial_pad = len;
|
||||
|
||||
if (devinfo->parent != 0)
|
||||
have_parent = 1;
|
||||
if (devinfo->is_array)
|
||||
have_array = 1;
|
||||
}
|
||||
|
||||
printf("SnapRAID SMART report:\n");
|
||||
|
|
@ -697,8 +736,10 @@ static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* lo
|
|||
if (flag & (SMARTCTL_FLAG_FAIL | SMARTCTL_FLAG_PREFAIL))
|
||||
make_it_fail = 1;
|
||||
|
||||
/* note that in older smartmontools, like 5.x, rotation rate is not present */
|
||||
/* and then it could remain unassigned */
|
||||
/*
|
||||
* Note that in older smartmontools, like 5.x, rotation rate is not present
|
||||
* and then it could remain unassigned
|
||||
*/
|
||||
|
||||
if (flag & (SMARTCTL_FLAG_UNSUPPORTED | SMARTCTL_FLAG_OPEN)) {
|
||||
/* if error running smartctl, skip AFR estimation */
|
||||
|
|
@ -715,8 +756,8 @@ static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* lo
|
|||
/* this happens only if no data */
|
||||
printf(" -");
|
||||
} else {
|
||||
/* use only the disks in the array */
|
||||
if (devinfo->parent != 0 || !have_parent)
|
||||
/* compute failure rate only for array disks (or fallback to all disks if none are array members) */
|
||||
if (devinfo->is_array || !have_array)
|
||||
array_failure_rate += afr;
|
||||
|
||||
printf("%4.0f%%", poisson_prob_at_least_one_failure(afr) * 100);
|
||||
|
|
@ -787,12 +828,23 @@ static void state_smart(struct snapraid_state* state, unsigned n, tommy_list* lo
|
|||
printf(" -----------------------------------------------------------------------\n");
|
||||
for (j = 0; j < RAID_PARITY_MAX; ++j) {
|
||||
printf("%6u", j + 1);
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 7, n, j + 1) * 100, 19);
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 30, n, j + 1) * 100, 17);
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 90, n, j + 1) * 100, 13);
|
||||
|
||||
if (j + 1 >= n) {
|
||||
printf(" ");
|
||||
printl("N/A", 19);
|
||||
printf(" ");
|
||||
printl("N/A", 17);
|
||||
printf(" ");
|
||||
printl("N/A", 13);
|
||||
} else {
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 7, n, j + 1) * 100, 19);
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 30, n, j + 1) * 100, 17);
|
||||
printf(" ");
|
||||
printp(raid_prob_of_one_or_more_failures(array_failure_rate, 365.0 / 90, n, j + 1) * 100, 13);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
@ -935,6 +987,41 @@ static void state_devices(struct snapraid_state* state, tommy_list* low)
|
|||
}
|
||||
}
|
||||
|
||||
static void state_devices_check(struct snapraid_state* state, tommy_list* low)
|
||||
{
|
||||
tommy_node* i;
|
||||
|
||||
if (state->opt.no_warnings || state->opt.skip_device)
|
||||
return;
|
||||
|
||||
for (i = tommy_list_head(low); i != 0; i = i->next) {
|
||||
devinfo_t* d1 = i->data;
|
||||
tommy_node* j;
|
||||
|
||||
for (j = i->next; j != 0; j = j->next) {
|
||||
devinfo_t* d2 = j->data;
|
||||
|
||||
if (d1->device == d2->device && d1->parent && d2->parent) {
|
||||
devinfo_t* p1 = d1->parent;
|
||||
devinfo_t* p2 = d2->parent;
|
||||
|
||||
/* only check conflict between array members (data/parity) */
|
||||
if (!p1->is_array || !p2->is_array)
|
||||
continue;
|
||||
|
||||
/* ignore extents of the same member or splits of the same parity level */
|
||||
devinfo_t* a1 = p1->split ? p1->split : p1;
|
||||
devinfo_t* a2 = p2->split ? p2->split : p2;
|
||||
if (a1 == a2)
|
||||
continue;
|
||||
|
||||
log_error(EUSER, "WARNING! Disks '%s' and '%s' share physical device '%s'.\n", p1->name, p2->name, d1->file);
|
||||
log_error(EUSER, "This configuration does not provide independent physical fault domains.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int devtest(tommy_list* high, tommy_list* low, int operation)
|
||||
{
|
||||
tommy_node* i;
|
||||
|
|
@ -954,6 +1041,7 @@ int devtest(tommy_list* high, tommy_list* low, int operation)
|
|||
|
||||
/* fake device number */
|
||||
entry->device = tommy_strhash_u32(0, devinfo->name);
|
||||
entry->is_array = devinfo->is_array;
|
||||
|
||||
tommy_list_insert_tail(low, &entry->node, entry);
|
||||
|
||||
|
|
@ -1004,26 +1092,32 @@ int devtest(tommy_list* high, tommy_list* low, int operation)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int state_device(struct snapraid_state* state, int operation, tommy_list* filterlist_disk)
|
||||
void state_devmap(struct snapraid_state* state)
|
||||
{
|
||||
/* map device if not already done */
|
||||
if (!state->mapped_device) {
|
||||
devmap();
|
||||
state->mapped_device = 1;
|
||||
}
|
||||
}
|
||||
|
||||
int state_device_force(struct snapraid_state* state, int operation, tommy_list* filterlist_disk, int force)
|
||||
{
|
||||
tommy_node* i;
|
||||
unsigned j;
|
||||
tommy_list high;
|
||||
tommy_list low;
|
||||
int ret;
|
||||
int sync_failed = 0;
|
||||
time_t now = time(0);
|
||||
|
||||
/* map device if not already done */
|
||||
if (!state->mapped_device) {
|
||||
devmap();
|
||||
state->mapped_device = 1;
|
||||
}
|
||||
|
||||
switch (operation) {
|
||||
case DEVICE_UP : msg_progress("Spinup...\n"); break;
|
||||
case DEVICE_DOWN : msg_progress("Spindown...\n"); break;
|
||||
}
|
||||
|
||||
state_devmap(state);
|
||||
|
||||
tommy_list_init(&high);
|
||||
tommy_list_init(&low);
|
||||
|
||||
|
|
@ -1035,12 +1129,18 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
if (filterlist_disk != 0 && filter_path(filterlist_disk, 0, disk->name, 0) != 0)
|
||||
continue;
|
||||
|
||||
/* skips inaccessible disks from all device operations */
|
||||
if (disk->skip_access)
|
||||
continue;
|
||||
|
||||
entry = calloc_nofail(1, sizeof(devinfo_t));
|
||||
|
||||
entry->device = disk->device;
|
||||
entry->device = disk->mount_device;
|
||||
device_name_set(entry, disk->name, 0);
|
||||
entry->is_array = 1;
|
||||
pathcpy(entry->mount, sizeof(entry->mount), disk->dir);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), disk->smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), disk->smartctl_info);
|
||||
memcpy(entry->smartignore, disk->smartignore, sizeof(entry->smartignore));
|
||||
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
|
|
@ -1055,6 +1155,10 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
if (filterlist_disk != 0 && filter_path(filterlist_disk, 0, lev_config_name(j), 0) != 0)
|
||||
continue;
|
||||
|
||||
/* skips inaccessible parities from all device operations */
|
||||
if (state->parity[j].skip_access)
|
||||
continue;
|
||||
|
||||
for (s = 0; s < state->parity[j].split_mac; ++s) {
|
||||
entry = calloc_nofail(1, sizeof(devinfo_t));
|
||||
|
||||
|
|
@ -1066,8 +1170,10 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
|
||||
entry->device = state->parity[j].split_map[s].device;
|
||||
device_name_set(entry, lev_config_name(j), s);
|
||||
entry->is_array = 1;
|
||||
pathcpy(entry->mount, sizeof(entry->mount), state->parity[j].split_map[s].path);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), state->parity[j].smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), state->parity[j].smartctl_info);
|
||||
memcpy(entry->smartignore, state->parity[j].smartignore, sizeof(entry->smartignore));
|
||||
pathcut(entry->mount); /* remove the parity file */
|
||||
|
||||
|
|
@ -1075,49 +1181,73 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
}
|
||||
}
|
||||
|
||||
/* extra disks are never spundown or spunup */
|
||||
int include_extra = 1;
|
||||
switch (operation) {
|
||||
case DEVICE_UP :
|
||||
case DEVICE_DOWN :
|
||||
case DEVICE_DOWNIFUP :
|
||||
include_extra = 0;
|
||||
break;
|
||||
}
|
||||
if (include_extra) {
|
||||
/* for all extra disks */
|
||||
for (i = state->extralist; i != 0; i = i->next) {
|
||||
struct snapraid_extra* extra = i->data;
|
||||
devinfo_t* entry;
|
||||
/* for all extra disks */
|
||||
for (i = state->extralist; i != 0; i = i->next) {
|
||||
struct snapraid_extra* extra = i->data;
|
||||
devinfo_t* entry;
|
||||
|
||||
if (filterlist_disk != 0 && filter_path(filterlist_disk, 0, extra->name, 0) != 0)
|
||||
continue;
|
||||
if (filterlist_disk != 0 && filter_path(filterlist_disk, 0, extra->name, 0) != 0)
|
||||
continue;
|
||||
|
||||
entry = calloc_nofail(1, sizeof(devinfo_t));
|
||||
entry = calloc_nofail(1, sizeof(devinfo_t));
|
||||
|
||||
entry->device = extra->device;
|
||||
device_name_set(entry, extra->name, 0);
|
||||
pathcpy(entry->mount, sizeof(entry->mount), extra->dir);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), extra->smartctl);
|
||||
memcpy(entry->smartignore, extra->smartignore, sizeof(extra->smartignore));
|
||||
entry->device = extra->device;
|
||||
device_name_set(entry, extra->name, 0);
|
||||
entry->is_array = 0;
|
||||
pathcpy(entry->mount, sizeof(entry->mount), extra->dir);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), extra->smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), extra->smartctl_info);
|
||||
memcpy(entry->smartignore, extra->smartignore, sizeof(entry->smartignore));
|
||||
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
}
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
}
|
||||
|
||||
/* with a GUI always gives time reference */
|
||||
if (state->opt.gui)
|
||||
log_tag("unixtime:%" PRIi64 "\n", (int64_t)now);
|
||||
|
||||
int degraded = 0;
|
||||
int query_failed = 0;
|
||||
|
||||
if (state->opt.fake_device) {
|
||||
ret = devtest(&high, &low, operation);
|
||||
} else {
|
||||
ret = devquery(&high, &low, operation);
|
||||
/*
|
||||
* Flush before DOWN, but not DOWNIFUP: syncfs() could wake disks
|
||||
* already in standby during the repeated thermal cooldown checks.
|
||||
*/
|
||||
if (operation == DEVICE_DOWN) {
|
||||
ret = devsync(&high);
|
||||
if (ret != 0) {
|
||||
/* thermal cooldown must attempt spindown even after a failed flush */
|
||||
if (!force)
|
||||
goto bail;
|
||||
sync_failed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
ret = devquery(&high, &low);
|
||||
if (ret > 0) {
|
||||
degraded = 1;
|
||||
ret = 0;
|
||||
} else if (ret < 0 && !tommy_list_empty(&low)) {
|
||||
/* keep operating on devices resolved before or after a failed disk */
|
||||
query_failed = 1;
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* if the list is empty, it's not supported in this platform */
|
||||
if (ret == 0 && tommy_list_empty(&low))
|
||||
ret = -1;
|
||||
if (ret == 0 && tommy_list_empty(&low)) {
|
||||
if (tommy_list_empty(&high)) {
|
||||
ret = -1;
|
||||
log_error(ESOFT, "No accessible devices selected for this operation.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* not an error, the selected disks are on network or virtual filesystems without a block device to manage */
|
||||
msg_info("No physical devices found for the selected disks, nothing to do.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
if (ret != 0) {
|
||||
const char* ope = 0;
|
||||
|
|
@ -1129,10 +1259,18 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
case DEVICE_PROBE : ope = "Probe"; break;
|
||||
case DEVICE_DOWNIFUP : ope = "Spindown"; break;
|
||||
}
|
||||
log_fatal(ESOFT, "%s is unsupported in this platform.\n", ope);
|
||||
log_error(ESOFT, "%s is unsupported in this platform.\n", ope);
|
||||
} else {
|
||||
state_stat(state, &high);
|
||||
|
||||
state_devices_check(state, &low);
|
||||
|
||||
if (!state->opt.fake_device) {
|
||||
ret = devrun(&low, operation);
|
||||
if (ret != 0)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
if (operation == DEVICE_SMART)
|
||||
state_smart(state, state->level + tommy_list_count(&state->disklist), &low);
|
||||
|
||||
|
|
@ -1146,9 +1284,22 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
state_devices(state, &low);
|
||||
}
|
||||
|
||||
bail:
|
||||
tommy_list_foreach(&high, free);
|
||||
tommy_list_foreach(&low, free);
|
||||
|
||||
if (ret == 0 && degraded)
|
||||
ret = 1;
|
||||
if (ret == 0 && query_failed)
|
||||
ret = -1;
|
||||
if (sync_failed)
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int state_device(struct snapraid_state* state, int operation, tommy_list* filterlist_disk)
|
||||
{
|
||||
return state_device_force(state, operation, filterlist_disk, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -60,11 +60,14 @@ static void dry_data_reader(struct snapraid_worker* worker, struct snapraid_task
|
|||
ret = handle_close(handle);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
/* This one is really an unexpected error, because we are only reading */
|
||||
/* and closing a descriptor should never fail */
|
||||
log_tag("%s:%u:%s:%s: Close error. %s.\n", es(errno), blockcur, disk->name, esc_tag(report->sub), strerror(errno));
|
||||
|
||||
/*
|
||||
* This one is really an unexpected error, because we are only reading
|
||||
* and closing a descriptor should never fail
|
||||
*/
|
||||
log_tag("%s::%s:%s: Close error. %s.\n", es(errno), disk->name, esc_tag(report->sub), strerror(errno));
|
||||
log_fatal_errno(errno, disk->name);
|
||||
log_fatal(errno, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(errno, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
|
||||
if (is_hw(errno)) {
|
||||
task->state = TASK_STATE_IOERROR;
|
||||
|
|
@ -78,11 +81,11 @@ static void dry_data_reader(struct snapraid_worker* worker, struct snapraid_task
|
|||
|
||||
ret = handle_open(handle, task->file, state->file_mode, 0);
|
||||
if (ret == -1) {
|
||||
log_tag("%s:%u:%s:%s: Open error. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), strerror(errno));
|
||||
log_tag("%s:%" PRIu64 ":%s:%s: Open error. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, disk->name);
|
||||
log_fatal(errno, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(errno, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
task->state = TASK_STATE_IOERROR;
|
||||
return;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -94,7 +97,7 @@ static void dry_data_reader(struct snapraid_worker* worker, struct snapraid_task
|
|||
|
||||
task->read_size = handle_read(handle, task->file_pos, buffer, state->block_size, 0);
|
||||
if (task->read_size == -1) {
|
||||
log_tag("%s:%u:%s:%s: Read error at position %u. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), task->file_pos, strerror(errno));
|
||||
log_tag("%s:%" PRIu64 ":%s:%s: Read error at position %" PRIu64 ". %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), task->file_pos, strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, disk->name);
|
||||
|
|
@ -126,7 +129,7 @@ static void dry_parity_reader(struct snapraid_worker* worker, struct snapraid_ta
|
|||
/* read the parity */
|
||||
ret = parity_read(parity_handle, blockcur, buffer, state->block_size);
|
||||
if (ret == -1) {
|
||||
log_tag("parity_%s:%u:%s: Read error. %s.\n", es(errno), blockcur, lev_config_name(level), strerror(errno));
|
||||
log_tag("parity_%s:%" PRIu64 ":%s: Read error. %s.\n", es(errno), blockcur, lev_config_name(level), strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, lev_config_name(level));
|
||||
|
|
@ -165,11 +168,11 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
buffermax = diskmax + 2 * state->level;
|
||||
|
||||
/* initialize the io threads */
|
||||
io_init(&io, state, state->opt.io_cache, buffermax, dry_data_reader, handle, diskmax, dry_parity_reader, 0, parity_handle, state->level);
|
||||
io_init(&io, state, state->opt.io_cache, buffermax, handle, diskmax, 0, dry_data_reader, 0, parity_handle, state->level, 0, dry_parity_reader, 0);
|
||||
|
||||
/* possibly waiting disks */
|
||||
waiting_mac = diskmax > RAID_PARITY_MAX ? diskmax : RAID_PARITY_MAX;
|
||||
waiting_map = malloc_nofail(waiting_mac * sizeof(unsigned));
|
||||
waiting_map = nalloc_nofail(waiting_mac, sizeof(unsigned));
|
||||
|
||||
soft_error = 0;
|
||||
io_error = 0;
|
||||
|
|
@ -182,17 +185,15 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
countpos = 0;
|
||||
blockcur = blockstart;
|
||||
|
||||
/* start all the worker threads */
|
||||
io_start(&io, blockstart, blockmax, 0);
|
||||
|
||||
blockcur = blockstart;
|
||||
|
||||
int alert = state_progress_begin(state, blockstart, blockmax, countmax);
|
||||
if (alert > 0)
|
||||
goto end;
|
||||
if (alert < 0)
|
||||
goto bail;
|
||||
|
||||
/* start all the worker threads */
|
||||
io_start(&io, blockstart, blockmax, 0);
|
||||
|
||||
while (1) {
|
||||
void** buffer;
|
||||
|
||||
|
|
@ -207,7 +208,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
/* for each disk, process the block */
|
||||
for (j = 0; j < diskmax; ++j) {
|
||||
struct snapraid_task* task;
|
||||
int read_size;
|
||||
ssize_t read_size;
|
||||
struct snapraid_block* block;
|
||||
struct snapraid_disk* disk;
|
||||
unsigned diskcur;
|
||||
|
|
@ -258,7 +259,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
if (io_error >= state->opt.io_error_limit) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EIO, "DANGER! Too many input/output errors in the %s disk. It isn't possible to continue.\n", disk->dir);
|
||||
log_fatal(EIO, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(EIO, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -311,7 +312,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
if (io_error >= state->opt.io_error_limit) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EIO, "DANGER! Too many input/output errors in the %s disk. It isn't possible to continue.\n", lev_name(levcur));
|
||||
log_fatal(EIO, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(EIO, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -342,12 +343,18 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
|
||||
state_progress_stop(state);
|
||||
|
||||
/* complete all read-ahead without consuming the results */
|
||||
io_quiesce(&io);
|
||||
|
||||
state_thermal_cooldown(state);
|
||||
|
||||
state_progress_restart(state);
|
||||
|
||||
/* drop until now */
|
||||
state_usage_waste(state);
|
||||
|
||||
if (os_signal_interrupt())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -366,7 +373,11 @@ bail:
|
|||
ret = handle_close(&handle[j]);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("%s:%u:%s:%s: Close error. %s.\n", es(errno), blockcur, disk->name, esc_tag(file->sub), strerror(errno));
|
||||
/*
|
||||
* If handle_close fails, the handle was open (f != -1), which
|
||||
* guarantees that both file and disk pointers are valid.
|
||||
*/
|
||||
log_tag("%s::%s:%s: Close error. %s.\n", es(errno), disk->name, esc_tag(file->sub), strerror(errno));
|
||||
log_fatal_errno(errno, disk->name);
|
||||
|
||||
if (is_hw(errno)) {
|
||||
|
|
@ -383,8 +394,6 @@ bail:
|
|||
msg_status("\n");
|
||||
msg_status("%8u soft errors\n", soft_error);
|
||||
msg_status("%8u io errors\n", io_error);
|
||||
} else {
|
||||
msg_status("Everything OK\n");
|
||||
}
|
||||
|
||||
if (soft_error)
|
||||
|
|
@ -427,7 +436,7 @@ int state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
if (blockstart > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EUSER, "Error in the specified starting block %u. It's larger than the parity size %u.\n", blockstart, blockmax);
|
||||
log_fatal(EUSER, "Error in the specified starting block %" PRIu64 ". It's larger than the parity size %" PRIu64 ".\n", blockstart, blockmax);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -437,13 +446,15 @@ int state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
blockmax = blockstart + blockcount;
|
||||
}
|
||||
|
||||
/* open the file for reading */
|
||||
/* it may fail if the file doesn't exist, in this case we continue to dry the files */
|
||||
/*
|
||||
* Open the file for reading
|
||||
* it may fail if the file doesn't exist, in this case we continue to dry the files
|
||||
*/
|
||||
for (l = 0; l < state->level; ++l) {
|
||||
ret = parity_open(&parity_handle[l], &state->parity[l], l, state->file_mode, state->block_size, state->opt.parity_limit_size);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("parity_%s:%u:%s: Open error. %s.\n", es(errno), blockmax, lev_config_name(l), strerror(errno));
|
||||
log_tag("parity_%s:%u:%s: Open error. %s.\n", es(errno), 0, lev_config_name(l), strerror(errno));
|
||||
log_fatal_errno(errno, lev_config_name(l));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -468,7 +479,7 @@ int state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
ret = parity_close(&parity_handle[l]);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("parity_%s:%u:%s: Close error. %s.\n", es(errno), blockmax, lev_config_name(l), strerror(errno));
|
||||
log_tag("parity_%s::%s: Close error. %s.\n", es(errno), lev_config_name(l), strerror(errno));
|
||||
log_fatal_errno(errno, lev_config_name(l));
|
||||
|
||||
++process_error;
|
||||
|
|
@ -479,6 +490,14 @@ int state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
if (process_error != 0)
|
||||
return -1;
|
||||
|
||||
if (log_hardware_errors() != 0) {
|
||||
msg_status("Everything done, but hardware errors were encountered in the process\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
msg_status("Everything OK\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "util.h"
|
||||
|
|
@ -22,24 +22,37 @@ struct snapraid_hash {
|
|||
tommy_hashdyn_node node;
|
||||
};
|
||||
|
||||
static void hash_size_store(unsigned char* ptr, uint64_t size)
|
||||
{
|
||||
ptr[0] = (unsigned char)(size >> 0);
|
||||
ptr[1] = (unsigned char)(size >> 8);
|
||||
ptr[2] = (unsigned char)(size >> 16);
|
||||
ptr[3] = (unsigned char)(size >> 24);
|
||||
ptr[4] = (unsigned char)(size >> 32);
|
||||
ptr[5] = (unsigned char)(size >> 40);
|
||||
ptr[6] = (unsigned char)(size >> 48);
|
||||
ptr[7] = (unsigned char)(size >> 56);
|
||||
}
|
||||
|
||||
struct snapraid_hash* hash_alloc(struct snapraid_state* state, struct snapraid_disk* disk, struct snapraid_file* file)
|
||||
{
|
||||
struct snapraid_hash* hash;
|
||||
block_off_t i;
|
||||
unsigned char* buf;
|
||||
size_t hash_size = BLOCK_HASH_SIZE;
|
||||
size_t data_size = file->blockmax * hash_size;
|
||||
|
||||
hash = malloc_nofail(sizeof(struct snapraid_hash));
|
||||
hash->disk = disk;
|
||||
hash->file = file;
|
||||
|
||||
buf = malloc_nofail(file->blockmax * hash_size);
|
||||
buf = malloc_nofail(data_size + sizeof(uint64_t));
|
||||
|
||||
/* set the back pointer */
|
||||
for (i = 0; i < file->blockmax; ++i) {
|
||||
struct snapraid_block* block = fs_file2block_get(file, i);
|
||||
|
||||
memcpy(buf + i * hash_size, block->hash, hash_size);
|
||||
hash_copy(buf + i * hash_size, block->hash);
|
||||
|
||||
if (!block_has_updated_hash(block)) {
|
||||
free(buf);
|
||||
|
|
@ -48,20 +61,28 @@ struct snapraid_hash* hash_alloc(struct snapraid_state* state, struct snapraid_d
|
|||
}
|
||||
}
|
||||
|
||||
memhash(state->besthash, state->hashseed, hash->hash, buf, file->blockmax * hash_size);
|
||||
hash_size_store(buf + data_size, (uint64_t)file->size);
|
||||
|
||||
memhash(state->besthash, state->hashseed, hash->hash, buf, data_size + sizeof(uint64_t));
|
||||
|
||||
free(buf);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
static inline tommy_uint32_t hash_hash(struct snapraid_hash* hash)
|
||||
static inline tommy_hash_t hash_hash(struct snapraid_hash* hash)
|
||||
{
|
||||
#if TOMMY_SIZE_BIT == 64
|
||||
return tommy_hash_u64(0, hash->hash, HASH_MAX);
|
||||
#else
|
||||
return tommy_hash_u32(0, hash->hash, HASH_MAX);
|
||||
#endif
|
||||
}
|
||||
|
||||
void hash_free(struct snapraid_hash* hash)
|
||||
static void hash_free(void* void_hash)
|
||||
{
|
||||
struct snapraid_hash* hash = void_hash;
|
||||
|
||||
free(hash);
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +116,7 @@ void state_dup(struct snapraid_state* state)
|
|||
for (j = disk->filelist; j != 0; j = j->next) {
|
||||
struct snapraid_file* file = j->data;
|
||||
struct snapraid_hash* hash;
|
||||
tommy_hash_t hash32;
|
||||
tommy_hash_t hash_val;
|
||||
|
||||
/* if empty, skip it */
|
||||
if (file->size == 0)
|
||||
|
|
@ -107,9 +128,9 @@ void state_dup(struct snapraid_state* state)
|
|||
if (!hash)
|
||||
continue;
|
||||
|
||||
hash32 = hash_hash(hash);
|
||||
hash_val = hash_hash(hash);
|
||||
|
||||
struct snapraid_hash* found = tommy_hashdyn_search(&hashset, hash_compare, hash->hash, hash32);
|
||||
struct snapraid_hash* found = tommy_hashdyn_search(&hashset, hash_compare, hash->hash, hash_val);
|
||||
if (found) {
|
||||
++count;
|
||||
size += found->file->size;
|
||||
|
|
@ -117,12 +138,12 @@ void state_dup(struct snapraid_state* state)
|
|||
printf("%12" PRIu64 " %s = %s\n", file->size, fmt_term(disk, file->sub), fmt_term(found->disk, found->file->sub));
|
||||
hash_free(hash);
|
||||
} else {
|
||||
tommy_hashdyn_insert(&hashset, &hash->node, hash, hash32);
|
||||
tommy_hashdyn_insert(&hashset, &hash->node, hash, hash_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tommy_hashdyn_foreach(&hashset, (tommy_foreach_func*)hash_free);
|
||||
tommy_hashdyn_foreach(&hashset, hash_free);
|
||||
tommy_hashdyn_done(&hashset);
|
||||
|
||||
msg_status("\n");
|
||||
|
|
|
|||
593
cmdline/elem.c
593
cmdline/elem.c
File diff suppressed because it is too large
Load diff
612
cmdline/elem.h
612
cmdline/elem.h
File diff suppressed because it is too large
Load diff
354
cmdline/handle.c
354
cmdline/handle.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "elem.h"
|
||||
#include "support.h"
|
||||
|
|
@ -10,10 +10,12 @@
|
|||
/****************************************************************************/
|
||||
/* handle */
|
||||
|
||||
int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, int mode)
|
||||
int handle_open_create(struct snapraid_handle* handle, struct snapraid_file* file, int mode, int create)
|
||||
{
|
||||
int ret;
|
||||
int flags;
|
||||
char path[PATH_MAX];
|
||||
char path_unrecoverable[PATH_MAX];
|
||||
|
||||
/* if it's the same file, and already opened, nothing to do */
|
||||
if (handle->file == file && handle->f != -1) {
|
||||
|
|
@ -21,58 +23,105 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, in
|
|||
}
|
||||
|
||||
advise_init(&handle->advise, mode);
|
||||
pathprint(handle->path, sizeof(handle->path), "%s%s", handle->disk->dir, file->sub);
|
||||
|
||||
ret = mkancestor(handle->path);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
pathprint(path, sizeof(path), "%s%s", handle->disk->dir, file->sub);
|
||||
pathprint(path_unrecoverable, sizeof(path_unrecoverable), "%s.unrecoverable", path);
|
||||
|
||||
/* initial values, changed later if required */
|
||||
handle->created = 0;
|
||||
handle->readonly_errno = 0;
|
||||
|
||||
/* flags for opening */
|
||||
/* O_BINARY: open as binary file (Windows only) */
|
||||
/* O_NOFOLLOW: do not follow links to ensure to open the real file */
|
||||
/*
|
||||
* Flags for opening
|
||||
* O_BINARY: open as binary file (Windows only)
|
||||
* O_NOFOLLOW: do not follow links to ensure to open the real file
|
||||
*/
|
||||
flags = O_BINARY | O_NOFOLLOW | advise_flags(&handle->advise);
|
||||
|
||||
/* open for read write */
|
||||
handle->f = open(handle->path, flags | O_RDWR);
|
||||
/*
|
||||
* If this recovery attempt was actually quarantined during the current fix run,
|
||||
* continue operating on its .unrecoverable copy.
|
||||
*
|
||||
* FILE_IS_QUARANTINED is runtime state and is not carried to a later fix.
|
||||
* FILE_IS_DAMAGED alone does not imply that the file was physically quarantined,
|
||||
* because some fix modes deliberately keep damaged files under their normal name.
|
||||
*/
|
||||
if (file_flag_has(file, FILE_IS_QUARANTINED)) {
|
||||
handle->f = open(path_unrecoverable, flags | O_RDWR);
|
||||
|
||||
/* if failed for missing write permission */
|
||||
if (handle->f == -1 && (errno == EACCES || errno == EROFS)) {
|
||||
/* open for read-only */
|
||||
handle->f = open(handle->path, flags | O_RDONLY);
|
||||
}
|
||||
|
||||
/* if failed for missing file */
|
||||
if (handle->f == -1 && errno == ENOENT) {
|
||||
char path_from[PATH_MAX];
|
||||
|
||||
/* check if exists a .unrecoverable copy, and rename to the real one */
|
||||
pathprint(path_from, sizeof(path_from), "%s.unrecoverable", handle->path);
|
||||
|
||||
if (rename(path_from, handle->path) == 0) {
|
||||
/* open for read write */
|
||||
handle->f = open(handle->path, flags | O_RDWR);
|
||||
} else {
|
||||
/* create it */
|
||||
handle->f = open(handle->path, flags | O_RDWR | O_CREAT, 0600);
|
||||
/* if failed for missing write permission */
|
||||
if (handle->f == -1 && (errno == EACCES || errno == EROFS)) {
|
||||
int saved_errno = errno;
|
||||
/* open for read-only */
|
||||
handle->f = open(path_unrecoverable, flags | O_RDONLY);
|
||||
if (handle->f != -1) {
|
||||
/* mark it as created if really done */
|
||||
handle->created = 1;
|
||||
handle->readonly_errno = saved_errno;
|
||||
}
|
||||
}
|
||||
|
||||
pathcpy(handle->path, sizeof(handle->path), path_unrecoverable);
|
||||
} else {
|
||||
/*
|
||||
* Start every recovery attempt from the normal filename.
|
||||
*
|
||||
* Do not reuse an .unrecoverable file left by a previous fix. It may
|
||||
* contain recovered CHG blocks whose CURRENT generation could not be
|
||||
* proven. That ambiguity is runtime state and is not persisted with
|
||||
* the file. Reopening such a file in a later fix would make those CHG
|
||||
* blocks appear merely readable and could incorrectly treat them as
|
||||
* valid CURRENT data.
|
||||
*
|
||||
* A previous .unrecoverable file is therefore kept only as the
|
||||
* best-effort result of that recovery attempt, not as input for a
|
||||
* subsequent one.
|
||||
*/
|
||||
handle->f = open(path, flags | O_RDWR);
|
||||
|
||||
/* if failed for missing write permission */
|
||||
if (handle->f == -1 && (errno == EACCES || errno == EROFS)) {
|
||||
int saved_errno = errno;
|
||||
/* open for read-only */
|
||||
handle->f = open(path, flags | O_RDONLY);
|
||||
if (handle->f != -1) {
|
||||
handle->readonly_errno = saved_errno;
|
||||
}
|
||||
}
|
||||
|
||||
/* if failed for missing file and creation allowed */
|
||||
if (handle->f == -1 && errno == ENOENT && create) {
|
||||
ret = mkancestor(path);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
handle->f = open(path, flags | O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
if (handle->f != -1) {
|
||||
handle->created = 1;
|
||||
} else if (errno == EEXIST) {
|
||||
/* if created concurrently, reopen safely */
|
||||
handle->f = open(path, flags | O_RDWR);
|
||||
}
|
||||
}
|
||||
|
||||
pathcpy(handle->path, sizeof(handle->path), path);
|
||||
}
|
||||
|
||||
if (handle->f == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error opening file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
/*
|
||||
* If creation was not requested, a missing file is an expected condition,
|
||||
* not a fatal error.
|
||||
*/
|
||||
if (create || (errno != ENOENT && errno != ENOTDIR)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error opening file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
int saved_errno = errno;
|
||||
handle_close(handle);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* just opened */
|
||||
|
|
@ -88,8 +137,14 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, in
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* get the size of the existing data */
|
||||
handle->valid_size = handle->st.st_size;
|
||||
if (!S_ISREG(handle->st.st_mode)) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(errno, "Error accessing file '%s' for not regular file.\n", handle->path);
|
||||
handle_close(handle);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = advise_open(&handle->advise, handle->f);
|
||||
if (ret != 0) {
|
||||
|
|
@ -103,10 +158,109 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, in
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move an opened file to its persistent .unrecoverable name.
|
||||
*/
|
||||
int handle_quarantine(struct snapraid_handle* handle, struct snapraid_file* file, int mode)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
char path_to[PATH_MAX];
|
||||
int ret;
|
||||
|
||||
(void)mode;
|
||||
|
||||
/* already quarantined during the current fix run */
|
||||
if (file_flag_has(file, FILE_IS_QUARANTINED))
|
||||
return 0;
|
||||
|
||||
/* mark this recovery attempt as damaged */
|
||||
file_flag_set(file, FILE_IS_DAMAGED);
|
||||
|
||||
pathprint(path, sizeof(path), "%s%s", handle->disk->dir, file->sub);
|
||||
pathprint(path_to, sizeof(path_to), "%s%s.unrecoverable", handle->disk->dir, file->sub);
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* Windows may not allow renaming an opened file. Close it before
|
||||
* replacing the previous quarantine and renaming the current file.
|
||||
*/
|
||||
ret = handle_close(handle);
|
||||
if (ret != 0)
|
||||
return -1;
|
||||
|
||||
ret = rename(path, path_to);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error renaming file '%s' to '%s'. %s.\n", path, path_to, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
file_flag_set(file, FILE_IS_QUARANTINED);
|
||||
|
||||
/*
|
||||
* FILE_IS_QUARANTINED is set, so handle_open_create() reopens the
|
||||
* .unrecoverable file belonging to the current recovery attempt.
|
||||
*/
|
||||
ret = handle_open_create(handle, file, mode, 0);
|
||||
if (ret != 0)
|
||||
return -1;
|
||||
#else
|
||||
/*
|
||||
* POSIX rename() atomically replaces an existing destination file.
|
||||
* The opened descriptor continues to reference the renamed inode, so
|
||||
* no close/reopen is required.
|
||||
*/
|
||||
ret = rename(path, path_to);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error renaming file '%s' to '%s'. %s.\n", path, path_to, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
file_flag_set(file, FILE_IS_QUARANTINED);
|
||||
pathcpy(handle->path, sizeof(handle->path), path_to);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an .unrecoverable file left by a previous recovery attempt.
|
||||
*/
|
||||
int handle_unrecoverable_remove(struct snapraid_handle* handle, struct snapraid_file* file)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
int ret;
|
||||
|
||||
pathprint(path, sizeof(path), "%s%s.unrecoverable", handle->disk->dir, file->sub);
|
||||
|
||||
ret = remove(path);
|
||||
if (ret != 0 && errno != ENOENT) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error removing file '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int handle_truncate(struct snapraid_handle* handle, struct snapraid_file* file)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (handle->readonly_errno != 0) {
|
||||
if (file->size == handle->st.st_size)
|
||||
return 0;
|
||||
/* LCOV_EXCL_START */
|
||||
errno = handle->readonly_errno;
|
||||
log_fatal(errno, "Failed to truncate file '%s' for missing write permission. %s.\n", handle->path, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = ftruncate(handle->f, file->size);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -119,8 +273,8 @@ int handle_truncate(struct snapraid_handle* handle, struct snapraid_file* file)
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* adjust the size to the truncated size */
|
||||
handle->valid_size = file->size;
|
||||
/* keep the cached EOF current; the other stat fields remain the open snapshot */
|
||||
handle->st.st_size = file->size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -134,7 +288,7 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int
|
|||
out_missing = log_error;
|
||||
|
||||
/* if already opened, nothing to do */
|
||||
if (handle->file == file && handle->file != 0 && handle->f != -1) {
|
||||
if (handle->file != 0 && handle->file == file && handle->f != -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -143,10 +297,13 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int
|
|||
|
||||
/* for sure not created */
|
||||
handle->created = 0;
|
||||
handle->readonly_errno = 0;
|
||||
|
||||
/* flags for opening */
|
||||
/* O_BINARY: open as binary file (Windows only) */
|
||||
/* O_NOFOLLOW: do not follow links to ensure to open the real file */
|
||||
/*
|
||||
* Flags for opening
|
||||
* O_BINARY: open as binary file (Windows only)
|
||||
* O_NOFOLLOW: do not follow links to ensure to open the real file
|
||||
*/
|
||||
flags = O_BINARY | O_NOFOLLOW | advise_flags(&handle->advise);
|
||||
|
||||
/* open for read */
|
||||
|
|
@ -175,8 +332,14 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* get the size of the existing data */
|
||||
handle->valid_size = handle->st.st_size;
|
||||
if (!S_ISREG(handle->st.st_mode)) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_error(errno, "Error accessing file '%s' for not regular file.\n", handle->path);
|
||||
handle_close(handle);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = advise_open(&handle->advise, handle->f);
|
||||
if (ret != 0) {
|
||||
|
|
@ -192,22 +355,29 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int
|
|||
|
||||
int handle_close(struct snapraid_handle* handle)
|
||||
{
|
||||
int ret;
|
||||
int f_ret = 0;
|
||||
int f_errno = 0;
|
||||
|
||||
/* close if open */
|
||||
if (handle->f != -1) {
|
||||
advise_close(&handle->advise, handle->f);
|
||||
int ret = advise_close(&handle->advise, handle->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
f_ret = -1;
|
||||
f_errno = errno;
|
||||
log_fatal(errno, "Error advising file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = close(handle->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (f_ret == 0) {
|
||||
f_ret = -1;
|
||||
f_errno = errno;
|
||||
}
|
||||
log_fatal(errno, "Error closing file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
|
||||
/* invalidate for error */
|
||||
handle->file = 0;
|
||||
handle->f = -1;
|
||||
handle->valid_size = 0;
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
|
@ -215,28 +385,31 @@ int handle_close(struct snapraid_handle* handle)
|
|||
/* reset the descriptor */
|
||||
handle->file = 0;
|
||||
handle->f = -1;
|
||||
handle->valid_size = 0;
|
||||
handle->readonly_errno = 0;
|
||||
|
||||
return 0;
|
||||
if (f_ret != 0)
|
||||
errno = f_errno;
|
||||
|
||||
return f_ret;
|
||||
}
|
||||
|
||||
int handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned char* block_buffer, unsigned block_size, log_ptr* out_missing)
|
||||
ssize_t handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned char* block_buffer, unsigned block_size, log_ptr* out_missing)
|
||||
{
|
||||
ssize_t read_ret;
|
||||
data_off_t offset;
|
||||
unsigned read_size;
|
||||
size_t read_size;
|
||||
unsigned count;
|
||||
int ret;
|
||||
|
||||
offset = file_pos * (data_off_t)block_size;
|
||||
offset = file_pos * block_size;
|
||||
|
||||
if (!out_missing)
|
||||
out_missing = log_error;
|
||||
|
||||
/* check if we are going to read only not initialized data */
|
||||
if (offset >= handle->valid_size) {
|
||||
if (offset >= handle->st.st_size) {
|
||||
/* if the file is missing, it's at 0 size, or it's rebuilt while reading */
|
||||
if (offset == handle->valid_size || handle->valid_size == 0) {
|
||||
if (offset == handle->st.st_size || handle->st.st_size == 0) {
|
||||
errno = ENOENT;
|
||||
if (offset == 0) {
|
||||
out_missing(errno, "Missing file '%s'.\n", handle->path);
|
||||
|
|
@ -252,13 +425,15 @@ int handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned c
|
|||
|
||||
read_size = file_block_size(handle->file, file_pos, block_size);
|
||||
|
||||
count = 0;
|
||||
errno = 0;
|
||||
do {
|
||||
bw_limit(handle->bw, block_size - count);
|
||||
bw_limit(handle->bw, block_size);
|
||||
|
||||
count = 0;
|
||||
do {
|
||||
read_ret = pread(handle->f, block_buffer + count, block_size - count, offset + count);
|
||||
if (read_ret == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error reading file '%s' at offset %" PRIu64 " for size %u. %s.\n", handle->path, offset + count, block_size - count, strerror(errno));
|
||||
return -1;
|
||||
|
|
@ -266,8 +441,7 @@ int handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned c
|
|||
}
|
||||
if (read_ret == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno == 0)
|
||||
errno = ENXIO;
|
||||
errno = ENXIO;
|
||||
log_error(errno, "Unexpected end of file '%s' at offset %" PRIu64 ". %s.\n", handle->path, offset, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -296,20 +470,31 @@ int handle_write(struct snapraid_handle* handle, block_off_t file_pos, unsigned
|
|||
{
|
||||
ssize_t write_ret;
|
||||
data_off_t offset;
|
||||
unsigned write_size;
|
||||
unsigned count;
|
||||
ssize_t write_size;
|
||||
ssize_t count;
|
||||
int ret;
|
||||
|
||||
offset = file_pos * (data_off_t)block_size;
|
||||
if (handle->readonly_errno != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = handle->readonly_errno;
|
||||
log_fatal(errno, "Failed to write file '%s' for missing write permission. %s.\n", handle->path, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
offset = file_pos * block_size;
|
||||
|
||||
write_size = file_block_size(handle->file, file_pos, block_size);
|
||||
|
||||
bw_limit(handle->bw, write_size);
|
||||
|
||||
count = 0;
|
||||
do {
|
||||
bw_limit(handle->bw, write_size - count);
|
||||
|
||||
write_ret = pwrite(handle->f, block_buffer + count, write_size - count, offset + count);
|
||||
if (write_ret == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error writing file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
return -1;
|
||||
|
|
@ -326,10 +511,9 @@ int handle_write(struct snapraid_handle* handle, block_off_t file_pos, unsigned
|
|||
count += write_ret;
|
||||
} while (count < write_size);
|
||||
|
||||
/* adjust the size of the valid data */
|
||||
if (handle->valid_size < offset + write_size) {
|
||||
handle->valid_size = offset + write_size;
|
||||
}
|
||||
/* keep the cached EOF current; the other stat fields remain the open snapshot */
|
||||
if (handle->st.st_size < offset + write_size)
|
||||
handle->st.st_size = offset + write_size;
|
||||
|
||||
ret = advise_write(&handle->advise, handle->f, offset, block_size);
|
||||
if (ret != 0) {
|
||||
|
|
@ -369,6 +553,16 @@ struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* h
|
|||
unsigned size = 0;
|
||||
struct snapraid_handle* handle;
|
||||
|
||||
/*
|
||||
* The handle array is indexed by persistent parity mapping position,
|
||||
* not by data disk count or enumeration order.
|
||||
*
|
||||
* Mapping holes must remain as empty handles: they contribute zero data
|
||||
* to RAID while preserving the parity column of following disks.
|
||||
*
|
||||
* Do not compact this array: renumbering a disk changes its RAID column
|
||||
* and invalidates existing parity against the content file mapping.
|
||||
*/
|
||||
/* get the size of the mapping */
|
||||
size = 0;
|
||||
for (i = state->maplist; i != 0; i = i->next) {
|
||||
|
|
@ -378,14 +572,14 @@ struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* h
|
|||
}
|
||||
++size; /* size is one more than the max */
|
||||
|
||||
handle = malloc_nofail(size * sizeof(struct snapraid_handle));
|
||||
handle = nalloc_nofail(size, sizeof(struct snapraid_handle));
|
||||
|
||||
for (j = 0; j < size; ++j) {
|
||||
/* default for empty position */
|
||||
handle[j].disk = 0;
|
||||
handle[j].file = 0;
|
||||
handle[j].f = -1;
|
||||
handle[j].valid_size = 0;
|
||||
handle[j].readonly_errno = 0;
|
||||
handle[j].bw = 0;
|
||||
}
|
||||
|
||||
|
|
@ -399,7 +593,7 @@ struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* h
|
|||
map = 0;
|
||||
for (k = state->maplist; k != 0; k = k->next) {
|
||||
map = k->data;
|
||||
if (strcmp(disk->name, map->name) == 0)
|
||||
if (pathcmp(disk->name, map->name) == 0)
|
||||
break;
|
||||
}
|
||||
if (!map) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __HANDLE_H
|
||||
#define __HANDLE_H
|
||||
#ifndef HANDLE_H
|
||||
#define HANDLE_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
@ -16,22 +16,39 @@ struct snapraid_handle {
|
|||
struct snapraid_disk* disk; /**< Disk of the file. */
|
||||
struct snapraid_file* file; /**< File opened. When the file is closed, it's set to 0. */
|
||||
int f; /**< Handle of the file. */
|
||||
struct stat st; /**< Stat info of the opened file. */
|
||||
struct stat st; /**< Stat info of the opened file. st_size tracks the current EOF after recovery writes. */
|
||||
struct advise_struct advise; /**< Advise information. */
|
||||
data_off_t valid_size; /**< Size of the valid data. */
|
||||
int created; /**< If the file was created, otherwise it was already existing. */
|
||||
int readonly_errno; /**< Non-zero if opened read-only as fallback. */
|
||||
struct snapraid_bw* bw; /**< Context for bandwidth limiting. */
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a file.
|
||||
* The file is created if missing, and opened with write access.
|
||||
* If the file is created, the handle->created is set.
|
||||
* Open or create a recovery file.
|
||||
* A new recovery attempt always uses the normal filename, even if a previous .unrecoverable file exists.
|
||||
* FILE_IS_QUARANTINED determines whether the .unrecoverable filename is opened in the current run.
|
||||
* If create is non-zero, a missing file is created and handle->created is set.
|
||||
* If create is zero, a missing file is not created, returning -1 with errno == ENOENT.
|
||||
* The initial size of the file is stored in the file->st struct.
|
||||
* If the file cannot be opened for write access, it's opened with read-only access.
|
||||
* The read-only access works only if the file has already the correct size and doesn't need to be modified.
|
||||
*/
|
||||
int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, int mode);
|
||||
int handle_open_create(struct snapraid_handle* handle, struct snapraid_file* file, int mode, int create);
|
||||
|
||||
/**
|
||||
* Move an opened file to its persistent .unrecoverable name.
|
||||
* A previous .unrecoverable from an older recovery attempt is replaced.
|
||||
* If already quarantined in the current run, do nothing.
|
||||
* On error, log the failure and return -1 with errno set.
|
||||
*/
|
||||
int handle_quarantine(struct snapraid_handle* handle, struct snapraid_file* file, int mode);
|
||||
|
||||
/**
|
||||
* Remove an .unrecoverable file left by a previous recovery attempt.
|
||||
* A missing .unrecoverable file is not an error.
|
||||
* On error, log the failure and return -1 with errno set.
|
||||
*/
|
||||
int handle_unrecoverable_remove(struct snapraid_handle* handle, struct snapraid_file* file);
|
||||
|
||||
/**
|
||||
* Truncate a file if required.
|
||||
|
|
@ -53,7 +70,7 @@ int handle_close(struct snapraid_handle* handle);
|
|||
* Read a block from a file.
|
||||
* If the read block is shorter, it's padded with 0.
|
||||
*/
|
||||
int handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned char* block_buffer, unsigned block_size, log_ptr* out_missing);
|
||||
ssize_t handle_read(struct snapraid_handle* handle, block_off_t file_pos, unsigned char* block_buffer, unsigned block_size, log_ptr* out_missing);
|
||||
|
||||
/**
|
||||
* Write a block to a file.
|
||||
|
|
|
|||
343
cmdline/import.c
343
cmdline/import.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "import.h"
|
||||
|
|
@ -44,17 +44,37 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
|
|||
block_off_t i;
|
||||
data_off_t offset;
|
||||
void* buffer;
|
||||
int ret;
|
||||
ssize_t ret;
|
||||
int f;
|
||||
int flags;
|
||||
int advise_errno;
|
||||
unsigned block_size = state->block_size;
|
||||
struct advise_struct advise;
|
||||
block_off_t blockmax;
|
||||
|
||||
blockmax = size / block_size;
|
||||
if (size % block_size != 0)
|
||||
++blockmax;
|
||||
|
||||
if (blockmax > BLOCK_MAX
|
||||
#if SIZE_MAX == UINT32_MAX
|
||||
|| blockmax > (block_off_t)(SIZE_MAX / sizeof(struct snapraid_import_block))
|
||||
#endif
|
||||
) {
|
||||
#if SIZE_MAX == UINT32_MAX
|
||||
log_fatal(ESOFT, "File '%s' with %" PRIu64 " blocks is too large for a 32-bit build. Use a 64-bit build or increase the block size.\n", path, blockmax);
|
||||
#else
|
||||
log_fatal(ESOFT, "File '%s' with %" PRIu64 " blocks is too large. Increase the block size.\n", path, blockmax);
|
||||
#endif
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
file = malloc_nofail(sizeof(struct snapraid_import_file));
|
||||
file->path = strdup_nofail(path);
|
||||
file->size = size;
|
||||
file->blockmax = (size + block_size - 1) / block_size;
|
||||
file->blockimp = malloc_nofail(file->blockmax * sizeof(struct snapraid_import_block));
|
||||
file->blockmax = blockmax;
|
||||
file->blockimp = nalloc_nofail((size_t)file->blockmax, sizeof(struct snapraid_import_block));
|
||||
file->is_runtime = 1;
|
||||
|
||||
buffer = malloc_nofail(block_size);
|
||||
|
||||
|
|
@ -81,29 +101,48 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
|
|||
offset = 0;
|
||||
for (i = 0; i < file->blockmax; ++i) {
|
||||
struct snapraid_import_block* block = &file->blockimp[i];
|
||||
unsigned read_size = block_size;
|
||||
size_t read_size = block_size;
|
||||
size_t count;
|
||||
if (read_size > size)
|
||||
read_size = size;
|
||||
|
||||
ret = read(f, buffer, read_size);
|
||||
if (ret < 0 || (unsigned)ret != read_size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error reading file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
count = 0;
|
||||
do {
|
||||
ret = read(f, (char*)buffer + count, read_size - count);
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error reading file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (ret == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(errno, "Unexpected end of file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
count += ret;
|
||||
} while (count < read_size);
|
||||
|
||||
if (read_size < block_size)
|
||||
memset((unsigned char*)buffer + read_size, 0, block_size - read_size);
|
||||
|
||||
block->file = file;
|
||||
block->offset = offset;
|
||||
block->size = read_size;
|
||||
|
||||
memhash(state->hash, state->hashseed, block->hash, buffer, read_size);
|
||||
memhash_block(state->hash, state->hashseed, block->hash, buffer, read_size, block_size);
|
||||
tommy_hashdyn_insert(&state->importset, &block->nodeset, block, import_block_hash(block->hash));
|
||||
|
||||
/* if we are in a rehash state */
|
||||
if (state->prevhash != HASH_UNDEFINED) {
|
||||
/* compute also the previous hash */
|
||||
memhash(state->prevhash, state->prevhashseed, block->prevhash, buffer, read_size);
|
||||
memhash_block(state->prevhash, state->prevhashseed, block->prevhash, buffer, read_size, block_size);
|
||||
tommy_hashdyn_insert(&state->previmportset, &block->prevnodeset, block, import_block_hash(block->prevhash));
|
||||
}
|
||||
|
||||
|
|
@ -111,9 +150,19 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
|
|||
size -= read_size;
|
||||
}
|
||||
|
||||
advise_close(&advise, f);
|
||||
ret = advise_close(&advise, f);
|
||||
advise_errno = ret != 0 ? errno : 0;
|
||||
|
||||
ret = close(f);
|
||||
|
||||
if (advise_errno != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = advise_errno;
|
||||
log_fatal(errno, "Error advising file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error closing file '%s'. %s.\n", path, strerror(errno));
|
||||
|
|
@ -126,37 +175,144 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
|
|||
free(buffer);
|
||||
}
|
||||
|
||||
void import_file_free(struct snapraid_import_file* file)
|
||||
static void import_dealloc(struct snapraid_state* state, const char* dir, struct snapraid_dealloc* dealloc)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
struct snapraid_import_file* file;
|
||||
block_off_t i;
|
||||
block_off_t blockmax;
|
||||
data_off_t offset;
|
||||
data_off_t size;
|
||||
unsigned block_size = state->block_size;
|
||||
|
||||
pathcpy(path, sizeof(path), dir);
|
||||
pathcat(path, sizeof(path), dealloc->sub);
|
||||
size = dealloc->size;
|
||||
|
||||
blockmax = size / block_size;
|
||||
if (size % block_size != 0)
|
||||
++blockmax;
|
||||
|
||||
if (blockmax > BLOCK_MAX
|
||||
#if SIZE_MAX == UINT32_MAX
|
||||
|| blockmax > (block_off_t)(SIZE_MAX / sizeof(struct snapraid_import_block))
|
||||
#endif
|
||||
) {
|
||||
#if SIZE_MAX == UINT32_MAX
|
||||
log_fatal(ESOFT, "File '%s' with %" PRIu64 " blocks is too large for a 32-bit build. Use a 64-bit build or increase the block size.\n", path, blockmax);
|
||||
#else
|
||||
log_fatal(ESOFT, "File '%s' with %" PRIu64 " blocks is too large. Increase the block size.\n", path, blockmax);
|
||||
#endif
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
file = malloc_nofail(sizeof(struct snapraid_import_file));
|
||||
file->path = strdup_nofail(path);
|
||||
file->size = size;
|
||||
file->blockmax = blockmax;
|
||||
file->blockimp = nalloc_nofail((size_t)file->blockmax, sizeof(struct snapraid_import_block));
|
||||
file->is_runtime = 0;
|
||||
|
||||
offset = 0;
|
||||
for (i = 0; i < file->blockmax; ++i) {
|
||||
struct snapraid_import_block* block = &file->blockimp[i];
|
||||
ssize_t read_size = block_size;
|
||||
if (read_size > size)
|
||||
read_size = size;
|
||||
|
||||
block->file = file;
|
||||
block->offset = offset;
|
||||
block->size = read_size;
|
||||
|
||||
if (dealloc->block[i].prev) {
|
||||
hash_invalid_set(block->hash);
|
||||
hash_copy(block->prevhash, dealloc->block[i].hash);
|
||||
|
||||
/* do not insert invalid hashes */
|
||||
if (!hash_is_invalid(block->prevhash))
|
||||
tommy_hashdyn_insert(&state->previmportset, &block->prevnodeset, block, import_block_hash(block->prevhash));
|
||||
} else {
|
||||
hash_copy(block->hash, dealloc->block[i].hash);
|
||||
hash_invalid_set(block->prevhash);
|
||||
|
||||
/* do not insert invalid hashes */
|
||||
if (!hash_is_invalid(block->hash))
|
||||
tommy_hashdyn_insert(&state->importset, &block->nodeset, block, import_block_hash(block->hash));
|
||||
}
|
||||
|
||||
offset += read_size;
|
||||
size -= read_size;
|
||||
}
|
||||
|
||||
tommy_list_insert_tail(&state->importlist, &file->nodelist, file);
|
||||
}
|
||||
|
||||
void import_file_free(void* void_file)
|
||||
{
|
||||
struct snapraid_import_file* file = void_file;
|
||||
|
||||
free(file->path);
|
||||
free(file->blockimp);
|
||||
free(file);
|
||||
}
|
||||
|
||||
int state_import_fetch(struct snapraid_state* state, int rehash, struct snapraid_block* missing_block, unsigned char* buffer)
|
||||
static int state_import_fetch_candidate(struct snapraid_state* state, int rehash, struct snapraid_import_block* block, const unsigned char* hash, unsigned char* buffer)
|
||||
{
|
||||
struct snapraid_import_block* block;
|
||||
int ret;
|
||||
ssize_t ret;
|
||||
int f;
|
||||
const unsigned char* hash = missing_block->hash;
|
||||
unsigned block_size = state->block_size;
|
||||
unsigned read_size;
|
||||
size_t read_size;
|
||||
size_t count;
|
||||
unsigned char buffer_hash[HASH_MAX];
|
||||
const char* path;
|
||||
|
||||
if (rehash) {
|
||||
block = tommy_hashdyn_search(&state->previmportset, import_block_prevhash_compare, hash, import_block_hash(hash));
|
||||
} else {
|
||||
block = tommy_hashdyn_search(&state->importset, import_block_hash_compare, hash, import_block_hash(hash));
|
||||
}
|
||||
if (!block)
|
||||
return -1;
|
||||
|
||||
path = block->file->path;
|
||||
read_size = block->size;
|
||||
|
||||
if (!block->file->is_runtime) {
|
||||
struct stat st;
|
||||
|
||||
/*
|
||||
* A deallocated candidate is historical and may be stale or shorter.
|
||||
* Validate metadata to ensure the file exists, is regular, and contains data at the offset.
|
||||
*/
|
||||
if (stat(path, &st) != 0) {
|
||||
if (errno == ENOENT) {
|
||||
log_error(EUSER, "WARNING! Unexpected missing deallocated file '%s'.\n", path);
|
||||
} else {
|
||||
log_error(errno, "WARNING! Error stating deallocated file '%s'. %s.\n", path, strerror(errno));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!S_ISREG(st.st_mode)) {
|
||||
log_error(EUSER, "WARNING! Unexpected non-regular deallocated file '%s'.\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((data_off_t)st.st_size < block->offset || (data_off_t)st.st_size - block->offset < (data_off_t)read_size) {
|
||||
log_error(EUSER, "WARNING! Unexpected short deallocated file '%s'.\n", path);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
f = open(path, O_RDONLY | O_BINARY);
|
||||
if (f == -1) {
|
||||
/*
|
||||
* A deallocated source is historical and may be stale, so failure to open is a
|
||||
* best-effort miss that lets the caller try another matching candidate.
|
||||
* A runtime import was hashed in this run; its disappearance violates
|
||||
* that invariant and must remain fatal.
|
||||
*/
|
||||
if (!block->file->is_runtime) {
|
||||
if (errno == ENOENT) {
|
||||
log_error(EUSER, "WARNING! Unexpected missing deallocated file '%s'.\n", path);
|
||||
} else {
|
||||
log_error(errno, "WARNING! Error opening deallocated file '%s'. %s.\n", path, strerror(errno));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno == ENOENT) {
|
||||
log_fatal(errno, "DANGER! file '%s' disappeared.\n", path);
|
||||
|
|
@ -168,13 +324,40 @@ int state_import_fetch(struct snapraid_state* state, int rehash, struct snapraid
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = pread(f, buffer, read_size, block->offset);
|
||||
if (ret < 0 || (unsigned)ret != read_size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error reading file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
count = 0;
|
||||
do {
|
||||
ret = pread(f, (char*)buffer + count, read_size - count, block->offset + count);
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
if (!block->file->is_runtime) {
|
||||
close(f);
|
||||
log_error(errno, "WARNING! Error reading deallocated file '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error reading file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (ret == 0) {
|
||||
if (!block->file->is_runtime) {
|
||||
close(f);
|
||||
log_error(EUSER, "WARNING! Unexpected end of file in deallocated file '%s'.\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(errno, "Unexpected end of file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
count += ret;
|
||||
} while (count < read_size);
|
||||
|
||||
ret = close(f);
|
||||
if (ret != 0) {
|
||||
|
|
@ -191,11 +374,22 @@ int state_import_fetch(struct snapraid_state* state, int rehash, struct snapraid
|
|||
|
||||
/* recheck the hash */
|
||||
if (rehash)
|
||||
memhash(state->prevhash, state->prevhashseed, buffer_hash, buffer, read_size);
|
||||
memhash_block(state->prevhash, state->prevhashseed, buffer_hash, buffer, read_size, block_size);
|
||||
else
|
||||
memhash(state->hash, state->hashseed, buffer_hash, buffer, read_size);
|
||||
memhash_block(state->hash, state->hashseed, buffer_hash, buffer, read_size, block_size);
|
||||
|
||||
if (memcmp(buffer_hash, hash, BLOCK_HASH_SIZE) != 0) {
|
||||
/*
|
||||
* Deallocated contents may have changed since they were recorded, so a
|
||||
* mismatch is best-effort and another candidate may still be valid.
|
||||
* A runtime import was hashed in this run; a mismatch means concurrent
|
||||
* modification and must remain fatal.
|
||||
*/
|
||||
if (!block->file->is_runtime) {
|
||||
log_error(EUSER, "WARNING! Unexpected hash mismatch from deallocated file '%s'.\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EUSER, "Mismatch in data reading file '%s'.\n", path);
|
||||
log_fatal(EUSER, "Please don't change imported files while running.\n");
|
||||
|
|
@ -206,6 +400,50 @@ int state_import_fetch(struct snapraid_state* state, int rehash, struct snapraid
|
|||
return 0;
|
||||
}
|
||||
|
||||
int state_import_fetch(struct snapraid_state* state, int rehash, struct snapraid_block* missing_block, unsigned char* buffer)
|
||||
{
|
||||
tommy_hashdyn* importset;
|
||||
tommy_hashdyn_node* node;
|
||||
tommy_uint32_t hash32;
|
||||
const unsigned char* hash = missing_block->hash;
|
||||
|
||||
if (rehash)
|
||||
importset = &state->previmportset;
|
||||
else
|
||||
importset = &state->importset;
|
||||
|
||||
hash32 = import_block_hash(hash);
|
||||
|
||||
/*
|
||||
* Multiple blocks may have the same digest. tommy_hashdyn_search() would
|
||||
* stop at the first one, but a deallocated source may be stale, so walk
|
||||
* the bucket until an exact candidate is reread and validated.
|
||||
*/
|
||||
node = tommy_hashdyn_bucket(importset, hash32);
|
||||
while (node) {
|
||||
struct snapraid_import_block* block = node->data;
|
||||
|
||||
/* hash32 is only an index: reject other bucket keys, then compare the full digest */
|
||||
if (node->index == hash32) {
|
||||
int equal;
|
||||
|
||||
if (rehash)
|
||||
equal = import_block_prevhash_compare(hash, block) == 0;
|
||||
else
|
||||
equal = import_block_hash_compare(hash, block) == 0;
|
||||
|
||||
if (equal) {
|
||||
if (state_import_fetch_candidate(state, rehash, block, hash, buffer) == 0)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void import_dir(struct snapraid_state* state, const char* dir)
|
||||
{
|
||||
DIR* d;
|
||||
|
|
@ -248,11 +486,13 @@ static void import_dir(struct snapraid_state* state, const char* dir)
|
|||
/* convert dirent to lstat result */
|
||||
dirent_lstat(dd, &st);
|
||||
|
||||
/* if the st_mode field is missing, takes care to fill it using normal lstat() */
|
||||
/* at now this can happen only in Windows (with HAVE_STRUCT_DIRENT_D_STAT defined), */
|
||||
/* because we use a directory reading method that doesn't read info about ReparsePoint. */
|
||||
/* Note that here we cannot call here lstat_sync(), because we don't know what kind */
|
||||
/* of file is it, and lstat_sync() doesn't always work */
|
||||
/*
|
||||
* If the st_mode field is missing, takes care to fill it using normal lstat()
|
||||
* at now this can happen only in Windows (with HAVE_STRUCT_DIRENT_D_STAT defined),
|
||||
* because we use a directory reading method that doesn't read info about ReparsePoint.
|
||||
* Note that here we cannot call here lstat_sync(), because we don't know what kind
|
||||
* of file is it, and lstat_sync() doesn't always work
|
||||
*/
|
||||
if (st.st_mode == 0) {
|
||||
if (lstat(path_next, &st) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -308,3 +548,20 @@ void state_import(struct snapraid_state* state, const char* dir)
|
|||
import_dir(state, path);
|
||||
}
|
||||
|
||||
void state_dealloc(struct snapraid_state* state, const char* dir, tommy_list* dealloclist)
|
||||
{
|
||||
/* snapshot should be enabled */
|
||||
if (!state->snapshot)
|
||||
return;
|
||||
|
||||
/* the hash must be full */
|
||||
if (BLOCK_HASH_SIZE != HASH_MAX)
|
||||
return;
|
||||
|
||||
for (tommy_node* i = tommy_list_head(dealloclist); i != 0; i = i->next) {
|
||||
struct snapraid_dealloc* dealloc = i->data;
|
||||
|
||||
import_dealloc(state, dir, dealloc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __IMPORT_H
|
||||
#define __IMPORT_H
|
||||
#ifndef IMPORT_H
|
||||
#define IMPORT_H
|
||||
|
||||
#include "elem.h"
|
||||
#include "state.h"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
struct snapraid_import_block {
|
||||
struct snapraid_import_file* file; /**< Back pointer to the file owning this block. */
|
||||
unsigned size; /**< Size of the block. */
|
||||
size_t size; /**< Size of the block. */
|
||||
data_off_t offset; /**< Position of the block in the file. */
|
||||
unsigned char hash[HASH_MAX]; /**< Hash of the block. */
|
||||
unsigned char prevhash[HASH_MAX]; /**< Previous hash of the block. Valid only if we are in rehash state. */
|
||||
|
|
@ -35,6 +35,7 @@ struct snapraid_import_file {
|
|||
struct snapraid_import_block* blockimp; /**< All the blocks of the file. */
|
||||
block_off_t blockmax; /**< Number of blocks. */
|
||||
char* path; /**< Full path of the file. */
|
||||
int is_runtime; /**< If the hash was obtained at runtime */
|
||||
|
||||
/* nodes for data structures */
|
||||
tommy_node nodelist;
|
||||
|
|
@ -43,7 +44,7 @@ struct snapraid_import_file {
|
|||
/**
|
||||
* Deallocate an import file.
|
||||
*/
|
||||
void import_file_free(struct snapraid_import_file* file);
|
||||
void import_file_free(void* void_file);
|
||||
|
||||
/**
|
||||
* Fetch a block from the specified hash.
|
||||
|
|
@ -56,5 +57,10 @@ int state_import_fetch(struct snapraid_state* state, int prevhash, struct snapra
|
|||
*/
|
||||
void state_import(struct snapraid_state* state, const char* dir);
|
||||
|
||||
/**
|
||||
* Import files from the dealloc list.
|
||||
*/
|
||||
void state_dealloc(struct snapraid_state* state, const char* dir, tommy_list* dealloclist);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
390
cmdline/io.c
390
cmdline/io.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "io.h"
|
||||
|
||||
|
|
@ -16,7 +16,8 @@ void (*io_parity_write)(struct snapraid_io* io, unsigned* levcur, unsigned* wait
|
|||
void (*io_write_preset)(struct snapraid_io* io, block_off_t blockcur, int skip) = 0;
|
||||
void (*io_write_next)(struct snapraid_io* io, block_off_t blockcur, int skip, int* writer_error) = 0;
|
||||
void (*io_refresh)(struct snapraid_io* io) = 0;
|
||||
void (*io_flush)(struct snapraid_io* io) = 0;
|
||||
void (*io_flush)(struct snapraid_io* io, int* writer_error) = 0;
|
||||
void (*io_quiesce)(struct snapraid_io* io) = 0;
|
||||
|
||||
/**
|
||||
* Get the next block position to process.
|
||||
|
|
@ -124,6 +125,39 @@ static void io_writer_sched_empty(struct snapraid_io* io, int task_index, block_
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an error to the global writer error counters.
|
||||
*/
|
||||
static void io_writer_error_add(struct snapraid_io* io, int state)
|
||||
{
|
||||
int error_index;
|
||||
|
||||
error_index = state - IO_WRITER_ERROR_BASE;
|
||||
|
||||
/*
|
||||
* Map negative TASK_STATE_* error codes to array indices [0..IO_WRITER_ERROR_MAX - 1].
|
||||
* Non-error states (e.g. TASK_STATE_EMPTY, TASK_STATE_DONE) result in an index
|
||||
* outside this range and are ignored.
|
||||
*/
|
||||
if (error_index >= 0 && error_index < IO_WRITER_ERROR_MAX)
|
||||
++io->writer_error[error_index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfer the accumulated writer errors to the caller and clear the counters.
|
||||
* Threaded callers must hold io_mutex so no writer can increment a counter
|
||||
* between its read and clear; the mono-thread path needs no lock.
|
||||
*/
|
||||
static void io_writer_error_get(struct snapraid_io* io, int* writer_error)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i) {
|
||||
writer_error[i] = io->writer_error[i];
|
||||
io->writer_error[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* mono thread */
|
||||
|
||||
|
|
@ -167,14 +201,11 @@ static void io_write_preset_mono(struct snapraid_io* io, block_off_t blockcur, i
|
|||
|
||||
static void io_write_next_mono(struct snapraid_io* io, block_off_t blockcur, int skip, int* writer_error)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
(void)blockcur;
|
||||
(void)skip;
|
||||
|
||||
/* report errors */
|
||||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i)
|
||||
writer_error[i] = io->writer_error[i];
|
||||
io_writer_error_get(io, writer_error);
|
||||
}
|
||||
|
||||
static void io_refresh_mono(struct snapraid_io* io)
|
||||
|
|
@ -182,7 +213,13 @@ static void io_refresh_mono(struct snapraid_io* io)
|
|||
(void)io;
|
||||
}
|
||||
|
||||
static void io_flush_mono(struct snapraid_io* io)
|
||||
static void io_flush_mono(struct snapraid_io* io, int* writer_error)
|
||||
{
|
||||
/* report errors */
|
||||
io_writer_error_get(io, writer_error);
|
||||
}
|
||||
|
||||
static void io_quiesce_mono(struct snapraid_io* io)
|
||||
{
|
||||
(void)io;
|
||||
}
|
||||
|
|
@ -237,12 +274,13 @@ static void io_parity_write_mono(struct snapraid_io* io, unsigned* pos, unsigned
|
|||
worker = &io->writer_map[i];
|
||||
task = &worker->task_map[0];
|
||||
|
||||
io->writer_error[i] = 0;
|
||||
|
||||
/* do the work */
|
||||
if (task->state != TASK_STATE_EMPTY)
|
||||
if (task->state != TASK_STATE_EMPTY) {
|
||||
worker->func(worker, task);
|
||||
|
||||
io_writer_error_add(io, task->state);
|
||||
}
|
||||
|
||||
/* return the position */
|
||||
*pos = i;
|
||||
|
||||
|
|
@ -255,15 +293,25 @@ static void io_start_mono(struct snapraid_io* io,
|
|||
block_off_t blockstart, block_off_t blockmax,
|
||||
bit_vect_t* block_enabled)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
io->started = 1;
|
||||
io->block_start = blockstart;
|
||||
io->block_max = blockmax;
|
||||
io->block_enabled = block_enabled;
|
||||
io->block_next = blockstart;
|
||||
|
||||
/* clear writer errors */
|
||||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i)
|
||||
io->writer_error[i] = 0;
|
||||
}
|
||||
|
||||
static void io_stop_mono(struct snapraid_io* io)
|
||||
{
|
||||
(void)io;
|
||||
if (!io->started)
|
||||
return;
|
||||
|
||||
io->started = 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
@ -284,11 +332,16 @@ static struct snapraid_task* io_reader_step(struct snapraid_worker* worker)
|
|||
/* the synchronization is protected by the io mutex */
|
||||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
/* acknowledge completion of the previous task */
|
||||
worker->busy = 0;
|
||||
|
||||
while (1) {
|
||||
unsigned next_index;
|
||||
|
||||
/* check if the worker has to exit */
|
||||
/* even if there is work to do */
|
||||
/*
|
||||
* Check if the worker has to exit
|
||||
* even if there is work to do
|
||||
*/
|
||||
if (io->done) {
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
return 0;
|
||||
|
|
@ -310,6 +363,7 @@ static struct snapraid_task* io_reader_step(struct snapraid_worker* worker)
|
|||
/* get the new working task */
|
||||
worker->index = next_index;
|
||||
task = &worker->task_map[worker->index];
|
||||
worker->busy = 1;
|
||||
|
||||
/* if the just completed task is at this index */
|
||||
if (done_index == waiting_index) {
|
||||
|
|
@ -336,15 +390,14 @@ static struct snapraid_task* io_reader_step(struct snapraid_worker* worker)
|
|||
static struct snapraid_task* io_writer_step(struct snapraid_worker* worker, int state)
|
||||
{
|
||||
struct snapraid_io* io = worker->io;
|
||||
int error_index;
|
||||
|
||||
/* the synchronization is protected by the io mutex */
|
||||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
/* counts the number of errors in the global state */
|
||||
error_index = state - IO_WRITER_ERROR_BASE;
|
||||
if (error_index >= 0 && error_index < IO_WRITER_ERROR_MAX)
|
||||
++io->writer_error[error_index];
|
||||
io_writer_error_add(io, state);
|
||||
|
||||
worker->busy = 0;
|
||||
|
||||
while (1) {
|
||||
unsigned next_index;
|
||||
|
|
@ -366,6 +419,8 @@ static struct snapraid_task* io_writer_step(struct snapraid_worker* worker, int
|
|||
worker->index = next_index;
|
||||
task = &worker->task_map[worker->index];
|
||||
|
||||
worker->busy = 1;
|
||||
|
||||
/* if the just completed task is at this index */
|
||||
if (done_index == waiting_index) {
|
||||
/* notify the IO that a new write is complete */
|
||||
|
|
@ -378,8 +433,10 @@ static struct snapraid_task* io_writer_step(struct snapraid_worker* worker, int
|
|||
return task;
|
||||
}
|
||||
|
||||
/* check if the worker has to exit */
|
||||
/* but only if there is no work to do */
|
||||
/*
|
||||
* Check if the worker has to exit
|
||||
* but only if there is no work to do
|
||||
*/
|
||||
if (io->done) {
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
return 0;
|
||||
|
|
@ -454,10 +511,7 @@ static void io_write_next_thread(struct snapraid_io* io, block_off_t blockcur, i
|
|||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
/* report errors */
|
||||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i) {
|
||||
writer_error[i] = io->writer_error[i];
|
||||
io->writer_error[i] = 0;
|
||||
}
|
||||
io_writer_error_get(io, writer_error);
|
||||
|
||||
if (skip) {
|
||||
/* skip the next write */
|
||||
|
|
@ -499,12 +553,14 @@ static void io_refresh_thread(struct snapraid_io* io)
|
|||
|
||||
if (worker->parity_handle)
|
||||
io->state->parity[worker->parity_handle->level].cached_blocks = cached;
|
||||
else
|
||||
else if (worker->handle->disk) /* mapping holes have no disk statistics */
|
||||
worker->handle->disk->cached_blocks = cached;
|
||||
}
|
||||
|
||||
/* for all writers, count the number of written blocks */
|
||||
/* note that this is a kind of "opposite" of cached blocks */
|
||||
/*
|
||||
* For all writers, count the number of written blocks
|
||||
* note that this is a kind of "opposite" of cached blocks
|
||||
*/
|
||||
for (i = 0; i < io->writer_max; ++i) {
|
||||
unsigned begin, end, cached;
|
||||
struct snapraid_worker* worker = &io->writer_map[i];
|
||||
|
|
@ -523,10 +579,15 @@ static void io_refresh_thread(struct snapraid_io* io)
|
|||
thread_mutex_unlock(&io->io_mutex);
|
||||
}
|
||||
|
||||
static void io_flush_thread(struct snapraid_io* io)
|
||||
static void io_flush_thread(struct snapraid_io* io, int* writer_error)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (!io->started) {
|
||||
io_writer_error_get(io, writer_error);
|
||||
return;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
int all_done = 1;
|
||||
|
||||
|
|
@ -539,19 +600,76 @@ static void io_flush_thread(struct snapraid_io* io)
|
|||
/* get the next pending task */
|
||||
unsigned next_index = (worker->index + 1) % io->io_max;
|
||||
|
||||
/* if the queue of pending tasks is not empty */
|
||||
if (next_index != io->writer_index) {
|
||||
/*
|
||||
* Ring indices can look empty after a writer dequeues its last task and
|
||||
* executes it outside the mutex. busy represents this in-flight gap;
|
||||
* without it flush could return before the final parity write completes.
|
||||
*/
|
||||
if (worker->busy || next_index != io->writer_index) {
|
||||
all_done = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (all_done) {
|
||||
/* report errors */
|
||||
io_writer_error_get(io, writer_error);
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
|
||||
if (all_done)
|
||||
break;
|
||||
/*
|
||||
* Wait for something to complete.
|
||||
*
|
||||
* We cannot use thread_cond_wait(&io->write_done) here because
|
||||
* write_done is heavily optimized to only be signaled when the oldest
|
||||
* task in the queue completes (done_index == waiting_index).
|
||||
* Since io_flush waits for all tasks to complete, it would miss
|
||||
* wakeups for newer tasks and deadlock.
|
||||
*/
|
||||
thread_yield();
|
||||
}
|
||||
}
|
||||
|
||||
/* wait for something to complete */
|
||||
static void io_quiesce_thread(struct snapraid_io* io)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (!io->started)
|
||||
return;
|
||||
|
||||
while (1) {
|
||||
int all_done = 1;
|
||||
|
||||
/* the synchronization is protected by the io mutex */
|
||||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
for (i = 0; i < io->reader_max; ++i) {
|
||||
struct snapraid_worker* worker = &io->reader_map[i];
|
||||
unsigned next_index = (worker->index + 1) % io->io_max;
|
||||
|
||||
/*
|
||||
* busy covers the task already dequeued and executing outside
|
||||
* the mutex. A different next index identifies scheduled work
|
||||
* not yet dequeued. Completed but unconsumed tasks need neither.
|
||||
* When stopping, pending tasks cannot start and don't need draining.
|
||||
*/
|
||||
if (worker->busy || (!io->done && next_index != io->reader_index)) {
|
||||
all_done = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (all_done) {
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
|
||||
/* wait for a reader to complete */
|
||||
thread_yield();
|
||||
}
|
||||
}
|
||||
|
|
@ -573,9 +691,11 @@ static struct snapraid_task* io_task_read_thread(struct snapraid_io* io, unsigne
|
|||
unsigned* let;
|
||||
unsigned busy_index;
|
||||
|
||||
/* get the index the IO is using */
|
||||
/* we must ensure that this index has not a read in progress */
|
||||
/* to avoid a concurrent access */
|
||||
/*
|
||||
* Get the index the IO is using
|
||||
* we must ensure that this index has not a read in progress
|
||||
* to avoid a concurrent access
|
||||
*/
|
||||
busy_index = io->reader_index;
|
||||
|
||||
/* search for a worker that has already finished */
|
||||
|
|
@ -605,8 +725,10 @@ static struct snapraid_task* io_task_read_thread(struct snapraid_io* io, unsigne
|
|||
|
||||
task = &worker->task_map[io->reader_index];
|
||||
|
||||
/* mark the worker as processed */
|
||||
/* setting the previous one to point at the next one */
|
||||
/*
|
||||
* Mark the worker as processed
|
||||
* setting the previous one to point at the next one
|
||||
*/
|
||||
*let = io->reader_list[i + 1];
|
||||
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
|
|
@ -661,11 +783,13 @@ static void io_parity_write_thread(struct snapraid_io* io, unsigned* pos, unsign
|
|||
unsigned* let;
|
||||
unsigned busy_index;
|
||||
|
||||
/* get the next index the IO is going to use */
|
||||
/* we must ensure that this index has not a write in progress */
|
||||
/* to avoid a concurrent access */
|
||||
/* note that we are already sure that a write is not in progress */
|
||||
/* at the index the IO is using at now */
|
||||
/*
|
||||
* Get the next index the IO is going to use
|
||||
* we must ensure that this index has not a write in progress
|
||||
* to avoid a concurrent access
|
||||
* note that we are already sure that a write is not in progress
|
||||
* at the index the IO is using at now
|
||||
*/
|
||||
busy_index = (io->writer_index + 1) % io->io_max;
|
||||
|
||||
/* search for a worker that has already finished */
|
||||
|
|
@ -691,8 +815,10 @@ static void io_parity_write_thread(struct snapraid_io* io, unsigned* pos, unsign
|
|||
|
||||
/* if the worker has finished this index */
|
||||
if (busy_index != worker->index) {
|
||||
/* mark the worker as processed */
|
||||
/* setting the previous one to point at the next one */
|
||||
/*
|
||||
* Mark the worker as processed
|
||||
* setting the previous one to point at the next one
|
||||
*/
|
||||
*let = io->writer_list[i + 1];
|
||||
|
||||
thread_mutex_unlock(&io->io_mutex);
|
||||
|
|
@ -753,7 +879,7 @@ static void* io_reader_thread(void* arg)
|
|||
|
||||
if (task->state != TASK_STATE_READY) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EINTERNAL, "Internal inconsistency: Unexpected state %d in reader for task at position %u in worker %u\n", task->state, task->position, worker->index);
|
||||
log_fatal(EINTERNAL, "Internal inconsistency: Unexpected state %d in reader for task at position %" PRIu64 " in worker %u\n", task->state, task->position, worker->index);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -788,7 +914,7 @@ static void* io_writer_thread(void* arg)
|
|||
|
||||
if (task->state != TASK_STATE_READY) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EINTERNAL, "Internal inconsistency: Unexpected state %d in writer for task at position %u in worker %u\n", task->state, task->position, worker->index);
|
||||
log_fatal(EINTERNAL, "Internal inconsistency: Unexpected state %d in writer for task at position %" PRIu64 " in worker %u\n", task->state, task->position, worker->index);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -809,6 +935,7 @@ static void io_start_thread(struct snapraid_io* io,
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
io->started = 1;
|
||||
io->block_start = blockstart;
|
||||
io->block_max = blockmax;
|
||||
io->block_enabled = block_enabled;
|
||||
|
|
@ -822,8 +949,10 @@ static void io_start_thread(struct snapraid_io* io,
|
|||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i)
|
||||
io->writer_error[i] = 0;
|
||||
|
||||
/* setup the initial read pending tasks, except the latest one, */
|
||||
/* the latest will be initialized at the fist io_read_next() call */
|
||||
/*
|
||||
* Setup the initial read pending tasks, except the latest one,
|
||||
* the latest will be initialized at the fist io_read_next() call
|
||||
*/
|
||||
for (i = 0; i < io->io_max - 1; ++i) {
|
||||
block_off_t blockcur = io_position_next(io);
|
||||
|
||||
|
|
@ -840,6 +969,7 @@ static void io_start_thread(struct snapraid_io* io,
|
|||
struct snapraid_worker* worker = &io->reader_map[i];
|
||||
|
||||
worker->index = 0;
|
||||
worker->busy = 1;
|
||||
|
||||
thread_create(&worker->thread, io_reader_thread, worker);
|
||||
}
|
||||
|
|
@ -849,6 +979,7 @@ static void io_start_thread(struct snapraid_io* io,
|
|||
struct snapraid_worker* worker = &io->writer_map[i];
|
||||
|
||||
worker->index = io->io_max - 1;
|
||||
worker->busy = 0;
|
||||
|
||||
thread_create(&worker->thread, io_writer_thread, worker);
|
||||
}
|
||||
|
|
@ -858,6 +989,11 @@ static void io_stop_thread(struct snapraid_io* io)
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
if (!io->started)
|
||||
return;
|
||||
|
||||
io->started = 0;
|
||||
|
||||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
/* mark that we are stopping */
|
||||
|
|
@ -895,17 +1031,29 @@ static void io_stop_thread(struct snapraid_io* io)
|
|||
|
||||
void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
||||
unsigned io_cache, unsigned buffer_max,
|
||||
void (*data_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_handle* handle_map, unsigned handle_max,
|
||||
const io_op_t* data_ops,
|
||||
void (*data_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
void (*data_writer)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max,
|
||||
const io_op_t* parity_ops,
|
||||
void (*parity_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
void (*parity_writer)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max)
|
||||
void (*parity_writer)(struct snapraid_worker*, struct snapraid_task*))
|
||||
{
|
||||
unsigned i;
|
||||
size_t allocated_size;
|
||||
size_t block_size = state->block_size;
|
||||
unsigned readers_count = 0;
|
||||
unsigned writers_count = 0;
|
||||
unsigned r_idx = 0;
|
||||
unsigned w_idx = 0;
|
||||
io_op_t data_op_default = IO_OP_NONE;
|
||||
io_op_t parity_op_default = IO_OP_NONE;
|
||||
|
||||
io->state = state;
|
||||
io->started = 0;
|
||||
for (i = 0; i < IO_WRITER_ERROR_MAX; ++i)
|
||||
io->writer_error[i] = 0;
|
||||
|
||||
assert(buffer_max >= handle_max + parity_handle_max);
|
||||
|
||||
|
|
@ -920,8 +1068,10 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
|
||||
#if HAVE_THREAD
|
||||
if (io_cache == 0) {
|
||||
/* default is 16 MiB of cache */
|
||||
/* this seems to be a good tradeoff between speed and memory usage */
|
||||
/*
|
||||
* Default is 16 MiB of cache
|
||||
* this seems to be a good tradeoff between speed and memory usage
|
||||
*/
|
||||
io->io_max = 16 * 1024 * 1024 / state->block_size;
|
||||
if (io->io_max < IO_MIN)
|
||||
io->io_max = IO_MIN;
|
||||
|
|
@ -943,9 +1093,9 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
allocated_size = 0;
|
||||
for (i = 0; i < io->io_max; ++i) {
|
||||
if (state->file_mode != ADVISE_DIRECT)
|
||||
io->buffer_map[i] = malloc_nofail_vector_align(handle_max, buffer_max, block_size, &io->buffer_alloc_map[i]);
|
||||
io->buffer_map[i] = malloc_nofail_vector_align(buffer_max, block_size, &io->buffer_alloc_map[i]);
|
||||
else
|
||||
io->buffer_map[i] = malloc_nofail_vector_direct(handle_max, buffer_max, block_size, &io->buffer_alloc_map[i]);
|
||||
io->buffer_map[i] = malloc_nofail_vector_direct(buffer_max, block_size, &io->buffer_alloc_map[i]);
|
||||
if (!state->opt.skip_self)
|
||||
mtest_vector(io->buffer_max, state->block_size, io->buffer_map[i]);
|
||||
allocated_size += block_size * buffer_max;
|
||||
|
|
@ -953,60 +1103,106 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
|
||||
msg_progress("Using %u MiB of memory for %u cached blocks.\n", (unsigned)(allocated_size / MEBI), io->io_max);
|
||||
|
||||
if (parity_writer) {
|
||||
io->reader_max = handle_max;
|
||||
io->writer_max = parity_handle_max;
|
||||
} else {
|
||||
io->reader_max = handle_max + parity_handle_max;
|
||||
io->writer_max = 0;
|
||||
/* resolve implicit fallback directions if ops are NULL */
|
||||
if (data_reader && !data_writer) {
|
||||
data_op_default = IO_OP_READ;
|
||||
}
|
||||
if (!data_reader && data_writer) {
|
||||
data_op_default = IO_OP_WRITE;
|
||||
}
|
||||
if (parity_reader && !parity_writer) {
|
||||
parity_op_default = IO_OP_READ;
|
||||
}
|
||||
if (!parity_reader && parity_writer) {
|
||||
parity_op_default = IO_OP_WRITE;
|
||||
}
|
||||
|
||||
io->reader_map = malloc_nofail(sizeof(struct snapraid_worker) * io->reader_max);
|
||||
io->reader_list = malloc_nofail(sizeof(unsigned) * (io->reader_max + 1));
|
||||
io->writer_map = malloc_nofail(sizeof(struct snapraid_worker) * io->writer_max);
|
||||
io->writer_list = malloc_nofail(sizeof(unsigned) * (io->writer_max + 1));
|
||||
/* count reader and writer workers */
|
||||
for (i = 0; i < handle_max; ++i) {
|
||||
io_op_t op = data_ops ? data_ops[i] : data_op_default;
|
||||
if (op == IO_OP_READ)
|
||||
readers_count++;
|
||||
if (op == IO_OP_WRITE)
|
||||
writers_count++;
|
||||
}
|
||||
for (i = 0; i < parity_handle_max; ++i) {
|
||||
io_op_t op = parity_ops ? parity_ops[i] : parity_op_default;
|
||||
if (op == IO_OP_READ)
|
||||
readers_count++;
|
||||
if (op == IO_OP_WRITE)
|
||||
writers_count++;
|
||||
}
|
||||
|
||||
io->reader_max = readers_count;
|
||||
io->writer_max = writers_count;
|
||||
|
||||
io->reader_map = nalloc_nofail(io->reader_max, sizeof(struct snapraid_worker));
|
||||
io->reader_list = nalloc_nofail(io->reader_max + 1, sizeof(unsigned));
|
||||
io->writer_map = nalloc_nofail(io->writer_max, sizeof(struct snapraid_worker));
|
||||
io->writer_list = nalloc_nofail(io->writer_max + 1, sizeof(unsigned));
|
||||
|
||||
io->data_base = 0;
|
||||
io->data_count = handle_max;
|
||||
io->parity_base = handle_max;
|
||||
io->parity_count = parity_handle_max;
|
||||
io->data_count = 0;
|
||||
for (i = 0; i < handle_max; ++i) {
|
||||
io_op_t op = data_ops ? data_ops[i] : data_op_default;
|
||||
if (op == IO_OP_READ)
|
||||
io->data_count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < io->reader_max; ++i) {
|
||||
struct snapraid_worker* worker = &io->reader_map[i];
|
||||
io->parity_base = io->data_count;
|
||||
io->parity_count = 0;
|
||||
for (i = 0; i < parity_handle_max; ++i) {
|
||||
io_op_t op = parity_ops ? parity_ops[i] : parity_op_default;
|
||||
if (op == IO_OP_READ)
|
||||
io->parity_count++;
|
||||
}
|
||||
|
||||
worker->io = io;
|
||||
|
||||
if (i < handle_max) {
|
||||
/* it's a data read */
|
||||
/* configure reader map workers */
|
||||
for (i = 0; i < handle_max; ++i) {
|
||||
io_op_t op = data_ops ? data_ops[i] : data_op_default;
|
||||
if (op == IO_OP_READ) {
|
||||
struct snapraid_worker* worker = &io->reader_map[r_idx++];
|
||||
worker->io = io;
|
||||
worker->handle = &handle_map[i];
|
||||
worker->parity_handle = 0;
|
||||
worker->func = data_reader;
|
||||
|
||||
/* data read is put in lower buffer index */
|
||||
worker->buffer_skew = 0;
|
||||
} else {
|
||||
/* it's a parity read */
|
||||
worker->buffer_skew = i - (r_idx - 1);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < parity_handle_max; ++i) {
|
||||
io_op_t op = parity_ops ? parity_ops[i] : parity_op_default;
|
||||
if (op == IO_OP_READ) {
|
||||
struct snapraid_worker* worker = &io->reader_map[r_idx++];
|
||||
worker->io = io;
|
||||
worker->handle = 0;
|
||||
worker->parity_handle = &parity_handle_map[i - handle_max];
|
||||
worker->parity_handle = &parity_handle_map[i];
|
||||
worker->func = parity_reader;
|
||||
|
||||
/* parity read is put after data and computed parity */
|
||||
worker->buffer_skew = parity_handle_max;
|
||||
worker->buffer_skew = (handle_max + parity_handle_max + i) - (r_idx - 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < io->writer_max; ++i) {
|
||||
struct snapraid_worker* worker = &io->writer_map[i];
|
||||
|
||||
worker->io = io;
|
||||
|
||||
/* it's a parity write */
|
||||
worker->handle = 0;
|
||||
worker->parity_handle = &parity_handle_map[i];
|
||||
worker->func = parity_writer;
|
||||
|
||||
/* parity to write is put after data */
|
||||
worker->buffer_skew = handle_max;
|
||||
/* configure writer map workers */
|
||||
for (i = 0; i < handle_max; ++i) {
|
||||
io_op_t op = data_ops ? data_ops[i] : data_op_default;
|
||||
if (op == IO_OP_WRITE) {
|
||||
struct snapraid_worker* worker = &io->writer_map[w_idx++];
|
||||
worker->io = io;
|
||||
worker->handle = &handle_map[i];
|
||||
worker->parity_handle = 0;
|
||||
worker->func = data_writer;
|
||||
worker->buffer_skew = i - (w_idx - 1);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < parity_handle_max; ++i) {
|
||||
io_op_t op = parity_ops ? parity_ops[i] : parity_op_default;
|
||||
if (op == IO_OP_WRITE) {
|
||||
struct snapraid_worker* worker = &io->writer_map[w_idx++];
|
||||
worker->io = io;
|
||||
worker->handle = 0;
|
||||
worker->parity_handle = &parity_handle_map[i];
|
||||
worker->func = parity_writer;
|
||||
worker->buffer_skew = (handle_max + i) - (w_idx - 1);
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_THREAD
|
||||
|
|
@ -1016,6 +1212,7 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
io_write_next = io_write_next_thread;
|
||||
io_refresh = io_refresh_thread;
|
||||
io_flush = io_flush_thread;
|
||||
io_quiesce = io_quiesce_thread;
|
||||
io_data_read = io_data_read_thread;
|
||||
io_parity_read = io_parity_read_thread;
|
||||
io_parity_write = io_parity_write_thread;
|
||||
|
|
@ -1035,6 +1232,7 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
io_write_next = io_write_next_mono;
|
||||
io_refresh = io_refresh_mono;
|
||||
io_flush = io_flush_mono;
|
||||
io_quiesce = io_quiesce_mono;
|
||||
io_data_read = io_data_read_mono;
|
||||
io_parity_read = io_parity_read_mono;
|
||||
io_parity_write = io_parity_write_mono;
|
||||
|
|
@ -1057,6 +1255,8 @@ void io_done(struct snapraid_io* io)
|
|||
free(io->writer_map);
|
||||
free(io->writer_list);
|
||||
|
||||
bw_done(&io->bw);
|
||||
|
||||
#if HAVE_THREAD
|
||||
if (io->io_max > 1) {
|
||||
thread_mutex_destroy(&io->io_mutex);
|
||||
|
|
|
|||
80
cmdline/io.h
80
cmdline/io.h
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#ifndef __IO_H
|
||||
#define __IO_H
|
||||
#ifndef IO_H
|
||||
#define IO_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
@ -31,10 +31,12 @@
|
|||
/**
|
||||
* State of the task.
|
||||
*/
|
||||
#define TASK_STATE_IOERROR_CONTINUE -4 /**< IO error. Continuation requested. */
|
||||
#define TASK_STATE_ERROR_CONTINUE -3 /**< Generic error. Continuation requested. */
|
||||
#define TASK_STATE_IOERROR -2 /**< IO error. Failure requested. */
|
||||
#define TASK_STATE_ERROR -1 /**< Generic error. Failure requested. */
|
||||
#define TASK_STATE_IOERROR_CONTINUE -6 /**< IO error. Continuation requested. */
|
||||
#define TASK_STATE_ERROR_CONTINUE -5 /**< Generic error. Continuation requested. */
|
||||
#define TASK_STATE_IOERROR -4 /**< IO error. Failure requested. */
|
||||
#define TASK_STATE_ERROR -3 /**< Generic error. Failure requested. */
|
||||
#define TASK_STATE_IOABORT -2 /**< IO error. Abort requested. */
|
||||
#define TASK_STATE_ABORT -1 /**< Generic error. Abort requested. */
|
||||
#define TASK_STATE_EMPTY 0 /**< Nothing to do. */
|
||||
#define TASK_STATE_READY 1 /**< Ready to start. */
|
||||
#define TASK_STATE_DONE 2 /**< Task completed. */
|
||||
|
|
@ -62,8 +64,9 @@ struct snapraid_task {
|
|||
struct snapraid_block* block;
|
||||
struct snapraid_file* file;
|
||||
block_off_t file_pos;
|
||||
int read_size; /**< Size of the data read. */
|
||||
ssize_t read_size; /**< Size of the data read. */
|
||||
int is_timestamp_different; /**< Report if file has a changed timestamp. */
|
||||
int unrelated_error; /**< Error unrelated to the current parity position. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -74,9 +77,16 @@ struct snapraid_task {
|
|||
struct snapraid_worker {
|
||||
#if HAVE_THREAD
|
||||
thread_id_t thread; /**< Thread context for the worker. */
|
||||
int busy; /**< A read or write task is currently being processed. */
|
||||
#endif
|
||||
|
||||
struct snapraid_io* io; /**< Parent pointer. */
|
||||
/**
|
||||
* Parent pointer.
|
||||
*
|
||||
* Note that worker threads must NOT use this pointer to access
|
||||
* the global state (io->state).
|
||||
*/
|
||||
struct snapraid_io* io;
|
||||
|
||||
void (*func)(struct snapraid_worker*, struct snapraid_task*);
|
||||
|
||||
|
|
@ -182,6 +192,15 @@ struct snapraid_worker {
|
|||
* io_stop(&io);
|
||||
*/
|
||||
struct snapraid_io {
|
||||
/**
|
||||
* Pointer to the global state.
|
||||
*
|
||||
* Note that this pointer must NOT be accessed inside worker threads
|
||||
* (e.g. data_reader/writer, parity_reader/writer functions).
|
||||
* Workers must only operate on their pre-allocated buffers and local task variables,
|
||||
* while any state modifications must strictly happen on the main thread
|
||||
* after I/O completion.
|
||||
*/
|
||||
struct snapraid_state* state;
|
||||
|
||||
/**
|
||||
|
|
@ -302,6 +321,11 @@ struct snapraid_io {
|
|||
*/
|
||||
int done;
|
||||
|
||||
/**
|
||||
* If worker threads have been started.
|
||||
*/
|
||||
int started;
|
||||
|
||||
/**
|
||||
* The worker task index currently used by the operation in
|
||||
* progress. It's the position in all the reader task_map[].
|
||||
|
|
@ -360,19 +384,40 @@ struct snapraid_io {
|
|||
struct snapraid_bw bw;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
IO_OP_NONE = 0, /**< Disk is not accessed. */
|
||||
IO_OP_READ = 1, /**< Disk is read. */
|
||||
IO_OP_WRITE = 2 /**< Disk is written. */
|
||||
} io_op_t;
|
||||
|
||||
/**
|
||||
* Initialize the InputOutput workers.
|
||||
* Initialize the InputOutput workers with granular directions.
|
||||
*
|
||||
* \param io The InputOutput context to initialize.
|
||||
* \param state The global program state.
|
||||
* \param io_cache The number of IO buffers for read-ahead and write-behind. 0 for default.
|
||||
* \param buffer_max The number of data/parity buffers to allocate.
|
||||
* \param handle_map The map of data disk handles.
|
||||
* \param handle_max The total number of data disk handles.
|
||||
* \param data_ops Granular operations for each data disk, or NULL for implicit defaults.
|
||||
* \param data_reader Callback function pointer for data read tasks.
|
||||
* \param data_writer Callback function pointer for data write tasks.
|
||||
* \param parity_handle_map The map of parity disk handles.
|
||||
* \param parity_handle_max The total number of parity levels/handles.
|
||||
* \param parity_ops Granular operations for each parity level, or NULL for implicit defaults.
|
||||
* \param parity_reader Callback function pointer for parity read tasks.
|
||||
* \param parity_writer Callback function pointer for parity write tasks.
|
||||
*/
|
||||
void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
||||
unsigned io_cache, unsigned buffer_max,
|
||||
void (*data_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_handle* handle_map, unsigned handle_max,
|
||||
const io_op_t* data_ops,
|
||||
void (*data_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
void (*data_writer)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max,
|
||||
const io_op_t* parity_ops,
|
||||
void (*parity_reader)(struct snapraid_worker*, struct snapraid_task*),
|
||||
void (*parity_writer)(struct snapraid_worker*, struct snapraid_task*),
|
||||
struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max);
|
||||
void (*parity_writer)(struct snapraid_worker*, struct snapraid_task*));
|
||||
|
||||
/**
|
||||
* Deinitialize the InputOutput workers.
|
||||
|
|
@ -467,8 +512,17 @@ extern void (*io_refresh)(struct snapraid_io* io);
|
|||
|
||||
/**
|
||||
* Flush all the writes.
|
||||
*
|
||||
* \param writer_error Return the number of errors. Vector of IO_WRITER_ERROR_MAX elements.
|
||||
*/
|
||||
extern void (*io_flush)(struct snapraid_io* io);
|
||||
extern void (*io_flush)(struct snapraid_io* io, int* writer_error);
|
||||
|
||||
/**
|
||||
* Wait for all scheduled reads to complete.
|
||||
*
|
||||
* Completed read-ahead results are retained for later consumption.
|
||||
*/
|
||||
extern void (*io_quiesce)(struct snapraid_io* io);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "elem.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "elem.h"
|
||||
#include "parity.h"
|
||||
|
|
@ -49,7 +49,7 @@ static void dump_entry(void* void_entry)
|
|||
struct snapraid_parity_entry* entry = void_entry;
|
||||
printf("%12" PRIu64 " ", entry->low * (uint64_t)entry->block_size);
|
||||
printf("%12" PRIu64 " ", (entry->high - entry->low + 1) * (uint64_t)entry->block_size);
|
||||
printf("%8u ", entry->fragments);
|
||||
printf("%8" PRIu64 " ", entry->fragments);
|
||||
printf("%s\n", fmt_term(entry->disk, entry->file->sub));
|
||||
}
|
||||
|
||||
|
|
@ -104,14 +104,14 @@ static void collect_parity_block_file(uint32_t block_size, struct snapraid_disk*
|
|||
tommy_list_insert_tail(file_list, &entry->node, entry);
|
||||
}
|
||||
|
||||
void state_locate_info(struct snapraid_state* state, uint64_t parity_tail, struct snapraid_locate_info* info)
|
||||
static void state_locate_info(struct snapraid_state* state, uint64_t parity_tail, struct snapraid_locate_info* info)
|
||||
{
|
||||
uint32_t block_size = state->block_size;
|
||||
|
||||
info->block_max = parity_allocated_size(state);
|
||||
info->parity_size = info->block_max * (uint64_t)block_size;
|
||||
|
||||
info->tail_block = (parity_tail + block_size - 1) / block_size;
|
||||
info->tail_block = (parity_tail / block_size) + (parity_tail % block_size != 0);
|
||||
|
||||
if (info->tail_block > info->block_max)
|
||||
info->low_to_free_tail_block = 0;
|
||||
|
|
@ -227,10 +227,12 @@ void state_locate_mark_tail_blocks_for_resync(struct snapraid_state* state, uint
|
|||
struct snapraid_file* file = entry->file;
|
||||
struct snapraid_disk* disk = entry->disk;
|
||||
|
||||
/* reallocate the full file, not only the part of in the free zone */
|
||||
/* this is required because the files blocks have to be in order in */
|
||||
/* in the parity file. */
|
||||
/* not reallocating the file head will prevent the reallocation of the file tail */
|
||||
/*
|
||||
* Reallocate the full file, not only the part of in the free zone
|
||||
* this is required because the files blocks have to be in order in
|
||||
* in the parity file.
|
||||
* not reallocating the file head will prevent the reallocation of the file tail
|
||||
*/
|
||||
for (block_off_t f = 0; f < file->blockmax; ++f) {
|
||||
block_off_t parity_pos = fs_file2par_find(disk, file, f);
|
||||
|
||||
|
|
@ -240,9 +242,21 @@ void state_locate_mark_tail_blocks_for_resync(struct snapraid_state* state, uint
|
|||
}
|
||||
|
||||
struct snapraid_block* block = fs_file2block_get(file, f);
|
||||
if (block_state_get(block) == BLOCK_STATE_BLK) {
|
||||
/* convert from BLK to REP */
|
||||
unsigned block_state = block_state_get(block);
|
||||
|
||||
if (block_state == BLOCK_STATE_BLK
|
||||
|| block_state == BLOCK_STATE_REBUILD
|
||||
) {
|
||||
/*
|
||||
* Explicit force-realloc overrides an in-place REBUILD request.
|
||||
* REP makes the block eligible for the normal reallocation path.
|
||||
*
|
||||
* This transition changes persistent block-state semantics. Mark the
|
||||
* state dirty explicitly rather than relying on the following scan to
|
||||
* incidentally do so.
|
||||
*/
|
||||
block_state_set(block, BLOCK_STATE_REP);
|
||||
state->need_write = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
#ifndef __LOCATE_H
|
||||
#define __LOCATE_H
|
||||
#ifndef LOCATE_H
|
||||
#define LOCATE_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* snapraid */
|
||||
|
|
|
|||
181
cmdline/main.c
181
cmdline/main.c
|
|
@ -1,18 +1,50 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "snapraid.h"
|
||||
|
||||
#define MODE_DEFAULT 0
|
||||
#define MODE_SPINDOWN 1
|
||||
|
||||
static int build_spindown_argv(int argc, char* argv[], char* spindown_argv[5])
|
||||
{
|
||||
char* conf = 0;
|
||||
int count = 0;
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--conf") == 0) {
|
||||
if (i + 1 < argc) {
|
||||
conf = argv[++i];
|
||||
}
|
||||
} else if (strncmp(argv[i], "-c", 2) == 0 && argv[i][2] != 0) {
|
||||
conf = argv[i] + 2;
|
||||
} else if (strncmp(argv[i], "--conf=", 7) == 0) {
|
||||
conf = argv[i] + 7;
|
||||
}
|
||||
}
|
||||
|
||||
spindown_argv[count++] = argv[0];
|
||||
if (conf) {
|
||||
spindown_argv[count++] = "-c";
|
||||
spindown_argv[count++] = conf;
|
||||
}
|
||||
spindown_argv[count++] = "down";
|
||||
spindown_argv[count] = 0;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define COMMAND_LINE_MAX 32767
|
||||
|
||||
static int needs_quote(const WCHAR* arg)
|
||||
{
|
||||
if (*arg == 0)
|
||||
return 1;
|
||||
|
||||
while (*arg) {
|
||||
if (*arg == L' ' || *arg == L'\t' || *arg == L'"')
|
||||
return 1;
|
||||
|
|
@ -25,11 +57,21 @@ static int needs_quote(const WCHAR* arg)
|
|||
#define charcat(c) \
|
||||
do { \
|
||||
if (pos + 1 >= size) { \
|
||||
errno = E2BIG; \
|
||||
return -1; \
|
||||
} \
|
||||
cmd[pos++] = (c); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Append one argument using the Microsoft C runtime command-line
|
||||
* quoting rules. Use this when building a normal CreateProcessW()
|
||||
* command line that the target process will parse back into argv[].
|
||||
*
|
||||
* Do not use this for cmd.exe /c or batch-script arguments: cmd.exe
|
||||
* applies an additional command language with different metacharacter
|
||||
* parsing rules.
|
||||
*/
|
||||
static int argcat(WCHAR* cmd, int size, int pos, const WCHAR* arg)
|
||||
{
|
||||
int has_quote;
|
||||
|
|
@ -96,20 +138,42 @@ static char* argutf8(const WCHAR* arg)
|
|||
return 0;
|
||||
|
||||
res = WideCharToMultiByte(CP_UTF8, 0, arg, len + 1 /* include final null */, utf8_arg, utf8_len, 0, 0);
|
||||
if (res != utf8_len)
|
||||
if (res != utf8_len) {
|
||||
free(utf8_arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return utf8_arg;
|
||||
}
|
||||
|
||||
/* Global variable to store child process handle */
|
||||
static HANDLE child_process = NULL;
|
||||
/* global variable to store child process handle */
|
||||
static void* volatile child_process = NULL;
|
||||
|
||||
/* Console control handler - forwards Ctrl+C, Ctrl+Break to child */
|
||||
/**
|
||||
* Safe atomic access helpers for child_process.
|
||||
*
|
||||
* The console_handler runs concurrently on an OS-managed thread created by
|
||||
* the Windows kernel. Because plain writes and standard volatile access do not
|
||||
* guarantee CPU cache visibility (flushing from store buffers) or prevent CPU/compiler
|
||||
* out-of-order reordering (due to lack of hardware memory barriers/fences on MinGW),
|
||||
* we must use Win32 Interlocked APIs to ensure safe, atomic, fence-protected reads
|
||||
* and writes of the child process handle.
|
||||
*/
|
||||
static HANDLE child_process_read(void)
|
||||
{
|
||||
return InterlockedCompareExchangePointer(&child_process, NULL, NULL);
|
||||
}
|
||||
|
||||
static void child_process_write(HANDLE handle)
|
||||
{
|
||||
InterlockedExchangePointer(&child_process, handle);
|
||||
}
|
||||
|
||||
/* console control handler - forwards Ctrl+C, Ctrl+Break to child */
|
||||
static BOOL WINAPI console_handler(DWORD ctrl_type)
|
||||
{
|
||||
/* if no child, default behavior */
|
||||
if (child_process == NULL)
|
||||
if (child_process_read() == NULL)
|
||||
return FALSE;
|
||||
|
||||
switch (ctrl_type) {
|
||||
|
|
@ -149,13 +213,14 @@ int main(int argc, char* argv[])
|
|||
int i;
|
||||
int pos;
|
||||
int mode;
|
||||
int lock_options;
|
||||
int ret;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
res = GetModuleFileNameW(NULL, app_buffer, sizeof(app_buffer));
|
||||
if (res == 0 || res >= sizeof(app_buffer)) {
|
||||
res = GetModuleFileNameW(NULL, app_buffer, COMMAND_LINE_MAX);
|
||||
if (res == 0 || res >= COMMAND_LINE_MAX) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +235,7 @@ int main(int argc, char* argv[])
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
pos = argcat(cmd_buffer, sizeof(cmd_buffer), 0, app_buffer);
|
||||
pos = argcat(cmd_buffer, COMMAND_LINE_MAX, 0, app_buffer);
|
||||
if (pos < 0) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -182,11 +247,15 @@ int main(int argc, char* argv[])
|
|||
utf8_argc = 1;
|
||||
|
||||
mode = MODE_DEFAULT;
|
||||
lock_options = 0;
|
||||
for (i = 1; i < wide_argc; i++) {
|
||||
if (wcscmp(wide_argv[i], L"--lock-options") == 0)
|
||||
lock_options = 1;
|
||||
|
||||
if (wcscmp(wide_argv[i], L"-s") == 0 || wcscmp(wide_argv[i], L"--spin-down-on-error") == 0) {
|
||||
mode = MODE_SPINDOWN;
|
||||
} else {
|
||||
pos = argcat(cmd_buffer, sizeof(cmd_buffer), pos, wide_argv[i]);
|
||||
pos = argcat(cmd_buffer, COMMAND_LINE_MAX, pos, wide_argv[i]);
|
||||
if (pos < 0) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -200,6 +269,11 @@ int main(int argc, char* argv[])
|
|||
utf8_argv[utf8_argc] = 0;
|
||||
cmd_buffer[pos] = 0;
|
||||
|
||||
if (mode == MODE_SPINDOWN && lock_options) {
|
||||
fprintf(stderr, "The --spin-down-on-error option cannot be used with --lock-options.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
LocalFree(wide_argv);
|
||||
|
||||
if (mode == MODE_DEFAULT) {
|
||||
|
|
@ -225,7 +299,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
/* store child process handle for signal handler */
|
||||
child_process = pi.hProcess;
|
||||
child_process_write(pi.hProcess);
|
||||
|
||||
wait = WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
if (wait != WAIT_OBJECT_0) {
|
||||
|
|
@ -237,7 +311,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
/* clear child process handle */
|
||||
child_process = NULL;
|
||||
child_process_write(NULL);
|
||||
|
||||
if (!GetExitCodeProcess(pi.hProcess, &res)) {
|
||||
fprintf(stderr, "GetExitCodeProcess failed: %lu\n", (unsigned long)GetLastError());
|
||||
|
|
@ -252,17 +326,15 @@ int main(int argc, char* argv[])
|
|||
ret = res;
|
||||
|
||||
if (ret != 0) {
|
||||
char* spindown_argv[3];
|
||||
spindown_argv[0] = utf8_argv[0];
|
||||
spindown_argv[1] = "down";
|
||||
spindown_argv[2] = 0;
|
||||
char* spindown_argv[5];
|
||||
int spindown_argc = build_spindown_argv(utf8_argc, utf8_argv, spindown_argv);
|
||||
|
||||
/* sync all disks */
|
||||
printf("Flush...\n");
|
||||
if (sync() != 0)
|
||||
printf("WARNING! Failed to flush disks!\n");
|
||||
|
||||
snapraid_main(2, spindown_argv);
|
||||
snapraid_main(spindown_argc, spindown_argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -293,14 +365,14 @@ const char* get_argv0(const char* argv0)
|
|||
}
|
||||
|
||||
/* global variable to store child PID for signal handler */
|
||||
static volatile pid_t child_pid = 0;
|
||||
static volatile sig_atomic_t child_pid = 0;
|
||||
|
||||
/* signal handler that forwards signals to child */
|
||||
/* LCOV_EXCL_START */
|
||||
static void forward_signal(int sig)
|
||||
{
|
||||
if (child_pid > 0) {
|
||||
kill(child_pid, sig);
|
||||
kill((pid_t)child_pid, sig);
|
||||
}
|
||||
}
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -308,12 +380,17 @@ static void forward_signal(int sig)
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
int mode;
|
||||
int lock_options;
|
||||
int i, j;
|
||||
int ret;
|
||||
|
||||
mode = MODE_DEFAULT;
|
||||
lock_options = 0;
|
||||
j = 1;
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (strcmp(argv[i], "--lock-options") == 0)
|
||||
lock_options = 1;
|
||||
|
||||
if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--spin-down-on-error") == 0) {
|
||||
mode = MODE_SPINDOWN;
|
||||
} else {
|
||||
|
|
@ -324,6 +401,11 @@ int main(int argc, char* argv[])
|
|||
argc = j;
|
||||
argv[argc] = 0;
|
||||
|
||||
if (mode == MODE_SPINDOWN && lock_options) {
|
||||
fprintf(stderr, "The --spin-down-on-error option cannot be used with --lock-options.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (mode == MODE_DEFAULT) {
|
||||
ret = snapraid_main(argc, argv);
|
||||
} else {
|
||||
|
|
@ -342,6 +424,18 @@ int main(int argc, char* argv[])
|
|||
sigaction(SIGUSR1, &sa, NULL); /* user-defined 1 */
|
||||
sigaction(SIGUSR2, &sa, NULL); /* user-defined 2 */
|
||||
|
||||
sigset_t set, oldset;
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGINT);
|
||||
sigaddset(&set, SIGQUIT);
|
||||
sigaddset(&set, SIGTERM);
|
||||
sigaddset(&set, SIGHUP);
|
||||
sigaddset(&set, SIGUSR1);
|
||||
sigaddset(&set, SIGUSR2);
|
||||
|
||||
/* block signals to prevent signal race before child_pid is set */
|
||||
sigprocmask(SIG_BLOCK, &set, &oldset);
|
||||
|
||||
pid_t pid = fork();
|
||||
if (pid == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -353,6 +447,9 @@ int main(int argc, char* argv[])
|
|||
if (pid == 0) {
|
||||
/* child process */
|
||||
|
||||
/* isolate child in its own process group to prevent double signal delivery from terminal */
|
||||
setpgid(0, 0);
|
||||
|
||||
/* restore default signal handlers */
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGQUIT, SIG_DFL);
|
||||
|
|
@ -361,6 +458,9 @@ int main(int argc, char* argv[])
|
|||
signal(SIGUSR1, SIG_DFL);
|
||||
signal(SIGUSR2, SIG_DFL);
|
||||
|
||||
/* unblock signals in child */
|
||||
sigprocmask(SIG_SETMASK, &oldset, NULL);
|
||||
|
||||
execvp(get_argv0(argv[0]), argv);
|
||||
|
||||
/* here it's an error */
|
||||
|
|
@ -372,23 +472,50 @@ int main(int argc, char* argv[])
|
|||
/* parent process */
|
||||
int status;
|
||||
|
||||
/* set child process group in parent to prevent race condition */
|
||||
setpgid(pid, pid);
|
||||
|
||||
/* store child PID so signal handler can forward signals */
|
||||
child_pid = pid;
|
||||
|
||||
/* unblock signals in parent */
|
||||
sigprocmask(SIG_SETMASK, &oldset, NULL);
|
||||
|
||||
/*
|
||||
* First wait for child termination without reaping (WNOWAIT).
|
||||
* The child enters zombie state, holding its PID reserved in the kernel
|
||||
* so no newly created process can receive the same PID. We clear
|
||||
* child_pid before the final waitpid() reap so the signal forwarder
|
||||
* never sends signals to a recycled PID.
|
||||
*/
|
||||
siginfo_t info;
|
||||
int wret;
|
||||
do {
|
||||
memset(&info, 0, sizeof(info));
|
||||
wret = waitid(P_PID, (id_t)pid, &info, WEXITED | WNOWAIT);
|
||||
} while (wret == -1 && errno == EINTR);
|
||||
|
||||
if (wret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
perror("Failed to wait for SnapRAID");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* clear child PID while PID is still reserved in zombie state */
|
||||
child_pid = 0;
|
||||
|
||||
do {
|
||||
ret = waitpid(pid, &status, 0);
|
||||
} while (ret == -1 && errno == EINTR); /* retry if interrupted by signal */
|
||||
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
perror("Failed to wait for SnapRAID");
|
||||
perror("Failed to reap SnapRAID");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* clear child PID */
|
||||
child_pid = 0;
|
||||
|
||||
/* restore default signal handlers */
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGQUIT, SIG_DFL);
|
||||
|
|
@ -407,17 +534,15 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
if (ret != 0) {
|
||||
char* spindown_argv[3];
|
||||
spindown_argv[0] = argv[0];
|
||||
spindown_argv[1] = "down";
|
||||
spindown_argv[2] = 0;
|
||||
char* spindown_argv[5];
|
||||
int spindown_argc = build_spindown_argv(argc, argv, spindown_argv);
|
||||
|
||||
/* ignore sigpipe to allow spindown even if the terminal is closed */
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
/* in *nix DO NOT CALL sync() because we use syncfs() in all single disks befode the down command */
|
||||
|
||||
snapraid_main(2, spindown_argv);
|
||||
snapraid_main(spindown_argc, spindown_argv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
203
cmdline/memory.c
Normal file
203
cmdline/memory.c
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "memory.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
||||
/**
|
||||
* Cumulative amount of memory allocated.
|
||||
*/
|
||||
static size_t mcounter;
|
||||
|
||||
#if HAVE_THREAD
|
||||
static int memory_is_single_thread;
|
||||
|
||||
void memory_single_thread(int single_thread)
|
||||
{
|
||||
memory_is_single_thread = single_thread;
|
||||
}
|
||||
|
||||
static inline void malloc_counter_inc(size_t inc)
|
||||
{
|
||||
if (tommy_likely(memory_is_single_thread))
|
||||
mcounter += inc;
|
||||
else
|
||||
__atomic_fetch_add(&mcounter, inc, __ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
size_t malloc_counter_get(void)
|
||||
{
|
||||
if (tommy_likely(memory_is_single_thread))
|
||||
return mcounter;
|
||||
return __atomic_load_n(&mcounter, __ATOMIC_RELAXED);
|
||||
}
|
||||
#else
|
||||
void memory_single_thread(int single_thread)
|
||||
{
|
||||
(void)single_thread;
|
||||
}
|
||||
|
||||
static inline void malloc_counter_inc(size_t inc)
|
||||
{
|
||||
mcounter += inc;
|
||||
}
|
||||
|
||||
size_t malloc_counter_get(void)
|
||||
{
|
||||
return mcounter;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
static ssize_t malloc_print(int f, const char* str)
|
||||
{
|
||||
ssize_t len = 0;
|
||||
|
||||
while (str[len])
|
||||
++len;
|
||||
return write(f, str, len);
|
||||
}
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
static ssize_t malloc_printn(int f, size_t value)
|
||||
{
|
||||
char buf[32];
|
||||
int i;
|
||||
|
||||
if (!value)
|
||||
return write(f, "0", 1);
|
||||
|
||||
i = sizeof(buf);
|
||||
while (value) {
|
||||
buf[--i] = (value % 10) + '0';
|
||||
value /= 10;
|
||||
}
|
||||
|
||||
return write(f, buf + i, sizeof(buf) - i);
|
||||
}
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
void malloc_fail(size_t size)
|
||||
{
|
||||
/* don't use printf to avoid any possible extra allocation */
|
||||
int f = 2; /* stderr */
|
||||
|
||||
malloc_print(f, "Failed for Low Memory!\n");
|
||||
malloc_print(f, "Allocating ");
|
||||
malloc_printn(f, size);
|
||||
malloc_print(f, " bytes.\n");
|
||||
malloc_print(f, "Already allocated ");
|
||||
malloc_printn(f, malloc_counter_get());
|
||||
malloc_print(f, " bytes.\n");
|
||||
if (sizeof(void*) == 4) {
|
||||
malloc_print(f, "You are currently using a 32 bits executable.\n");
|
||||
malloc_print(f, "If you have more than 4GB of memory, please upgrade to a 64 bits one.\n");
|
||||
}
|
||||
}
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
void* malloc_nofail(size_t size)
|
||||
{
|
||||
void* ptr = malloc(size ? size : 1);
|
||||
|
||||
if (!ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
malloc_fail(size);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
malloc_counter_inc(size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void* realloc_nofail(void* ptr, size_t size)
|
||||
{
|
||||
/* keep zero-size requests allocated, as in malloc_nofail() */
|
||||
void* new_ptr = realloc(ptr, size ? size : 1);
|
||||
|
||||
if (!new_ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
malloc_fail(size);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
malloc_counter_inc(size);
|
||||
|
||||
return new_ptr;
|
||||
}
|
||||
|
||||
void* nalloc_nofail(size_t count, size_t size)
|
||||
{
|
||||
if (size != 0 && count > SIZE_MAX / size) {
|
||||
log_fatal(EINTERNAL, "Allocation size overflow\n");
|
||||
os_abort();
|
||||
}
|
||||
|
||||
size *= count;
|
||||
|
||||
void* ptr = malloc(size ? size : 1);
|
||||
|
||||
if (!ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
malloc_fail(size);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
malloc_counter_inc(size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void* calloc_nofail(size_t count, size_t size)
|
||||
{
|
||||
if (size != 0 && count > SIZE_MAX / size) {
|
||||
log_fatal(EINTERNAL, "Allocation size overflow\n");
|
||||
os_abort();
|
||||
}
|
||||
|
||||
void* ptr = calloc(count ? count : 1, size ? size : 1);
|
||||
|
||||
if (!ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
malloc_fail(count * size);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
malloc_counter_inc(count * size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
char* strdup_nofail(const char* str)
|
||||
{
|
||||
size_t size = strlen(str) + 1;
|
||||
|
||||
char* ptr = malloc_nofail(size);
|
||||
|
||||
memcpy(ptr, str, size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
char* strndup_nofail(const char* str, size_t size)
|
||||
{
|
||||
char* ptr = malloc_nofail(size + 1);
|
||||
|
||||
memcpy(ptr, str, size);
|
||||
ptr[size] = 0;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
62
cmdline/memory.h
Normal file
62
cmdline/memory.h
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
||||
/**
|
||||
* Return the size of the cumulative allocated memory.
|
||||
*/
|
||||
size_t malloc_counter_get(void);
|
||||
|
||||
/**
|
||||
* Enable or disable single-thread mode for memory counters.
|
||||
*/
|
||||
void memory_single_thread(int single_thread);
|
||||
|
||||
/**
|
||||
* Safe malloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* malloc_nofail(size_t size);
|
||||
|
||||
/**
|
||||
* Safe realloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* realloc_nofail(void* ptr, size_t size);
|
||||
|
||||
/**
|
||||
* Safe malloc with calloc calling arguments.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* nalloc_nofail(size_t count, size_t size);
|
||||
|
||||
/**
|
||||
* Safe calloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* calloc_nofail(size_t count, size_t size);
|
||||
|
||||
/**
|
||||
* Safe strdup.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
char* strdup_nofail(const char* str);
|
||||
|
||||
/**
|
||||
* Safe strndup with known length.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
char* strndup_nofail(const char* str, size_t size);
|
||||
|
||||
/**
|
||||
* Helper for printing an error about a failed allocation.
|
||||
*/
|
||||
void malloc_fail(size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
114
cmdline/metro.c
114
cmdline/metro.c
|
|
@ -1,114 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2019 Andrea Mazzoleni
|
||||
|
||||
/*
|
||||
* Derivative work from MetroHash128::Hash
|
||||
*
|
||||
* This version extends the original MetroHash128::Hash to accept a full 128-bit seed.
|
||||
*
|
||||
* Note: The original algorithm's behavior can be perfectly replicated by
|
||||
* setting the low and high part of the seed to the same 64-bit value.
|
||||
*
|
||||
* https://github.com/jandrewrogers/MetroHash/blob/master/src/metrohash128.cpp
|
||||
*
|
||||
* Copyright 2015-2018 J. Andrew Rogers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
static const uint64_t k0 = 0xC83A91E1;
|
||||
static const uint64_t k1 = 0x8648DBDB;
|
||||
static const uint64_t k2 = 0x7BDEC03B;
|
||||
static const uint64_t k3 = 0x2F5870A5;
|
||||
|
||||
void MetroHash128(const void* data, size_t size, const uint8_t* seed, uint8_t* digest)
|
||||
{
|
||||
const uint8_t* ptr = data;
|
||||
uint64_t v[4];
|
||||
|
||||
/*
|
||||
* EXTENSION: Initialize primary state with 128-bit seed (seedL and seedH)
|
||||
* Ensures both halves influence the hash even for short messages (< 32 bytes)
|
||||
*
|
||||
* Original code was:
|
||||
* v[0] = (static_cast<uint64_t>(seed) - k0) * k3;
|
||||
* v[1] = (static_cast<uint64_t>(seed) + k1) * k2;
|
||||
*/
|
||||
v[0] = (util_read64(seed) - k0) * k3;
|
||||
v[1] = (util_read64(seed + 8) + k1) * k2;
|
||||
|
||||
if (size >= 32) {
|
||||
/*
|
||||
* EXTENSION: Initialize secondary state using both halves of the 128-bit seed
|
||||
*
|
||||
* Original code was:
|
||||
* v[2] = (static_cast<uint64_t>(seed) + k0) * k2;
|
||||
* v[3] = (static_cast<uint64_t>(seed) - k1) * k3;
|
||||
*/
|
||||
v[2] = (util_read64(seed) + k0) * k2;
|
||||
v[3] = (util_read64(seed + 8) - k1) * k3;
|
||||
|
||||
do {
|
||||
v[0] += util_read64(ptr) * k0; ptr += 8; v[0] = util_rotr64(v[0], 29) + v[2];
|
||||
v[1] += util_read64(ptr) * k1; ptr += 8; v[1] = util_rotr64(v[1], 29) + v[3];
|
||||
v[2] += util_read64(ptr) * k2; ptr += 8; v[2] = util_rotr64(v[2], 29) + v[0];
|
||||
v[3] += util_read64(ptr) * k3; ptr += 8; v[3] = util_rotr64(v[3], 29) + v[1];
|
||||
size -= 32;
|
||||
} while (size >= 32);
|
||||
|
||||
v[2] ^= util_rotr64(((v[0] + v[3]) * k0) + v[1], 21) * k1;
|
||||
v[3] ^= util_rotr64(((v[1] + v[2]) * k1) + v[0], 21) * k0;
|
||||
v[0] ^= util_rotr64(((v[0] + v[2]) * k0) + v[3], 21) * k1;
|
||||
v[1] ^= util_rotr64(((v[1] + v[3]) * k1) + v[2], 21) * k0;
|
||||
}
|
||||
|
||||
if (size >= 16) {
|
||||
v[0] += util_read64(ptr) * k2; ptr += 8; v[0] = util_rotr64(v[0], 33) * k3;
|
||||
v[1] += util_read64(ptr) * k2; ptr += 8; v[1] = util_rotr64(v[1], 33) * k3;
|
||||
v[0] ^= util_rotr64((v[0] * k2) + v[1], 45) * k1;
|
||||
v[1] ^= util_rotr64((v[1] * k3) + v[0], 45) * k0;
|
||||
size -= 16;
|
||||
}
|
||||
|
||||
if (size >= 8) {
|
||||
v[0] += util_read64(ptr) * k2; ptr += 8; v[0] = util_rotr64(v[0], 33) * k3;
|
||||
v[0] ^= util_rotr64((v[0] * k2) + v[1], 27) * k1;
|
||||
size -= 8;
|
||||
}
|
||||
|
||||
if (size >= 4) {
|
||||
v[1] += util_read32(ptr) * k2; ptr += 4; v[1] = util_rotr64(v[1], 33) * k3;
|
||||
v[1] ^= util_rotr64((v[1] * k3) + v[0], 46) * k0;
|
||||
size -= 4;
|
||||
}
|
||||
|
||||
if (size >= 2) {
|
||||
v[0] += util_read16(ptr) * k2; ptr += 2; v[0] = util_rotr64(v[0], 33) * k3;
|
||||
v[0] ^= util_rotr64((v[0] * k2) + v[1], 22) * k1;
|
||||
size -= 2;
|
||||
}
|
||||
|
||||
if (size >= 1) {
|
||||
v[1] += util_read8(ptr) * k2; v[1] = util_rotr64(v[1], 33) * k3;
|
||||
v[1] ^= util_rotr64((v[1] * k3) + v[0], 58) * k0;
|
||||
}
|
||||
|
||||
v[0] += util_rotr64((v[0] * k0) + v[1], 13);
|
||||
v[1] += util_rotr64((v[1] * k1) + v[0], 37);
|
||||
v[0] += util_rotr64((v[0] * k2) + v[1], 13);
|
||||
v[1] += util_rotr64((v[1] * k3) + v[0], 37);
|
||||
|
||||
util_write64(digest, v[0]);
|
||||
util_write64(digest + 8, v[1]);
|
||||
}
|
||||
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
/*
|
||||
* Metro test vector from https://github.com/jandrewrogers/MetroHash/blob/master/src/metrohash128.cpp
|
||||
*/
|
||||
{ "012345678901234567890123456789012345678901234567890123456789012", 63, { 0xc7, 0x7c, 0xe2, 0xbf, 0xa4, 0xed, 0x9f, 0x9b, 0x05, 0x48, 0xb2, 0xac, 0x50, 0x74, 0xa2, 0x97 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
|
||||
{ "012345678901234567890123456789012345678901234567890123456789012", 63, { 0x45, 0xA3, 0xCD, 0xB8, 0x38, 0x19, 0x9D, 0x7F, 0xBD, 0xD6, 0x8D, 0x86, 0x7A, 0x14, 0xEC, 0xEF }, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
|
||||
/* others */
|
||||
{ "", 0, { 0x06, 0x7e, 0x5d, 0x24, 0x32, 0x71, 0x6c, 0x6f, 0x56, 0x3f, 0xbe, 0xaa, 0x5d, 0xb4, 0x77, 0x00 }, { 0x35, 0xc9, 0xf7, 0x89, 0x7b, 0x34, 0x47, 0xb1, 0x35, 0xc9, 0xf7, 0x89, 0x7b, 0x34, 0x47, 0xb1 } },
|
||||
{ "a", 1, { 0xc7, 0x4e, 0x10, 0x0d, 0x2c, 0x8d, 0x25, 0xc6, 0x2b, 0x99, 0x3d, 0x31, 0x22, 0xa6, 0x47, 0xfc }, { 0x26, 0x15, 0x24, 0x15, 0x2d, 0x5e, 0x2a, 0xa0, 0x26, 0x15, 0x24, 0x15, 0x2d, 0x5e, 0x2a, 0xa0 } },
|
||||
{ "abc", 3, { 0xed, 0x8d, 0xc5, 0xf8, 0x84, 0x85, 0x66, 0xec, 0x60, 0xca, 0x3f, 0x49, 0x60, 0xcf, 0x6a, 0xfd }, { 0xf7, 0x95, 0xaa, 0x11, 0x1f, 0xc3, 0x05, 0x4f, 0xf7, 0x95, 0xaa, 0x11, 0x1f, 0xc3, 0x05, 0x4f } },
|
||||
{ "message digest", 14, { 0x13, 0xec, 0x25, 0xf2, 0x3c, 0x4d, 0x4f, 0x4e, 0x9f, 0x83, 0x61, 0x0d, 0x2f, 0x2d, 0x22, 0x44 }, { 0x41, 0xff, 0x15, 0x16, 0x2c, 0x05, 0xde, 0x29, 0x41, 0xff, 0x15, 0x16, 0x2c, 0x05, 0xde, 0x29 } },
|
||||
{ "abcdefghijklmnopqrstuvwxyz", 26, { 0xe7, 0x26, 0xb1, 0x06, 0x6d, 0x21, 0xa6, 0x5e, 0xba, 0x63, 0x29, 0xfc, 0x3f, 0xb6, 0x1f, 0x01 }, { 0x34, 0x1b, 0x5c, 0x7e, 0x2c, 0x41, 0xdb, 0x17, 0x34, 0x1b, 0x5c, 0x7e, 0x2c, 0x41, 0xdb, 0x17 } },
|
||||
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 62, { 0x5c, 0x11, 0x8e, 0xd2, 0x10, 0x21, 0xe9, 0x2d, 0x26, 0x07, 0xf9, 0xc5, 0xfb, 0xf7, 0xb2, 0x79 }, { 0xb2, 0xeb, 0x2d, 0x5e, 0x69, 0x37, 0x37, 0xeb, 0xb2, 0xeb, 0x2d, 0x5e, 0x69, 0x37, 0x37, 0xeb } },
|
||||
{ "The quick brown fox jumps over the lazy dog", 43, { 0xdb, 0xb5, 0xfa, 0xd3, 0x6c, 0x77, 0x8a, 0x09, 0xf6, 0xa3, 0x30, 0x36, 0xa2, 0xf9, 0x18, 0x4f }, { 0x25, 0x6e, 0x8b, 0x77, 0x41, 0x6b, 0x6f, 0x96, 0x25, 0x6e, 0x8b, 0x77, 0x41, 0x6b, 0x6f, 0x96 } },
|
||||
{ "\x2a", 1, { 0x9a, 0x53, 0x8f, 0xc2, 0x88, 0x75, 0x00, 0x2d, 0x23, 0xc1, 0xfe, 0xfc, 0x90, 0xbc, 0xcc, 0xcf }, { 0xe2, 0x5d, 0x6e, 0xb9, 0x90, 0xb8, 0x43, 0x62, 0xe2, 0x5d, 0x6e, 0xb9, 0x90, 0xb8, 0x43, 0x62 } },
|
||||
{ "\x11\xb7", 2, { 0x86, 0x94, 0xdd, 0xa0, 0x50, 0xf5, 0x54, 0xa7, 0x4e, 0x79, 0x12, 0x03, 0xbd, 0xc5, 0x07, 0x85 }, { 0x1f, 0xf6, 0x7f, 0x9e, 0xa4, 0xbf, 0xa0, 0x9a, 0x1f, 0xf6, 0x7f, 0x9e, 0xa4, 0xbf, 0xa0, 0x9a } },
|
||||
{ "\x4c\xdf\x4d", 3, { 0x89, 0xf6, 0xec, 0x6f, 0xe6, 0xb7, 0x73, 0x70, 0x72, 0xf9, 0x20, 0xb4, 0x7f, 0x5e, 0x80, 0x08 }, { 0x13, 0xd9, 0xc1, 0x91, 0x25, 0x57, 0x65, 0x48, 0x13, 0xd9, 0xc1, 0x91, 0x25, 0x57, 0x65, 0x48 } },
|
||||
{ "\x57\x34\x85\xf5", 4, { 0x34, 0x52, 0xd0, 0x11, 0x30, 0x55, 0x59, 0x30, 0xbc, 0x9e, 0x7d, 0xd7, 0xb0, 0xcb, 0x7c, 0x8e }, { 0xc4, 0x7f, 0x07, 0x4e, 0x4d, 0x8a, 0x47, 0x01, 0xc4, 0x7f, 0x07, 0x4e, 0x4d, 0x8a, 0x47, 0x01 } },
|
||||
{ "\x87\x87\xf3\x02\xd8", 5, { 0xcb, 0x72, 0xe3, 0x2b, 0x97, 0x72, 0xf0, 0xcd, 0x8a, 0xb1, 0xa2, 0xb4, 0xf9, 0x4e, 0xe1, 0x3a }, { 0x0c, 0x68, 0xf2, 0x5f, 0x35, 0xca, 0xdd, 0x3e, 0x0c, 0x68, 0xf2, 0x5f, 0x35, 0xca, 0xdd, 0x3e } },
|
||||
{ "\x60\xcd\xb4\x00\x4c\xd4", 6, { 0x3c, 0xe8, 0xda, 0x00, 0x44, 0x63, 0x90, 0x75, 0x5f, 0xbd, 0x7f, 0x4f, 0x9a, 0x84, 0xe3, 0x90 }, { 0xde, 0xc2, 0x11, 0x42, 0xa5, 0x26, 0xe1, 0x90, 0xde, 0xc2, 0x11, 0x42, 0xa5, 0x26, 0xe1, 0x90 } },
|
||||
{ "\xc2\x57\x5a\x3b\x1b\x83\x07", 7, { 0xe6, 0xe5, 0xcd, 0x64, 0x2e, 0x10, 0x7c, 0x15, 0x1c, 0x1c, 0xb2, 0xe4, 0x6a, 0xeb, 0xc6, 0xa9 }, { 0xfa, 0x1e, 0x9c, 0xd3, 0xdf, 0x07, 0xbb, 0xdf, 0xfa, 0x1e, 0x9c, 0xd3, 0xdf, 0x07, 0xbb, 0xdf } },
|
||||
{ "\x7a\xef\xb4\xfe\xcf\x95\xda\xb4", 8, { 0xf4, 0x68, 0x70, 0x68, 0x31, 0xde, 0x32, 0xda, 0xf8, 0x78, 0x8f, 0x42, 0x87, 0xdd, 0x2b, 0x49 }, { 0x2d, 0xe0, 0x72, 0x31, 0xeb, 0xf4, 0x07, 0xce, 0x2d, 0xe0, 0x72, 0x31, 0xeb, 0xf4, 0x07, 0xce } },
|
||||
{ "\xc3\x8f\xec\xcb\x1e\x00\x7a\x7b\x84", 9, { 0x5b, 0x70, 0xc0, 0xd4, 0x73, 0xd1, 0x61, 0xc5, 0xcf, 0xc0, 0xf5, 0x29, 0x50, 0xb6, 0xc4, 0xf8 }, { 0x08, 0x43, 0x53, 0xfd, 0x79, 0x45, 0xc3, 0xeb, 0x08, 0x43, 0x53, 0xfd, 0x79, 0x45, 0xc3, 0xeb } },
|
||||
{ "\x6f\x9a\x56\x2c\x85\x0a\xf1\xa5\x90\x5f", 10, { 0xa7, 0x93, 0x18, 0x11, 0x94, 0x74, 0x38, 0x05, 0x03, 0x0c, 0x4e, 0xc2, 0x1a, 0x54, 0x6c, 0xb2 }, { 0xc1, 0x72, 0x94, 0x12, 0x23, 0x22, 0x2f, 0x74, 0xc1, 0x72, 0x94, 0x12, 0x23, 0x22, 0x2f, 0x74 } },
|
||||
{ "\xec\x25\x78\x0e\x7f\xe1\x53\x8d\x3d\xa5\xd9", 11, { 0xa5, 0xc2, 0x14, 0x97, 0x49, 0x21, 0x16, 0xe5, 0x29, 0x73, 0x2c, 0xff, 0x38, 0xa7, 0x4e, 0xb3 }, { 0x74, 0x73, 0x8d, 0xd4, 0x0b, 0x50, 0x7a, 0x6a, 0x74, 0x73, 0x8d, 0xd4, 0x0b, 0x50, 0x7a, 0x6a } },
|
||||
{ "\x3e\x81\x9e\x0b\x68\x2a\x0f\x60\xca\x61\xc6\x48", 12, { 0x76, 0xb2, 0x6c, 0x3b, 0x89, 0xfc, 0x91, 0xf4, 0x9e, 0xac, 0x4f, 0x92, 0xa5, 0x95, 0xa2, 0x28 }, { 0x45, 0xee, 0xa1, 0x15, 0x7f, 0xf4, 0xa8, 0xd1, 0x45, 0xee, 0xa1, 0x15, 0x7f, 0xf4, 0xa8, 0xd1 } },
|
||||
{ "\x87\x12\x60\x00\x51\x25\xd5\x63\x60\xf4\x60\x33\xba", 13, { 0xba, 0xbd, 0x9d, 0x0d, 0xe7, 0x4e, 0x60, 0xe7, 0x7c, 0x61, 0xf1, 0x69, 0xff, 0x93, 0x1f, 0x55 }, { 0x21, 0x8a, 0x1e, 0x83, 0x3a, 0x49, 0xba, 0xfe, 0x21, 0x8a, 0x1e, 0x83, 0x3a, 0x49, 0xba, 0xfe } },
|
||||
{ "\x91\x95\xc9\x08\xe7\xea\x6a\xae\x5e\xd6\x4f\xf9\xcf\x98", 14, { 0x05, 0x7e, 0x64, 0x97, 0xf8, 0x20, 0x3f, 0xf0, 0x6e, 0x34, 0xde, 0x97, 0x48, 0x80, 0xa7, 0xf5 }, { 0xb9, 0xb7, 0x6a, 0x60, 0x42, 0x0e, 0xba, 0x16, 0xb9, 0xb7, 0x6a, 0x60, 0x42, 0x0e, 0xba, 0x16 } },
|
||||
{ "\xc1\xe9\xfa\x1e\x9f\x4e\x90\x14\x33\x39\xc2\x58\xd8\x98\x14", 15, { 0x14, 0x53, 0x9c, 0xaa, 0x18, 0xeb, 0xa3, 0xfe, 0x80, 0x2d, 0x69, 0x09, 0x0e, 0x44, 0xef, 0x56 }, { 0x6c, 0x7b, 0x65, 0x1b, 0xa1, 0x45, 0xb7, 0x2e, 0x6c, 0x7b, 0x65, 0x1b, 0xa1, 0x45, 0xb7, 0x2e } },
|
||||
{ "\x60\x3e\x95\x66\xf0\x12\x4d\x58\x0f\x93\x5a\x21\xad\x41\x40\x13", 16, { 0x15, 0x96, 0xc5, 0x22, 0x89, 0x4e, 0x24, 0x1d, 0xfd, 0x47, 0x2c, 0x19, 0xf0, 0x63, 0x2b, 0x42 }, { 0x46, 0x82, 0x96, 0xe4, 0xc0, 0xcc, 0xb9, 0xf6, 0x46, 0x82, 0x96, 0xe4, 0xc0, 0xcc, 0xb9, 0xf6 } },
|
||||
{ "\x67\xe4\xa4\xd2\x35\xf4\xe3\xac\x9d\xa0\xd6\x93\x1e\xbc\xb2\x13\xc3", 17, { 0xf7, 0xf4, 0xf4, 0x4c, 0xfb, 0xd4, 0x5b, 0xce, 0x4c, 0x74, 0x2c, 0x0c, 0xe6, 0xb4, 0xa7, 0xaa }, { 0xd4, 0x9a, 0x3d, 0xc0, 0xd2, 0x85, 0xeb, 0x4b, 0xd4, 0x9a, 0x3d, 0xc0, 0xd2, 0x85, 0xeb, 0x4b } },
|
||||
{ "\x32\x28\xb3\x53\xe9\x51\xcd\x4b\x9a\x12\xb9\xc3\x51\x3c\x1a\x0f\x44\x24", 18, { 0xab, 0xcf, 0xaa, 0xf3, 0x02, 0xde, 0x49, 0x01, 0x10, 0x39, 0x4b, 0xba, 0xa8, 0xbe, 0xf3, 0x28 }, { 0x62, 0x9d, 0xa7, 0xb7, 0x15, 0x73, 0x5a, 0x71, 0x62, 0x9d, 0xa7, 0xb7, 0x15, 0x73, 0x5a, 0x71 } },
|
||||
{ "\xf8\xeb\x58\xac\xbb\xd0\xb5\x23\x29\xda\x7e\x9d\x8f\xe4\x7e\x85\x25\x06\xee", 19, { 0xfb, 0xb5, 0x26, 0x27, 0xa1, 0x47, 0x99, 0xfa, 0xc7, 0x6e, 0x72, 0x28, 0x78, 0x72, 0x07, 0x1f }, { 0xc6, 0x31, 0xf8, 0xb7, 0xa1, 0xfe, 0xb8, 0xee, 0xc6, 0x31, 0xf8, 0xb7, 0xa1, 0xfe, 0xb8, 0xee } },
|
||||
{ "\x41\x13\x1e\xa0\x63\xb9\x62\x07\x1b\xfe\xb3\x7c\xd8\x14\xe1\xfb\x87\x00\x29\x55", 20, { 0x74, 0x36, 0xdd, 0x5a, 0xaa, 0x66, 0x42, 0x91, 0x24, 0x45, 0x4e, 0x49, 0xdc, 0x9c, 0x1e, 0x78 }, { 0xc6, 0xde, 0x21, 0xd0, 0x98, 0x2b, 0xa6, 0x66, 0xc6, 0xde, 0x21, 0xd0, 0x98, 0x2b, 0xa6, 0x66 } },
|
||||
{ "\xa5\xe6\xe0\x0b\xbc\xff\x11\xb4\xfa\xef\x25\x42\x58\x83\x64\x00\x71\x6f\xa2\xfd\xe7", 21, { 0x0b, 0x38, 0x5d, 0x2e, 0xe4, 0xba, 0xa5, 0x4f, 0x83, 0x0b, 0x46, 0x34, 0x0f, 0xb9, 0xbd, 0xc4 }, { 0x6b, 0xae, 0xc7, 0x84, 0x60, 0x69, 0x32, 0xa9, 0x6b, 0xae, 0xc7, 0x84, 0x60, 0x69, 0x32, 0xa9 } },
|
||||
{ "\x9f\x23\x3a\xda\x11\x18\x86\x18\x7c\x65\xe8\x8b\xba\xf2\x35\xa9\x85\x89\xfc\xd6\xfe\x4c", 22, { 0x8d, 0x33, 0xa9, 0x97, 0xbf, 0x89, 0x7b, 0xbf, 0x65, 0xa2, 0xe5, 0xe8, 0x5a, 0xcd, 0x3f, 0x69 }, { 0xcd, 0xe0, 0x28, 0x17, 0xf3, 0x4f, 0x44, 0x79, 0xcd, 0xe0, 0x28, 0x17, 0xf3, 0x4f, 0x44, 0x79 } },
|
||||
{ "\xfd\xf5\xbd\xb8\x72\xf6\x5b\xb1\xc1\x6f\x6b\x91\x9a\x17\xca\x7a\xdc\x25\xfa\x60\x2e\x2b\x0d", 23, { 0x5f, 0xf8, 0x10, 0x8f, 0x3c, 0xf5, 0x8a, 0x94, 0x95, 0x97, 0x1d, 0x2d, 0xe6, 0xc6, 0x7f, 0xaa }, { 0x94, 0x78, 0x37, 0x0c, 0x1c, 0x04, 0x0e, 0x91, 0x94, 0x78, 0x37, 0x0c, 0x1c, 0x04, 0x0e, 0x91 } },
|
||||
{ "\x4f\x34\x7e\xc9\xa5\xfe\x82\xaf\xc4\x14\x09\x8c\x05\x44\xd1\xa7\x58\x45\xaa\x10\xcf\x85\x48\x92", 24, { 0xd2, 0x67, 0x35, 0x27, 0x0e, 0x55, 0xbd, 0xb1, 0x00, 0x55, 0x35, 0xf2, 0x8d, 0x19, 0x2f, 0x60 }, { 0xe6, 0x78, 0xcf, 0xe1, 0xaa, 0x6c, 0xaa, 0x65, 0xe6, 0x78, 0xcf, 0xe1, 0xaa, 0x6c, 0xaa, 0x65 } },
|
||||
{ "\xa6\xf9\x60\x25\xe2\x87\xb6\x0e\x1f\x6f\x2f\xd5\x96\xf4\xdf\x98\x62\x1d\xb2\x44\x68\x66\x13\xa0\xa4", 25, { 0x79, 0xaa, 0x35, 0x8b, 0x04, 0x39, 0xa5, 0x81, 0xcb, 0xe0, 0xbf, 0x21, 0xc6, 0xa8, 0xc9, 0xde }, { 0x9e, 0x15, 0x99, 0x85, 0xc6, 0xa7, 0x99, 0x06, 0x9e, 0x15, 0x99, 0x85, 0xc6, 0xa7, 0x99, 0x06 } },
|
||||
{ "\xab\x90\xcd\xc5\xcb\x95\xce\xd2\xd0\x3b\x50\xe7\xb7\x46\x7a\xf9\x9e\x00\x61\xd7\x86\xf8\x92\x5a\xea\x98", 26, { 0x87, 0x00, 0x28, 0x66, 0xfe, 0x22, 0xb2, 0xfc, 0xc7, 0xb2, 0xe5, 0xc3, 0x48, 0xe4, 0xb6, 0x83 }, { 0x87, 0x82, 0xf1, 0xe4, 0x2e, 0x58, 0x17, 0xfc, 0x87, 0x82, 0xf1, 0xe4, 0x2e, 0x58, 0x17, 0xfc } },
|
||||
{ "\x4b\x15\x88\xe0\x30\xc0\x52\x11\xe1\xc8\xe2\x9e\xe3\xc8\xff\xd8\x5f\x1b\x75\x7d\x62\x93\xeb\x49\x30\x86\x58", 27, { 0x8e, 0x32, 0x7c, 0x12, 0x57, 0x58, 0x7a, 0x3f, 0x90, 0xf6, 0x39, 0x32, 0x92, 0x83, 0x86, 0xcb }, { 0xe5, 0x55, 0xa6, 0x43, 0xd1, 0x93, 0x62, 0x31, 0xe5, 0x55, 0xa6, 0x43, 0xd1, 0x93, 0x62, 0x31 } },
|
||||
{ "\x46\x4f\x6d\x23\x9b\x98\xaf\x0b\x84\x00\xb3\xac\x86\x08\x52\x9d\xaa\xcc\xd6\x80\x0a\x1d\x4f\x84\x65\x55\x97\x42", 28, { 0xf9, 0x89, 0x90, 0x17, 0x7e, 0x5f, 0x90, 0xc5, 0x64, 0xf4, 0x7c, 0xe3, 0xcf, 0xde, 0x56, 0xe6 }, { 0x6e, 0xf5, 0x14, 0x2f, 0x68, 0x36, 0xc3, 0x14, 0x6e, 0xf5, 0x14, 0x2f, 0x68, 0x36, 0xc3, 0x14 } },
|
||||
{ "\xaf\x19\x03\x50\x77\x43\x46\xd8\x25\x83\x87\x65\xc6\x0f\x58\xa4\xdd\x4a\x15\x3a\x7a\x19\xbb\x34\x60\xb6\x7c\x93\x77", 29, { 0xdb, 0x7f, 0xc3, 0x0d, 0xaa, 0x01, 0xd3, 0x5d, 0x11, 0xa0, 0x34, 0x05, 0x3f, 0xc4, 0xd8, 0xef }, { 0xc9, 0x36, 0xfb, 0xae, 0xfb, 0x63, 0xa9, 0x3e, 0xc9, 0x36, 0xfb, 0xae, 0xfb, 0x63, 0xa9, 0x3e } },
|
||||
{ "\x84\x87\x11\x76\xfd\x70\xdc\x2f\x21\x01\xc6\xe3\x3f\x96\x68\x63\x9e\x0f\x36\x7e\x9e\x54\x1a\xf1\xff\x79\x60\xee\x1e\xf4", 30, { 0xc0, 0xcd, 0x4d, 0xd5, 0x74, 0x77, 0xc0, 0x9c, 0x2a, 0x29, 0x25, 0x06, 0x73, 0x55, 0xf8, 0xd9 }, { 0x11, 0x9f, 0x10, 0xec, 0x1a, 0x9f, 0xf4, 0x59, 0x11, 0x9f, 0x10, 0xec, 0x1a, 0x9f, 0xf4, 0x59 } },
|
||||
{ "\x79\xd2\xf2\xe7\xd8\xe7\x0e\x62\x17\x7b\x47\x52\x55\x39\x3b\x65\x4f\x8c\x00\xc7\xfc\x72\xf8\xd1\x75\x6a\x10\x78\xee\x2e\x8a", 31, { 0x32, 0x8d, 0x56, 0x46, 0xc1, 0xd8, 0x12, 0x14, 0x67, 0x42, 0xeb, 0xd6, 0x5a, 0xc4, 0xcb, 0x9b }, { 0x21, 0xe7, 0x37, 0x0d, 0x13, 0x25, 0x96, 0xc2, 0x21, 0xe7, 0x37, 0x0d, 0x13, 0x25, 0x96, 0xc2 } },
|
||||
{ "\xa3\x83\xd0\x52\x93\x5b\x89\x70\xd8\x98\x95\xab\x0f\x66\xd1\xe7\x50\x16\x43\x3d\x8f\x60\xfd\x55\x99\x67\xb7\x04\xbf\x4f\x6e\x1e", 32, { 0x50, 0x03, 0xd1, 0xa6, 0xc8, 0xcb, 0x7e, 0xb2, 0x17, 0x62, 0xeb, 0xca, 0x3a, 0x04, 0x8d, 0xc7 }, { 0x14, 0xd1, 0xd0, 0x8d, 0xe1, 0x7f, 0xed, 0x3a, 0x14, 0xd1, 0xd0, 0x8d, 0xe1, 0x7f, 0xed, 0x3a } },
|
||||
{ "\x34\xe4\xa3\x56\x0a\x06\x74\x09\xbf\x32\x81\xff\x64\xdd\xd6\x3c\xcf\x81\x00\x56\xa5\x7c\x6d\x3d\x22\xa2\x59\x56\x1c\xb6\xf3\x43\x82", 33, { 0x30, 0x05, 0xa8, 0xf1, 0xc1, 0xb1, 0x93, 0x3c, 0x52, 0xd4, 0xca, 0xf2, 0xcd, 0xa5, 0xf0, 0xa9 }, { 0x34, 0x22, 0xd6, 0x35, 0x14, 0x82, 0x2f, 0x24, 0x34, 0x22, 0xd6, 0x35, 0x14, 0x82, 0x2f, 0x24 } },
|
||||
{ "\xc1\xb2\x2b\x9a\xf7\xd5\x08\x69\xf0\xab\x7f\x8b\xb6\x5c\x6a\x3a\x86\x6f\x8d\x47\xe2\xc8\x40\x69\xe0\x66\xc1\x40\x79\xf3\x9c\xf0\x2d\xef", 34, { 0x1f, 0x42, 0x2c, 0xf9, 0x0c, 0xf6, 0xd2, 0x4e, 0xf6, 0xdf, 0xdf, 0x49, 0x91, 0x6e, 0x51, 0xb3 }, { 0x26, 0xb9, 0x1a, 0xb0, 0xde, 0xee, 0x7a, 0x15, 0x26, 0xb9, 0x1a, 0xb0, 0xde, 0xee, 0x7a, 0x15 } },
|
||||
{ "\xe9\xd7\x3c\x4b\xbc\xc0\xdb\xe9\xd0\xad\x55\x8d\x5f\xde\x6b\xc9\x89\x6e\x27\x8f\xab\x5d\x73\x6f\xe2\x3a\x57\x1b\xea\x9d\x81\x85\xa4\x18\x4b", 35, { 0xc8, 0x28, 0x51, 0xfe, 0xc6, 0x47, 0x70, 0xf9, 0x79, 0x5f, 0x22, 0xca, 0x28, 0x4d, 0xee, 0x86 }, { 0xeb, 0x4d, 0x93, 0xa6, 0xce, 0xe1, 0xef, 0x1c, 0xeb, 0x4d, 0x93, 0xa6, 0xce, 0xe1, 0xef, 0x1c } },
|
||||
{ "\x53\xc9\x79\x5f\x82\x09\xaf\xab\xd5\x7d\xfe\xeb\x7f\x1b\xc8\x3e\xda\x03\x45\xfd\x75\x2c\x8b\xa8\xf9\xcc\x82\x2d\x67\xa6\xf3\xdc\x15\xd3\x28\xe0", 36, { 0x32, 0x4b, 0xcb, 0x82, 0x1a, 0x2b, 0x4a, 0x46, 0x06, 0xc6, 0xe5, 0x2c, 0xb3, 0x0f, 0x1b, 0x2c }, { 0xa2, 0xd2, 0x75, 0x4a, 0x34, 0x1b, 0x91, 0xa4, 0xa2, 0xd2, 0x75, 0x4a, 0x34, 0x1b, 0x91, 0xa4 } },
|
||||
{ "\x5b\xd9\x0c\xe1\xa3\x9b\x19\xff\x60\x1d\x4a\x21\x1e\xa8\x27\x20\x3f\x79\x02\xc4\x43\x1c\x02\x42\xa8\x14\x9b\xd8\x12\x69\xa2\xe2\x60\x07\xb4\x3b\xed", 37, { 0xa1, 0x9f, 0x6c, 0xcc, 0x8f, 0x19, 0xa3, 0x82, 0xf4, 0x99, 0x55, 0x60, 0x2c, 0xf7, 0x02, 0xd2 }, { 0x64, 0x04, 0x2a, 0x91, 0xbb, 0x50, 0xec, 0x24, 0x64, 0x04, 0x2a, 0x91, 0xbb, 0x50, 0xec, 0x24 } },
|
||||
{ "\x00\x56\xb0\xea\xa5\x9c\x8e\x6d\x0e\xf4\x88\x98\xc2\x49\x3e\x6e\xe8\xc5\xf7\x44\x8f\x6a\xd6\x88\x35\xac\xe2\x66\xbd\x63\xee\xcc\xb8\x9b\x04\xa4\xba\x27", 38, { 0x30, 0x15, 0xd7, 0x06, 0xd5, 0x87, 0xf9, 0xf5, 0x30, 0x3b, 0x40, 0xc0, 0x98, 0x6a, 0x40, 0xeb }, { 0xfa, 0x63, 0xf0, 0xe3, 0x60, 0x2a, 0x40, 0xbf, 0xfa, 0x63, 0xf0, 0xe3, 0x60, 0x2a, 0x40, 0xbf } },
|
||||
{ "\x52\x6e\xdc\x2b\x6d\x81\x33\x7e\xf8\xb0\x70\xe5\x08\x68\x10\x68\x84\x07\xe6\x73\x86\xdb\x67\xcd\x34\x87\x55\xa1\xd4\xec\x3a\x7c\x3f\x54\x30\xfe\x3d\xde\x31", 39, { 0x50, 0xa5, 0xbc, 0x38, 0x2d, 0x32, 0xad, 0x41, 0xba, 0xdf, 0x51, 0x78, 0x1e, 0xaa, 0x99, 0xc6 }, { 0x75, 0xd7, 0x8f, 0x5d, 0x99, 0x57, 0x1a, 0x1a, 0x75, 0xd7, 0x8f, 0x5d, 0x99, 0x57, 0x1a, 0x1a } },
|
||||
{ "\x19\x8f\xb2\x47\x4d\x96\x87\xd9\xed\xfe\xea\x41\x00\xd9\xbe\x30\xfa\x64\xd8\x24\xad\x2a\x90\x00\x84\x78\x39\x1e\x38\x85\xa5\xa4\x0c\x21\x89\x3a\x85\x50\x54\x77", 40, { 0xdc, 0x64, 0x9e, 0xa3, 0x88, 0x2c, 0x3f, 0xe2, 0x38, 0x1b, 0x2e, 0x9d, 0xe5, 0xad, 0x60, 0x8c }, { 0x49, 0xae, 0x02, 0xd9, 0xfe, 0xa1, 0x4a, 0xfa, 0x49, 0xae, 0x02, 0xd9, 0xfe, 0xa1, 0x4a, 0xfa } },
|
||||
{ "\xac\x0f\x22\x3f\xa6\x99\x88\xd1\x10\x7a\xbe\xaf\x56\x67\xfb\x82\x10\xf9\x58\xea\x92\xbb\xe0\x6b\x11\x38\x89\xfd\x8d\x1c\x47\x22\x75\x6d\x30\x18\x00\x20\x86\x02\x44", 41, { 0xa8, 0x1e, 0xb6, 0x09, 0xc1, 0xa5, 0xfa, 0xe1, 0x2d, 0x51, 0x1e, 0xa8, 0xb0, 0x9a, 0x03, 0xc9 }, { 0x41, 0x3e, 0x76, 0x3e, 0x86, 0x0e, 0x5d, 0x54, 0x41, 0x3e, 0x76, 0x3e, 0x86, 0x0e, 0x5d, 0x54 } },
|
||||
{ "\xcc\x0e\x8b\x41\xa8\x2f\xe4\xd6\xcc\xd6\x8a\x4a\x32\xe9\x08\x81\x50\xe8\x2a\xbc\xcf\xfc\x27\xa5\xd3\x33\x95\x8a\x9b\x09\x5c\xda\xb0\x6c\xc6\x5c\x73\x9d\x9a\x47\xba\x52", 42, { 0x0e, 0x64, 0xdd, 0xf9, 0xfa, 0x02, 0x6b, 0x45, 0x84, 0xa1, 0xdc, 0x92, 0x9d, 0xc3, 0x00, 0xf0 }, { 0x7a, 0xb4, 0x28, 0x13, 0x93, 0xf9, 0xad, 0x09, 0x7a, 0xb4, 0x28, 0x13, 0x93, 0xf9, 0xad, 0x09 } },
|
||||
{ "\xc6\x9f\x96\x4d\x4b\xd2\x4f\x87\xd0\xca\x42\x44\x8b\xe3\x55\x68\xd4\xd1\xf1\x1c\x0f\xb4\xfb\x39\x73\x62\xb3\x16\xd1\x12\xc0\x73\xcf\x85\x1f\x32\xc8\x11\x73\xba\xa6\x7e\xe9", 43, { 0xbb, 0x4f, 0x10, 0x73, 0x94, 0x59, 0xb9, 0x4f, 0x67, 0xc4, 0x50, 0x4b, 0xde, 0x34, 0x54, 0x2d }, { 0x1d, 0x85, 0x33, 0xc6, 0x82, 0xc1, 0x99, 0x1c, 0x1d, 0x85, 0x33, 0xc6, 0x82, 0xc1, 0x99, 0x1c } },
|
||||
{ "\x2d\xf1\xb6\x46\xda\xe7\x50\x43\x2d\xb1\xf5\xcd\xd0\x9e\x3b\xcb\xe5\x76\x79\x9e\x7c\x2a\xa3\x7f\xe4\x97\xa2\xcc\x12\xe2\xc7\xb8\xeb\xaa\xe0\x34\x66\xac\x9f\xb5\x3b\x6b\xd2\x28", 44, { 0xdd, 0x18, 0x57, 0x75, 0x64, 0x74, 0xc6, 0xb5, 0x3c, 0x09, 0x6d, 0xcd, 0x92, 0x42, 0x34, 0x0b }, { 0x85, 0x9b, 0xc9, 0x0c, 0xf4, 0x07, 0xff, 0x9b, 0x85, 0x9b, 0xc9, 0x0c, 0xf4, 0x07, 0xff, 0x9b } },
|
||||
{ "\x16\xcf\x24\x22\x8e\xb6\xf2\x80\xfa\x0a\x55\x07\x36\x52\xef\x8b\xd7\x5b\x66\x5f\x8d\x52\xac\x72\x01\x31\x22\x94\x48\x8f\x4e\x4f\x39\x9c\x1c\xa9\x4c\x5d\x17\x57\xb8\xf5\xce\x76\x43", 45, { 0xd5, 0xfa, 0x71, 0x93, 0xa5, 0x10, 0x4e, 0x04, 0xd3, 0x00, 0x04, 0xdf, 0xa1, 0x34, 0x92, 0x2f }, { 0x27, 0xec, 0x5b, 0x50, 0xab, 0x3a, 0x4c, 0x9c, 0x27, 0xec, 0x5b, 0x50, 0xab, 0x3a, 0x4c, 0x9c } },
|
||||
{ "\x13\x5d\x5a\x28\xc7\xf0\xbf\x6d\xef\x8a\x78\xec\x31\xf3\x9a\x51\x31\xdc\xa7\x09\xe9\x87\x36\x29\xee\x96\x09\x5b\x31\xb2\xda\xca\x14\x56\x25\x69\x30\xcd\x60\xbc\x72\x75\x48\xdc\xa5\x9c", 46, { 0x1f, 0xc9, 0xb7, 0x57, 0x8c, 0xad, 0xdf, 0xf4, 0xcf, 0xad, 0xcc, 0x85, 0x57, 0x64, 0xf2, 0x1c }, { 0xdc, 0x97, 0xf6, 0x8c, 0x5d, 0xe0, 0x56, 0x3e, 0xdc, 0x97, 0xf6, 0x8c, 0x5d, 0xe0, 0x56, 0x3e } },
|
||||
{ "\xf7\xe6\xd7\xf5\x3e\x77\x10\x02\xb2\x0e\x0c\x1a\xa4\x60\xf1\x26\x04\x01\x34\xa6\x8f\xdf\x64\xcd\x78\xe7\x80\x4e\xd1\x36\x04\x3c\x46\x64\x30\x95\x69\x4b\x01\x09\x73\x02\xdc\x05\xd0\x2e\x9d", 47, { 0xc3, 0x9b, 0x8f, 0x6a, 0x6f, 0xb6, 0x09, 0x92, 0xf6, 0x61, 0xec, 0x1c, 0xc4, 0x67, 0x87, 0x1a }, { 0xa1, 0xaf, 0x88, 0xc8, 0x22, 0xe9, 0xcc, 0x32, 0xa1, 0xaf, 0x88, 0xc8, 0x22, 0xe9, 0xcc, 0x32 } },
|
||||
{ "\xef\x8b\x59\x07\x6a\xa6\x89\xcc\x48\x28\x85\xc7\xbe\x8c\xe4\xe3\x1b\x1b\x8b\x40\x42\x16\xe4\xed\x1d\xc7\xa3\xd2\xf7\xc7\x8d\x3e\x1d\x74\xab\xcf\x72\x3d\x15\xe8\x4c\xdd\x3b\xda\x3b\xf8\x48\x52", 48, { 0xaf, 0xb1, 0xe7, 0xab, 0x1f, 0xde, 0xd2, 0x0a, 0x2f, 0x57, 0xe7, 0x76, 0x11, 0x64, 0x0c, 0x3f }, { 0x3a, 0x7d, 0x06, 0x01, 0x57, 0x65, 0xf7, 0x58, 0x3a, 0x7d, 0x06, 0x01, 0x57, 0x65, 0xf7, 0x58 } },
|
||||
{ "\x13\x9e\x05\x5e\x33\xc7\xfb\xd4\xa8\x71\x90\x8a\xe7\x4f\x32\x89\x10\x47\x69\x64\x67\x0d\x95\x55\x5b\xc7\xcd\x2c\xef\x0b\x92\x78\xb7\xdf\x4a\x8f\x41\x3b\x22\xdb\x43\xe0\x13\x38\x53\x46\x06\xf3\xfe", 49, { 0x5c, 0xbe, 0x3f, 0x5f, 0x67, 0x60, 0xf3, 0xe6, 0x05, 0xb8, 0x9f, 0xdc, 0x63, 0xd0, 0x61, 0xbe }, { 0x0f, 0x4f, 0xe7, 0xf0, 0x9a, 0x71, 0xd0, 0x89, 0x0f, 0x4f, 0xe7, 0xf0, 0x9a, 0x71, 0xd0, 0x89 } },
|
||||
{ "\x42\x1d\xaf\xd0\xc5\x96\x91\xad\x2f\xba\x69\x33\x95\x3f\xdc\x66\xc0\x50\xf7\xc5\xe0\xbe\x1a\x91\x72\x7a\x87\x92\xa3\x46\x03\xcd\x36\xa8\x6c\x38\xd6\x2f\x71\x53\x50\x6a\xd7\xb0\xd5\xbf\xa6\xef\xc3\xdf", 50, { 0x68, 0x9e, 0xb8, 0x2e, 0xc6, 0xf6, 0x91, 0x0c, 0x64, 0xad, 0x91, 0x8e, 0xbc, 0x82, 0x56, 0xab }, { 0xd3, 0x46, 0x6e, 0xbb, 0x64, 0x21, 0xdd, 0x93, 0xd3, 0x46, 0x6e, 0xbb, 0x64, 0x21, 0xdd, 0x93 } },
|
||||
{ "\x06\x3b\x63\x82\xdc\x71\xde\x0f\x4c\x30\x8f\x3c\x00\xf3\x56\x51\x7b\xa1\x6d\x3e\xaa\x8f\xea\x1e\x4c\x04\xd8\x02\xed\xe7\x6d\x74\x8c\x1c\x5a\x99\x31\x3b\xad\x79\xcb\x4a\x3b\x31\xdb\x65\xc7\x51\x26\xff\x4d", 51, { 0x58, 0xe3, 0x70, 0xc8, 0xdb, 0xae, 0x03, 0xd0, 0x51, 0xa1, 0x6b, 0x11, 0x19, 0x90, 0x01, 0xed }, { 0x87, 0xf0, 0xdb, 0x9a, 0x06, 0xd5, 0x74, 0x11, 0x87, 0xf0, 0xdb, 0x9a, 0x06, 0xd5, 0x74, 0x11 } },
|
||||
{ "\x54\xc6\x7f\xd3\xc3\xff\xab\x98\x48\xef\x96\x79\xa1\x23\xc0\x15\x57\x1d\x24\x0e\x41\xe8\xc2\xe3\x46\xdf\xab\xb9\x13\x13\xc0\xaf\x21\x8e\xb9\x07\x9e\x60\x4e\xad\x4b\x15\x71\xde\xba\xed\xe4\xfd\x2c\x9b\xfb\x26", 52, { 0xdc, 0xe0, 0x11, 0xe0, 0x75, 0x52, 0x95, 0x6a, 0xc0, 0x80, 0x3d, 0x9b, 0x95, 0xff, 0x45, 0x52 }, { 0x35, 0xb2, 0x7b, 0x6d, 0x6b, 0xdf, 0xfc, 0xed, 0x35, 0xb2, 0x7b, 0x6d, 0x6b, 0xdf, 0xfc, 0xed } },
|
||||
{ "\xe4\x5b\x24\x0c\x37\x72\xfa\xf3\xdc\xca\x08\xc0\x1b\xe7\x23\x92\x8d\xaf\x6a\x6f\x04\xe2\xd2\x86\xb5\xfb\xae\x02\x66\x8a\x12\xe1\x54\xfb\x2d\x3d\x3d\xd2\x8c\x7d\x07\xdb\xdb\x8b\xd2\xe5\xaf\x21\x53\x8a\xbe\xec\x5d", 53, { 0x2d, 0xa4, 0x49, 0x55, 0xf6, 0x76, 0xc0, 0x14, 0x4d, 0xb5, 0x13, 0x88, 0x72, 0x68, 0x0e, 0xfc }, { 0x6a, 0x68, 0x98, 0xe2, 0xab, 0x45, 0xde, 0x08, 0x6a, 0x68, 0x98, 0xe2, 0xab, 0x45, 0xde, 0x08 } },
|
||||
{ "\x02\x63\xda\xe2\xff\x98\x4d\x40\x41\xad\x77\x9e\x33\xac\xd7\x30\x21\xb0\x73\x45\x4f\x81\xbe\x65\x42\xf9\x49\x7f\xa6\x04\x7d\x77\x40\x8d\x2d\xcd\xb8\xc9\xd2\xad\xd3\x0f\xbb\x33\xca\x72\xb1\xac\x0a\x53\x5d\xf5\x86\x36", 54, { 0xa9, 0x00, 0x59, 0x2b, 0xc6, 0xef, 0x1f, 0x1c, 0x6c, 0xf2, 0x6b, 0x5c, 0xad, 0xec, 0x95, 0x94 }, { 0x2c, 0x85, 0x99, 0x03, 0xca, 0x6d, 0x8a, 0x44, 0x2c, 0x85, 0x99, 0x03, 0xca, 0x6d, 0x8a, 0x44 } },
|
||||
{ "\xe8\x30\x1e\xa8\xd1\xc7\x62\x47\xb0\x61\x8b\x7a\xd3\x77\x8a\x00\x5b\x34\x9b\xa9\x0e\x59\x64\xb1\x71\x07\xfd\xd9\x73\xfa\xfd\x89\x70\x2c\x35\xf8\xf7\xb7\xdb\x6e\x12\xa3\x88\x30\x0c\xcc\xe5\x68\x85\xf2\xd0\xbb\x2c\x8c\x20", 55, { 0x7c, 0x0f, 0x04, 0xd0, 0xc6, 0x74, 0x4e, 0xda, 0x26, 0x0a, 0xb5, 0xa4, 0x27, 0x43, 0xd1, 0x78 }, { 0x29, 0xf3, 0x4d, 0xbf, 0xe4, 0xf2, 0xa5, 0x5d, 0x29, 0xf3, 0x4d, 0xbf, 0xe4, 0xf2, 0xa5, 0x5d } },
|
||||
{ "\x3d\xef\xf7\x0a\xa6\x9e\x02\xc2\x6e\x61\xea\x7e\x94\x2f\x20\xce\x4e\x35\x40\x27\xba\xc8\x51\x93\x3b\xe2\xee\x71\x38\x9e\x12\x33\x5b\x07\xc5\x20\xdf\xe3\x19\xf2\xd0\x74\x24\x0b\xd1\xd1\x8c\x80\x52\xbd\xd6\xb6\x5d\x85\xdd\x92", 56, { 0x71, 0x35, 0xf4, 0x1e, 0x6c, 0xe3, 0xce, 0x81, 0xd1, 0x4d, 0x58, 0x60, 0xd9, 0xb5, 0x5d, 0x8d }, { 0x5c, 0x3a, 0xe8, 0x76, 0x95, 0x30, 0x66, 0x9c, 0x5c, 0x3a, 0xe8, 0x76, 0x95, 0x30, 0x66, 0x9c } },
|
||||
{ "\xd1\x06\x7e\xa7\xa4\x1c\x82\x43\x2b\xf8\xb2\x30\xe8\xe6\x0c\x57\x86\xc2\xe3\x42\x2a\x96\xf6\x6a\x1d\x33\xed\x4a\xec\x4d\xdf\x12\x9e\xbc\x40\x06\x30\x55\x7a\x4d\xb9\x20\xaa\x25\x99\x70\x41\x21\xd5\x8c\x85\x04\xa8\x31\x07\x30\xbc", 57, { 0x7c, 0xc1, 0x88, 0x98, 0xf4, 0xc9, 0xd1, 0x7a, 0x52, 0x16, 0xef, 0x62, 0xba, 0xf5, 0x41, 0x78 }, { 0x42, 0x44, 0x30, 0x72, 0xe0, 0x5e, 0x0b, 0xa2, 0x42, 0x44, 0x30, 0x72, 0xe0, 0x5e, 0x0b, 0xa2 } },
|
||||
{ "\xe9\xe4\x13\x6b\x32\x34\xa6\xfb\xaa\x62\x4c\x27\x4a\x04\xf5\x2b\x2e\xd9\x6d\x09\xe7\xad\x57\xfb\x45\xcf\xdd\x04\x49\x64\x91\xaa\x42\x55\x95\x7b\xd6\x5b\x67\x40\xab\x62\x6c\xe2\xc9\x99\xf2\x96\xd4\x20\xa1\xb8\x27\x99\x85\x26\xeb\x20", 58, { 0x24, 0x02, 0xfe, 0x32, 0xd7, 0x73, 0x16, 0x51, 0x8c, 0xe6, 0xe3, 0x90, 0x93, 0xd6, 0xef, 0x17 }, { 0x96, 0x53, 0x42, 0x5b, 0x79, 0x57, 0x2f, 0xce, 0x96, 0x53, 0x42, 0x5b, 0x79, 0x57, 0x2f, 0xce } },
|
||||
{ "\x65\x2d\x76\x67\x68\x9f\x1f\xde\x8c\x30\x4c\xc7\x4d\xa5\x0b\xd7\x4e\x97\x08\xef\x8f\xdd\x70\x9c\xc6\x47\xf7\xcd\x3b\x75\x1b\xc2\x49\x2d\x76\x24\x9d\x58\xb0\x47\x92\x76\x42\xde\x06\x0c\xfa\x64\x0a\x50\x76\xa6\x01\x83\xb6\x4d\x86\xf8\x6c", 59, { 0x04, 0x21, 0x0f, 0xfc, 0xd2, 0x16, 0x1b, 0x7e, 0x82, 0xa2, 0xdb, 0x70, 0xe1, 0xf7, 0x9c, 0x1b }, { 0xc7, 0xdb, 0x6d, 0xd1, 0xaf, 0x80, 0xf8, 0x8e, 0xc7, 0xdb, 0x6d, 0xd1, 0xaf, 0x80, 0xf8, 0x8e } },
|
||||
{ "\xfa\xd2\x68\xd8\x5b\x76\x6e\x87\x7c\x14\xb5\xe3\x12\xc6\xbf\xa5\xc8\xb2\x66\x63\xc7\xa0\x1c\x67\xef\xa6\xbf\x7a\xb3\x11\x5d\x15\x3f\xbe\xd7\x8f\x68\xd2\xb1\x93\x78\x89\x6c\xca\x92\x6b\x08\xc8\x45\x15\xcd\x4c\x20\x49\x8b\x3c\xef\xfa\x89\xcc", 60, { 0xb9, 0xb4, 0xe0, 0x51, 0xb1, 0xf4, 0xd8, 0xd1, 0xce, 0x0f, 0xb1, 0xae, 0xb5, 0xe1, 0x40, 0xa9 }, { 0xac, 0xcc, 0x07, 0x15, 0xc9, 0x37, 0x5f, 0x90, 0xac, 0xcc, 0x07, 0x15, 0xc9, 0x37, 0x5f, 0x90 } },
|
||||
{ "\x27\xed\xc5\x85\x12\xd5\x2b\xac\x25\xb6\xb0\xab\x92\x53\x15\x44\x42\x07\x4d\xd5\xe1\xc4\x5a\x24\x99\x2c\x09\xa2\x4c\xcf\x6e\xc3\x91\xf8\x7c\xda\x2d\xd2\x8a\x81\xf5\x4c\x90\xce\x2f\x3c\x7d\x54\x42\x56\xee\xdc\xb6\xa2\x4e\x5f\x95\xbb\xc6\xba\xd4", 61, { 0x2e, 0x03, 0x80, 0xfa, 0x88, 0x7b, 0x11, 0x87, 0xbf, 0x9a, 0x4a, 0x31, 0x08, 0x4b, 0x37, 0x96 }, { 0xc2, 0x0a, 0xfe, 0xcc, 0xa0, 0x6f, 0x54, 0xa3, 0xc2, 0x0a, 0xfe, 0xcc, 0xa0, 0x6f, 0x54, 0xa3 } },
|
||||
{ "\xf3\xe6\xdd\xe2\xba\x72\x79\x2b\x30\x3b\x2e\x8f\x6e\xd3\x70\xa1\xa5\x18\x8e\xff\xb0\xcf\xc6\xdc\x8e\x39\xb4\x4a\x5b\x90\x71\x0c\xcb\xb4\xf4\x82\x3e\xf6\x6b\xb3\x99\x0c\x27\x6c\x81\x19\x31\x1d\x51\xff\x78\x47\x51\x58\x24\x95\xdf\x09\x18\x3f\x7c\x4b", 62, { 0x8d, 0xd3, 0xc2, 0x8e, 0xa1, 0x41, 0x4e, 0x28, 0x2b, 0xd2, 0xc6, 0x5f, 0x9b, 0xfa, 0x0c, 0x1b }, { 0xb3, 0xba, 0x49, 0x8f, 0x24, 0x57, 0x37, 0x21, 0xb3, 0xba, 0x49, 0x8f, 0x24, 0x57, 0x37, 0x21 } },
|
||||
{ "\x00\x1e\xed\xb7\x17\x39\xf7\x8b\xea\xbc\x79\x5c\xa2\xc2\xf1\x00\xae\x7d\x0a\xf6\x48\xe6\x91\x23\x0d\x39\x9d\x48\x22\xb1\xd5\x27\xd2\x1f\x9f\xed\x8d\x37\x8e\xa7\x76\x14\xe8\x86\x50\x57\x49\x9f\x48\x5d\xe8\x5d\x74\x5b\x73\x6c\xf2\x11\x6e\x3d\xa8\x7f\x4d", 63, { 0xf0, 0x77, 0x16, 0xd5, 0xa2, 0xb6, 0xb8, 0x72, 0x03, 0xe5, 0xda, 0xe0, 0x52, 0x47, 0x56, 0x66 }, { 0xad, 0xec, 0x74, 0xe1, 0x7e, 0xa8, 0x5c, 0x7a, 0xad, 0xec, 0x74, 0xe1, 0x7e, 0xa8, 0x5c, 0x7a } },
|
||||
{ "\x0c\x20\xdf\xfe\x41\x55\xf7\x8d\x73\x10\x41\x2a\x92\xca\x29\x17\x1d\xd0\xfb\x06\x49\x41\x23\x4c\x1c\xf9\x0a\x64\x8b\x2b\x5f\x99\x1c\xec\xfe\x8f\x59\x95\xfb\xc0\x62\x54\xd8\x9c\x0a\x20\x10\x31\xe0\x5c\x7b\x0b\x31\xc9\xb5\x61\x5d\xe7\x28\x26\xce\x05\xba\x09", 64, { 0x72, 0xc3, 0x93, 0xb4, 0x20, 0x70, 0x60, 0x59, 0x41, 0x57, 0xb3, 0x09, 0x19, 0x61, 0x8c, 0x30 }, { 0x26, 0x3b, 0x07, 0x98, 0xc2, 0xbf, 0xbb, 0x7d, 0x26, 0x3b, 0x07, 0x98, 0xc2, 0xbf, 0xbb, 0x7d } },
|
||||
{ "\x99\x45\x2b\x92\xb2\x19\xc2\xfc\xa4\x0b\x9d\xfd\xcd\x44\xfa\x1f\xe8\x2b\xf7\x00\xb8\xa8\xeb\x56\x78\xc7\x1a\xe5\x9f\x4c\xd4\x67\x7c\x46\x04\xab\x4a\x76\x3e\x4b\xcd\x58\x35\x1e\xe8\xcf\x83\x6b\x6e\x0a\xe3\x25\x66\x00\x5a\x03\xf6\xa6\x67\xdc\xcb\xbd\x5b\xd7\x23", 65, { 0x92, 0x08, 0x27, 0x67, 0x9a, 0xfa, 0xd7, 0x8d, 0x0e, 0x66, 0xe5, 0x4c, 0x25, 0x94, 0xd1, 0x08 }, { 0x52, 0xa7, 0x81, 0x4b, 0x9b, 0x72, 0xde, 0xf0, 0x52, 0xa7, 0x81, 0x4b, 0x9b, 0x72, 0xde, 0xf0 } },
|
||||
{ "\x2d\x3a\xdf\xd3\x20\xa0\x0d\x41\xce\x99\x23\xc6\xf3\xc5\xa8\x1f\x64\x6a\xc3\x16\xfb\x96\xbe\x30\xb3\x1a\x1a\xad\x6d\x87\x81\x22\x18\xf8\xa1\x73\x4d\x5b\xb4\xbd\x27\x86\xbf\xde\x12\x48\xa2\x5f\x73\xcb\xb4\x40\x45\x62\xbb\x87\x9f\x3c\xde\xbc\x84\x65\x9d\xa1\xca\x0d", 66, { 0xd4, 0x35, 0x00, 0x98, 0x36, 0xc8, 0x30, 0xac, 0x62, 0x87, 0x7c, 0x36, 0xa8, 0x9b, 0x0f, 0xba }, { 0xbd, 0x79, 0x12, 0xb6, 0x62, 0xe0, 0xef, 0x3f, 0xbd, 0x79, 0x12, 0xb6, 0x62, 0xe0, 0xef, 0x3f } },
|
||||
{ "\x9b\x26\x96\x7a\xe6\xb4\x23\x33\x58\xf7\x3c\xcd\xdc\x94\x82\xea\x21\x44\x66\x96\x6a\xe1\x99\x78\x1e\xd6\x4b\x3a\x32\xb9\x4a\xb1\xc3\x12\x8a\x26\x91\xf8\x0b\x08\x5b\x16\x84\x60\xd9\x31\x58\xd3\xb4\xa4\xa8\xb1\xa2\x62\xb3\x18\xcf\x8a\x8e\x5e\xe7\x28\x59\xa4\x24\xaf\xa5", 67, { 0x17, 0xb3, 0xea, 0x3f, 0xa9, 0xc1, 0x71, 0x24, 0x0c, 0x19, 0x53, 0x9e, 0x1a, 0x90, 0x25, 0x0e }, { 0x6a, 0x4e, 0x23, 0x11, 0x1d, 0x13, 0x77, 0xdc, 0x6a, 0x4e, 0x23, 0x11, 0x1d, 0x13, 0x77, 0xdc } },
|
||||
{ "\x7f\xd4\xad\x52\xdb\x5d\xa8\x2d\x2a\xac\x70\x5d\x77\xca\x02\x75\xd9\x0b\x93\xf2\x56\xab\x77\x8e\xba\xa0\xf3\x07\x85\xbf\xab\x96\x66\xe7\x8f\x6c\x53\x05\xdd\x20\xe0\xab\x65\x6e\x5e\xf0\x46\x4a\xad\xe3\x39\x20\x97\xb2\x9f\x4b\x87\xad\x3a\xdb\x20\xaa\x17\x47\xa9\x37\x02\xf1", 68, { 0x92, 0x2b, 0xac, 0x59, 0xa0, 0xcd, 0x20, 0x6c, 0xbb, 0x6c, 0xb2, 0xe7, 0xde, 0x2e, 0x7e, 0xdb }, { 0x4d, 0xef, 0xfa, 0x9d, 0xca, 0xf8, 0xe0, 0xf0, 0x4d, 0xef, 0xfa, 0x9d, 0xca, 0xf8, 0xe0, 0xf0 } },
|
||||
{ "\x15\x31\xea\x64\xa1\xb4\x17\xd9\xea\x6a\xe5\x3b\x9e\xad\x62\x30\x99\x85\x50\x60\x55\x4a\x41\xf0\xe8\xa6\xe6\x60\xa5\x43\xd5\xcd\x91\x4f\xac\xaf\xc2\xa6\x07\x22\x7b\xcc\x8c\xf8\x78\xa6\xfd\x70\x93\xd5\x92\xef\x76\x61\x9c\x9b\x34\x9a\xa6\xef\xd3\x89\x11\x1a\x47\xd7\x86\x0a\xdd", 69, { 0x1c, 0xe7, 0x33, 0xa7, 0x61, 0x2b, 0xde, 0x8b, 0x5e, 0xc0, 0xc0, 0xd0, 0x45, 0xc1, 0xb4, 0x66 }, { 0xc3, 0xdc, 0xf3, 0x0d, 0x72, 0x9d, 0x96, 0x7a, 0xc3, 0xdc, 0xf3, 0x0d, 0x72, 0x9d, 0x96, 0x7a } },
|
||||
{ "\xdf\x6b\x28\x3b\x07\x75\xce\xbf\x97\x59\x0b\x99\x49\xce\x9a\x68\xcc\x0f\xcf\x40\x7d\x4f\x2b\x8f\xac\x69\x9a\x90\x70\x9e\xee\xf0\xdc\x3d\xaa\xee\x03\x95\x43\x9b\xeb\x85\x4d\xaa\xd2\xab\x30\x6c\x60\x83\x5b\x83\xcb\x17\xd6\x61\x9a\xb4\x6e\x37\x60\x7c\x36\xe8\xf5\xfc\x20\xae\xf7\x9d", 70, { 0x94, 0xa3, 0xf4, 0xc3, 0x47, 0x4f, 0x8f, 0xa2, 0x22, 0x40, 0x48, 0x9c, 0x17, 0x37, 0xae, 0x83 }, { 0x4f, 0x6b, 0x35, 0x93, 0x5e, 0xd2, 0xb6, 0x16, 0x4f, 0x6b, 0x35, 0x93, 0x5e, 0xd2, 0xb6, 0x16 } },
|
||||
{ "\x45\x2c\xea\x15\xa6\xba\x93\x13\x7d\x7a\xa4\xb8\x23\x58\xf1\x79\x8a\x62\x04\xf9\x0f\x48\xb4\x6f\x27\x37\xd8\x35\x1b\xf9\x3b\x6e\xf6\x0e\xcf\x52\x5a\x05\x55\x06\x6b\x5f\x91\x15\x52\x15\xc2\x30\xff\x2f\x21\xea\xd3\x83\xf7\xa7\x2c\x55\x16\x8d\x0f\x03\x5a\x0d\xf5\x31\x1d\x3c\x06\x29\xc8", 71, { 0xe1, 0xac, 0x61, 0xfd, 0xec, 0x47, 0xdf, 0x52, 0x17, 0x4f, 0xf7, 0x61, 0x07, 0xb0, 0x4f, 0x3c }, { 0xe8, 0x71, 0x9c, 0x0d, 0x9c, 0x03, 0x97, 0x6a, 0xe8, 0x71, 0x9c, 0x0d, 0x9c, 0x03, 0x97, 0x6a } },
|
||||
{ "\xf8\x2b\x77\xf2\x71\x37\x70\x97\x27\xd5\xa5\x0d\x60\xbc\x7a\x1a\x06\x22\x86\xf2\x2c\xa7\xe0\x1d\x9d\x67\x84\x98\xf5\xbf\x71\x38\x87\xe1\xf2\x0a\xc6\x2f\x78\x63\x7f\x3f\xc3\xc7\x3f\x25\xfe\x20\x01\x1a\xe7\x29\xb5\x7f\x3e\xb8\xf9\x25\x05\x60\x1e\x6d\x07\xd3\x35\x47\x4a\xcd\x78\xef\x84\x78", 72, { 0x17, 0xfb, 0x57, 0x7d, 0x14, 0x3d, 0x5d, 0x87, 0xe7, 0xf5, 0x9a, 0xb5, 0x27, 0xa7, 0x66, 0xb4 }, { 0x8f, 0x00, 0x0f, 0x84, 0x29, 0xf8, 0x2d, 0x5b, 0x8f, 0x00, 0x0f, 0x84, 0x29, 0xf8, 0x2d, 0x5b } },
|
||||
{ "\x6f\xc5\xd1\x4a\xbd\x27\xe8\xb0\xd3\x95\x30\x41\x51\xd0\x1c\x27\x67\xc1\x31\x3b\x98\x03\x3a\xee\xea\xeb\x5a\xee\x99\xa7\xda\xb5\xee\xc1\xbe\x6c\x34\x10\xf6\xb0\x6c\x33\x48\xc9\x75\x19\x2a\xe6\x6b\xa9\xa6\x41\x88\xd6\x5e\x65\x31\xef\xc8\xe0\x3e\x9a\x54\x7e\xd5\x18\xad\x4c\x0f\x62\x53\x36\xb5", 73, { 0x5e, 0x2b, 0xac, 0x76, 0x9a, 0xdd, 0xf6, 0x27, 0xfd, 0xf5, 0x83, 0xb6, 0xec, 0xc9, 0x58, 0x7a }, { 0x82, 0x89, 0xc7, 0x34, 0x74, 0xa2, 0x50, 0x55, 0x82, 0x89, 0xc7, 0x34, 0x74, 0xa2, 0x50, 0x55 } },
|
||||
{ "\xb2\xd1\x4a\x80\xbf\x4a\xa4\x8e\xd9\xd7\xde\xdb\x3e\x9e\x3a\x1e\xa3\xdc\x77\x28\x8c\x73\x1b\x98\x2f\x82\x2b\x9e\x4a\x5d\x86\x0c\x4a\xa7\x93\x86\x14\x0c\xa5\xf9\x7c\x96\x76\x25\xee\x80\xcd\x0c\xf3\x3d\x90\x84\xef\x93\x7d\xf0\xcc\x58\xd8\xb2\xb1\x85\x87\x9c\x07\xd3\xe4\xae\x06\x75\x19\x76\x13\x8d", 74, { 0x9b, 0x95, 0x55, 0x04, 0x42, 0x22, 0x2a, 0x37, 0xa9, 0xfd, 0xf9, 0x30, 0xe7, 0x73, 0x22, 0x52 }, { 0x9d, 0x6e, 0xa4, 0xdd, 0x10, 0x69, 0x5c, 0x21, 0x9d, 0x6e, 0xa4, 0xdd, 0x10, 0x69, 0x5c, 0x21 } },
|
||||
{ "\xfe\xc3\x86\xcc\xba\x64\x84\x1c\xf9\x19\x69\x2e\x6e\xf2\xe8\x64\x62\xa9\x74\x3e\x38\x0b\x16\x73\xf7\x74\x59\x21\x53\x40\xaa\x31\x9e\xdb\xdd\xec\x59\x12\x42\x3e\x64\xc5\x2a\x62\xfe\x80\xb6\x25\xc3\xcd\xeb\xb5\xc9\x46\x9a\xc6\x27\x75\x4d\x47\x6a\x6f\x3b\x74\x7e\x9a\x4c\x5a\xfb\x75\x3f\xdc\x53\xad\x19", 75, { 0x61, 0xe0, 0x10, 0xeb, 0x6d, 0xc7, 0xa3, 0x8e, 0x6b, 0x90, 0x30, 0xa4, 0x54, 0x37, 0x97, 0xb5 }, { 0x01, 0x31, 0x3f, 0xdf, 0x3e, 0x55, 0x37, 0x93, 0x01, 0x31, 0x3f, 0xdf, 0x3e, 0x55, 0x37, 0x93 } },
|
||||
{ "\xc6\x59\x0a\xac\x92\xb2\x48\xa1\x4d\x30\x03\x14\xe6\xcf\xdd\x39\xbc\x97\x14\x70\xd3\xe8\x65\x79\x5d\xc1\x37\xf3\xdb\x67\xe9\xb7\x91\xba\x8c\x4b\x8b\x6f\xdd\xd3\x84\xbd\x91\x32\xcd\x17\x76\x56\x8d\xc5\xff\xaf\x87\xa7\x8f\x85\x6f\x26\x13\x72\x95\x34\x46\x21\xe3\xa2\x2c\x0e\xbf\x28\xd2\x66\xad\x2b\xef\x43", 76, { 0x26, 0x23, 0x4f, 0x57, 0xbb, 0x65, 0xda, 0xaa, 0x3c, 0xa6, 0x7f, 0xc9, 0xa5, 0xf4, 0x91, 0x81 }, { 0x70, 0xe9, 0xc4, 0x39, 0x1a, 0xd1, 0xb7, 0x83, 0x70, 0xe9, 0xc4, 0x39, 0x1a, 0xd1, 0xb7, 0x83 } },
|
||||
{ "\xb1\x11\x15\xe7\xe5\xd9\xa1\x8a\xb1\x7b\x68\xb2\xb6\x31\xcb\xe5\xed\x27\x14\x85\x44\x31\xc7\x8b\x24\x9d\x0d\xab\xdf\xa4\xbe\x75\xb8\x32\x89\x56\x5a\x68\xab\x82\x5c\x81\xf8\x78\xe9\xe6\x41\x00\xd0\x62\xf6\x24\x08\x39\xe3\x4d\x65\xfc\x5e\xba\x4a\x3f\xe2\x1f\x0f\x6a\x78\x02\x83\x53\x32\xac\x1d\x7e\xb7\x08\xf4", 77, { 0x53, 0x2e, 0xe9, 0xe5, 0xf7, 0xa7, 0x74, 0x14, 0x0c, 0xb6, 0x4c, 0xa2, 0xb0, 0xe6, 0xd5, 0xf7 }, { 0xc1, 0xe7, 0x96, 0x6e, 0xb1, 0x3f, 0x44, 0x8a, 0xc1, 0xe7, 0x96, 0x6e, 0xb1, 0x3f, 0x44, 0x8a } },
|
||||
{ "\x08\xa8\x5c\x6b\x58\x8b\x3f\xa6\xc6\x74\x46\xc1\xd0\x3e\x75\x04\x1b\x37\x9b\xa6\xc0\xdb\xd8\x41\x6c\xef\x7b\x0c\x20\xbe\xf9\xc3\xd9\x97\xce\x33\xa0\x2a\xdb\xc9\x18\x0b\xbd\x52\x02\x42\x3d\xd3\xcd\x6d\xde\x2a\x00\x13\x61\x51\x04\x74\x82\x00\x4f\x18\x52\x98\xb8\xe4\x29\x19\x67\x32\x81\x7c\x99\xa4\xb5\xdf\xf4\xb6", 78, { 0x29, 0xc8, 0x3d, 0x7b, 0x62, 0x9a, 0x52, 0x28, 0xf4, 0x40, 0x81, 0xc7, 0x73, 0x08, 0x5e, 0x1f }, { 0x2a, 0x82, 0x5c, 0x87, 0x5e, 0x02, 0x6b, 0xc3, 0x2a, 0x82, 0x5c, 0x87, 0x5e, 0x02, 0x6b, 0xc3 } },
|
||||
{ "\x0b\x93\x62\x32\x10\x85\xe1\x8f\x73\x00\x23\x30\xe5\x1f\x18\xa7\xdf\x69\x5a\x87\x5c\xfe\xcd\x80\xcc\x99\x52\x04\xa2\xec\x28\x64\xaf\x4d\x7e\x24\xb7\x6c\xb3\x43\x6b\xc4\x04\x92\xe1\xa7\x71\xeb\x4c\xc9\xd9\xf8\x04\x67\xe9\x07\x62\xdd\xd5\x00\x5b\x76\xe6\x31\xc9\x85\x00\x2b\x1a\x37\x26\x91\x35\x4c\xa4\x2b\xec\x1d\x38", 79, { 0x7b, 0xd5, 0x6f, 0x86, 0x16, 0x3a, 0xff, 0x0e, 0x67, 0xbd, 0xab, 0xf8, 0xe7, 0x24, 0xe5, 0xcf }, { 0xfb, 0x9d, 0x92, 0x5b, 0xf1, 0x4c, 0x63, 0x44, 0xfb, 0x9d, 0x92, 0x5b, 0xf1, 0x4c, 0x63, 0x44 } },
|
||||
{ "\xd8\x24\x34\x7b\x68\x21\x72\x15\x9f\x7d\x09\x37\x31\x5d\x8d\xbe\x81\x12\xd4\x4c\x8a\x5a\x27\xdb\x6c\x29\x14\x78\xc8\x1f\x32\x79\xbc\x47\x54\x83\xd2\x8c\x77\x1e\x08\xb0\x2a\x51\xe7\xa9\x84\xbd\xac\xdd\x68\xbd\x56\xe9\x78\xac\x10\x16\x5e\xd2\x31\xaa\xf9\xcd\x1e\xbb\x4c\xcc\xd9\x2d\xd5\x05\x2e\x31\xae\x20\x2c\xf0\x71\xe7", 80, { 0xd6, 0x83, 0x14, 0x82, 0x66, 0x96, 0xdb, 0x62, 0xea, 0x76, 0x23, 0x92, 0x93, 0xd0, 0xdb, 0x0b }, { 0x6c, 0x45, 0xe2, 0xd2, 0xa0, 0xe7, 0x6b, 0x2b, 0x6c, 0x45, 0xe2, 0xd2, 0xa0, 0xe7, 0x6b, 0x2b } },
|
||||
{ "\xb3\x07\xbc\x67\xf0\xfb\x08\x0f\x0e\x23\x59\xa1\xac\xb6\x5f\xf8\xc9\xd8\xe1\x8a\x10\xb6\xd8\x0b\xed\x8d\x03\xc7\xd7\xea\x2d\xee\xcc\xe6\xb7\xf6\x84\xda\x24\xc6\xc7\x04\x10\xf8\x17\x0d\x97\x12\xde\xe1\xe6\x91\xbb\x2c\x28\x9b\x84\x94\x31\x1d\x95\x03\x66\x1c\x23\xe4\x46\xe1\x89\x1e\x84\x27\xd4\x4b\x97\xb3\x05\xf6\x70\xcf\x0a", 81, { 0x4e, 0x1b, 0x3d, 0x32, 0xf1, 0xd0, 0xd7, 0x17, 0xff, 0xed, 0x39, 0xeb, 0x08, 0xcc, 0xb3, 0x60 }, { 0x49, 0xc3, 0xe6, 0xab, 0x5b, 0x15, 0x7d, 0x2a, 0x49, 0xc3, 0xe6, 0xab, 0x5b, 0x15, 0x7d, 0x2a } },
|
||||
{ "\x96\x5f\x13\x62\x21\x7f\xb8\x50\x38\x67\x9e\x84\xaa\xc5\x97\x8e\x8a\xb8\x7d\xd1\x94\x06\x05\x4d\x0b\x33\xd6\x09\x28\x2a\x08\x38\x9b\xe5\xbc\x58\xc9\xb5\x19\x8a\x72\x45\x60\xc7\x89\x4b\x36\x89\xbc\xa6\x20\x6e\xe1\x97\x47\x39\xdd\x74\x7b\x65\xff\x1b\xe7\x0e\xd7\x30\x38\xdb\x57\x90\x88\x5a\x6d\xef\x4e\x00\xc6\x6d\x09\x8b\xe7\x8d", 82, { 0x4d, 0xd8, 0x38, 0xea, 0x16, 0xd6, 0xb7, 0xd7, 0x46, 0x51, 0x31, 0xaa, 0xf1, 0x43, 0x5e, 0xac }, { 0x1d, 0x39, 0x9d, 0xf9, 0xd0, 0x32, 0xca, 0x16, 0x1d, 0x39, 0x9d, 0xf9, 0xd0, 0x32, 0xca, 0x16 } },
|
||||
{ "\xe5\xb6\x2c\x14\x61\xea\x00\xec\xab\x68\x58\xca\x6f\x3e\x1d\x7e\xb0\x05\x6f\x9c\x68\xd1\xd8\x9e\x83\x98\x27\x6b\x1f\x27\xb1\x13\xd6\xbc\xa2\x85\x14\x6c\x75\xc2\x8a\x79\x72\x6b\x99\xee\x61\x11\x0b\xca\x31\xea\x65\x55\x76\xa8\x64\x26\x5a\xea\x21\xc2\xa3\x6b\x85\x1f\xae\xbd\xe9\x8a\x8c\xd6\xec\x47\x22\x26\x3b\x2f\xea\xce\x42\xed\x16", 83, { 0x9e, 0x55, 0x16, 0x9f, 0x73, 0x73, 0x1f, 0x72, 0xed, 0x8b, 0x9f, 0x1f, 0xb5, 0x95, 0x87, 0xbe }, { 0x86, 0x70, 0x4f, 0xcb, 0xba, 0x9b, 0xc0, 0x4c, 0x86, 0x70, 0x4f, 0xcb, 0xba, 0x9b, 0xc0, 0x4c } },
|
||||
{ "\x68\xa9\x14\x5b\xb5\xc1\xab\x92\x6a\x8a\x06\x6c\x57\x3a\x43\xab\x77\x94\x46\xfd\x00\xf8\x1c\xeb\x4d\x93\x3b\x59\xc6\x79\x05\xe8\x72\xc6\x81\x99\x34\xdc\xa9\xff\x0d\xa0\x3c\x40\x25\x04\x90\xac\xe7\x84\xc0\x69\xd4\x05\xef\x11\x12\xe9\x99\x6a\xbb\x56\x05\x77\x93\x9d\xb3\x86\xc7\xa4\xfa\x33\xc3\x16\xf6\x8f\xe9\x19\x7d\xb5\x4e\xa8\x49\xc0", 84, { 0x0f, 0xf7, 0x02, 0x1d, 0xa7, 0x2f, 0x69, 0x12, 0x60, 0xfb, 0xfb, 0xad, 0x2a, 0x61, 0x30, 0xd6 }, { 0x85, 0x29, 0x73, 0x63, 0x21, 0x02, 0x86, 0x55, 0x85, 0x29, 0x73, 0x63, 0x21, 0x02, 0x86, 0x55 } },
|
||||
{ "\x30\xd1\xa1\xfd\x6d\x0e\x91\x15\x34\x8e\x1a\x24\x33\x7a\x51\x46\xe7\x04\x4d\x40\xe6\x97\x13\x61\xf3\x58\xb6\x6b\xe3\xaa\xd0\x10\xee\x49\x98\xf1\xa0\xfb\xcb\x49\xc4\x05\x38\x8b\x28\xa0\x89\x19\x19\x78\x7f\xa6\x2a\x33\x0a\x68\x83\x58\x3e\x4c\xae\xfd\x84\xb4\xdd\x92\x4b\x24\x6e\xb7\x35\x5b\xed\x12\x9a\x96\x2a\x3f\xfb\x3b\xf5\xd5\x4a\x97\x03", 85, { 0xe8, 0xfd, 0x65, 0x4b, 0x4e, 0xb0, 0x00, 0xff, 0x77, 0x93, 0xb5, 0xd0, 0x50, 0xbf, 0x84, 0x6a }, { 0x46, 0xdd, 0x04, 0xb6, 0xc5, 0x5a, 0x76, 0x27, 0x46, 0xdd, 0x04, 0xb6, 0xc5, 0x5a, 0x76, 0x27 } },
|
||||
{ "\x6b\xa2\x47\x58\xd9\x70\x6e\x39\xfc\xd5\x94\x0a\xeb\x16\x35\xfb\x31\x8f\x0c\xe2\x77\x9a\xa1\x1d\x66\xce\x66\xad\x86\x50\x60\xd8\xf4\xdc\x5f\xb2\xf6\xcf\xe1\x76\xf9\x6a\x7f\xfb\x03\xe5\xb2\x1e\xde\x0c\x3a\x04\x2d\x7d\x67\x70\x45\x2e\x97\x65\xac\x15\xbd\x4b\xb8\xe1\xcf\x5e\x5b\x0e\x37\x42\x82\xda\xbb\xb6\xca\xfb\x33\xe0\xf9\xc7\x45\xba\x6c\x61", 86, { 0x6d, 0x22, 0x63, 0x98, 0x9e, 0x37, 0xf9, 0x34, 0x56, 0xf7, 0xc0, 0x77, 0xc4, 0x42, 0xf1, 0x30 }, { 0x4a, 0xdf, 0xfb, 0x13, 0xe1, 0xf4, 0xcc, 0x98, 0x4a, 0xdf, 0xfb, 0x13, 0xe1, 0xf4, 0xcc, 0x98 } },
|
||||
{ "\xcd\xa5\x25\x30\xfe\xd9\xf2\xed\x4b\x3b\x39\xc5\xea\xdb\xd2\xa2\x14\x51\xb3\xa9\xf4\xc0\xe0\x3b\x4b\x72\xb0\x2e\x78\xe2\xa6\x93\x13\x8b\x22\xc1\x5c\x03\xbb\x43\x17\xdc\xc7\x79\x5b\x31\x08\x87\x0a\x31\xf9\x2a\x38\x76\x91\xaa\x23\xe6\x7c\x1e\xf8\x93\x57\xc1\x72\x8d\x66\x8c\x7e\x55\x33\x78\x6e\x48\x40\x10\x0a\xd2\xc7\x9f\xf4\x3d\x46\xa9\x8b\x54\xf9", 87, { 0x84, 0xf4, 0xc6, 0xda, 0x42, 0xa8, 0x24, 0x21, 0x87, 0x49, 0xdb, 0x9e, 0x3b, 0x68, 0x57, 0x5d }, { 0xf4, 0x57, 0xbf, 0x8a, 0x8e, 0x8f, 0x31, 0x1c, 0xf4, 0x57, 0xbf, 0x8a, 0x8e, 0x8f, 0x31, 0x1c } },
|
||||
{ "\x62\xe8\x6f\x5a\xd6\xc0\x2e\x06\xef\x54\x17\xe7\x26\xba\x79\xdd\xcc\xea\x88\x60\xa2\x0b\x70\xb1\x85\xa3\xea\xba\x1c\x63\xbd\x61\x32\xb5\xbd\x08\x89\xe6\x59\xb5\x21\x00\x82\x32\x98\xfc\xc6\x1d\xa3\x08\xae\xeb\x84\x2d\xcb\x19\x7c\x0b\xd9\x9a\x7c\x11\x8e\xe3\xfb\x44\xa0\x07\x61\x18\x55\xd9\xbf\x31\xb4\x29\xf0\xf4\x0a\x14\x02\x32\xe2\x89\xc0\xb3\x06\x1b", 88, { 0x11, 0x39, 0x7c, 0x62, 0x34, 0x62, 0x46, 0x8b, 0xfc, 0x65, 0x10, 0xaf, 0xa0, 0x53, 0xc0, 0xee }, { 0x1b, 0x4f, 0x4f, 0x2f, 0x12, 0xfa, 0xff, 0x30, 0x1b, 0x4f, 0x4f, 0x2f, 0x12, 0xfa, 0xff, 0x30 } },
|
||||
{ "\x85\xed\x3f\xeb\x0b\x3e\x48\xc9\xae\x32\xf1\xf6\x47\x95\x42\xdd\xd3\x99\x71\xb7\x0c\xf4\x6c\xb8\x8a\x9d\x72\xb3\x8d\x1b\xee\x03\x2e\x0e\x75\xbe\x20\x1d\xeb\x9f\xa9\xab\xd0\x74\x8e\x43\x49\xaf\xc3\xb8\xba\x85\x21\x43\xe7\xe0\x59\xf0\x02\x1a\x05\x5b\x88\x2a\x27\x16\xda\x01\x09\x1b\x48\xc8\x40\x4f\x18\xd8\xc9\x74\x7a\xca\xfd\x5a\x01\x57\x43\x46\x6e\x64\xfe", 89, { 0xd7, 0x07, 0x57, 0x84, 0xed, 0xa4, 0x8f, 0x30, 0x7f, 0xb3, 0xa7, 0x86, 0xac, 0x10, 0x9f, 0xc5 }, { 0xfa, 0xf3, 0x19, 0xdb, 0x73, 0x61, 0xff, 0x0b, 0xfa, 0xf3, 0x19, 0xdb, 0x73, 0x61, 0xff, 0x0b } },
|
||||
{ "\x86\x39\x69\x83\xeb\x8b\x72\xc7\xfb\x99\x31\xcd\x8a\x0f\x83\xa7\x8e\x87\x40\x4a\xbf\x4a\x5d\xcc\x06\x45\xcb\xfd\x63\x2a\x8e\x31\x08\x03\x7a\x61\xb5\x37\x7b\x81\x00\x07\x8d\x29\xf5\xb9\x0f\x5c\x1c\xcc\x75\xce\x78\x2b\x58\x2e\xaa\x12\xf2\xb2\x16\x0a\xf9\x2a\xd9\xab\x65\xd4\x66\x71\x88\xc4\x8d\x40\xb7\xbb\x27\x5b\x16\x1f\x5d\x25\x20\xb9\xe7\xba\x32\xbd\x1d\xe0", 90, { 0x30, 0xf8, 0x10, 0x07, 0xa8, 0x7b, 0xa1, 0x4c, 0x3b, 0x2d, 0xb9, 0x4b, 0x38, 0xfe, 0x15, 0x56 }, { 0x42, 0xb5, 0x42, 0x7c, 0x61, 0x7a, 0x10, 0xf9, 0x42, 0xb5, 0x42, 0x7c, 0x61, 0x7a, 0x10, 0xf9 } },
|
||||
{ "\xd6\x87\x00\xf7\x2c\x35\x8a\x60\x3c\x7a\xd4\xd9\x03\xb2\xae\xdc\xa0\x0d\x6e\xed\x19\x1c\xcc\x2c\xec\x26\x3f\xf3\x8b\xed\xf4\x21\xb4\x92\xde\xcb\x08\x85\x46\x35\xca\xac\x9a\xf9\x7c\xca\x66\xd1\x43\x81\xda\x7d\xcd\x60\x11\x13\x0e\x98\xce\x4f\x53\xbf\x19\x85\x8a\x39\x99\x28\x89\x4e\x25\xca\xcb\x7b\x79\x80\xb1\x36\x22\x74\xed\xe5\xf6\xb3\x7b\x92\xa2\xa7\x25\x4d\xed", 91, { 0xe1, 0x9a, 0xe9, 0x38, 0x03, 0x65, 0xf0, 0xb3, 0x87, 0x50, 0x0f, 0x5c, 0xd2, 0x21, 0x09, 0x9d }, { 0xc3, 0x8a, 0xd5, 0x68, 0xc6, 0xc4, 0xff, 0x8c, 0xc3, 0x8a, 0xd5, 0x68, 0xc6, 0xc4, 0xff, 0x8c } },
|
||||
{ "\x60\xd0\x8c\xc0\xac\x24\x6b\xf7\xeb\xbe\x48\x24\x83\x80\x9e\xc2\xaa\x7c\x32\x30\x0f\x0c\xeb\x25\x48\x30\x66\xd8\xa1\xee\xf8\x2e\x3f\xb3\x6b\x53\x7b\x27\xeb\x15\x44\x59\x40\x0f\xcf\xfd\xa5\xad\x3e\x70\x6d\x2a\x8a\xa9\x03\x35\xd9\x40\x89\x81\xb7\x31\xc3\xdf\x1f\x10\xf0\xd8\xb3\xea\x16\x60\x32\x0a\x97\xb8\xe3\x04\x77\x2b\xb1\x82\x55\x7d\xa6\x82\x97\x4d\x78\x11\x41\x6f", 92, { 0x1b, 0xef, 0xb5, 0x5d, 0xf7, 0xb0, 0x88, 0xaf, 0x6c, 0x7e, 0x06, 0xe7, 0x6f, 0xc0, 0x93, 0x6c }, { 0x96, 0x13, 0xcb, 0xab, 0x7c, 0x1a, 0xa3, 0x8f, 0x96, 0x13, 0xcb, 0xab, 0x7c, 0x1a, 0xa3, 0x8f } },
|
||||
{ "\x19\x8d\x64\x27\x97\x46\x6b\xc6\x76\x37\xdb\x88\x8c\x47\x51\xd4\x9e\x52\x5e\x88\xd7\x61\xb6\x0f\x98\xaf\x57\x21\x5d\xef\x6f\xd6\x72\xb9\x9e\xc0\x06\xce\x32\x10\xb8\x49\x6f\xef\x7b\xed\x4b\x39\x81\x2e\xf9\x8f\xee\xf9\x4e\xa9\x4a\x4c\xfe\xb0\x9f\x2c\x82\x34\xcd\xb0\x07\x5e\xc4\x8f\xbb\x6c\xd3\xdb\x0a\xe5\x80\xfa\x0c\x8d\x1c\xfa\xee\x23\x9a\xbe\x67\x1f\x18\x21\x01\xaa\x37", 93, { 0x77, 0x65, 0x26, 0xc5, 0x1e, 0xc3, 0x17, 0x49, 0x55, 0xc0, 0xeb, 0xf8, 0xd4, 0xff, 0x5d, 0xcc }, { 0xd1, 0xdf, 0x56, 0x22, 0xb1, 0x30, 0xc7, 0x83, 0xd1, 0xdf, 0x56, 0x22, 0xb1, 0x30, 0xc7, 0x83 } },
|
||||
{ "\x1c\x7b\x03\xef\x82\xac\xb5\x3f\x96\xaf\x2f\xa6\xb2\xc7\x86\x4e\xfe\x66\xf2\xf1\x14\x1f\x3f\x9b\x42\xe3\x44\xe9\x83\x89\x8e\x06\x0c\x26\xfe\x18\x57\x88\xb2\x34\xab\x8b\xc3\xe6\x3b\x2c\x6a\x53\xa0\x11\x54\x2d\x98\x26\xaa\x98\xf6\xdc\x42\x30\x82\x6f\xbf\xaa\xc3\xf6\x1d\x37\x15\x1b\xc7\x32\xc5\xfc\x2b\x3b\xeb\x0b\x79\x1e\x49\x21\x0e\x11\x63\xce\xe9\xd3\x14\xc8\xfe\xa8\x51\x82", 94, { 0xd6, 0xc5, 0xae, 0xa7, 0x0f, 0x85, 0x62, 0x61, 0xbb, 0xf0, 0x2c, 0x00, 0x4a, 0xbf, 0x69, 0xb2 }, { 0x02, 0x95, 0xf1, 0xde, 0x6f, 0xd4, 0xff, 0xf0, 0x02, 0x95, 0xf1, 0xde, 0x6f, 0xd4, 0xff, 0xf0 } },
|
||||
{ "\x29\x6b\xf9\x3c\x5e\x11\xe2\x36\xfa\xad\x77\x84\x23\x04\x5b\x16\xc1\x7f\x42\x1e\xd6\xba\xd1\xd6\x1f\x7f\x0a\x0b\x37\x59\xef\x6d\x87\x53\xf2\xef\x85\xe4\x81\xc3\x9d\x58\x26\x83\xcb\xd8\xa9\xa5\x04\xa2\x85\xe5\x31\x8a\xe5\xe6\x0d\x63\x7c\x7a\xf1\x64\x95\xee\xfe\x03\x6a\xfb\x53\x54\xaa\x88\xbb\xce\xc5\x23\xc0\xcd\x20\x43\xb3\x8c\xdd\x99\x5f\x76\x3f\x4c\x85\xfc\x77\x28\xb2\x0f\x12", 95, { 0xac, 0x34, 0x4c, 0x7d, 0xcf, 0x4d, 0xb2, 0xbc, 0xd5, 0x4f, 0x56, 0x0a, 0x82, 0x4f, 0x9a, 0x82 }, { 0xd3, 0x23, 0x31, 0xe1, 0x0f, 0x63, 0xe7, 0x04, 0xd3, 0x23, 0x31, 0xe1, 0x0f, 0x63, 0xe7, 0x04 } },
|
||||
{ "\xad\x53\xe9\xd3\xb2\x64\x88\x08\xff\x5d\x32\x06\xe1\x51\x80\x89\x6a\x8f\x66\x19\xd8\x70\xec\xbc\x95\xca\xc2\x5a\x0d\x8b\x4f\x28\xe8\x41\x2b\xdb\xdb\xed\xa4\xfe\x5a\x0c\x2a\xd2\xfc\xef\xc4\xae\x76\x49\x86\x35\x82\x13\x45\x26\x06\x57\xe8\x52\x4d\xe0\xd5\xd9\x78\x03\xeb\xc1\x05\xef\xe6\x94\xa6\xc7\xd9\xa2\x41\xd3\xe0\xae\xf1\xd6\xe2\xc5\x6f\xde\x66\x85\x57\x73\xde\x76\x55\xc5\x3d\xe9", 96, { 0x80, 0xeb, 0xe1, 0xae, 0x47, 0x0d, 0x45, 0x73, 0x86, 0x0f, 0xa1, 0xdf, 0x89, 0x2f, 0x6c, 0x8f }, { 0x47, 0x49, 0x5f, 0x08, 0x90, 0x14, 0xb1, 0x2e, 0x47, 0x49, 0x5f, 0x08, 0x90, 0x14, 0xb1, 0x2e } },
|
||||
{ "\x07\x05\x83\x98\x52\x5a\xd7\xaa\xdd\x7f\x6e\xaa\xb9\x05\x36\x7f\xf1\xec\xe2\x8a\x31\x17\xe2\x07\x63\xc7\xd2\x07\xe9\x33\x56\xbd\xea\x10\xcf\xde\xc2\x11\x05\x75\x94\x6b\x6b\x38\x5e\xcf\xc8\x8e\xbc\x11\xf5\x2d\x0e\xc4\x0b\x32\xe5\x3c\x23\x51\xfe\x65\x1a\xdc\x16\xc4\x86\xeb\xd1\xd2\x4c\x56\x2c\x55\x84\x14\x70\xe8\x60\xb0\x09\x74\x1b\x49\x12\x64\x2f\xb8\x59\x6a\x44\x38\x19\x0c\x39\xd6\x52", 97, { 0xdd, 0x5f, 0x38, 0xac, 0x99, 0x5d, 0x49, 0xe3, 0xb6, 0x42, 0xb5, 0xf1, 0x77, 0x41, 0x0e, 0xb6 }, { 0x26, 0x42, 0xcc, 0xc5, 0xde, 0xcd, 0x58, 0x0d, 0x26, 0x42, 0xcc, 0xc5, 0xde, 0xcd, 0x58, 0x0d } },
|
||||
{ "\x69\xdb\x99\xb2\x4a\xec\x53\x9a\x77\x03\xc0\xd5\x81\xd5\x0e\x9c\xdd\x04\x19\xe2\xff\x1f\xc0\x4b\xf0\x30\x96\x2b\x62\x02\x1e\x7f\x84\xa8\x19\x47\xa3\xdc\xb5\x62\x6f\xdc\x40\x66\x69\xb2\x1f\x58\x9b\x8d\x51\xc0\x7f\xe2\x4d\xbc\x8a\xc9\x6d\x71\x29\xfb\x72\xf0\x0c\xa5\xf7\xfb\x2a\x6f\x2a\x54\x52\x58\x4f\x6d\xbe\xd3\xfe\x37\xc5\x0f\xd9\x4e\x45\x45\x4a\x7c\x43\x2b\x35\x1b\x41\xaa\x11\x5c\x5a\xed", 98, { 0xb3, 0x7b, 0x88, 0x17, 0x77, 0x93, 0x07, 0x1a, 0xb4, 0xec, 0x31, 0x3d, 0xea, 0x26, 0x30, 0x27 }, { 0x16, 0x41, 0xb1, 0x31, 0x2f, 0xd3, 0x9f, 0x87, 0x16, 0x41, 0xb1, 0x31, 0x2f, 0xd3, 0x9f, 0x87 } },
|
||||
{ "\x31\xec\x6c\xcc\xe5\x86\x40\xb4\xb7\x69\x06\x3d\x51\xd9\x2b\x4a\x12\x6e\x3d\xd0\xc2\x3e\x9d\x1c\x74\x75\x70\x5b\xc2\xda\xb7\x16\xc5\x22\x32\x16\x45\x28\x8b\x00\xcb\x13\xc3\xf6\x4e\xce\xa6\x0e\xe5\xf3\xf0\x5f\x86\x4d\x6d\xdf\xdc\x18\xe3\x30\x50\xe8\x84\x7a\x55\xb5\xbd\x1c\x81\xad\x28\xcb\xdf\x7b\x06\x24\x0c\xb9\xd4\x85\x07\xfa\xc8\x33\x7c\x04\xc9\x8e\xfb\xf3\x4f\x0c\x3b\xeb\xab\xd5\xd4\x9a\x0d", 99, { 0x04, 0xe9, 0xd9, 0x48, 0x7d, 0xf8, 0xff, 0xb1, 0xd1, 0x04, 0xcf, 0xc7, 0x43, 0x31, 0x5c, 0xd6 }, { 0x0c, 0xc0, 0x2b, 0xd5, 0xf7, 0xd7, 0x1e, 0xeb, 0x0c, 0xc0, 0x2b, 0xd5, 0xf7, 0xd7, 0x1e, 0xeb } },
|
||||
{ "\x42\x0e\x83\xe3\xf8\x3a\x6f\xf2\xbd\xa7\xb3\x07\x7d\x5e\x41\xce\xd8\xe3\x8c\xed\xff\x06\x67\x73\x62\x60\x87\x4b\x2a\x2f\x4a\x0f\x95\x10\xde\x72\xc9\x0e\xae\x1d\x0d\xcd\x02\x70\x36\xe5\xe8\xe0\x0e\x26\x59\x55\x9d\x01\xb1\x20\xcd\x8d\xf1\x47\x91\x1f\x31\xa3\x80\x42\xa5\x32\x1c\x61\x4c\x24\x0c\x2f\xf6\xe8\x0d\x9c\xc4\x00\x53\x57\x3f\xa8\xbe\x26\xb5\xcb\x6d\xbe\x57\xd3\x53\xd5\xb1\x55\xd4\xf6\x89\x82", 100, { 0x09, 0x18, 0x2e, 0x65, 0x01, 0xbb, 0x6c, 0xbc, 0x2e, 0xf8, 0xe2, 0x62, 0x84, 0x4f, 0xbc, 0xd6 }, { 0x6d, 0xa3, 0x2d, 0x1c, 0x96, 0x76, 0xe7, 0xe2, 0x6d, 0xa3, 0x2d, 0x1c, 0x96, 0x76, 0xe7, 0xe2 } },
|
||||
{ "\x61\x6b\xc7\x1c\x58\xba\x21\x50\x31\xb7\x49\xdf\x2a\x76\x82\x22\x2c\x5f\x74\x96\x62\xf7\x49\x3a\x29\x74\x95\x88\x7a\x81\x44\x2d\xcc\xc6\x59\x63\xe5\x6a\x68\xbf\x3b\x24\xd7\xb6\x2c\xb6\xcd\xa8\x3d\x0e\x70\x7d\x69\x94\x10\xbd\xee\x63\x9a\x5e\x6c\x61\x3a\xe5\x94\x95\x30\x3c\x9b\x02\xc2\x42\x7f\x12\x76\xcd\xa6\xcd\x87\x00\xb9\x08\x43\x55\x2a\xc3\x62\xd8\xdb\x38\x6c\x9a\x45\xa8\xd4\xd3\xd9\xc7\xe9\xb4\xf2", 101, { 0x20, 0xfc, 0x88, 0x97, 0x26, 0x73, 0x64, 0xd5, 0x17, 0xf5, 0xd5, 0x35, 0x6c, 0xda, 0xde, 0xad }, { 0x63, 0x26, 0xcd, 0xc0, 0xd9, 0x07, 0x6b, 0x6a, 0x63, 0x26, 0xcd, 0xc0, 0xd9, 0x07, 0x6b, 0x6a } },
|
||||
{ "\x1d\xed\xce\x04\x21\xe4\x52\x32\x1b\xe6\x52\x3f\x9c\x9a\xc5\x9f\xeb\x31\x6e\x0f\xda\xdf\xea\x2d\xc9\xb5\x5f\x37\x8f\xd3\x7a\x48\x5a\x24\xc4\xba\x16\xf4\x16\x75\x91\xcb\x66\x6a\x59\x90\x25\xd2\xab\x21\x4c\xe8\x8f\xb0\xd6\x94\x00\x01\x1b\x60\xae\xe2\x81\x2a\x53\xd7\xfd\xa0\x1d\x7b\x76\x1d\x6d\x0d\xf9\x5e\x50\xad\x24\x90\x67\x67\x94\x0b\xb1\x9b\x7d\x3d\x62\x47\x0e\xb6\x0e\xd9\x38\xea\xc0\x8d\xed\xae\x89\x73", 102, { 0x95, 0xba, 0xac, 0x8e, 0xe6, 0x49, 0x05, 0xf7, 0x77, 0xf9, 0x14, 0x8e, 0x85, 0x5c, 0x31, 0x2b }, { 0x4e, 0xcf, 0xab, 0x23, 0x42, 0xa2, 0x14, 0x56, 0x4e, 0xcf, 0xab, 0x23, 0x42, 0xa2, 0x14, 0x56 } },
|
||||
{ "\xce\x1e\xd6\x94\x3f\xe7\x3c\xaf\xfb\x32\x1f\x39\xc5\x22\xed\x5a\x7a\xfa\x3b\x27\xdb\x5b\xe8\x48\x5b\x51\x96\xc6\x1d\x4b\x95\xc4\xf5\x53\x09\x52\xc7\xdf\xdc\xb4\x49\xbd\x77\xf3\x66\xf8\x71\x50\x0a\xc4\x90\x12\x17\x0d\xcd\x48\xd9\xc9\xde\x28\x8c\x0f\x8d\x59\x10\xb7\x7a\xe3\xf4\x69\xe5\x08\x90\xec\x3d\xc6\x68\xe1\xe3\xfc\x90\x88\x64\xc0\xf6\xcb\xb9\x5d\x9e\xb3\x8d\xed\x07\x72\xd2\x84\x03\xf3\x68\xd5\x87\x10\x79", 103, { 0xf7, 0x15, 0x7c, 0x3e, 0x99, 0x31, 0x19, 0x59, 0xd3, 0xd8, 0xcc, 0xf9, 0x88, 0x6d, 0x43, 0x5e }, { 0x62, 0xb5, 0x83, 0x0a, 0xab, 0xd9, 0x79, 0x75, 0x62, 0xb5, 0x83, 0x0a, 0xab, 0xd9, 0x79, 0x75 } },
|
||||
{ "\xb8\x13\x53\x89\x9d\x27\x20\xb6\xd6\xe2\x66\xce\x8d\x54\xd0\xde\x25\x58\xef\xa5\x4b\x84\xf0\xd5\x1e\xe8\x59\x30\x5d\x66\xb3\x5c\xed\xce\x12\x0b\x00\x46\x5a\x9a\x69\x4b\x7f\xa1\x3d\xde\x42\x44\x9f\x9d\x70\x88\x80\xa5\x99\x2b\x74\xec\x07\x94\x31\x6c\xbf\x66\xd3\xc9\xe8\x2b\x7d\x06\x3f\xad\xb7\x9d\x50\x22\x44\xc9\xa3\xe0\x07\x2c\xcd\xe7\x3c\xdc\xc3\x35\xad\xf8\xcf\xe3\xd0\xee\xb1\x17\xea\x81\x89\xfa\x6f\x33\x74\x83", 104, { 0x0e, 0x6b, 0x76, 0x6d, 0x7b, 0xde, 0xbf, 0x7e, 0x4d, 0x13, 0xcf, 0x0c, 0x33, 0xfa, 0xfe, 0xa0 }, { 0x26, 0x14, 0x24, 0xdb, 0x0c, 0x14, 0xad, 0x81, 0x26, 0x14, 0x24, 0xdb, 0x0c, 0x14, 0xad, 0x81 } },
|
||||
{ "\x55\x7b\x93\x59\x48\xe4\x4a\xb5\x8d\x0b\x76\x2d\x80\x87\xa8\xcb\x2d\x7d\x9f\x00\xb2\x91\xc7\x57\x23\xd7\xcd\x73\x03\x52\x11\x48\x2c\xd9\x0f\xe9\xde\x22\x68\x0c\x11\xe8\x9e\x69\xd0\x70\x85\xbf\xc3\x3c\x1a\x38\xba\x09\x3a\x41\xef\x6f\xf3\xc0\xaf\x4d\x8b\x71\x49\xce\x63\x13\x25\x9b\xdf\xdb\x21\xc0\x7d\x99\x01\x35\x6f\x44\xdc\xe6\xbb\xdc\x7f\x0b\xa6\x62\x02\xa5\x64\x8d\xcd\x43\x80\x6c\x2f\x24\x01\x96\x1a\x82\xdc\xb1\xa8", 105, { 0xc7, 0xb6, 0x96, 0x9b, 0xcd, 0x30, 0x78, 0xcc, 0x41, 0x9b, 0x92, 0xc6, 0xf8, 0x90, 0x87, 0xe6 }, { 0x2e, 0xe3, 0x9b, 0x78, 0xdb, 0x09, 0xf4, 0xfd, 0x2e, 0xe3, 0x9b, 0x78, 0xdb, 0x09, 0xf4, 0xfd } },
|
||||
{ "\x1a\x91\x0c\x5b\x6d\x5d\x8e\x77\x92\xbf\xbe\xa4\xdb\x07\x6f\xa9\xac\x56\x17\x68\xe0\xe3\x6a\x84\x51\x05\x93\xc9\xe4\xed\x66\xa2\x6b\xd4\x49\xf5\x26\x17\x42\x32\xca\x34\x9e\x58\x17\xc7\x69\x02\x36\x86\x0d\x09\x6b\x49\xa7\xc1\x54\xfb\x09\x3d\xcc\xa1\xcb\x67\xba\x94\x46\x77\x9f\x27\xac\x42\x4a\x2d\x50\x66\x79\x95\x0b\xab\x84\x42\x94\x80\xb2\x99\x64\xc5\xe9\xc2\xd0\xa8\x2c\xa6\x48\xa2\xd6\xd4\x6e\x28\xaf\x60\xbf\x81\xf1\xcd", 106, { 0x41, 0xf4, 0xd6, 0xaf, 0x20, 0x5b, 0xb7, 0x45, 0x4c, 0x08, 0xe7, 0xb9, 0x3b, 0x27, 0xe4, 0x45 }, { 0x35, 0x7b, 0x6a, 0xd3, 0xfe, 0x2a, 0x78, 0x73, 0x35, 0x7b, 0x6a, 0xd3, 0xfe, 0x2a, 0x78, 0x73 } },
|
||||
{ "\x2a\xde\x8b\x64\x13\x7d\xfe\x0e\x3e\x54\xc5\x82\x15\xd3\x74\xc3\x71\x4d\xf9\x0f\x49\x06\xe1\x72\x1c\xe6\x3f\xe1\x17\x53\x2b\x38\x6d\xdd\x4c\x45\xb5\xf5\xf0\xf0\x97\xcc\xde\x59\xc9\x49\x2f\x48\x0c\x94\x41\x07\x44\xe8\xa7\x5e\xab\x9a\x1b\x25\xc0\x72\x38\x69\xf2\x3e\x91\xe4\x02\xd7\x07\x84\xbd\xed\x87\x74\xee\x80\xec\xa1\x08\xbd\x23\xc1\x48\xeb\x39\x6f\xf6\xe4\x54\xed\x62\x20\xea\x5f\xc7\xd5\xe4\xdb\x75\x45\x63\xfe\x2a\xb5\x2e", 107, { 0x7b, 0x18, 0x89, 0x70, 0xe9, 0x09, 0x1b, 0x04, 0xb7, 0x9f, 0xc4, 0xe7, 0x54, 0xdf, 0xbe, 0x0b }, { 0xe8, 0x69, 0x11, 0xdb, 0x66, 0xed, 0xc9, 0xa3, 0xe8, 0x69, 0x11, 0xdb, 0x66, 0xed, 0xc9, 0xa3 } },
|
||||
{ "\x32\x31\x11\x4e\x93\xe0\x03\x50\x84\xb4\xbb\x55\xcb\xc6\x46\xc0\x47\x3b\x13\xe2\x4f\xa7\x24\x30\x40\x1e\x4d\xdc\x2b\xdd\x57\xe6\x34\xcf\x49\xed\x14\x88\xdf\xd0\x93\xa8\xee\x2c\x36\x3b\xf8\x2d\xc3\xde\x15\xde\x86\x2f\x1e\xab\x55\xa9\xce\xa0\x6d\xdb\x78\x07\xee\xf8\x23\x93\x90\xad\xf2\x7f\x68\x5e\xf8\xa6\xe3\xbc\x0a\x7d\xd9\xd3\x07\xda\x9e\xed\x40\xfa\x89\xe1\xfa\x0f\xec\x42\xe6\xbc\x1c\xa0\x7c\x70\xd5\x54\xa8\xb8\xcc\xf4\x66\xf6", 108, { 0xdc, 0xa6, 0xe8, 0x4a, 0x96, 0xdb, 0xed, 0x8e, 0xec, 0x6d, 0xec, 0xeb, 0xbe, 0xf1, 0x6f, 0xc4 }, { 0x0b, 0x15, 0x39, 0x49, 0x59, 0xbd, 0xc9, 0x3c, 0x0b, 0x15, 0x39, 0x49, 0x59, 0xbd, 0xc9, 0x3c } },
|
||||
{ "\x75\xa7\xf6\xee\x23\x9b\xf5\xeb\x62\xff\x76\xf4\xfe\x7d\xd9\x8c\x23\x11\xa1\xa4\x1e\xe1\xf7\xa1\x4a\xba\x3e\xad\x63\x9b\xd4\x79\xed\x89\x68\xf8\x35\xe7\x39\xbd\xfd\xa7\x32\x17\x96\xf1\x8d\x16\xae\xac\xc1\x2f\x90\xca\x3d\x6b\x87\xee\x0f\x93\x52\x8c\x3b\xc3\xa6\x36\x3d\x0b\xeb\x66\xc1\x4c\xba\xac\xc0\x21\xde\x94\xf4\x9c\x1c\x61\x5d\xcf\xb8\xfc\xb6\xf3\xda\xee\xa3\xc9\x24\xf3\x56\x1c\xc4\xfe\x64\xbb\x53\x07\xe2\x87\xfe\xc0\x5c\xbb\x91", 109, { 0xc2, 0x3a, 0x08, 0xcb, 0xe1, 0xc5, 0x7f, 0x37, 0xd6, 0xf1, 0x53, 0x2b, 0x40, 0xb7, 0x68, 0x03 }, { 0x1a, 0x47, 0x55, 0x57, 0x55, 0x9f, 0xcc, 0x5a, 0x1a, 0x47, 0x55, 0x57, 0x55, 0x9f, 0xcc, 0x5a } },
|
||||
{ "\x1f\xa5\x25\xea\xba\xfc\x20\x81\xf9\x8f\xd7\x4a\xfe\xa7\xa3\x9a\xfa\xd0\xf2\xf0\xb5\xc8\xe4\x97\xc9\x31\xf2\xc8\xc6\x4f\xab\x15\xa1\x06\xf5\xa0\xcb\xff\xb5\x97\x0c\x25\x45\xb0\x60\xa9\x3b\x0a\x0e\xae\x0b\x39\xa6\xd2\x84\xdf\x0e\xbf\xb0\x4e\x26\x54\xf6\xc4\x85\x4b\x9f\xc0\x3e\xbd\xee\x9a\x7d\x27\x2e\x9e\x0a\x1c\x10\xf6\xc5\x49\xd9\x4e\x24\x85\xcf\xaf\x2d\x90\x1f\xc4\x07\xb7\xcc\x85\xe8\x27\xc3\xad\x15\x50\xe8\x35\x80\x9b\x18\x62\xd0\x98", 110, { 0x84, 0x43, 0x13, 0xee, 0xa9, 0xb3, 0x84, 0x4b, 0xe1, 0xa7, 0xaf, 0x53, 0x7b, 0x28, 0x22, 0xf5 }, { 0x7e, 0x2e, 0xe2, 0x33, 0x54, 0xe3, 0xea, 0x28, 0x7e, 0x2e, 0xe2, 0x33, 0x54, 0xe3, 0xea, 0x28 } },
|
||||
{ "\x8d\x75\x1d\xb3\xee\x7a\x2f\x1e\x1b\x43\xee\x74\x20\x5d\x8e\xe7\xe1\xcf\x95\xd5\x96\x5c\x99\xd2\x6c\x34\x13\x6f\xb0\xaf\xab\x86\x48\x5d\x89\xe8\xa4\x0e\xe5\x5f\xc8\x3e\xc6\x2c\xcc\xae\x6e\x1d\x51\x6d\x86\xd4\x2e\x5e\xe0\xf6\x17\xc0\x7c\x0a\x59\x50\xe6\xff\x55\x00\xe7\xd4\xcc\xba\x88\x2b\x3b\xcd\xe9\x20\x99\x78\x3d\xd8\xf8\x3a\x76\x77\xfb\xbe\xaf\x2e\x2f\x27\xda\x2a\x56\xda\xd6\x7f\xcc\x79\x8c\xa9\xe4\xe5\xa6\x20\xb0\x93\x60\xb0\x19\x2f\xe1", 111, { 0xcd, 0x76, 0xbe, 0xe5, 0xc9, 0x35, 0x9d, 0x48, 0xd1, 0xcb, 0x92, 0xc1, 0xec, 0xad, 0x8a, 0x70 }, { 0x22, 0x67, 0xa5, 0x45, 0x9b, 0x19, 0x9d, 0x5d, 0x22, 0x67, 0xa5, 0x45, 0x9b, 0x19, 0x9d, 0x5d } },
|
||||
{ "\xfe\x3a\x4a\x50\xfa\xf9\x68\xa3\xa0\xff\xb5\x10\x0d\x76\xe0\x90\x29\x0a\x7e\x45\x22\xda\x52\xa8\x75\xfc\xeb\x25\x1c\xc7\x73\xa1\xc9\x16\x29\x34\xcc\xe8\xa8\x4a\xb4\xf1\xac\xc9\x2d\x60\xa9\x5a\x3a\x34\x9d\xa6\xa7\x8d\x9f\x20\x55\x0f\xd6\x17\x5e\xa0\x2e\x76\x44\x67\x73\x83\x3f\xf4\xb7\x52\xc3\x03\xd2\xa1\xbb\x9c\x71\x18\x6c\x22\x61\x7e\x27\xd7\x80\x6a\x01\x19\xbd\x39\xef\x4e\xaa\x12\xe6\xa7\x16\xe2\xbb\x47\x11\xf8\x4e\x0c\xae\xbb\x4d\xdb\x5a\x27", 112, { 0x9b, 0x41, 0x48, 0x92, 0x98, 0x99, 0x31, 0x5e, 0x16, 0xc0, 0xbb, 0xf2, 0x75, 0x44, 0xea, 0x8a }, { 0xb0, 0xbc, 0x90, 0x59, 0x24, 0xee, 0x94, 0x5b, 0xb0, 0xbc, 0x90, 0x59, 0x24, 0xee, 0x94, 0x5b } },
|
||||
{ "\xeb\x41\x32\x39\x1b\x75\x2f\x92\xc5\x5e\x2b\x6f\x9c\xf9\x00\xb2\x9f\x84\xb7\x56\x07\x9b\xb9\xae\xc4\x1e\x10\x4a\xda\x0e\xe1\x5f\xd2\xae\xe0\x54\x3e\x5c\x2c\x0c\xac\x40\xb5\x58\xfc\x90\x96\x4b\x54\x65\x9c\xc1\xf2\xc5\xc7\x5a\x2a\xc7\xd0\xbf\x0d\x73\x5c\xb9\x21\x12\x50\x2c\x88\x8f\xb1\x73\xbc\xe5\xe4\xab\x68\xff\x53\x72\x5d\x2b\xbf\x01\x32\xe1\x07\x7c\x6e\x99\xbc\x98\x1c\x5f\x47\x8f\x69\xd5\x7b\xd4\xdf\x22\xc2\x32\x5a\x26\xa5\x17\xbd\x18\x26\x53\x95", 113, { 0xfc, 0x79, 0x63, 0x98, 0x97, 0xfc, 0x70, 0xbb, 0x49, 0xc5, 0x63, 0x4f, 0x0d, 0x4e, 0x4f, 0x02 }, { 0x14, 0xf6, 0xc5, 0x06, 0xb2, 0x19, 0x16, 0x94, 0x14, 0xf6, 0xc5, 0x06, 0xb2, 0x19, 0x16, 0x94 } },
|
||||
{ "\xd8\xb2\x19\x18\xe3\xa1\xaa\xd4\x9f\xef\x5f\x1e\x0d\x91\x3a\xa9\x7d\xed\xa3\x9f\x7b\xb3\x73\x23\x74\x6a\x0c\x4e\xff\xb0\xa8\x17\xa0\x35\x23\x18\x43\xa0\xfe\x5e\x08\xd4\xde\xe4\x3f\x86\xf3\xe2\xa5\x52\x91\xd3\xbf\xde\x4a\xcf\xec\x2e\xab\xfa\x93\xaf\x2f\x17\x2f\x2a\x54\xc1\x75\x7c\x86\x02\x7c\xa9\x33\xbb\x81\xde\xdb\xbf\x7e\xdb\xde\xf4\x7b\xbb\xa5\xef\x12\x1a\x63\x06\x40\x22\xd3\xab\x7d\xe4\x6c\x8a\x8a\xae\x93\x03\xa7\x5c\x6d\x9d\xeb\x64\x8a\xf5\x74\x76", 114, { 0xb6, 0xdf, 0x0c, 0x85, 0x9a, 0xc1, 0x89, 0x48, 0x75, 0x2f, 0x8a, 0xf8, 0x90, 0xc6, 0xad, 0xf7 }, { 0x6b, 0xf7, 0x78, 0x1e, 0xa2, 0x92, 0xf6, 0x6d, 0x6b, 0xf7, 0x78, 0x1e, 0xa2, 0x92, 0xf6, 0x6d } },
|
||||
{ "\x7c\xbd\x1f\x61\xc8\x5a\xdc\x39\xab\xa7\x6d\x7b\x08\x23\x98\x75\xa4\xc0\x5f\x2c\xff\xa3\x20\xdb\x7f\xaf\x01\x73\xd8\xa8\x3c\xf0\x26\x04\xa9\x06\x85\x4e\xf0\x02\xc1\x50\x9c\xb7\x2a\xac\xc2\x6a\xc4\xa5\xb4\xba\x3c\x9d\x53\x5f\xb4\x75\x35\xb9\x98\x41\x41\x77\x73\x2c\xde\x5b\x86\xdf\xe9\x35\x21\x4a\xc0\xae\x2d\x7e\xd6\xd5\x00\xf7\xb3\xb5\x8a\xd0\x8c\xf3\x7b\x5e\x73\x58\xe2\x42\x50\xde\xd6\xf5\xc8\x15\x91\x07\x1a\xd8\xfe\xd5\x0f\x4a\xbc\x81\xd6\xed\xc9\x7b\x29", 115, { 0x17, 0x64, 0x5c, 0x1e, 0x16, 0x8d, 0xa1, 0x1e, 0x5c, 0xab, 0x35, 0xfb, 0x51, 0x40, 0x11, 0x78 }, { 0x49, 0x3d, 0xbe, 0x2a, 0xb9, 0x28, 0x69, 0x38, 0x49, 0x3d, 0xbe, 0x2a, 0xb9, 0x28, 0x69, 0x38 } },
|
||||
{ "\x7d\x70\xcb\x7a\x58\xfb\x56\x69\xd9\x30\x71\xa4\xaa\xaa\x8b\x9f\xf3\x2e\x60\x68\x9e\x30\x1f\x35\x3e\x19\xd4\x23\x3e\x6f\xdd\x0e\x7e\x60\x3e\xd8\x95\x4c\x32\x6b\xae\x64\xf9\x69\xea\x9a\x72\x49\x3f\x22\x30\x38\x30\x9c\x40\x68\x8f\x09\x09\xea\xe0\x9d\x0a\x3b\xdb\x1c\xc4\xfb\xc5\x84\x96\x2d\xd1\x79\xee\xe4\x5b\xb9\x4c\xba\xc2\xb9\x94\x7e\xd0\xca\xf7\x15\x28\xff\x82\xfc\x35\x34\xd8\x10\xbe\xab\xf1\x3e\x33\x81\x64\xb4\xe1\x7c\xc1\xf2\x01\x3d\xf7\x4e\x8e\xcd\x1c\x76", 116, { 0xbd, 0xc2, 0x80, 0x8d, 0x5b, 0x54, 0x69, 0x71, 0x21, 0x90, 0xff, 0xfe, 0xb4, 0x9f, 0x42, 0xa4 }, { 0x45, 0xe1, 0xde, 0xd2, 0x01, 0xfc, 0x69, 0xdb, 0x45, 0xe1, 0xde, 0xd2, 0x01, 0xfc, 0x69, 0xdb } },
|
||||
{ "\x45\x8b\xca\x9a\xb5\x91\xc7\x80\xfd\x8c\x19\x64\xe2\xb0\x19\x84\xc3\x2d\xa9\x7f\xa0\xd4\xa0\xe8\xd9\xb5\xe3\x56\x3d\x35\x06\xcc\xa8\xf3\x7e\x82\x05\xad\x95\x6b\xac\xd2\x12\x23\x7a\xfc\x3c\x2c\x4f\xe0\x28\xd3\xba\xdb\x6d\xb0\xa8\x1a\x5d\x42\xb2\xc4\x63\x44\x9f\xa5\x76\xde\x76\xec\x9a\xf0\xc4\xd3\x85\xed\x70\x76\xe3\x52\x6b\xa3\x69\xa1\xd5\x96\xb9\xae\x25\xc9\xac\x94\xa7\xbf\x90\xf2\xd6\x1f\x2e\xcc\x36\xa8\xee\x17\xe8\xd5\x66\x54\xd8\x2c\x70\x74\x33\x15\xc0\xe8\x9e", 117, { 0x8b, 0x00, 0xfd, 0xb3, 0xe0, 0xb8, 0x60, 0x00, 0x67, 0x7a, 0x86, 0xc1, 0x40, 0x64, 0x4b, 0x86 }, { 0xb1, 0x15, 0x58, 0xfa, 0xea, 0x38, 0x9f, 0x80, 0xb1, 0x15, 0x58, 0xfa, 0xea, 0x38, 0x9f, 0x80 } },
|
||||
{ "\xa3\xca\xc2\xc2\x05\x59\xf7\x25\xa4\x48\xdf\xa0\x77\x47\x0b\x5a\xe4\x59\xcb\x84\x22\xc3\x2e\x97\x24\x5e\x70\x7d\xc7\x78\x41\xeb\xc8\x73\x1f\x4f\x10\xae\x3f\xd3\x6a\xc6\x8a\xef\x78\xbb\x35\x85\x8d\x4f\x8e\xa2\xae\xec\x4b\x5b\x4f\x9b\xff\x2c\x9d\xb0\x1c\x9d\xea\x48\xe4\x72\x49\x90\x92\x60\xc6\xbe\x1d\x68\x48\x53\x5f\x91\xb7\xfd\xbc\x5f\x42\xe0\xf8\x5d\x0b\x4c\x69\xcf\x72\x59\x05\xa9\x74\x61\xc8\xec\xf0\xad\x91\x29\xd9\xe9\xbe\xab\xc1\xec\x50\x40\x5b\x77\xe2\xae\x26\x08", 118, { 0x78, 0x57, 0x26, 0x0f, 0xbd, 0xb1, 0xec, 0xed, 0x77, 0x71, 0x96, 0x10, 0x29, 0xb7, 0x56, 0xfd }, { 0x54, 0x51, 0x59, 0xe9, 0x1d, 0x1a, 0x96, 0x65, 0x54, 0x51, 0x59, 0xe9, 0x1d, 0x1a, 0x96, 0x65 } },
|
||||
{ "\xdc\x1e\x1b\x5a\x91\x8c\xd0\x3e\xe4\x25\x18\xea\xb0\x90\x77\xba\x78\x55\x6a\xb1\xba\xec\x7e\xbc\xdb\x46\x4e\x07\xe2\xcb\xe5\xea\xd8\x1d\x84\x55\x30\x0d\xae\xaa\x80\x03\x3e\x12\x1e\xd4\x9d\x3d\x41\xbd\x42\x15\xf6\x19\x4b\xfb\x73\xa1\xe4\x65\xc9\xb6\x6f\x3f\x13\x95\xde\x71\xb5\xdf\x83\x24\x78\xbd\x5d\xb5\xe6\xd4\xb4\x42\x1c\x53\xf5\x10\x9e\x15\xad\xe3\xcf\x3b\x75\xef\x47\x09\xd9\xe6\x30\xbd\xce\x55\x16\x1a\xfe\x35\x82\x03\x62\x58\xa5\x98\x9c\xfd\x2e\x44\x00\x35\xf2\x7f\xff", 119, { 0xbd, 0xba, 0x2b, 0x81, 0x72, 0x4f, 0x14, 0xab, 0xc0, 0xab, 0x40, 0x68, 0xb1, 0x5f, 0xa0, 0x49 }, { 0xe8, 0x0f, 0x8b, 0x9b, 0xa1, 0x2e, 0x0e, 0x85, 0xe8, 0x0f, 0x8b, 0x9b, 0xa1, 0x2e, 0x0e, 0x85 } },
|
||||
{ "\x17\x3e\xc2\xb1\x97\x03\x25\x21\xca\x4c\xdc\x72\x53\x8f\xfe\x30\x60\x1f\x7d\xbf\x0a\x4f\xc9\x67\x42\x1e\x5b\x1f\x83\xaa\x59\xd6\x8d\x90\x5d\x83\x0a\xbe\xe0\x9e\x39\x21\x59\x27\x44\xd6\x3f\x63\xb2\xa6\x95\x9c\x57\xd0\x64\x35\x30\x5a\x93\x4e\x2b\xa7\x9e\x66\xca\x89\x8f\x48\xee\x64\x41\x3e\x1c\xb4\xe1\x88\xee\xf1\x1c\x95\x35\xe2\xd7\xd7\x72\xa6\x92\x93\xdb\x40\x28\x67\x54\x20\xad\xb4\x5c\x95\xf7\xa5\xb1\x6e\x3f\xda\xfa\xfc\xa2\xdc\x71\xbe\xac\x49\x37\x36\x9c\x27\x6d\x9d\xf3\x22", 120, { 0x98, 0x1a, 0x5d, 0xa6, 0x5e, 0x50, 0xea, 0xe4, 0xe6, 0x54, 0x2b, 0x51, 0x8a, 0xf5, 0x92, 0x1f }, { 0xa6, 0xf9, 0x97, 0xb6, 0x97, 0x7a, 0x32, 0xd1, 0xa6, 0xf9, 0x97, 0xb6, 0x97, 0x7a, 0x32, 0xd1 } },
|
||||
{ "\x6c\x8a\xe9\xf7\x57\x57\x45\x93\x36\x06\xc4\x8e\x27\xeb\xc1\xbd\xcc\xbd\x9e\xaf\xf5\xc0\x28\x67\x65\xe0\x33\x5f\xcc\xbb\x99\xfd\xb6\x26\xfa\x45\xa3\x44\xf4\x62\x7f\xf6\xe0\x45\x7c\xa5\x81\x67\x21\x57\xf4\x9a\xa6\xe7\xb9\x5c\x8d\xf2\x77\x0b\xfc\x2a\x19\xed\x32\x3c\x5c\x02\x94\x0c\x65\x57\x16\xc5\xb3\x2a\x2c\xb4\xa8\x0b\x29\xf9\x76\x6a\x06\xd4\x09\x99\xaa\xeb\x7f\x93\xe6\x8b\xab\x96\x76\xc0\x15\x31\x8f\xc7\x34\x0d\xd3\x32\x14\xd9\xe9\x35\x13\x6a\xfa\x0a\x68\x67\x0c\x1e\xc9\xa8\x4a", 121, { 0xaa, 0x30, 0xc6, 0x62, 0xf2, 0x54, 0x96, 0x72, 0x0b, 0x18, 0xd4, 0x72, 0x1e, 0x92, 0xf2, 0x36 }, { 0xd9, 0x7a, 0x32, 0x17, 0x43, 0xc3, 0xc5, 0x10, 0xd9, 0x7a, 0x32, 0x17, 0x43, 0xc3, 0xc5, 0x10 } },
|
||||
{ "\xa6\xec\x50\xa2\x11\xf1\x68\x02\x91\x8f\x22\xcc\x2f\xf4\x40\xce\x84\xd9\x6e\xf5\x5f\x7b\xa3\x3a\x58\xe9\xa5\xf8\xd0\x13\x1e\x34\xb9\xf5\xf5\xb4\xe8\xa8\x32\x0f\x64\xec\x27\x55\xf3\xfa\x43\x22\xd3\x91\x32\x49\xcf\x2f\x45\x57\x79\xaf\x9e\xb2\x94\xf5\xc2\xc9\x9a\x53\x53\x64\x1e\x55\xd4\x73\x27\x13\xe5\x65\x59\xe0\x86\x97\xb0\x6e\xb6\x42\x54\x6f\x3e\x60\xcc\x1b\x8a\x8f\xdf\x64\xe4\x5b\xd1\x49\x7b\x1f\x60\x42\x4b\x4e\xcf\x46\x55\x5f\xd5\x73\x0e\xc5\x77\xdf\x19\xc6\x58\x61\xde\xb8\x22\x18", 122, { 0xa7, 0xfe, 0xb9, 0xe1, 0xf0, 0xbd, 0xc9, 0x11, 0xc6, 0x98, 0x1c, 0x85, 0xd7, 0xaa, 0x32, 0xe0 }, { 0xc7, 0x29, 0x1d, 0x27, 0xd3, 0x7f, 0x4c, 0x7a, 0xc7, 0x29, 0x1d, 0x27, 0xd3, 0x7f, 0x4c, 0x7a } },
|
||||
{ "\x08\xec\xdc\x51\xbc\x41\xbb\x60\xac\x2b\x47\x99\x9a\x0d\x7d\xd8\x7c\x6f\x80\xee\x63\xc0\x10\x05\xe1\x40\xe2\x4c\xc9\x9f\x12\xf9\x9f\x95\xf4\x71\xf6\x91\xba\xff\x7b\x4a\x05\x5c\xa1\xd6\x6e\xac\x45\xfb\x58\x0a\xda\x73\x33\x08\x35\x25\xf3\x48\xfd\x58\xa9\x28\xad\xbc\x8a\xca\x86\x5f\xe6\x76\x78\xec\x5a\x6a\xc2\x4b\xf7\xa7\xf9\x74\x5a\x29\x22\x62\x8d\x52\x05\x45\xac\x73\x4f\x78\x73\x80\x00\xb8\x7e\x1a\x0f\xa3\x2f\x51\xfd\xf8\xd9\x84\xf1\x85\x78\x67\xc9\x9c\x0a\x6f\xa8\x4e\x7d\x23\xfe\x6b\xac", 123, { 0x1f, 0xdc, 0xdf, 0xf9, 0xcf, 0x2e, 0xe7, 0xc6, 0xbd, 0x7a, 0xaf, 0xc0, 0x57, 0xc5, 0x3a, 0x57 }, { 0x83, 0xbb, 0x03, 0xac, 0x35, 0x7d, 0x3e, 0x50, 0x83, 0xbb, 0x03, 0xac, 0x35, 0x7d, 0x3e, 0x50 } },
|
||||
{ "\x3a\x01\xa4\x77\xd4\xbc\xaa\xa7\xa8\x9d\x77\x4f\x04\xd9\x70\x20\x9a\xa5\x31\xe5\x4d\x52\xc9\xe8\xf9\x48\xba\x13\x0a\x46\xe4\x07\x48\xeb\x4e\x9c\x63\x61\xc1\xbe\x2a\x80\x32\xaf\x3f\x4a\x15\x83\x7a\x5a\x58\xac\x89\x3a\x5b\xa3\xb7\xfa\x6a\x46\x1d\x3b\x51\x09\x28\x6b\x45\x8d\x17\x59\x76\x4a\x31\xef\xbf\x31\xc9\x57\x9b\x4f\x71\x67\x92\x05\x20\x1b\xe0\x38\xba\xd3\xf7\xad\xc9\xdc\xb1\xc5\x51\xba\x58\x0f\x43\x5d\x17\x9f\xa2\x05\xdc\x65\x06\xab\xb0\xb4\x33\x5b\xd3\x8d\xaa\x1e\x60\x1d\x68\x73\x08\x52", 124, { 0x9b, 0x8e, 0x30, 0x9f, 0x27, 0x38, 0x5a, 0xfa, 0x33, 0x75, 0x71, 0xab, 0xdd, 0x13, 0x4a, 0x27 }, { 0xb6, 0x4c, 0x67, 0xe9, 0x9f, 0x92, 0xb7, 0x53, 0xb6, 0x4c, 0x67, 0xe9, 0x9f, 0x92, 0xb7, 0x53 } },
|
||||
{ "\x27\xe2\xbe\xa8\xf6\x17\xbf\x5c\xa6\x0f\x31\x87\xa5\x6e\x0c\xa4\xc7\xb0\x25\x48\xb0\xea\x44\x17\xcb\x1f\x25\xd1\x08\x15\xa9\x4b\xd8\x42\x9d\x56\x7a\xde\xaf\x3e\xa0\x3d\x66\x42\x14\x51\x1a\xa7\x4c\xfc\x9f\x37\x78\x30\xd4\x11\x35\x3c\x6c\x31\x37\xe9\x42\x5e\x7f\x81\x3c\x3d\xe3\xf3\x36\x1d\xfa\xf6\x9f\xf4\x0a\xbf\xc5\x56\xf1\x2d\x4e\x5c\x05\x09\x3a\xe8\xef\xd5\xb1\x1e\xb6\xb0\xeb\xc2\x97\x91\xeb\x67\x5e\x9b\x44\x6c\xaf\x45\x7b\xed\x34\xf5\x3c\xa1\xbc\x4c\xc4\xdc\x15\xa9\xea\x7e\xfb\x38\xd3\x8f\x69", 125, { 0x11, 0x66, 0x45, 0x8f, 0x93, 0x28, 0x94, 0x1b, 0x2c, 0xc9, 0x10, 0xc9, 0x97, 0x1d, 0x77, 0xf2 }, { 0x2f, 0xa1, 0x96, 0x06, 0x39, 0xb6, 0x64, 0x34, 0x2f, 0xa1, 0x96, 0x06, 0x39, 0xb6, 0x64, 0x34 } },
|
||||
{ "\x87\xee\x1a\x0b\x42\xf2\x4a\x66\xad\x4f\xa2\x28\x37\x28\xa4\x43\x0e\x89\xee\xcd\x77\x8b\x8e\x41\x78\xcb\x58\x18\xfb\x30\xe2\x0a\x3a\x1e\x4f\x4e\x82\x3e\x9d\x44\xef\x08\x07\x5f\x58\xfa\x5e\x96\xd1\x9b\xc3\xba\x08\xb8\x60\x13\xb0\xcd\x41\x4d\x36\xcb\x0d\xfb\xc1\xf0\xa2\xd3\xec\x72\x06\x14\x27\x92\x22\xd3\x94\xa3\xc4\xf2\x13\xb8\xcc\x7a\xc5\x89\x1a\xb3\xfd\x4c\x18\x76\xc0\x04\xcd\x58\x99\xac\xd5\xb6\xc2\x8d\x23\xeb\x41\x6d\xa1\x17\x48\x90\xe8\x2b\xfc\x6e\xee\xc8\xca\x8d\x8f\x47\xaa\x58\x1f\x12\x6d\xed", 126, { 0x08, 0x32, 0xa1, 0xcc, 0x3a, 0xee, 0xfd, 0xd0, 0x30, 0xdd, 0x34, 0x35, 0x0e, 0x14, 0xa5, 0x3f }, { 0x45, 0xcd, 0x59, 0xa5, 0xea, 0xc6, 0x2b, 0x88, 0x45, 0xcd, 0x59, 0xa5, 0xea, 0xc6, 0x2b, 0x88 } },
|
||||
{ "\x68\xa6\x9d\xb4\xe0\x19\xb1\xe3\xe6\x62\x71\x3d\x88\xd7\xd0\xab\x9e\x5a\x55\x4f\x88\x9b\x01\x51\xbb\xe2\xac\xcf\x51\x0b\xd1\xb4\xa3\xd1\x43\x01\xd1\xe0\x3c\x92\x94\x02\xf8\x56\x2a\xa5\xcc\xdf\xba\xb0\x6e\xa5\xb0\x57\x81\xd1\xd1\xe6\x75\x8c\x5b\x27\xb1\xc6\xeb\x9d\xa3\x65\x2a\xb0\x1e\xf9\xa3\x0b\xeb\xa1\x4e\x49\x92\x64\x48\x2c\x66\x3b\x50\xe0\x3d\x85\x3e\xa1\xdd\x59\xef\xfe\x1f\x9e\xb4\xb1\x5c\xf6\x81\x0d\x41\x6b\x41\xd5\x4c\x79\x2d\xcb\xe9\x8c\xa1\x3e\x3b\x08\xdc\xdd\xc0\x01\x14\x2d\x74\x0e\xf3\x69\x91", 127, { 0x8d, 0x80, 0x38, 0x14, 0xa0, 0x4a, 0x73, 0xe1, 0x4f, 0x88, 0x23, 0x08, 0x27, 0xa4, 0x19, 0x86 }, { 0x9b, 0x4f, 0x66, 0x15, 0x67, 0xa8, 0x91, 0x5f, 0x9b, 0x4f, 0x66, 0x15, 0x67, 0xa8, 0x91, 0x5f } },
|
||||
{ "\xaf\xd2\x8a\x5a\x75\x0b\xa7\x0e\xfd\x9e\xa8\x72\x3f\x13\x1a\xf6\xe9\x6f\x52\xf0\x27\x28\x9b\xb4\x99\xdc\xa7\xe5\x92\x2a\x0c\x67\x0d\x91\xcc\xc7\xfb\x9d\x98\x71\x72\xc0\x0b\xac\x1b\xf1\xb0\xb8\x88\x7e\x45\xed\x82\x4a\x03\xba\x04\xd4\xdd\x1b\x9b\x62\x29\x8a\xfe\xec\x5a\x5a\x42\xa1\xa4\xd8\x23\xda\x57\x0b\x09\xe3\x50\x75\xc6\xf8\x41\x7e\x61\xba\x52\xf1\x9f\x5b\x53\x0b\x6f\x4a\xd1\xf4\x70\xd4\xee\xd8\x9a\x84\x06\xe2\xd0\x1a\xeb\xcd\xed\x90\x59\x82\xed\x34\xac\x2a\xed\x1c\x5b\xb3\x95\xa4\x91\xf2\x64\xff\x3e\x43", 128, { 0x10, 0x27, 0x14, 0xa5, 0x93, 0xa4, 0xaf, 0xb7, 0x29, 0xb6, 0x13, 0x61, 0x1a, 0xe6, 0xca, 0x2c }, { 0xae, 0x5e, 0x36, 0x7f, 0xc2, 0x2f, 0x87, 0x90, 0xae, 0x5e, 0x36, 0x7f, 0xc2, 0x2f, 0x87, 0x90 } },
|
||||
{ "\xfd\x7f\xcf\xd9\xd3\xe1\x20\xf6\xd1\xb3\x1c\xe7\xbb\x07\xc7\x8f\xa1\x34\xe6\xf0\xd3\x5d\x0f\xfc\x11\xef\x1d\x94\xcc\x3f\x50\xe9\xc4\xcc\x1b\xd2\xbf\xbd\x74\x2b\x4a\x16\x37\xf3\xf7\x95\x29\x24\x93\xe1\x78\xbc\x89\x9b\x53\xe5\x61\x3c\xa0\x35\x9e\xce\x68\xf4\xb5\xa6\xaf\xd3\xf4\xd1\xdc\x42\xd1\xd8\x96\xfb\xc4\x50\x5d\xc6\xe2\xd2\x8a\xae\x5e\xbb\xc5\x92\xff\x39\xe5\xd0\xbe\xa9\x16\x7a\x03\x43\x07\x74\xaf\xa9\xa6\x2b\x85\x31\xe0\x26\x2a\x01\x13\x4d\x50\x03\xbf\x75\x7f\x59\xd3\x55\x37\x18\x40\xef\xc5\x18\x6b\xa4\x00", 129, { 0xff, 0x68, 0x40, 0x97, 0x3c, 0x8a, 0xff, 0xb6, 0x58, 0x15, 0x3c, 0x32, 0x9e, 0x23, 0x63, 0x0e }, { 0xc6, 0xec, 0xc8, 0xd1, 0x82, 0xf4, 0xc2, 0x7f, 0xc6, 0xec, 0xc8, 0xd1, 0x82, 0xf4, 0xc2, 0x7f } },
|
||||
{ "\x42\x28\xec\x05\x25\x21\xb7\x2d\x5d\x37\x4d\xff\xd0\xf8\x09\xb7\x75\x9a\x0f\xe1\xbb\x1d\x38\x88\xa4\x77\xf7\xb1\x42\x73\xd6\xcd\x6e\x67\x82\x35\xcc\x06\x37\x64\x91\x34\x56\xd4\x4e\x70\x67\x9a\x42\xf0\xef\xec\xd6\x0b\xac\x9b\x22\x39\xbe\xa1\x9c\x56\xd4\xc7\xc2\x5e\x5f\xe6\x3f\x3f\x87\x10\x5d\x0b\xe3\x0e\xb4\x9e\xc0\x15\x84\x71\x0a\x95\x1c\xce\xe7\xd7\xa2\x7e\x7e\x6d\x0d\x14\x0d\x06\xf6\x4f\x92\x51\xde\x2c\xe5\x59\x36\x69\x1e\x62\x20\xa0\xf8\xc8\x18\x77\x56\x1f\xd3\x3d\x42\xd8\x15\x18\x3a\x7b\x16\x72\xcc\xb1\x2c\xe4", 130, { 0x5a, 0x36, 0x4f, 0x9e, 0x42, 0xc1, 0x79, 0xb3, 0x69, 0x8f, 0xa6, 0xaf, 0x98, 0x01, 0x5e, 0x19 }, { 0x71, 0x27, 0xf0, 0x19, 0x74, 0x24, 0xac, 0x18, 0x71, 0x27, 0xf0, 0x19, 0x74, 0x24, 0xac, 0x18 } },
|
||||
{ "\xc7\xa0\x26\x96\xed\xd0\x5f\x5c\x2e\x22\xd0\x1e\x34\x7b\x35\x24\x8c\x1a\xf2\x47\x04\x9e\x70\x89\xa5\x2f\x19\x2a\x8a\xbe\x3f\x37\x31\xfd\xf4\xf8\x93\xe4\x7d\x32\xa3\xad\xf6\x0c\x4d\x8a\xa9\x80\x72\xc0\xf5\xac\xcc\x63\x9d\xdb\x20\xf9\x5d\x62\x6d\x69\x05\xd4\x2b\xce\xbe\x7d\x7c\x40\x7f\xcc\x97\x7f\x76\x45\x4f\xd0\x4d\xe2\x87\x06\x57\xb5\x99\xbb\x77\x9f\xdb\x52\x53\x51\x8a\x4b\x59\xe6\x5f\xee\x04\xdf\xf2\xef\xa1\x70\xb3\xfb\xc2\x67\x71\x63\x02\x7c\x32\x40\xab\x67\x74\xb2\x86\xef\x25\xd3\x18\x8b\xdf\xda\xed\x07\xc8\xc6\xed", 131, { 0xbd, 0xb3, 0x6a, 0x61, 0xc5, 0x66, 0xe6, 0xe2, 0x07, 0x31, 0x2e, 0xc9, 0x24, 0xef, 0x2d, 0x86 }, { 0x25, 0x35, 0x60, 0x7f, 0xe8, 0x24, 0x71, 0x4e, 0x25, 0x35, 0x60, 0x7f, 0xe8, 0x24, 0x71, 0x4e } },
|
||||
{ "\x2b\xb7\x4b\x95\xd2\x7d\x8c\xd8\x29\x96\x97\x01\x25\xdb\xbd\xf5\x7c\xb0\x5c\x70\x0c\x65\x3a\x18\x59\xcd\xf0\xcf\x10\x5e\xbb\x5d\xe8\x6f\x0f\x9d\x61\x7b\x96\x23\xbf\xa4\x2c\x7c\x13\x05\x2d\x97\x9f\xd3\x09\x1f\xd5\xaa\x84\xd7\xe5\x9f\x14\x97\x46\x4f\x5e\x51\xa6\x2e\x49\x24\x59\xb5\x47\x2e\xc5\x81\x8a\x94\x76\xea\x54\xd7\x7a\xe7\x60\xb7\xf3\x76\xb7\xc8\x5a\x0c\xc4\xa0\xad\x5e\x06\x34\xe0\xdd\xce\x14\x67\x00\x28\xa3\x0c\x50\xd0\xb5\xa6\x9f\x32\x89\xa7\xe0\x11\x6f\x3b\x9d\x37\xf2\x2a\x86\xb9\x69\x0c\x1a\x32\x43\x24\x55\x1a\x67", 132, { 0x40, 0xfa, 0x9c, 0xef, 0x51, 0xe5, 0x19, 0x3f, 0x78, 0xbd, 0xef, 0x33, 0x2e, 0x97, 0xdf, 0xaf }, { 0x82, 0x95, 0xbc, 0x8a, 0x21, 0x49, 0x26, 0xc9, 0x82, 0x95, 0xbc, 0x8a, 0x21, 0x49, 0x26, 0xc9 } },
|
||||
{ "\x52\xde\x69\xb4\xce\x65\x04\x79\xcb\xd7\xae\x80\xfa\xc9\x86\xa4\xd3\x5c\xc3\x92\xc4\x03\x4f\x31\x2a\x59\x84\x3a\xdc\x68\x29\x8a\x59\x45\x7e\x8a\x92\x11\x7e\x9d\x13\x4b\x0d\xc1\xa5\x71\xee\x01\x71\xd1\x26\x2b\x8e\xae\x5c\x1f\xde\x31\x1b\x54\x7c\x30\x04\xe8\xee\x4b\xca\x6d\x15\x8d\xdc\x40\x2a\xb6\x71\x4f\x12\xf3\x57\x1a\x0e\xbe\x87\xe7\x8e\x3e\x7b\x04\x33\xb8\x8c\xfb\xf3\xdc\xf3\x5f\xf5\xff\x09\x72\x9e\xf4\x1b\x16\xd8\xfb\x50\x10\xfc\x2b\xea\x29\xcd\x4b\xaf\x2c\xfc\xdf\xf5\x29\x26\xce\x3d\x98\xd8\x41\x3e\x86\xca\xcd\x49\x2b\x0c", 133, { 0x09, 0x5c, 0xf5, 0x5d, 0x5a, 0xf5, 0x95, 0x7c, 0x0f, 0xac, 0x66, 0xa3, 0xde, 0x73, 0x22, 0x83 }, { 0x0c, 0xec, 0x38, 0x93, 0x97, 0xc5, 0xd3, 0xb2, 0x0c, 0xec, 0x38, 0x93, 0x97, 0xc5, 0xd3, 0xb2 } },
|
||||
{ "\xd1\x04\xcd\x30\x3f\x4e\x53\xba\x34\xc2\xc3\xf3\xbf\x9b\xf4\x65\x12\x08\xda\xb3\x5e\xf0\x18\xcd\x4f\x19\xcb\x72\xd7\x34\x6e\xb5\x48\xf6\xf0\x3a\x04\x7c\x63\xd3\x49\xf7\xc2\x03\x9e\xcb\x68\x67\x69\x01\xf4\x45\x82\x5b\xfa\xf8\x87\x0c\xd0\x52\x02\x5b\x28\x26\x95\x9f\xee\x44\x0d\x1e\x09\x56\xc3\xd3\xdb\x9e\xdc\xfa\x61\x30\xe3\x49\x32\xe7\x4c\x5e\xe4\x36\xb3\xa2\xb0\x3c\x80\xfb\xb5\x34\x57\xf5\x00\x36\x24\x50\xd8\xf4\xb5\xf2\x3d\xae\xb7\x7f\x2a\x07\x53\x3e\x72\x1e\x85\x2c\x6c\x1a\xb0\xb7\x60\x82\xe5\xa9\xc3\xc4\x81\xae\x46\xdb\xa6\x61", 134, { 0x3a, 0xce, 0x51, 0x29, 0x71, 0xb9, 0xce, 0x1b, 0xd0, 0x69, 0x66, 0x47, 0x19, 0x66, 0xb0, 0x06 }, { 0xb9, 0x2f, 0x6c, 0x33, 0x99, 0xf1, 0xaa, 0x51, 0xb9, 0x2f, 0x6c, 0x33, 0x99, 0xf1, 0xaa, 0x51 } },
|
||||
{ "\x9a\x20\x2b\xbd\xa9\xca\x7e\x91\x7e\x74\x7f\xb5\xc8\x15\x07\x49\x1e\xe8\x68\x4d\x14\xb6\x5b\x79\xa8\x49\x3c\x6f\x10\xb9\x69\x4b\x17\x64\x61\x32\x09\x0e\x8b\x39\xc2\xf4\x57\x94\x94\xde\xa7\x5b\x9b\xa8\x7d\x83\xe8\x77\x02\x00\x49\x4b\x86\x82\xb2\xb4\xc5\x14\xf7\x32\x29\x0d\x8b\xbb\x6e\xe5\xba\x65\xc6\x34\xaf\x67\xdd\x05\xe7\xab\x87\x74\x68\x7e\x02\x64\xbf\xd7\xe7\x9b\x59\x95\x46\xff\x19\x9a\x92\x52\x96\xba\xa1\x0c\xd6\xb3\xac\x3e\x8c\xf4\x90\xaf\xb8\x5d\x7c\xbd\x77\xc5\x98\xec\x10\xfd\x16\x87\xf6\x0b\x4b\xda\x2f\x4d\x8f\x98\x5f\x11\x63", 135, { 0xd2, 0xc5, 0x55, 0x23, 0xe8, 0x26, 0x03, 0x1d, 0x2f, 0x1e, 0xf3, 0x10, 0xc0, 0x84, 0x33, 0x87 }, { 0x7d, 0xe3, 0x27, 0xac, 0xa8, 0xaa, 0xc3, 0xaa, 0x7d, 0xe3, 0x27, 0xac, 0xa8, 0xaa, 0xc3, 0xaa } },
|
||||
{ "\x35\x54\xdd\x37\xd8\xa3\xf6\xff\x2e\x4b\x51\xde\x8d\xa7\x63\xf1\x3e\x7f\x59\xd1\x4e\xfa\x88\x59\xee\x1b\xc0\xa3\xce\x83\xaa\x85\x19\x5b\x24\x26\x6d\x67\xcb\x7c\x99\x2f\xbf\x04\x6d\xbc\x93\x0b\xe9\x97\x07\x20\x30\xe8\x9f\xbc\x5f\x27\xb6\x68\x4c\x01\xc8\x1e\x3b\x6a\xdf\x58\xb6\xdc\x45\xe9\x59\x2e\x21\xf8\x0e\x95\xc7\x42\x39\xd3\x17\x21\x49\x27\x1f\xfe\xa2\xfa\x4f\x95\x3a\xcf\x56\xcc\x60\xb6\x91\x25\x72\x24\x97\xd8\xcd\xe0\x57\x1c\x04\x2c\x5d\x2e\xdc\x53\x1a\x10\xa3\x49\x12\x5c\x63\xfb\x17\xac\xd7\x0a\x06\x6c\x96\xd1\x81\xcd\xd4\xd0\xf9\xe6", 136, { 0x62, 0x65, 0xd7, 0xce, 0x73, 0xe4, 0x21, 0xe0, 0xb4, 0x7c, 0x21, 0xe6, 0x1e, 0xb0, 0x6c, 0x20 }, { 0xb1, 0xa1, 0x43, 0xd5, 0xf4, 0xd6, 0x02, 0xcf, 0xb1, 0xa1, 0x43, 0xd5, 0xf4, 0xd6, 0x02, 0xcf } },
|
||||
{ "\xc9\xc2\x21\x2a\x31\x57\xc3\x2c\xad\x99\xb9\x03\x6d\xc3\x8d\x8e\xe0\x4f\x88\xef\xe3\xba\x62\xc5\x4e\xf3\x0e\x6b\xa3\x03\xd5\x2f\x11\xa3\xd2\xce\x90\xf5\xe4\xda\x3b\x32\x6a\xdd\x1f\xc7\x91\x20\xb8\xe7\xaa\x6d\xac\x11\x76\xfa\xc2\x4c\xf9\x9b\x61\xf1\xd7\x52\x3d\x0b\xfd\x05\x68\xce\xa1\xfe\x01\x63\x31\xe7\xa3\xcf\x82\xdf\xe6\x2c\x53\x45\x7d\xdf\xff\x91\x2a\xcf\xfd\xda\x21\x91\xe9\xda\xa8\xa1\x28\x28\xc7\x46\x31\x9a\x0a\x5d\x96\x31\x43\xea\x54\xa6\x32\x5d\xdb\x26\xe7\xd2\xab\x2c\xa2\x41\x7e\xc0\xc5\xce\x50\xea\x77\x6b\x31\xf2\xdc\xef\x55\x8a\xee", 137, { 0x41, 0x39, 0x7e, 0xdd, 0x3a, 0x94, 0xe4, 0x70, 0x9e, 0x8e, 0x98, 0x4f, 0x97, 0x69, 0x2b, 0x39 }, { 0x5d, 0x42, 0x73, 0xaa, 0x69, 0x60, 0x0b, 0x40, 0x5d, 0x42, 0x73, 0xaa, 0x69, 0x60, 0x0b, 0x40 } },
|
||||
{ "\x84\x29\xe7\x9d\xf8\x03\xf6\xe0\x29\xd9\x39\x7c\x73\x2c\x82\xce\xa6\x82\x9a\x6d\x6e\x4e\xa9\x12\x90\xa2\x8a\xfb\xe9\xc8\xe2\x58\x08\x68\x34\x58\x8a\x22\x96\x34\xdb\xe3\xcf\x46\x54\xa4\xb1\x2d\x14\xdd\x1c\x67\x83\x53\x22\x29\x00\x32\xce\xdd\xe7\x44\xea\xa6\x6a\x3e\x72\x4f\xfe\x91\xf7\xfb\xd0\xad\xbe\xe3\xd1\xe7\xf8\x0c\xdb\x85\xe3\xbf\xc6\xed\x2b\xe7\xb6\x3e\xe9\x26\xa5\x0e\x9f\x51\x48\x33\x5d\x21\x31\x7a\xe4\x15\x58\xa0\xe7\x7f\x55\x32\x02\xa6\xe1\x78\x74\x69\xb2\x1b\x1a\xe2\xa4\x01\xfb\x1c\x33\x7f\x07\xd6\xca\xf6\xd4\x05\xc1\xd0\xe2\x8c\x0d\xd6", 138, { 0x01, 0x95, 0x92, 0xb6, 0x40, 0x11, 0x75, 0xe6, 0xd9, 0x96, 0x4c, 0xbc, 0x21, 0x87, 0xa1, 0x33 }, { 0x66, 0x3e, 0x8b, 0x02, 0xba, 0xcf, 0xfc, 0x58, 0x66, 0x3e, 0x8b, 0x02, 0xba, 0xcf, 0xfc, 0x58 } },
|
||||
{ "\xb3\x73\x93\xf2\xde\x4a\xf8\xc1\x8c\x0a\xa0\x6b\x0d\x08\xe8\xfd\x8d\xc8\x34\x3f\x6e\x64\xc3\xaa\x30\x0a\xc5\x71\x35\x0c\xdf\xca\xc1\x17\x81\x29\x61\x66\xb2\x54\x52\x9a\xed\xe3\xb8\xee\x6b\x43\x47\x62\xa4\x0f\xc3\x51\xff\x7f\x64\x72\x1a\x12\xd5\xb4\x7a\x1f\x94\xf8\xc7\xc5\x8d\xe8\xb8\xb4\xff\x8f\x3a\xbf\x77\x81\x35\xe2\x9f\x3d\x39\x68\x16\x50\x9b\x28\xac\xbf\xcf\x5c\xfd\x36\x40\xb9\xa1\x55\xe6\x6c\x94\x8b\x5b\xe9\x80\x80\xa0\x4a\xad\xd0\xca\xc0\x63\x39\xc9\xc9\x86\xe9\xbf\x20\xb4\xa2\x5f\x8e\x4c\xdc\xb1\x56\xf6\x44\xa2\x4b\xe7\x3e\x6d\x32\xa5\x88\x8d", 139, { 0x05, 0xe4, 0x41, 0xa6, 0x18, 0x8a, 0x3a, 0x41, 0x29, 0x28, 0x8b, 0x1e, 0x74, 0x2f, 0x3a, 0xba }, { 0x05, 0x1e, 0x35, 0xa9, 0x81, 0x92, 0xe9, 0xac, 0x05, 0x1e, 0x35, 0xa9, 0x81, 0x92, 0xe9, 0xac } },
|
||||
{ "\x38\xce\x73\xe1\x19\xfe\x37\x9f\xf1\x28\x32\x28\x62\x77\x35\xee\xc4\x45\x9f\xe8\x9b\x1f\x8c\x9b\xd0\xa0\x29\x56\xfe\x86\xe9\x8b\x43\x9b\xa2\x5b\xa2\xcc\x5e\x0a\x97\x79\xa6\x2e\x87\x44\x74\x1e\x7f\x7d\xc2\x01\xef\x3c\x7c\x6d\x5a\xf3\xb7\x46\x7e\x1f\xc6\xfa\x88\x8f\x3c\x3b\x43\x97\x8f\x86\xf7\x3a\xc0\xaf\x75\xd9\x2d\xf0\xa6\xbf\x36\x0d\xd5\x49\x76\xa7\x87\x35\xd8\x58\x04\xcb\x44\x2f\x52\x58\xf8\x3e\xe0\xfd\xdd\xe6\x9f\xc7\x30\x3d\x8d\xb2\x55\x48\xf8\xcb\xdc\x15\x21\x9c\x37\x69\xf3\x0b\x9b\xe1\xb1\x67\x86\x76\xe2\x43\xb8\x99\xfb\xc7\x61\x6c\xdc\x8a\xed\xdd", 140, { 0x13, 0x1a, 0x72, 0xe2, 0x15, 0x91, 0xec, 0xc2, 0x05, 0x2d, 0xf2, 0x29, 0x5c, 0xc3, 0x40, 0x7b }, { 0x23, 0x2a, 0x74, 0x5c, 0xb5, 0xb7, 0x04, 0x1e, 0x23, 0x2a, 0x74, 0x5c, 0xb5, 0xb7, 0x04, 0x1e } },
|
||||
{ "\x17\xf6\x8f\xc8\x82\xef\x94\xf8\x42\xdc\xf0\x0c\x5c\x9d\x68\x55\x39\x61\xbe\x9e\x0e\x06\x79\xc1\xa5\xb9\xca\x9d\xcd\x78\x87\x17\x58\x16\xcf\x8c\xbd\x2e\x59\xd0\x00\x05\x53\xb0\x42\x7a\xe1\x83\x6f\xb5\x2e\x70\xb8\xd3\x77\xa1\x92\xd9\x91\x7b\x96\xd3\x3d\xd9\xea\xd6\xdb\x68\x47\xe4\x5f\x5e\xed\x9e\xcc\xa7\x23\xe2\x44\xdc\x63\x10\x8b\x6a\xf9\x79\x85\x50\xd8\x49\x3f\x77\xc9\xb7\xc9\xc7\x5b\x5d\x91\x28\x59\x8e\x07\xb8\xfb\xab\x16\xe6\x82\xc6\x56\xa4\xd1\xa5\x17\x57\x7f\x7d\x16\x3a\x0e\xec\xa3\xc5\xb5\x3a\xdd\x3a\x3d\xa6\x6c\x7a\x1d\x91\x0a\xf9\xe7\xb2\x38\x87\x1e", 141, { 0xa9, 0x5e, 0x6f, 0xfb, 0xa7, 0x76, 0x81, 0xa5, 0x47, 0x9b, 0x80, 0x37, 0x48, 0xb6, 0x59, 0xc0 }, { 0x86, 0xf3, 0x3d, 0x93, 0xc1, 0x65, 0x0f, 0xca, 0x86, 0xf3, 0x3d, 0x93, 0xc1, 0x65, 0x0f, 0xca } },
|
||||
{ "\x1e\x22\xc0\xe7\x7b\x18\x36\x16\x92\x06\x4f\xf3\xab\x66\xa5\x77\x23\xac\x57\x36\x4e\xb6\xa3\xd8\x62\x87\xb2\x0b\x2b\x88\xf6\x42\xcf\xb0\x12\x05\x56\xdf\x34\x24\xa0\x63\xed\x71\x97\xde\x1d\xfb\xc6\x6f\xfd\x87\x29\x47\x16\xa8\xba\x3e\xdc\x55\xc0\x94\x77\x26\xb6\xc1\x66\x39\xc5\xeb\x3a\x85\x73\x6f\x4e\xcd\x0d\xac\xfa\xf8\xff\x1f\x8f\x4c\xba\x77\x90\x1f\x63\x43\x53\x70\x06\x3e\xa5\x85\xd0\xc3\x9c\x6f\x5c\x6d\x4e\x7c\xcf\xf6\x2c\xe8\xf6\xad\x9a\x6f\x4b\x3c\x9a\xbe\x9c\x1d\x92\x02\x3e\x0a\x98\xa0\x08\x09\x07\x16\x0d\xa0\x1a\x4e\x66\x11\x6c\xaf\xd5\xb9\x43\x26\xc8\x43", 142, { 0xc7, 0x48, 0x6b, 0xfe, 0x6b, 0xdd, 0x39, 0x76, 0x61, 0x30, 0x39, 0xab, 0x79, 0x74, 0xde, 0x85 }, { 0xba, 0x83, 0x0d, 0x18, 0x15, 0x5c, 0x63, 0x07, 0xba, 0x83, 0x0d, 0x18, 0x15, 0x5c, 0x63, 0x07 } },
|
||||
{ "\xbe\xf5\x9c\x67\xba\x6d\xe1\xa3\xac\xfe\x8d\x28\x49\x30\xc1\xf3\x2a\xc6\x11\x0a\x4d\x5d\x5e\xbe\x7c\x0f\xaa\x65\x54\x4b\x8c\x12\xb5\x09\x01\xdf\x7f\x26\xb6\x36\xbc\x7c\xad\x8b\xb9\xf7\xfe\x90\x58\x83\x5c\x69\x5a\xe0\x62\xd1\x4a\x61\xf3\xac\xd7\x18\xeb\x17\xee\xe8\x78\xa9\x80\xf3\x29\xac\x39\xd1\x27\x9a\xe5\xbb\xa5\x22\xce\x2b\xaa\x8b\xfa\x8c\xb5\x9c\xd6\x7e\x0c\x79\xaa\xc5\xcd\xfe\x46\x5e\x57\x42\x88\x2f\x84\x42\x45\x5a\x78\x2c\xb5\x0a\xf3\x60\x97\x60\x7c\x43\xcc\x4b\xc7\x4c\x84\x88\xa9\xc0\xa1\x09\x46\x7e\xb7\xde\xe1\x25\xfc\xbc\x30\x52\xe1\x25\xf0\x63\x48\x8b\x04", 143, { 0x96, 0xf1, 0x2d, 0x65, 0x88, 0x47, 0xf1, 0x0b, 0x7b, 0x99, 0x33, 0x16, 0xad, 0x86, 0xe1, 0xca }, { 0x1e, 0x42, 0xd9, 0x58, 0xe1, 0x5a, 0xec, 0xea, 0x1e, 0x42, 0xd9, 0x58, 0xe1, 0x5a, 0xec, 0xea } },
|
||||
{ "\x5a\x40\x2f\x53\x27\x99\x53\x89\x5d\x06\x5f\x3c\xca\xf7\xb0\xd5\xcd\xfe\xe5\xe5\x65\x06\xca\xa8\xb2\xe6\xae\x50\x6d\x5f\xe3\x1e\xa4\xa7\x77\xe4\xda\x0a\x5b\x44\x3c\xd6\x58\x87\x06\xba\x79\xec\xae\x9f\xdb\x02\x04\x76\x1d\x0a\x01\xc1\xcb\x63\xce\x42\x9b\x3d\x99\x97\x0d\x14\x31\x90\xac\x97\xab\x13\x9a\x88\xac\x7b\xc3\x29\x08\x84\x27\xee\x26\x84\xfd\x32\x64\x3a\xb5\xcc\x1d\x3e\x20\x62\x05\xfc\x31\xd5\x35\xda\x0e\x08\x11\xf4\x3c\xa2\x7d\xae\x65\x36\xf5\x05\x3e\xf3\xe3\x7c\xe2\x74\x0a\xbd\x76\x5d\xa8\xea\x11\xe8\x8d\x60\xd0\xa2\xc3\x59\x17\x1b\x9c\x50\xc7\xc1\x7b\xc7\xe9\x42", 144, { 0xda, 0x43, 0x23, 0x3c, 0xfc, 0xdd, 0x80, 0xca, 0x66, 0xac, 0x78, 0xf3, 0x43, 0x92, 0xe6, 0x47 }, { 0x3e, 0x98, 0x28, 0x82, 0xbb, 0x59, 0x28, 0x43, 0x3e, 0x98, 0x28, 0x82, 0xbb, 0x59, 0x28, 0x43 } },
|
||||
{ "\x24\x2e\x20\xce\x15\x2b\x1e\xa3\x39\xf4\x2e\x11\x20\xdd\xb4\xa5\x45\x09\x07\xae\xe9\x9b\xb7\x99\x17\xa5\xfb\xad\x91\x88\xed\x75\x9b\xfc\xa6\xc2\x2e\x0c\xe2\x7d\x25\xb7\xb4\x43\x03\xf4\x1c\x73\x61\xdc\x7f\x7b\x70\xaa\x24\x00\x4d\xa7\x33\xc0\x54\xe3\xef\xe9\xf5\xa0\x62\x43\xbf\x25\x36\x58\xe7\xd9\xd8\xaf\xa9\x52\xaa\x4f\x35\xd9\xf0\xcb\x42\x7d\x14\x41\x2c\xc8\xa8\xb8\x4e\xbd\x3e\xb3\xd1\x52\x82\x59\x42\xa6\x2d\x16\x3c\xa3\xd9\xe6\x07\xb4\x8c\x32\x93\x03\x57\x00\x18\x85\x47\x05\x23\xab\xf6\xee\x41\x36\xe9\x1d\xda\x72\x3d\x12\xa5\xa0\xa5\x58\x5c\x89\x7d\xba\x97\xce\x2d\x4e\xe7", 145, { 0xf3, 0xa5, 0xa6, 0xe7, 0x59, 0x44, 0x8d, 0xb4, 0x15, 0xad, 0xcd, 0x24, 0xa3, 0x79, 0x85, 0xfc }, { 0x53, 0x79, 0x02, 0x32, 0x0a, 0xa1, 0x68, 0xb3, 0x53, 0x79, 0x02, 0x32, 0x0a, 0xa1, 0x68, 0xb3 } },
|
||||
{ "\x3e\x1f\x2f\xe8\xfb\xd1\x02\xa2\x02\xd2\x22\xec\x66\x42\x58\xa4\x82\x0a\xfb\x4e\xe8\x11\x7a\xfc\x4c\x91\xfb\x8f\x38\x31\x25\xf2\xdf\xd8\xa6\x83\xd6\x3f\x39\x7f\xa3\x81\x25\x61\xb0\x37\x29\xd1\xe4\xdc\x1b\x3f\xfc\xec\xec\x61\xa1\xa7\x14\x27\x1d\xf5\xba\x42\xd1\xeb\xde\x4f\xa6\xd9\x63\x80\xef\xdd\x13\xd0\x00\x57\x13\x87\xfa\x24\x6c\xe7\x26\x82\x78\x47\xd1\x28\x25\xd2\xe5\x1b\xb6\x6b\x12\x26\x6b\x2e\x4a\xc3\xfd\x00\xa2\x27\x1f\x9f\x87\x88\x2f\xdf\xff\x67\xe0\x95\x31\x83\x88\x80\x8b\x23\x19\x72\xa9\x10\xe1\xc6\x08\xcb\xc3\xc1\x4a\xd5\x3e\x98\x93\x01\xdc\xf1\xaa\x29\x70\xba\x47\xab", 146, { 0xf6, 0x2a, 0xb9, 0x1a, 0x46, 0x23, 0xc4, 0x1c, 0x96, 0xad, 0x39, 0x85, 0x21, 0xad, 0x47, 0x60 }, { 0xb1, 0xd3, 0x71, 0x64, 0x04, 0xc9, 0xd2, 0x0a, 0xb1, 0xd3, 0x71, 0x64, 0x04, 0xc9, 0xd2, 0x0a } },
|
||||
{ "\x17\x3c\x8d\xa9\xde\xe7\x3c\x70\x85\x4b\xc7\x04\x03\x70\xe5\xf3\xbf\x47\x52\xe2\x33\x96\x88\xe0\xf3\x24\xce\x8d\xdd\x55\x47\x6b\x6d\x7b\x05\x42\xd1\x5a\x6a\x6f\xa0\x22\x0e\xee\x33\x68\x0b\x51\xf4\x50\xe0\x5b\x4b\xfd\x7f\x0a\x2a\xbc\x07\x3d\x26\xcb\xab\x3b\xd2\xa3\x3a\x7e\xe9\xdd\xcf\x34\x4e\xad\xfc\x6e\x4b\xa5\x35\x81\x4b\x70\x85\x86\xa2\xd2\x51\x44\x5f\x4b\x10\xc1\xb7\xc5\xe6\xab\x8b\xc2\x54\xb7\x2f\x8d\x79\x53\x0a\xe6\x82\xcd\x44\x9c\x33\x22\x46\xb6\x18\x4a\x88\xdf\x62\x80\xab\x2a\x2b\x6b\x01\x65\x64\x97\xe5\x79\x43\x7d\xe9\x55\x81\x73\x01\x5f\xca\x8a\x92\x1d\x80\x98\xfc\x53\xfc", 147, { 0xf0, 0x73, 0xd7, 0xe6, 0x4c, 0x6a, 0x7d, 0x0f, 0x48, 0x6a, 0xbe, 0xa4, 0xf5, 0x23, 0x3a, 0xe9 }, { 0x35, 0xa8, 0x2f, 0x98, 0x39, 0x4b, 0x3d, 0x0f, 0x35, 0xa8, 0x2f, 0x98, 0x39, 0x4b, 0x3d, 0x0f } },
|
||||
{ "\x9a\xf2\x44\x62\xb3\xee\x1e\x8d\x2c\xf4\x0d\xf4\xde\x7e\x0f\xed\xb0\xed\x76\x2b\x6a\xf1\xbc\xeb\xb8\x64\xf3\x69\x44\xda\xaa\xf4\x2e\x7b\x50\x3a\x31\xe2\x7e\x05\xec\xff\xbf\x96\xe2\x59\xc2\xa5\x98\x09\x35\xb6\x31\x53\xb9\xe4\xc2\xee\xf6\x6e\xef\x37\xde\x70\x8a\x34\x88\x61\x80\x26\x32\xf3\xe5\x42\xea\xbd\x5d\xb5\x84\xfa\x88\x12\x6c\x9f\x42\x65\xcf\x64\x3b\x03\x1a\x33\xdb\x08\x7b\x9a\x53\xaf\x29\xf5\x9d\x5b\xaf\xd7\x0d\xbe\x0a\x69\x86\xf5\xda\x65\xa1\x57\xf3\xca\x38\x23\x93\x1d\x98\xa6\x2b\x82\xaa\xf8\xa6\x0c\x9c\x4a\x05\xfc\x22\x30\xcb\xa3\x76\x87\x17\x85\x04\x34\x80\xf1\x0c\x71\x86\x77", 148, { 0x67, 0xb2, 0xa1, 0x39, 0x14, 0x79, 0x69, 0xaa, 0xb1, 0x66, 0xfb, 0xff, 0xb6, 0xdf, 0x54, 0xdf }, { 0x25, 0x10, 0x32, 0xb5, 0x41, 0xf2, 0xdb, 0x04, 0x25, 0x10, 0x32, 0xb5, 0x41, 0xf2, 0xdb, 0x04 } },
|
||||
{ "\x5b\x45\xf8\x23\x25\x82\x26\x72\x35\x93\x10\xfd\x0d\x3e\x5a\x55\x93\xfb\xa8\x6a\x7b\x65\xaa\x92\xd4\x4a\x50\x2b\x9d\xc7\xf0\xa6\xbe\xe8\xeb\xd0\x8d\xf9\x7c\x79\xd7\xd5\x91\xb0\x79\x31\x5e\x51\x41\xf3\x96\xd2\xbc\xe5\xc9\x63\xe5\x8a\x34\x92\x27\x93\xd2\x2c\xdc\x5f\x75\xd5\xa1\x62\x1c\x76\x39\xa7\x26\x62\xf1\x95\xb1\x21\xef\x25\xb4\x06\x15\xd5\x0e\x5f\x6e\xb6\x1c\xbc\x3f\x3f\xc7\x42\x02\xb2\xd4\xc3\xd7\x1e\xc0\xdf\x8c\x27\x1e\xa1\x8c\x74\x21\xb8\x07\xcd\x0c\x3e\xf7\xba\xf6\xf8\x20\xaa\x31\x4d\xfa\x2e\xd4\xcb\x45\x56\xd9\xfc\xa5\xf8\xeb\x21\xeb\xd3\x9b\x4e\x5b\xa8\x77\xe4\xa4\x18\xaa\x4f\xe2", 149, { 0x13, 0xb2, 0xe9, 0xf8, 0x80, 0xc8, 0x6a, 0xd1, 0x09, 0x73, 0xcd, 0xd2, 0x73, 0xe7, 0x08, 0x92 }, { 0xd5, 0x02, 0xf8, 0x50, 0x07, 0xb2, 0x6b, 0xf7, 0xd5, 0x02, 0xf8, 0x50, 0x07, 0xb2, 0x6b, 0xf7 } },
|
||||
{ "\xde\x9a\xba\x6c\x55\x8f\x2a\x84\xd6\x9b\x22\xdd\x6a\xd6\x1e\x40\x63\xe1\x42\x03\xd8\x22\xc0\x1f\xd2\xfb\xc1\xe4\x84\xaf\x51\x96\x6f\x39\xb9\xbd\xc5\x05\x35\xac\x80\x9d\x0e\x51\xd5\xf1\xfb\x4b\x54\xd9\x36\x55\xf1\x96\x3b\x7c\xed\x10\xd8\xc8\x38\x90\x12\xc5\xd5\xa6\xa2\x2e\x31\xa2\xf3\x26\x9f\x88\x3a\xee\x84\xed\x4c\x08\xe0\x35\x06\xf1\x71\xc7\xa5\xe1\x87\x5a\xf2\x73\x2b\xeb\xe8\x90\x72\x28\xa8\x4d\xee\x8a\xe4\x8d\x51\xdb\x9f\x5c\xb1\x27\x5b\x10\x2c\x90\x23\x49\x33\x5b\x11\x5d\x3e\x1e\xfa\x8e\x73\x03\xae\x75\xf9\xa3\x35\x20\xf6\x7c\x9d\xed\x59\x8d\xfd\xf1\xbb\xb1\xb1\xbc\xf1\x7e\xa4\xb1\x22\x21", 150, { 0x22, 0xca, 0xc8, 0x57, 0x00, 0x44, 0xa0, 0xa3, 0x48, 0xa2, 0xbf, 0x1f, 0xa0, 0x7c, 0xa7, 0x6b }, { 0x8b, 0x41, 0x42, 0x5c, 0xbc, 0x8a, 0x1f, 0xc4, 0x8b, 0x41, 0x42, 0x5c, 0xbc, 0x8a, 0x1f, 0xc4 } },
|
||||
{ "\xad\xdf\x50\x2b\x40\x73\xd1\xe1\xb2\x85\xef\xe2\x6d\x96\x41\xa4\xe5\xa4\x33\x98\x85\xf6\xe0\x34\xc5\x92\xf7\x4c\x7b\x71\xc4\x4d\xd5\x70\x12\x4f\x64\x30\x40\x3e\x97\xf4\xe2\xef\x71\xab\xc8\xfe\x3d\xfd\x63\xb4\xc8\x6a\xb2\x5b\xf9\xa1\x76\x99\x55\x25\x26\x77\xff\xfb\x57\xd5\x04\x53\x2a\xda\x60\x17\x6f\x3c\xa5\xee\xb1\x0d\x86\x0b\x2b\x56\x35\x8f\x98\x62\x7a\xd2\x4a\xc1\x4d\xdc\x66\x87\x42\x4c\x84\xc5\x00\xc7\xa8\x8a\x30\x59\xd4\xdf\x33\xd3\x53\x64\xe4\x42\x60\xfb\x0d\x9e\x22\x48\x80\xcf\xc7\xe4\x6d\x77\x18\x54\x63\xc2\x4e\x0f\x74\x52\x08\x3d\x09\x5c\x94\xda\xa6\x3f\xf2\x54\x8c\x22\x27\xf1\x1f\xb7\xef", 151, { 0x45, 0x2b, 0xbb, 0x5f, 0x8c, 0x67, 0x2d, 0x66, 0xdc, 0x82, 0x6e, 0x16, 0x87, 0xb3, 0x4c, 0x08 }, { 0xb3, 0x90, 0x91, 0x83, 0x74, 0x1b, 0xf2, 0x29, 0xb3, 0x90, 0x91, 0x83, 0x74, 0x1b, 0xf2, 0x29 } },
|
||||
{ "\xee\xd2\x12\xfb\x52\x7c\xdd\xe7\x02\x9a\x8c\xaf\x4e\xb0\x62\x3d\x98\x51\x8a\x02\x4f\x66\x08\x1e\x40\x95\x0c\xf8\xbf\x75\x91\x89\xed\x54\x34\x04\x28\x57\xb7\x7a\xaa\x81\x33\x47\xd2\x19\xf2\x49\x4d\x78\x65\xc1\x98\x3d\x6a\x96\xdc\x12\x48\x52\x57\xc6\x40\x17\xf8\x26\xab\x32\xf1\x4a\xd9\xb3\x53\xcf\x16\xe4\x3f\xda\x31\x68\x10\x88\xc9\x82\x17\xd2\x33\xde\x10\xb7\x57\x5d\x30\x8d\x16\x2a\x75\x04\x7c\xc9\xdb\xf4\x45\x78\x4c\x2e\x94\xed\x95\x90\xca\xad\x37\x16\x68\x5e\x90\x19\xd8\xbc\x69\xbb\xd3\x6c\xdc\xcd\x7b\x30\xf2\xe9\xf8\x67\x58\x80\x18\x78\xf0\x28\x50\xa5\xb9\x8e\x61\x76\x60\x8a\xcf\x6a\x52\xa2\x98\xef", 152, { 0x89, 0x67, 0x6b, 0x00, 0xaf, 0x6b, 0x2f, 0x6a, 0xe3, 0x85, 0x45, 0x80, 0xb5, 0x3f, 0x9d, 0x6c }, { 0x6f, 0x19, 0xe5, 0x14, 0xa2, 0x28, 0x67, 0xf2, 0x6f, 0x19, 0xe5, 0x14, 0xa2, 0x28, 0x67, 0xf2 } },
|
||||
{ "\x01\x39\x20\x9d\x67\xa2\x8c\x63\x57\x12\x6e\x56\xf4\x84\xd5\xbc\x3a\x5b\x6d\x97\xc3\x16\xcc\x36\x2c\x05\x8a\x3e\xda\xa5\xda\x6b\xd3\xb9\xa7\x3b\xeb\x0f\x76\xc0\x67\x0a\x03\x8c\x1c\x7f\x49\x64\xc9\xca\x04\x80\xc0\xf6\x59\x3c\x25\xd5\x20\x2a\x79\x50\xdf\x50\x53\x2a\xba\x9e\x31\x6a\x6c\xac\x17\x07\xdb\xd3\x5f\x20\xca\xc7\xb8\xdf\x8a\xa8\xf3\xeb\x44\x94\x2b\x6e\x82\x12\xb2\x96\x5b\x05\x2d\x28\x39\xe9\x81\xc2\x20\x29\x69\x8b\x85\x60\xff\x9e\x08\xf5\xeb\xe1\xc8\x82\xd4\x0f\x15\x69\x7e\x9d\x1f\x91\x3f\xd3\x53\xef\x2c\x28\x77\x17\xad\x93\xeb\xfc\x38\x7d\x0a\xcb\x18\x92\x09\x27\xe0\x49\x85\xa2\xb3\x8f\x90\xf6\xd5", 153, { 0xe7, 0x9f, 0x7f, 0x45, 0xb5, 0x9c, 0x3c, 0x2f, 0x1c, 0xf9, 0x84, 0x7a, 0x32, 0x35, 0xb3, 0x80 }, { 0x89, 0x2e, 0x8b, 0xd4, 0x4d, 0x89, 0x34, 0x38, 0x89, 0x2e, 0x8b, 0xd4, 0x4d, 0x89, 0x34, 0x38 } },
|
||||
{ "\x5e\xbe\xcb\xe4\xe5\x99\x70\x5a\xa0\x8a\xde\x58\xfe\x5d\xe8\x32\x8b\x85\x6c\x46\x40\xfe\xcf\x38\x1b\x22\x1d\x99\x59\x33\x52\xec\xc4\xab\x20\x7d\xdc\x69\x6d\xa8\x79\x53\x48\x78\x11\xe2\xdd\x15\x61\xf1\x0a\x88\xf1\x58\xc0\xde\x99\x90\x74\xd4\x3a\xc3\xee\xa2\x44\x6b\x02\xfe\xb2\x6a\xb9\xc4\xb6\x3f\xc2\x90\xe7\x6e\x11\xb8\x3d\x7a\xf3\xa8\x7b\x1e\xe0\xd9\x66\x58\xd9\x56\xb7\xdf\xc3\x45\x2f\xff\x01\xc9\xcf\xf5\xda\xea\x9b\xd8\xef\xa2\xc6\x97\x9e\xe6\x4d\x31\xbd\x26\x21\x2c\xd8\xaf\xcd\xdb\xcf\x02\x98\xd7\x6a\xa3\xec\x3f\x7b\x93\x17\x64\xa8\x6a\x1e\xc1\x61\x1d\x93\xd0\xdf\xd5\xb5\x6b\xb9\x1f\xc4\x13\x2c\x8f\x33\x0f", 154, { 0x11, 0xf8, 0xc4, 0xdc, 0xe7, 0xb5, 0x25, 0xa6, 0x30, 0x58, 0xf0, 0xe6, 0xf7, 0x04, 0x05, 0xc2 }, { 0x22, 0x41, 0x35, 0x66, 0x54, 0xd7, 0x58, 0x10, 0x22, 0x41, 0x35, 0x66, 0x54, 0xd7, 0x58, 0x10 } },
|
||||
{ "\xc2\x7e\x35\x7e\x47\xa0\x47\x69\xf5\xc6\x0b\x2d\xb3\x75\x86\x7d\x42\x9a\x46\x4c\x78\x3d\xa0\xa3\x84\x9c\xfe\x46\xbb\x99\xad\xb0\x20\x99\x58\x77\xe7\x5b\xb7\x37\x20\xff\x10\xbf\x1e\xcc\x58\x12\xcf\x76\xd9\x07\x26\x92\xfb\x6f\xa6\x94\xd8\x5d\x72\xa4\x1d\x87\x02\x22\x58\x6d\x14\x69\xe7\x01\xeb\x1c\x5c\x15\x28\x59\xdb\x2f\x83\x13\x1b\xc5\x9a\xb4\x9f\x95\xbe\xfb\x30\x42\x5b\x6f\x62\x02\xe9\x04\x6a\x40\xeb\x2f\x48\x9a\x1a\x5b\x11\xaf\x79\xb3\x54\xe7\x8b\x50\x48\x10\x3b\x8c\xef\xbd\xe1\x78\xc1\xf6\x9a\x0f\xf9\x60\xe9\x8a\xfc\xab\x05\x16\x9d\xab\xd8\x7b\x16\xe7\x06\x10\xd0\xe8\x8a\xf7\x7b\x8c\x67\x96\x08\x5f\x49\xc5\xb4", 155, { 0x2c, 0x0f, 0x82, 0x44, 0x4f, 0x05, 0xb5, 0xcf, 0x44, 0x47, 0x9b, 0x7b, 0x58, 0x97, 0x65, 0x23 }, { 0x93, 0x0a, 0x79, 0xaa, 0x54, 0xaf, 0x7d, 0xd8, 0x93, 0x0a, 0x79, 0xaa, 0x54, 0xaf, 0x7d, 0xd8 } },
|
||||
{ "\x6d\xd4\x08\xed\x1c\x0d\x8d\xa3\xfd\x1e\x5c\x4f\xee\x02\x96\x3a\x5a\x2e\x62\xd0\xcc\xc9\x49\x25\x11\xa6\x7a\x5f\x71\xf6\xae\xee\x9b\xb7\x43\xc0\x4c\x78\xaa\x49\x86\x7a\xa0\x0a\x8b\x51\x50\x5a\x33\x99\x0c\xf2\xe8\x78\xe2\xbe\x4b\x0e\x26\xb7\x1b\x30\x30\x0c\x9a\xa8\xc7\x9b\x35\x3f\x0a\xff\x31\x18\x2f\x85\x28\xdc\x87\x8f\x39\x29\x88\x51\x05\xb1\xd4\xf5\x2e\x68\xc2\x87\x97\x74\x32\x60\x60\xfa\x54\x67\x96\xd3\xaa\x46\xcf\x8c\xad\x89\xb1\x19\x41\xf2\x0b\x95\xa5\xab\x47\xba\x0a\x74\x65\xdb\x44\x1d\x4f\xaa\x19\x31\x8b\x5a\x47\x11\x2d\xa9\x2e\x11\x92\x30\xab\x3f\x8d\x84\xd2\xf6\x5e\xf7\x16\xf4\x74\x8f\xd2\x8f\x8b\xd8\x67\x1e", 156, { 0xd2, 0x79, 0x38, 0x0e, 0xc6, 0x0e, 0x92, 0x0e, 0x2b, 0xb3, 0x16, 0x78, 0x8d, 0x40, 0xe5, 0xd7 }, { 0xf2, 0xef, 0x3d, 0xcb, 0x0d, 0xbd, 0x25, 0x3b, 0xf2, 0xef, 0x3d, 0xcb, 0x0d, 0xbd, 0x25, 0x3b } },
|
||||
{ "\x38\xa6\x35\x9d\x0c\xe5\x03\x10\xd7\x37\x2a\xdc\x32\x0e\x51\xd5\xec\xf8\x64\x87\x8a\x54\x44\x26\xda\x95\x53\x10\xa6\x00\xb9\x46\x49\x03\xa5\x50\x79\x47\xb7\x03\xed\xdd\x3f\xd5\x4c\xee\x76\xa8\x4f\x0c\x31\xe4\xf6\x4f\xc1\x20\xcf\x6b\xc9\xb4\xd1\xb1\x9c\x9b\x31\xcb\x53\x59\xe5\x1e\x78\xe9\x02\x81\x3c\x42\x29\x3b\x4f\x0d\x41\x72\xee\x9c\xfa\x2c\x42\x18\xca\x38\x48\xd8\x39\x14\x4a\x45\x75\x69\x90\x3a\x20\xe3\x44\x3e\xe1\xfc\x27\x1b\x66\x1b\x88\xdb\xff\x80\x2c\xff\x5b\xc0\xd9\x0d\x80\xc3\xdb\x1f\x31\x4a\x21\xdd\x84\x7b\x40\xa0\xdb\xe3\x7a\x01\x60\xc2\xbc\x81\x8d\x69\x56\x84\xdc\xa1\x35\xb1\x26\xc7\x03\x69\xbf\xef\x5e\x3e\xf9", 157, { 0x15, 0x95, 0xe2, 0x0c, 0x48, 0xbe, 0x3f, 0x17, 0x90, 0x40, 0x33, 0x5f, 0xbe, 0xa9, 0x62, 0x1d }, { 0x8b, 0x81, 0xe1, 0x83, 0x13, 0xcd, 0xf6, 0x7e, 0x8b, 0x81, 0xe1, 0x83, 0x13, 0xcd, 0xf6, 0x7e } },
|
||||
{ "\x16\xe7\xcd\xb0\xab\xeb\x09\x2c\x01\x9a\xb2\x72\x1c\x22\xc5\x87\x8f\x50\xf0\x83\x67\x98\xe9\xd2\xf7\xde\x99\x8d\x00\xed\xfb\x7e\x31\x5d\x06\xa6\xf3\xe5\x77\x66\x10\x78\x5d\x88\x03\xa0\xa1\xf6\x64\x8d\x36\x51\x4c\x6e\xd3\x15\x83\x81\x3d\x0c\xb5\xa2\xb8\xa9\x15\x6d\x5a\xa3\xee\xd7\x9b\xa5\x2b\xc5\xb4\x84\x2e\xf6\x2a\x55\xbf\x26\xc2\x56\xf1\x91\x0a\xda\x38\x3d\xca\x84\xaa\xf7\x1a\x7e\x21\xda\x4f\x3d\x05\x12\x8c\x24\x9d\x9b\x98\xd1\xac\x53\xad\xc8\xaa\xd9\x46\x28\x91\x8c\x94\xd4\xc7\xdb\x79\x25\xdc\x39\x26\x3e\xc2\x8c\x39\xb0\x8a\x9f\x8e\x99\x1e\x79\x8a\x2c\x49\x7a\xf5\xd4\x5b\x3c\x94\x2c\x4c\xf1\x7e\x70\x29\x02\x93\x19\xaa\xc8", 158, { 0x3e, 0x3b, 0x75, 0xd1, 0x06, 0xc0, 0xc5, 0x7f, 0x70, 0x80, 0xd3, 0xd5, 0x8e, 0x01, 0x99, 0x0d }, { 0x5d, 0x5a, 0x9a, 0xfe, 0xe6, 0x62, 0x13, 0x7d, 0x5d, 0x5a, 0x9a, 0xfe, 0xe6, 0x62, 0x13, 0x7d } },
|
||||
{ "\x33\xc7\x82\x61\xe4\x76\x52\x8e\x8a\xe8\xdf\xb0\xfc\x6e\xda\xa1\x3e\xca\x88\x80\xc7\x51\xd9\xf8\x89\xfd\xdd\x94\xc7\x17\x27\xd0\xc0\x37\x34\x75\x1c\x09\xae\x17\xbd\xf0\xf1\x13\x7b\x47\x50\xf6\x61\xc7\x22\x7f\x95\xa9\x22\xb5\xbe\xcb\x6f\xfd\x73\xc1\x85\xd5\xe9\xcd\x8b\x43\xea\xdd\x49\x03\x19\x47\xcf\xde\x7a\x15\x72\x74\xc5\x9d\x68\x44\x09\xd2\x6f\x60\x70\xd4\x46\xd6\x2d\xd1\x55\x41\x49\x5c\xb9\xca\x70\x9c\x32\xc3\x4c\x6d\x68\x25\x0c\xc9\x94\x20\xa1\xef\x36\x6e\x81\x4f\x69\x19\x3a\x28\xd5\x82\x62\x13\x7b\xd1\x70\x4c\x9d\xe1\x22\x87\x6b\x5c\x3e\x6a\xff\xe4\x9a\x51\x83\x00\x1e\x02\x6c\xff\xee\x85\xbb\xfe\xfe\x12\x60\x62\x3c\xb1\x0a", 159, { 0x58, 0x73, 0x7b, 0x44, 0x83, 0xfd, 0x8f, 0x9d, 0x40, 0x36, 0xbb, 0x54, 0xf7, 0xdc, 0xa7, 0x1e }, { 0xbd, 0x8f, 0x8c, 0x43, 0xbf, 0x83, 0xe8, 0x1b, 0xbd, 0x8f, 0x8c, 0x43, 0xbf, 0x83, 0xe8, 0x1b } },
|
||||
{ "\xf5\x26\x8c\x0d\x40\x28\xdb\xaf\x34\x0e\xa4\x6e\x23\x0e\x10\x35\x7e\xbf\x3b\x46\xb7\xd2\xb6\xc1\x19\x97\xf7\x43\xdb\x8f\x92\x13\xfe\xa4\xa6\x74\x0c\xb7\x48\x6c\xa3\x09\x5a\x9e\x35\x88\xf1\x67\x44\xa5\xfd\x54\x25\xde\x01\x2a\xd5\x0c\xeb\x19\x16\xff\x4e\x83\x86\xab\xad\x82\xc4\xb5\x3a\xac\x2b\xa6\xd1\xdf\xb3\x88\x14\x43\x8f\x03\x44\x3f\xd7\x11\xe9\xbc\x7b\xac\x7e\x21\x18\x1a\xea\x77\x4a\x80\xa0\x86\x60\xac\x3b\x0e\x6e\x59\xdb\x5e\x49\x1a\x84\xd5\x56\x38\x77\xd2\xe6\x67\x42\x48\x3b\x95\xa3\x5b\xd8\xfc\xd9\xed\x66\x39\x15\x1a\xe7\x8b\x89\x18\x23\x2c\x03\xfa\x71\x8b\xf5\x08\xc4\x74\xa7\xd9\xdf\x4f\x64\x01\xe2\x35\x7e\xfa\x79\xeb\x1c\x4a", 160, { 0xc4, 0x67, 0xa0, 0x07, 0xfa, 0xd7, 0xa5, 0x5c, 0x75, 0x61, 0xcb, 0x22, 0x0a, 0x6c, 0x37, 0x67 }, { 0x1f, 0x6d, 0x8f, 0xab, 0x7c, 0x51, 0x50, 0x9a, 0x1f, 0x6d, 0x8f, 0xab, 0x7c, 0x51, 0x50, 0x9a } },
|
||||
{ "\xe2\xb6\xfd\xa5\xb9\xad\xc3\x1f\xd3\xd5\xe5\x12\x01\x35\x17\x56\xd1\x57\x3e\x5c\xa3\xd6\x8e\x37\x50\x72\xd1\x03\x46\x49\xbe\xa9\x7f\xfc\x19\x18\xca\xd8\xb9\x53\x03\x9b\x8e\x1c\xee\x49\x20\xb6\x99\xef\xf1\xe0\xd2\x77\x19\x5f\xa3\x12\x0a\xf4\x73\xc8\xa2\xd8\xff\x34\xec\x7f\x1c\xad\x87\xb9\x5c\xe8\x3f\x0e\xeb\x5c\xe5\x96\x7c\xe3\xd0\x11\x08\xb4\xdd\xab\x1a\x27\x00\x90\x0d\xa3\xc0\x32\x29\xc9\xe6\x45\xc3\xba\x7b\xda\x1a\x4b\x2e\xd5\x67\x72\xca\x32\x90\x8d\xe1\xe8\xab\x78\xcb\x1d\xbe\x84\xd4\x7e\x72\x26\x36\xbb\xaf\xa0\x5a\x0e\x3b\x44\x61\xbd\x1c\x21\xd6\x61\x3b\xc7\x30\xab\xb8\xb2\x2d\x59\x9d\xf5\xf1\x47\xbb\x4c\x9e\x32\x40\x47\x35\xf0\xb7", 161, { 0x0b, 0xf7, 0x7d, 0x7f, 0x0a, 0x39, 0xc4, 0x60, 0xbe, 0xaf, 0xc0, 0x96, 0xa5, 0xff, 0x8f, 0xf1 }, { 0x5e, 0xc7, 0x0e, 0xa7, 0xfc, 0x4c, 0xca, 0x5c, 0x5e, 0xc7, 0x0e, 0xa7, 0xfc, 0x4c, 0xca, 0x5c } },
|
||||
{ "\x88\x11\xda\x74\x63\xaf\x60\x31\x13\x2e\xbe\xa3\x68\xea\xc4\x8d\x3e\xf6\x12\xda\xfb\x65\xba\x02\x32\x44\x16\xa9\xfd\xa5\xc5\xb6\xf6\xab\x8e\x76\xb8\x80\x11\xf9\x47\x02\xb6\x04\x74\x0a\x6c\x3c\xd2\xe1\x3b\xf6\xdd\x35\x44\x8a\x4c\xbf\x2f\xa1\xb3\x4e\xf8\xb1\x11\x94\x41\xe7\xaf\x9a\xef\x9b\x54\x52\x3a\x7d\xce\xe6\xc4\xe6\x73\x3e\x2b\x19\x58\xeb\x23\x9d\x40\xde\x9f\xa8\x0c\x47\x1b\xff\x64\x82\x70\xd8\xdd\x97\x8b\x93\xd8\x7a\x91\x51\x40\xa4\xb5\x4f\x34\xa0\xeb\x70\x91\xb0\x8a\xfd\xc4\x54\x59\x05\x32\xfe\xed\xa3\x57\xe2\x34\x42\x8a\xa6\xb0\xa4\x43\x43\xf9\x6b\x07\x87\x43\x17\x63\xcb\x26\xa0\x6d\x08\x22\x75\xb1\x82\x89\x40\xb1\x65\x0b\xdd\x88\xcc", 162, { 0x86, 0xaa, 0xe8, 0x45, 0x7b, 0xe3, 0x52, 0x3f, 0x2a, 0xc0, 0xe1, 0x80, 0x81, 0x90, 0x1c, 0xd4 }, { 0x20, 0x53, 0x15, 0xaa, 0x27, 0x9b, 0x6d, 0x8a, 0x20, 0x53, 0x15, 0xaa, 0x27, 0x9b, 0x6d, 0x8a } },
|
||||
{ "\x97\xe4\x99\xa8\xb4\x28\xd5\x30\x0a\xc4\x3f\x53\x62\x0c\x1c\x2a\x9b\x6f\x35\x57\x0d\x7f\x67\x88\xdb\xb2\x2e\x93\x8b\x08\x58\xcd\x4d\x6c\xcd\x0c\x72\xbb\xfa\x92\x56\xbc\x98\x03\x96\x7f\x58\xd8\xb8\x78\x9c\x76\x3f\x30\x7b\xa6\x95\x51\xdf\x2d\x21\xff\xac\x9a\x22\xc6\xa0\xfc\xa5\x3d\x19\x8c\xae\x6f\x04\x46\x5a\x2d\xac\xb9\xee\x95\x98\x36\x57\xda\x78\x47\x27\xe7\xb7\xea\x12\x7f\xa2\x92\x3a\xfb\x6b\xef\x50\x03\x0f\x28\x83\x60\xf5\x79\xb2\x9c\x04\x64\x27\x80\x02\x92\x5d\xac\x0b\xac\x9d\x58\x32\x6e\xac\x34\x67\x7a\xcf\x49\xf0\xe9\x27\xeb\x19\xf8\x21\xfa\x8a\x94\x29\x0a\x66\xc7\xf3\x9f\x96\x57\x7a\x63\x7b\x46\xf2\x10\x83\x60\x4b\xfd\xdb\x5c\x09\xda\x4f", 163, { 0x91, 0xe3, 0xcc, 0x45, 0x80, 0x51, 0x06, 0xb8, 0xff, 0x87, 0x94, 0x3a, 0x05, 0x8e, 0x09, 0xdd }, { 0x33, 0x01, 0x31, 0x06, 0xaf, 0x11, 0xf8, 0x0a, 0x33, 0x01, 0x31, 0x06, 0xaf, 0x11, 0xf8, 0x0a } },
|
||||
{ "\x40\x93\x11\xe7\x5d\xf7\xcb\xa0\x03\xc3\x71\x14\x00\x85\x1d\xca\x3d\xad\xac\x24\x89\x8c\x63\x92\xa5\xf4\xe9\x82\xca\x1e\x9b\xb7\xd8\xac\x44\xa9\xeb\xd3\xc3\x38\xe9\x74\x2a\x59\x71\x39\x5f\xf3\xed\xf6\x31\xaa\xec\x21\xa0\x05\x77\x4d\x54\xe7\x4b\x58\x4d\x0b\x64\x4d\x76\x26\x8a\x56\x35\xdd\x37\x5c\x83\x55\xaf\x8d\xc1\x27\x10\x44\x6a\xe7\x9e\x26\x72\x10\xd3\xfc\xea\x6e\xa3\x8d\xc8\x72\xbe\xf4\x63\x61\x9a\x78\xbf\x49\x1c\xb9\x13\x60\x35\xc7\xed\x98\xd7\xd1\x51\x23\x2a\xeb\x96\x43\xca\xa9\x64\xa2\xcc\x86\x62\xd0\x2c\x57\xa4\x93\xdb\x9f\x93\x28\xef\x68\x46\xfc\xea\x0a\x06\xf3\xad\x94\xe8\x2d\xe5\xbe\x08\x5a\xff\x04\xfb\xe0\xb4\x9a\x2d\xd8\x26\xd7\x22\xc1", 164, { 0xbb, 0xdb, 0x8d, 0xb7, 0x8e, 0x68, 0x24, 0x05, 0xda, 0xb9, 0xed, 0x38, 0x37, 0x35, 0x8b, 0xb8 }, { 0xc5, 0xb5, 0xa1, 0x1d, 0x07, 0x20, 0xb3, 0xb9, 0xc5, 0xb5, 0xa1, 0x1d, 0x07, 0x20, 0xb3, 0xb9 } },
|
||||
{ "\xa0\x00\x91\xdc\xb7\xe4\x48\xb4\x83\x00\xbc\xea\xf9\xbf\x54\x3f\xa1\x49\xac\x18\x08\x0d\x3a\x09\x40\xe8\xe8\xb7\x3b\xba\xa1\x56\x45\x04\xdb\xcd\x76\xa3\xe6\xb6\x25\x95\x6d\xb2\x94\x6f\x21\xb3\x0c\x92\xbf\xc1\x51\x77\x58\xf9\xe3\xe3\x3b\xf5\x44\x5b\xe2\x0a\xf7\x93\xba\x9a\xc6\x57\xd2\xbe\x3a\xde\x38\xe1\xe5\x32\xc0\xd4\x86\x81\x6b\x21\x2e\xfb\xa1\x4c\x18\x33\x17\x97\xd0\x9d\x6b\xe7\x79\x82\x39\x2c\x6c\xee\x04\xbb\x87\x0c\xb3\x3d\xaf\xe6\xb7\x46\x32\x73\x50\xe8\x44\x81\x61\xce\xea\xd7\x71\x0b\x14\xb0\xec\xa0\x83\xe2\x3d\x4b\x95\x77\x1d\xfa\x37\x79\x72\xbf\xbc\x29\x0e\xfb\x30\xa4\x7a\xd5\xf9\xbf\x8b\x76\x63\xc2\xff\x3f\x6a\x35\x9f\xce\x46\x97\x39\x68\xeb", 165, { 0x21, 0x73, 0xa9, 0xca, 0x0e, 0x65, 0xf1, 0xb2, 0x2b, 0x2d, 0x08, 0x94, 0x28, 0xe2, 0x19, 0xd7 }, { 0x17, 0xaa, 0xf1, 0xc4, 0xd7, 0x12, 0x91, 0x3f, 0x17, 0xaa, 0xf1, 0xc4, 0xd7, 0x12, 0x91, 0x3f } },
|
||||
{ "\x87\x1a\xe5\xf3\x6a\x1c\x99\x37\x34\x5e\x4f\x17\x3f\x08\x4e\x48\x2f\x50\xb9\xd5\x7c\x51\x82\xe4\xec\x49\x1a\x49\xfd\xf5\xd1\xe6\xac\x0b\x63\x91\xbf\x15\x1b\x6d\x53\x50\x7c\x95\x45\x07\x22\x4d\x1e\x87\x3d\x83\x6a\x59\x39\x82\x0c\xcb\xc6\x6e\x89\x81\x15\xe2\x2e\x22\x1f\xd0\x87\x70\x03\xd8\x2d\xcd\x5f\xf9\xe7\x7c\xbf\x77\x26\x9e\x78\x35\x3a\x46\x67\xf8\x8d\x25\xe3\x40\x6f\x54\xd4\xa3\x0e\x51\x07\x3d\x24\xe1\xb8\xf4\x5b\x70\xd5\xc5\x36\x0e\xcf\xf8\xc5\x90\x1c\x24\xa6\x02\x8e\x58\xe8\x67\x45\x5c\x2a\x13\xc4\x56\xde\x61\x47\x0d\x08\x75\xb5\x8e\x9e\xcb\x68\x60\x56\x64\xe3\x74\xef\x2f\xd8\x6d\x8c\x42\x5c\x8f\x29\xef\xb8\xb3\xe2\x6c\x8f\x14\x47\x00\xc0\xa9\x87\x5e", 166, { 0xc8, 0x6f, 0xef, 0xfd, 0xe2, 0x27, 0x40, 0x55, 0xbd, 0x7a, 0x17, 0x5b, 0x20, 0x81, 0xca, 0xa7 }, { 0x6e, 0x08, 0x8e, 0xe3, 0xca, 0xea, 0x61, 0xc9, 0x6e, 0x08, 0x8e, 0xe3, 0xca, 0xea, 0x61, 0xc9 } },
|
||||
{ "\xa6\x89\xa7\x1b\x32\x15\x7d\xd3\x48\x25\x3e\xd5\xf9\xb8\xaa\xa2\x51\x38\x92\x84\xef\x86\x94\x39\x95\xa1\xfd\x79\x47\x84\xab\x7b\x09\x83\x82\x26\xad\x00\xba\xbe\x21\x8c\x53\x8d\x62\x5b\x1f\x39\x37\xa3\xe9\x79\x0e\xdd\x86\x13\xc4\x5b\xc6\x89\x32\xe1\xc5\x3a\xf9\xa2\x5d\x0a\x4e\xd9\x42\x97\x3a\x67\x67\x3a\x7c\x1e\xd7\x12\xb2\xa6\x5c\xc3\xe8\xdc\x9b\x82\xe2\x2d\xf1\x03\x78\xf7\xda\x06\xf5\x19\x18\xc8\x34\x9a\x4d\x47\x2a\x9b\x20\xc9\xee\x6c\x88\xfa\x41\xcb\xff\xbd\x0d\x2d\x89\x76\x82\x7b\xc7\xb0\x1e\xb3\x65\x18\xba\xb0\xdd\x7e\xb1\xab\x24\xf7\xd4\xe3\xcd\x3d\xfb\x12\xaf\x07\x58\x4f\xf1\x4d\x37\x51\xef\x69\xdb\x4f\x42\xe9\x21\x4d\xa1\x8f\x67\x8d\xf6\x84\xb5\x69\x56", 167, { 0xb7, 0x6a, 0xcd, 0xf6, 0x31, 0xb2, 0x7d, 0xe8, 0x95, 0x9c, 0xcd, 0x89, 0xc9, 0x5b, 0x66, 0xec }, { 0xc2, 0xfd, 0xb2, 0xc6, 0x79, 0xb7, 0xa8, 0x9f, 0xc2, 0xfd, 0xb2, 0xc6, 0x79, 0xb7, 0xa8, 0x9f } },
|
||||
{ "\x95\xe6\xe0\xdd\x99\x41\xbc\x13\xa2\x23\xfc\x08\x64\xc6\x17\x45\xc7\x1b\xcd\x32\x5a\x14\x02\x54\x16\x38\xbf\x60\x73\xc7\x67\x49\x53\xe8\x85\x27\xd2\x03\xab\xd0\xaf\x42\x30\x76\x04\xde\x82\x76\x60\x0d\x54\x99\xe9\x07\x54\x12\x96\x13\x5c\x3c\x9a\xdf\x07\xbb\xd7\x86\x08\xa5\x30\xeb\x55\xcd\xe9\x50\x69\x25\x75\xbc\x68\xf3\x7f\xf4\x94\x35\xac\x37\x21\x94\x50\xb6\x48\xd4\xed\x82\xc0\xb0\x04\x2e\xd8\x36\x6e\x35\x10\xee\xd4\x01\x7c\xb7\xd8\x9c\x6b\x70\x28\xdf\xdd\x06\x8c\xe5\x62\x74\x91\xbd\x70\xc3\x63\x56\x2e\x00\x44\x27\xf4\x09\x5f\x66\xae\xd3\xea\x6f\xe8\x9b\x13\x2f\xa5\x41\xe2\x9e\xa6\x00\x60\xee\xa7\xe8\x7d\x36\x3d\x8f\x18\x47\x17\x48\x1e\x14\xd2\xc4\xf4\x8e\x0d\x95", 168, { 0xde, 0xb6, 0x05, 0x1b, 0xcf, 0xe9, 0x0b, 0xdc, 0x55, 0xae, 0xf7, 0x91, 0x1a, 0xa0, 0x9c, 0x30 }, { 0x93, 0x90, 0x6e, 0xe9, 0xed, 0xbc, 0xad, 0x39, 0x93, 0x90, 0x6e, 0xe9, 0xed, 0xbc, 0xad, 0x39 } },
|
||||
{ "\xaa\x23\x22\xf0\xc5\x6d\x85\xc1\x11\x3b\xdf\x7d\xbd\x84\xee\xa0\x95\xf4\xbd\x14\xc0\x03\x17\xb5\x23\x7c\x87\xcf\x25\xa7\xfb\x5a\x73\x18\xda\x9c\x90\x7c\x1d\x18\x12\x99\x9f\x59\x58\x86\xbc\x2e\x77\xb9\x28\x66\xd3\x7f\x56\x11\x22\x94\x98\x70\xe1\x31\x78\x01\x37\xde\x52\x69\x6b\x5f\x07\x9f\x74\x59\xac\x9b\x38\x2f\x57\x24\x38\xad\x92\x91\xef\xe0\x47\x77\x63\xab\xb7\x7d\x07\xf9\x0f\x1f\xa4\x79\xd7\x36\x1c\x67\x1a\xdd\xd4\x51\x49\xd9\x38\x57\xd6\x4c\x6e\x1b\x6d\x42\x5c\x05\x5c\xfd\x56\x31\x37\xd9\xdb\xe4\xa7\x31\xac\x85\x16\xd8\xba\x20\x24\x55\x89\x60\x38\xe5\x29\xa9\x68\x45\xfe\x02\xd8\xcb\x14\x23\xe0\x1c\x7f\xfe\x71\x92\x13\x72\x4a\xa8\x56\xcd\x42\x3e\x2a\x9c\x07\x73\x29", 169, { 0x5e, 0x9a, 0x39, 0x8c, 0x7b, 0xd5, 0x00, 0xcb, 0xc5, 0xd4, 0xd0, 0x89, 0x96, 0x5b, 0xff, 0x19 }, { 0xf2, 0x82, 0x97, 0xbc, 0xd5, 0x6b, 0x65, 0x55, 0xf2, 0x82, 0x97, 0xbc, 0xd5, 0x6b, 0x65, 0x55 } },
|
||||
{ "\xeb\xdf\xa9\xd2\x11\x4a\xd2\xf1\x4c\x13\x20\xb8\x28\x30\x45\x50\x81\x1d\xb7\xcb\xf6\x53\x04\xd0\x3f\xee\x27\xfe\xfd\xb6\x34\xa0\x83\xc1\x0b\x6b\x91\x14\xa1\x4d\x59\x96\xb9\x64\x26\xb9\xc3\x73\x1c\x63\x61\x2a\x77\x0e\xe3\x84\x79\x8d\x6f\x29\x94\x91\x62\x66\x46\x04\x42\xae\xbb\x77\x66\xcb\xb1\x02\x9f\x58\x72\xae\xa9\xf1\x8a\x18\xd1\xa8\x2b\xec\xfa\xff\x47\xb9\xac\x83\xf3\x9f\x91\x3a\x47\x17\x17\xb3\x71\xa2\x77\xe6\x20\x25\xdb\xcf\x02\xaa\x80\x7a\x39\xa1\x5d\x3f\x28\x98\xe7\xa7\xbc\x29\x18\x0f\x0e\x30\x68\x98\xa3\xe0\x8d\xf3\x60\xd3\xc6\xef\x17\xf5\xff\xe3\x59\xc1\xe2\xd4\xbf\xce\xbb\x90\x71\x64\x78\x88\x59\x2a\x73\xe6\xe2\x86\x99\xe4\x91\x63\x68\xac\x96\xbf\x58\x57\xaa\x5d", 170, { 0x37, 0x33, 0x1b, 0x06, 0x76, 0x0d, 0x13, 0x1e, 0x80, 0x3d, 0x91, 0xa4, 0x65, 0x7d, 0x68, 0xa5 }, { 0xa6, 0x12, 0x6d, 0x95, 0xc1, 0xbe, 0x4f, 0xfc, 0xa6, 0x12, 0x6d, 0x95, 0xc1, 0xbe, 0x4f, 0xfc } },
|
||||
{ "\x59\x07\x13\x5e\xb1\x65\xd7\x6b\x44\xa5\x99\x5c\xba\x6a\x74\x3e\x84\xd0\xcf\xeb\xd2\x82\x88\xaa\x76\x17\xf9\x0f\xd9\x8a\x99\x75\x99\x50\x80\x39\x3c\x75\x74\x89\xbb\x5a\xc8\x80\x12\x12\x79\x91\xf1\x52\x15\xad\x42\x77\xd6\x52\xd5\x0f\xb2\x5a\x1c\x64\xb3\xd4\xed\xac\xb1\x31\x6f\xe8\xa0\x77\x5c\x61\x9c\xa7\x77\x75\xe6\x0d\x16\x38\x85\xdd\x2f\xe4\x2a\x5b\xc7\x16\x1c\x87\xe7\x4e\x50\xa1\x57\xbc\x9a\xcf\x24\xab\x5b\x16\xea\x08\x02\xa5\x22\xbd\xa6\x33\xfd\xe6\x9d\x9f\x7a\x2d\x01\x4f\x96\x53\x5c\xc8\xfe\xd6\xc5\x63\x73\xbe\xb9\xad\x20\xc6\xc3\xab\xc5\x1e\x12\xe3\xe2\x62\x22\xbf\x69\x36\x4d\xf3\xa7\x08\x1f\x69\xef\x8a\x89\x76\x6b\xdb\x01\x7a\xfc\xb0\x07\xc6\x25\xb6\x89\xb4\x8e\x70\xc7", 171, { 0x4c, 0xc6, 0x7d, 0x17, 0x8d, 0x1b, 0xac, 0x28, 0x83, 0x9e, 0x32, 0x54, 0x3d, 0x15, 0x9e, 0x82 }, { 0xc4, 0x16, 0x73, 0x7e, 0xf3, 0x51, 0xa9, 0x5a, 0xc4, 0x16, 0x73, 0x7e, 0xf3, 0x51, 0xa9, 0x5a } },
|
||||
{ "\x9e\xd1\xa4\x71\x3d\x0c\x2b\x50\x69\x84\x67\x39\x21\x50\x37\xde\x45\xc0\xc4\x87\x40\xa3\xf0\xf9\xc2\x2f\x18\x67\x5e\x2b\xcd\x47\x41\xe9\x3c\xeb\xdc\xcd\x91\xc6\x67\x12\x9f\xd4\x4a\x48\xe6\x05\xaf\x21\x78\x2e\x7b\xf3\x39\x01\xef\xd6\xcf\xdb\xa1\x61\x52\x13\xae\x9c\xde\xfb\x6c\xc1\xd6\x2d\xda\xcf\x99\xb0\x67\x3f\x4b\x51\xe8\x8b\xc5\xc3\x3c\x61\xa9\x46\xb6\xea\x8b\x34\x1b\xf7\x08\x1f\x98\x75\x2f\xdb\xca\x32\x3d\x04\x3d\xd0\x36\x06\x57\x07\xba\x77\x54\xa6\xd3\xba\x5d\xd9\x12\x0a\x46\x7f\x37\x45\x0d\x04\x6b\x37\xe6\x5d\xd9\x7f\x2f\x40\x4f\x49\xa9\x62\xbb\x11\x10\x4e\x23\xf2\xbc\x12\xd3\x93\xfb\x6b\xdc\xd6\x1f\x37\x26\x36\x3d\xd8\x56\x92\xec\xaa\xc7\x74\xea\x08\x2d\xda\x44\x60\xd5\x5d", 172, { 0x73, 0x78, 0x8c, 0x1d, 0xaa, 0x21, 0x86, 0xd8, 0x46, 0xde, 0x21, 0x97, 0xe5, 0x4a, 0xf4, 0xde }, { 0xaa, 0x34, 0xdf, 0xed, 0x55, 0x46, 0xf6, 0x7f, 0xaa, 0x34, 0xdf, 0xed, 0x55, 0x46, 0xf6, 0x7f } },
|
||||
{ "\xab\xe6\xa1\x9a\xcd\xde\x56\x7f\x8d\x19\x5d\x91\x99\x9b\x6e\x28\xa4\x5b\x8a\x34\xb7\x0c\x0d\xd4\x0b\x22\xe3\x23\xf1\x31\x8f\xd2\xcb\x0a\x93\xc5\xbe\x04\x76\x70\x20\x76\x3f\x79\xb4\x56\x07\x76\xa3\xc5\xa6\xb7\x2b\xcb\x3e\x1c\xc6\xf3\xfb\x47\x4e\x0e\x1c\xf7\x7a\x93\xc0\x00\xde\xe3\xc4\x6d\xe0\x1d\xe0\xcd\xe1\xbc\x5e\x6a\xbd\x96\x84\x6b\x07\xbf\xa1\x9e\xba\xf2\x60\x00\x3b\xa9\xf2\xac\x30\xe9\x2a\x11\x97\x73\xf6\x40\x91\xa9\x95\x96\x26\x94\x63\x78\xff\x27\x35\x3b\xdd\x00\xcb\xc9\xed\x7c\xfd\x71\x05\xb7\x61\x77\xb7\x9b\xb0\x89\x61\x81\xab\xce\x4d\x2f\xb4\x27\xd4\x4e\x66\xe7\x40\xe6\x2b\xac\xc4\x3f\xa7\xe2\x44\x9f\xc0\x97\xf2\x79\x67\xd2\x71\xee\x3d\x6d\x55\xad\xd2\x37\x1b\x8a\xa4\xea\xae", 173, { 0xac, 0xc6, 0xe5, 0x26, 0x4c, 0x66, 0x0e, 0x55, 0xb2, 0x1c, 0x04, 0xa9, 0x2f, 0x71, 0x7b, 0x2c }, { 0xfd, 0xf8, 0x63, 0x3b, 0xb7, 0x05, 0x50, 0x42, 0xfd, 0xf8, 0x63, 0x3b, 0xb7, 0x05, 0x50, 0x42 } },
|
||||
{ "\x48\x6d\xa5\xd9\x06\x34\x46\xf9\x85\xc4\xd1\x21\x0b\xb9\x48\x71\x47\xc2\x67\x3c\xe1\x68\xb1\xc6\xcb\xc5\x14\x7d\x76\x50\x92\xa1\x55\x55\x21\x65\x7c\xc8\x20\xaa\xf3\x1f\xa1\x87\xfa\x63\x30\x58\x7e\xd3\x34\xef\x75\x1a\x2e\x0f\x77\x77\x9d\x6f\xde\x5a\x9c\xd4\x64\x97\x70\x52\x34\x51\x27\x7b\x1b\x4e\x84\x2a\x89\xd4\x85\x54\x76\x26\x4e\x60\x6f\x65\x4b\x83\x1b\x26\x4b\x76\x05\x67\x84\x86\xdb\x5c\xff\x5c\x12\xdf\x1a\xb0\x1e\xc2\x05\xd6\x18\x0f\xa3\xe9\x64\x5c\xb6\x4a\x18\x55\x51\x86\xcc\x3e\x0f\xce\x20\xf0\x5e\x17\xff\x54\xab\x03\x00\x74\x11\x69\xbb\x17\x51\x3f\x55\x6c\x9a\xa0\x73\x7a\x9f\x7c\x99\xf3\x28\x86\xa8\xed\xa9\x83\x1e\x5f\x40\x98\x71\xdb\xcf\x0d\x04\x44\x38\xd8\xf6\xfb\x00\x22\x03\x7b", 174, { 0xaf, 0xfd, 0xff, 0xf3, 0xf4, 0xcf, 0x2e, 0x00, 0x2d, 0xe2, 0x5d, 0xd8, 0xdb, 0x8d, 0x26, 0xe6 }, { 0x32, 0xc3, 0x6e, 0x46, 0xf6, 0x82, 0x78, 0x6b, 0x32, 0xc3, 0x6e, 0x46, 0xf6, 0x82, 0x78, 0x6b } },
|
||||
{ "\x54\x42\x6e\xff\x48\x28\x12\x5b\x31\x4c\xdd\xde\x77\xc3\x5e\xe3\xc3\x29\xea\x5a\x0f\x68\xdb\xf0\xc4\xc6\x98\x31\x94\x76\x7b\xd8\x75\x0d\x0a\xfd\xa5\x65\x08\x7d\xb8\x53\x63\xa9\x1d\xee\x4e\xe2\x49\xc2\x5a\x98\x00\x45\x74\x2f\x76\x46\xe3\x31\xe9\x0b\xb1\x74\x59\x23\xfd\xf2\x38\x8a\x9d\x0f\xb1\xf4\x38\x36\xd1\x09\x1f\xca\xb8\x04\x27\xeb\x27\xfb\x6c\x99\xb0\xcd\xe8\x01\x0b\x10\x38\xad\xad\x5a\x07\x4f\x49\xa3\xd5\xf9\x01\xe5\xb9\x8e\x7d\xeb\x88\xa8\x6e\x7e\x5f\x06\x07\x4c\xde\xc1\xfd\x16\xa3\x58\x15\xc7\xf8\x0f\xd4\xe0\x73\x8e\x1c\x80\x3d\xaf\x1b\x85\x8a\x93\xe0\xa5\x77\xae\xaa\x91\x73\xf5\x2b\x3f\x20\xa8\x58\x63\xb4\x0b\xff\x0c\xe6\x47\xa8\xd9\x71\x68\x4d\x55\xd6\x8d\xae\x80\x56\x47\xf7\xdf\x08", 175, { 0x52, 0xbd, 0x6a, 0x3d, 0xf1, 0x03, 0x96, 0x7b, 0x7c, 0x9c, 0xb2, 0x19, 0x26, 0x22, 0x84, 0xac }, { 0x39, 0xa0, 0x5c, 0xe6, 0x57, 0x6c, 0xd9, 0x53, 0x39, 0xa0, 0x5c, 0xe6, 0x57, 0x6c, 0xd9, 0x53 } },
|
||||
{ "\x5c\x74\xc0\x16\xf2\x36\xda\x03\x00\x16\x65\x64\x34\x42\xb3\xca\xc5\xdf\x00\x40\xfe\xf4\xb9\xef\xd4\x05\xdd\x60\xea\xb1\xf6\xe3\x0e\xd9\x1c\x8a\x33\xb3\xec\x01\xbe\x63\xbb\x2f\xff\x6d\x22\x0b\xa9\x95\x94\x84\x5d\xb9\x65\x07\x40\x5b\x82\xd2\x37\xee\xfb\xc4\x8d\x3d\x65\xfd\xca\xe7\x91\x41\x05\x9d\x3d\x95\x4d\x5d\x23\x64\xcc\xbd\xda\x97\x9e\x7f\x45\x7c\x98\xf9\x08\x31\x04\xb4\x56\xee\xa6\x2a\x1c\x00\x66\xd7\xa5\x79\xf7\x6b\xaa\x14\xbd\xbc\xfb\x08\xdd\xd0\xe7\x9c\x6f\x5f\x79\x4e\x70\x4e\xfa\x15\xd4\x1d\xbe\xf3\xd1\x2b\xfa\x72\xb1\xca\xd9\x69\x92\x18\x28\xd3\x93\xa4\x90\xa5\x4a\xce\x44\xa5\x71\x4e\x74\xa3\xae\x55\x2a\x45\x62\x5c\xfb\x51\x24\x1b\xd2\x9a\xa4\x87\x51\x61\x45\xee\xb3\xf1\x55\x01\x60\xea", 176, { 0xdf, 0xff, 0x45, 0xd1, 0x3a, 0xe9, 0x9a, 0x4e, 0x1d, 0xbd, 0xa1, 0x01, 0xf3, 0x1c, 0x0b, 0x0b }, { 0x49, 0x32, 0xaa, 0x25, 0x47, 0xa9, 0x97, 0xea, 0x49, 0x32, 0xaa, 0x25, 0x47, 0xa9, 0x97, 0xea } },
|
||||
{ "\x09\xce\x9e\x08\x47\xe3\xb8\x2a\xd5\x57\x52\xa4\x68\xa8\xf9\x64\x20\x71\x94\xb0\x8c\x38\x16\xe7\x65\xb7\xe2\xea\x98\x8b\x7b\x24\xe5\x1e\x8b\x5f\x21\xc5\xe1\x5b\x41\x2c\x60\x5a\x1b\x10\x9a\xeb\xb1\x79\x17\x1d\x3c\x12\xdf\x34\xfc\x7c\x22\xe0\xc1\x75\xf8\x68\x6a\x80\x70\xd7\xd4\x81\xf3\xdc\x6b\xc0\x25\x27\xe3\x44\xad\xbe\x9a\x85\xdc\xbd\xe1\xb7\x31\x7e\xce\xd4\x22\xb5\x22\xd4\xb4\xe2\x13\xfa\xb8\x68\xf1\xbf\x64\x7a\xc6\x4c\x8f\xeb\xa8\xa4\x14\x3d\xa8\xb9\x3a\x3c\xc3\x84\x8b\x7c\x68\x4c\xda\xc9\x64\xa3\x32\x28\xb7\x8d\x28\x2b\x3a\x17\xcb\x78\x65\x72\x82\xd3\x02\x90\x2d\x86\x51\x12\x1f\xd3\xe0\x65\x0e\x12\x83\x05\x69\x70\x63\x76\x92\x43\x4c\x5e\xde\x52\xa4\x3f\x2f\x65\x72\x13\x03\x00\x98\xce\x8c\x03\x55", 177, { 0xfb, 0x2d, 0x33, 0xa1, 0xa0, 0xfb, 0x3a, 0x46, 0xdb, 0x40, 0x7e, 0x65, 0x1f, 0x8f, 0xa7, 0x71 }, { 0xf8, 0x4b, 0xc3, 0x84, 0x17, 0x3a, 0xd2, 0x27, 0xf8, 0x4b, 0xc3, 0x84, 0x17, 0x3a, 0xd2, 0x27 } },
|
||||
{ "\x09\xad\xbf\xfa\xb8\x07\xc9\x7a\x9d\x0a\x6e\xa9\x64\xa6\xef\x6f\xa9\xc2\xcd\xa7\x39\x4c\x16\xc7\x19\xc0\x9c\xbf\x3a\x15\xae\xac\xac\xf2\x26\x87\xd4\x91\xc8\x68\x10\x29\x05\x44\xeb\xfb\x97\x2a\x45\x59\xe4\xe2\xe4\xb9\xa7\xc5\x4a\x08\xef\xf7\xea\xed\x22\xaf\x14\xef\x5b\x9d\xa4\xf7\x0d\x75\x77\x2c\xc5\x5c\xa9\x9d\xd7\x2c\xfd\xab\xdb\x0b\xd8\x8d\x88\x90\x21\xc3\xe0\xb4\xd6\xff\xf6\xcf\x78\xc7\x1d\xf3\x37\x05\x1c\x5e\xa0\x55\x1b\x26\x4f\xa8\x48\xb9\xe5\x3e\x07\x23\xe3\xf2\xc8\xc5\x62\x47\x3a\x1c\x2c\xe7\x5c\x72\xa8\xab\xc1\xca\xc3\xac\xc4\x7d\x44\x6e\x54\x00\xe2\x53\x9e\xb2\x48\xa2\xaf\xa3\xb6\x2d\xd2\x4a\x7d\x29\xe1\x7e\x4e\xc9\x2d\x59\x7a\x73\xf9\xe3\xb0\x29\xec\xa9\x5f\x27\x03\xc8\x3f\x9c\xad\x28\xd1\x7f", 178, { 0x45, 0x76, 0x4f, 0x29, 0xd6, 0x4b, 0x25, 0x08, 0xcb, 0x2d, 0xa9, 0xbd, 0xb0, 0xd6, 0x39, 0xe2 }, { 0x87, 0x4e, 0xa7, 0xb8, 0x73, 0x03, 0x9d, 0xe2, 0x87, 0x4e, 0xa7, 0xb8, 0x73, 0x03, 0x9d, 0xe2 } },
|
||||
{ "\xcb\x84\x2e\x85\xf2\xe3\xb0\x17\xf3\x3d\x8a\x29\x98\x14\x8d\x2f\x74\x6c\xbd\x84\x08\xfc\x93\x26\xbd\x15\x6a\x32\x04\xb6\xaa\x29\xf2\xb7\x5c\x01\x6b\x3f\xbf\xd6\x15\xa9\xeb\xca\x49\x6a\x54\x71\x91\xac\xee\x7c\xa0\x5a\xbd\xc0\x56\x14\xba\x3e\x2d\x3b\x43\x5f\x85\x6e\xa6\x5b\x4d\x93\x0d\x7d\xc3\x1d\xb7\xd0\xf0\x6a\xa8\x2b\x4b\xe9\x30\xa7\x4b\x29\xd8\x09\x5d\x74\x3b\xde\x01\x8e\xf7\xbe\x47\xd5\x16\xef\x5c\xf7\x43\xfa\x07\x2d\x91\x04\xaa\x9e\xf9\x13\xae\xef\xeb\xa1\x29\x6b\x37\x81\xd5\x43\xf1\x74\x28\x96\x94\xc6\x1c\xe3\x3d\x81\x8c\x3e\x0f\x53\xf6\x83\x3f\x8d\xa5\x33\xbf\xce\x90\x16\x34\xdb\x2d\x97\xec\x90\x7e\xcf\x92\xdc\xbc\x69\x4c\xd1\xd2\x82\x32\xed\xf1\xef\xfd\xaf\x98\x23\x25\x41\x83\xb8\x7e\xe0\x4a\x77\x40", 179, { 0x55, 0x77, 0x05, 0x9f, 0x0a, 0x07, 0xda, 0x15, 0x7a, 0x7d, 0x44, 0xc0, 0xdf, 0xf5, 0x4e, 0xdf }, { 0x91, 0x98, 0x29, 0x42, 0xd5, 0x20, 0xdf, 0xa2, 0x91, 0x98, 0x29, 0x42, 0xd5, 0x20, 0xdf, 0xa2 } },
|
||||
{ "\x98\x35\x8f\x45\x14\xfd\xf0\x51\x36\x67\x60\x7e\xb3\x5a\xe9\x11\x35\xcc\xff\xdf\xac\xd8\x15\x61\x9f\x2c\x0b\x4e\x38\x0e\x39\xdf\xa6\x46\x5c\x46\x44\x54\x04\x07\xc9\x93\x23\x9a\x09\x6c\x2a\x99\xde\x9b\xb7\x82\x6a\x99\x01\x77\x2b\x1a\xd8\x06\xc9\x08\x8b\x97\x65\xd1\xe2\x3d\x4e\x45\x06\x59\xf3\xba\x68\x21\x61\xbc\xcf\xc0\x2e\x60\x5c\xd5\xa8\xfe\x4c\xb8\xcf\x8f\x4d\x25\xbf\xb4\x05\x52\x67\x81\x9b\x42\xf1\x73\x77\x08\x9e\x54\x06\xa3\x7a\x69\x85\x99\x33\x17\x38\x7c\x7e\xda\x5e\xa3\x4d\x90\x5f\xef\x14\x77\xcf\x7d\x1f\xca\x5a\xe4\x84\x13\xa8\x06\x61\x4d\x1f\x5a\x6e\xf1\x8a\x0d\x06\x52\x9b\x06\x61\x13\xd6\xeb\xee\x50\x17\x81\xfa\x49\x9c\xa2\x94\xb6\x5e\xf3\x66\x78\x62\x96\x16\xd0\x31\x3b\xeb\x22\xad\xf3\x3a\x18\x93\x18", 180, { 0x46, 0x08, 0x86, 0x0d, 0x7a, 0xf0, 0xae, 0xea, 0xd1, 0xc7, 0x6d, 0x59, 0x98, 0x3f, 0x70, 0x13 }, { 0x24, 0x64, 0x6b, 0x58, 0xc0, 0x59, 0x2a, 0x38, 0x24, 0x64, 0x6b, 0x58, 0xc0, 0x59, 0x2a, 0x38 } },
|
||||
{ "\xd5\xc9\x4f\x92\x59\x34\xe5\xf1\xd0\x98\x9f\x5b\x93\x3a\x05\x7a\x15\x47\x19\xd3\x41\xa9\x3e\x67\x31\xae\xe3\x2c\x38\xf2\xe7\x19\x3d\xd2\x07\xa9\x9e\xde\x92\x23\x1d\x7e\x01\x34\x09\x7a\x9b\x52\x0e\x16\xa6\x9f\x0f\x0b\x20\xd1\x1f\x77\x9f\xde\x64\x68\xfd\x13\xdc\xbd\x4b\xd7\x38\x68\xc3\xf6\xad\x9c\xe3\x3a\x6f\x8b\x7d\x77\xf8\x16\x1f\x85\x49\xef\x89\x22\x63\x11\x69\x5e\xfb\x94\x96\x52\x18\x12\x8f\x2b\xed\xa8\xd0\xa6\x6b\x9c\x08\xf2\x0e\x5d\x62\xe8\x79\xc3\x9b\x28\xdc\x9f\xb8\x5e\xdf\x63\x88\xcc\xfe\x4d\xe9\x1d\x75\x6d\x7b\xe0\x62\x41\x65\xf8\xcf\xa0\x63\x2f\xe6\x95\x90\x94\xa0\x2d\x68\x67\xff\xa8\xef\x9d\xeb\x64\x7e\x63\xe7\xf6\x41\xda\xaf\x20\x3d\x02\x3b\x5d\xcc\xc9\xdb\x83\xfd\x2b\x57\x38\x4a\xb4\xe7\x40\xa5\x09\xaa", 181, { 0x2f, 0xb9, 0x65, 0xd7, 0x4a, 0xb7, 0xb5, 0xda, 0x84, 0xf7, 0x30, 0xd2, 0x5c, 0x8d, 0x74, 0x17 }, { 0x54, 0xba, 0x4c, 0xb8, 0xd3, 0x37, 0xfe, 0x28, 0x54, 0xba, 0x4c, 0xb8, 0xd3, 0x37, 0xfe, 0x28 } },
|
||||
{ "\x42\xdd\x21\x64\x36\xc2\xe9\x11\x4b\x93\x95\x63\xaa\xd7\xe2\xb6\xd8\x2d\xf7\xcb\xe0\xf9\x0b\x5f\x50\x5f\xb6\x03\xc7\xb4\x5e\x89\x42\xa9\xa1\xd0\xd1\x09\x68\x14\xbc\x78\xf3\xfa\x6a\x50\xbc\xab\x56\x99\x32\xc4\xc0\x4c\x56\x7a\x1c\xec\x45\x46\x7e\xf7\x4f\x14\x8a\xcf\xa9\xcd\x4b\x95\xf7\x9b\xee\xbd\xb8\x16\x6e\x62\xc7\xf6\x13\x08\xb4\xcc\xd1\xfe\x30\xc0\x5a\xac\xfd\x21\x1e\x31\xe2\xbe\x05\xff\x7b\x16\xba\x91\x45\x71\xe2\xbe\x8a\x97\x4f\x3f\x5a\xee\xf3\xa2\x55\x22\xc6\x45\x7d\xc9\x80\xc4\x42\x44\xbd\xd5\x45\x91\xb8\xd7\x07\x83\x81\x22\x94\x2c\xe4\x3c\xc4\x1d\xb2\xee\x76\x2f\xbf\xe1\xd8\x90\x43\xef\xd2\xfd\xf3\x40\x74\x53\x2b\x27\xe4\x43\x9c\x7b\xfd\xee\x62\x56\x5c\xf2\x2b\x9c\x09\x48\xbb\xc4\x94\xa9\xd3\xb2\x51\xf6\xc7\x3d", 182, { 0x11, 0x29, 0x12, 0x1a, 0xe3, 0x6e, 0x30, 0xb1, 0x7c, 0x78, 0x27, 0x13, 0x01, 0x7f, 0xfa, 0x3b }, { 0x0c, 0x7a, 0xba, 0x2b, 0xbd, 0xce, 0x49, 0xb1, 0x0c, 0x7a, 0xba, 0x2b, 0xbd, 0xce, 0x49, 0xb1 } },
|
||||
{ "\xdf\x38\x9e\x13\xc8\x0e\x4f\xbb\x24\xc6\x81\x02\x22\x68\x0b\x77\xa3\x92\xee\x03\xa9\xcf\x6d\x46\x18\xfd\x9c\x37\x41\x12\x09\x22\x11\x6c\x6e\xfb\x56\x51\x2e\x3a\xb8\xe3\x96\xa0\xae\xe4\x39\x2a\xf8\x6c\x54\x94\xa9\x63\xb0\x56\x8c\x67\xc4\x4e\x59\xea\x2f\xd3\xb7\x5e\x1f\xad\x5b\xc9\x6b\x45\x71\x08\x32\xdb\x7d\x9e\x82\xdf\xe1\xd0\xd8\x28\x65\xc8\x66\x01\x53\x78\xbb\x92\xaa\x78\x2a\xd5\x73\xe4\x91\x7a\x5e\x29\x06\xad\xc2\x40\xff\x54\x53\x38\x6e\x1a\x5b\x28\x4c\x86\xd4\xfe\x73\xe7\xfe\xee\xe1\x37\x89\x5c\x0d\x6b\xc0\xf9\x4b\x03\xba\xda\x8a\xab\x12\x82\x5e\xbc\x32\x9e\x02\xd3\x5d\x6e\xa1\x9a\x9a\xa7\x35\x3a\xa0\xe8\x06\xa0\x51\x3d\x51\x5f\xe6\x71\xe3\x7d\xf9\xc1\x27\xd9\x71\x6e\x87\x3e\x47\x81\xce\x81\xe2\xb9\xd6\x1a\xe3\xd7\xa1", 183, { 0x62, 0x41, 0x10, 0xa0, 0x6b, 0x7d, 0xe4, 0x3c, 0xbb, 0xe0, 0xd2, 0xec, 0xb1, 0x96, 0x55, 0xc2 }, { 0xe3, 0xf1, 0xb9, 0x22, 0x12, 0xd6, 0xa0, 0x33, 0xe3, 0xf1, 0xb9, 0x22, 0x12, 0xd6, 0xa0, 0x33 } },
|
||||
{ "\x3e\x08\x3b\x63\x72\x4e\x47\xa7\x76\xd2\xd7\x78\x52\x5a\xef\x85\xe2\x2b\xf2\x86\x1b\xb8\x97\x4b\x8b\x98\xbc\x67\xa9\xcc\x7e\xc4\xf9\x6d\xb4\x16\xfd\x36\x11\x77\xda\x59\xed\x2d\x3e\x64\x35\x58\x7b\x4e\xae\xc4\xf5\x55\x2f\x67\x0b\xec\xe4\x25\x93\x11\xa4\x6d\x41\xde\xc0\x83\x9a\xcd\x1d\x64\xd8\x87\xb8\x61\x24\x61\x17\xc4\x5c\xda\xc5\x90\x7d\x14\x87\x2b\xfa\x83\x2f\x8f\x05\xfa\xb3\x1a\xb9\xd2\x74\x6c\x1c\xde\xba\x54\x94\xdc\xfa\xe0\x68\xfa\x22\x26\x7d\x72\x6d\x86\x3a\x8f\xfb\x36\xa7\x21\x02\x99\xa6\xd6\xb5\xe2\x02\xda\xe8\x80\x72\x48\x8a\x8e\x0f\x21\x3f\xd1\xce\xd6\x1b\x44\xad\x31\xe0\x9c\x8b\xd8\x59\x8e\xb4\x5c\x53\x6c\x7a\x7d\x0b\xa0\x09\x67\xf0\xa9\x2d\x6d\xa8\x66\x18\xdc\x5f\xc6\x0c\x91\xb4\x42\xb3\x8c\x8f\x09\x22\xdd\x9e\xce", 184, { 0x4a, 0xe3, 0x21, 0xed, 0x56, 0x9f, 0x45, 0x4c, 0x4c, 0xa5, 0x91, 0xc7, 0x1b, 0xec, 0x69, 0xe0 }, { 0xd8, 0x40, 0x1c, 0x64, 0xa4, 0x47, 0x51, 0xf4, 0xd8, 0x40, 0x1c, 0x64, 0xa4, 0x47, 0x51, 0xf4 } },
|
||||
{ "\x55\xda\x31\x9d\x01\x0f\x05\x9d\x6f\x89\x81\x50\x3e\x91\x54\x6d\xaf\x13\xc8\xcc\x55\x95\xa2\x96\x6f\x07\xe1\x1e\x37\x88\xb4\x24\x3f\x57\x99\xc4\x05\x94\xff\x47\x8a\x0f\xa8\x6c\xd0\xfd\xec\x22\xd0\xdc\xf7\x8b\x6d\x45\x46\x53\x5c\x52\x92\x80\xb9\x3d\xbc\x5b\xfe\x37\xdb\x6e\xc1\x0f\x41\x6a\x80\xaf\xd4\xb9\x56\xe7\x2d\x98\x3d\xe2\x3a\xb0\x87\x27\x09\x78\x37\x86\xaf\x39\xd8\xf6\x5f\x1f\x52\x52\x29\x46\xed\x42\xf5\x29\xe7\x59\x75\x86\x12\x62\x54\x5d\xe4\xe9\x83\x8b\xce\xae\xbe\xe0\xa7\xad\x8d\x97\x80\x08\x99\x44\x68\x9a\xd0\x7e\x8f\xe5\x83\xd8\xcb\xd5\x24\xf9\x8f\x4d\xc6\xd4\x23\x4a\x6f\xf2\xe9\x2d\xca\x21\x75\x0f\xfd\x05\xa6\x27\xf2\xb8\x5a\x11\x85\xff\x03\x57\x18\x2d\xb9\xcc\x95\xc5\x6a\x0b\xf2\x48\xbc\x35\xbe\x91\x03\x95\xc8\xd1\x8c", 185, { 0x53, 0x10, 0xa8, 0x8b, 0x9d, 0x2a, 0xc1, 0xdf, 0xc4, 0x81, 0x8f, 0x71, 0x91, 0xe7, 0x82, 0xf4 }, { 0xcd, 0xd5, 0x36, 0xcb, 0xe8, 0x10, 0x0b, 0x4c, 0xcd, 0xd5, 0x36, 0xcb, 0xe8, 0x10, 0x0b, 0x4c } },
|
||||
{ "\x99\xa3\xf6\xf6\x9f\x4c\x5e\x7f\x0d\x5e\xf7\x35\xd0\x08\x66\x49\x5e\xf3\xe3\xbc\xf5\xa8\x31\x68\x39\xef\x53\xef\xf6\x26\x11\xe3\x6e\x0b\x24\x11\x19\xb0\xe8\x1f\xa0\x73\x53\xfb\x44\x9c\xd4\xe1\xd6\x4d\xbd\xa4\x84\x1a\xc0\x4c\x9d\x65\x06\xd7\xa3\x34\x29\x57\x5a\x25\x3f\x62\xae\x8b\xda\xfa\x65\x06\x81\x70\x7f\x33\x08\xb5\x16\x4b\xd2\x81\xf2\x09\x00\xe7\x6b\x6a\x2a\x34\x3a\x0b\x8a\xa2\x7f\xd4\x77\xdf\x92\x01\xbb\x79\x21\x37\x0c\x51\x36\x01\xdf\xcb\xbd\x58\x9f\x67\x73\x92\x7f\x51\xda\x4f\x56\x9a\xb1\x8d\xc3\x7b\xd3\xda\x65\x3b\x7f\x0c\x75\xbb\x46\x14\x96\x63\x8b\x72\xb4\x02\xc2\x27\xee\x7b\x79\x22\x56\xe8\x6d\xd6\xf4\xa3\xcf\x3c\xb9\xac\x71\x11\x76\xcf\xfa\xc3\x42\x90\xd6\xa7\x35\x97\xa4\x19\x06\x03\xb4\x39\xf3\x76\x46\x7e\xd7\xbb\x7b\xb7", 186, { 0x24, 0x3e, 0x6d, 0xc9, 0x2c, 0xa4, 0x00, 0xcb, 0x16, 0x01, 0x23, 0x3e, 0x63, 0xcb, 0x8b, 0x48 }, { 0x86, 0xde, 0x90, 0xe6, 0xe8, 0x12, 0x0e, 0x06, 0x86, 0xde, 0x90, 0xe6, 0xe8, 0x12, 0x0e, 0x06 } },
|
||||
{ "\x1e\x29\x1e\xbe\xe0\x6c\x84\xd9\x2e\xd4\x79\x32\xa7\x40\xab\xf3\x4e\x42\x3f\x48\x4d\xbf\xa7\x50\xa7\x21\x38\xf4\x22\x67\x78\xb1\xa8\xd1\xc3\x5e\xfa\x1a\xf8\x2f\xfd\x76\xb6\xe5\x26\x3a\xe3\x72\x0d\xae\x74\xb5\x25\x19\xfa\x59\x85\x8d\x72\x27\xb0\xfa\xd4\x44\x76\x73\xb9\x53\x40\xb7\x7d\xc4\xcd\x60\x9d\x20\x44\xa3\x59\x6d\xf2\x17\x78\x13\x87\xa2\x5a\x1b\x22\xcd\x6e\x87\x28\x5f\x2a\xf2\x75\x75\x28\x43\x51\x94\x07\xa7\x9d\x6e\x65\x31\xf3\xfb\xad\x11\xd2\x70\xc6\x5c\x1b\xfb\x19\x3f\xd8\x51\xf2\xe1\xde\xca\x57\x53\xcb\x00\x5f\xc1\xa3\xb7\xeb\x1c\xaf\xf0\x33\x3f\x9a\x6f\x9c\x66\x08\xdb\x9c\x8e\x9e\x35\x57\xcb\xd0\x1a\x57\x1d\x21\x26\x41\x6d\xdb\x25\xd0\x2a\xab\x53\x3f\x79\xbf\xdd\xae\xa6\x58\xbc\x74\x6e\x32\x3b\x7d\x65\x96\xac\x71\x9c\xee\xd3\x55", 187, { 0x4e, 0x8b, 0x03, 0x86, 0x16, 0x37, 0x82, 0x1a, 0x85, 0x32, 0xdc, 0xd8, 0xa6, 0x26, 0xa9, 0xa2 }, { 0xe0, 0xb5, 0xfd, 0xfc, 0xec, 0x46, 0xc7, 0x7b, 0xe0, 0xb5, 0xfd, 0xfc, 0xec, 0x46, 0xc7, 0x7b } },
|
||||
{ "\x67\x32\xf2\xa4\x2f\xcf\x92\x9b\x66\x47\x27\xe7\xbc\x24\xa4\xb5\x7e\x59\x57\xcb\x89\x43\x85\xeb\xb6\xc9\x49\x0e\xd3\x12\xe8\xc6\xcc\x64\x62\x24\x8c\x5a\x8e\xed\x97\x92\xfa\xcb\x87\x56\x60\x70\xda\x9c\x68\xb6\xf4\x4a\x33\x50\x8c\x60\x3a\xc6\x24\x48\x49\x49\xd7\x84\x8b\x21\xe9\x56\x58\x47\x2d\x8e\x6c\xbf\xf9\x4b\x71\x32\xbb\x2d\x03\x2f\x1a\x1b\x8b\xc9\xd7\xc7\x49\x34\x27\x79\x15\x08\x9c\x30\xec\xe0\x3c\x91\xca\x21\x78\x37\xfc\xb2\x81\x8f\x6f\x46\x8a\x56\xc2\xa8\x23\x96\x59\x97\xe4\x8d\x7a\x09\xd3\x96\xa2\xed\x94\xba\xc3\xfa\x4b\x69\xe7\x42\x70\x9b\x41\x53\x0d\x2c\xf9\x4f\x9f\x70\x4b\x36\xf3\x37\x11\x0b\x40\xac\x56\x1d\x64\xc9\xb6\x1d\xd7\x69\x76\xba\x89\x38\xc2\x4d\x71\xd0\x4f\xf2\x47\xed\x9e\x4b\x19\xd8\xf3\x94\x76\x27\x11\x88\x7e\x58\x4a\x34", 188, { 0x43, 0x2d, 0x9a, 0x57, 0x47, 0xa7, 0x53, 0x4e, 0x59, 0x87, 0x8a, 0x2d, 0xab, 0x31, 0x29, 0x1f }, { 0xcb, 0x18, 0x1b, 0x74, 0xff, 0xad, 0x10, 0xaa, 0xcb, 0x18, 0x1b, 0x74, 0xff, 0xad, 0x10, 0xaa } },
|
||||
{ "\x5c\x93\xaf\xcf\x28\x39\x82\x1e\x24\xe4\xe6\xcb\xb9\x0d\x51\x9d\xa1\xa5\x38\x7f\x5b\xab\xc9\xd6\x64\xdf\x32\xf3\xa7\x7f\x78\xf4\xb7\x38\x0b\xa6\xb5\xfd\xb6\x8c\x95\xc6\x47\xca\x08\x42\xd7\xca\x61\x08\x99\x67\x63\x41\x81\x3a\x8b\xf1\x08\x09\xdd\x76\x02\xe5\xad\xa0\xfb\xfd\x90\xc3\x22\xcd\x1b\xbe\x22\xe6\xf6\x8c\xb5\x33\xf9\x33\x45\xa8\x7a\xe9\xe2\x07\xb1\xb3\x9e\x6c\x51\xf3\xdf\x45\x00\x0b\xd3\x94\x61\x1c\x04\x42\x63\x08\x9d\x70\x6b\x2d\xd9\xd6\x07\x0e\xb0\x52\xba\xff\x6d\xc0\xce\xde\x23\x95\xe7\x5d\xdb\x47\x16\x86\xb7\x01\xaa\x30\x82\x0e\x5e\x50\x5a\x6a\x65\xe9\xb3\x6e\x05\x74\x9c\x8e\x3b\x30\x67\x67\x79\x1d\x8b\x4e\xb1\x66\x33\x2d\xde\xc1\x3a\x04\xc9\xb9\x84\x6b\x12\xe0\xad\xdf\x7c\x56\x06\xb9\xe3\x02\xd8\x85\x22\x16\xc3\xc2\x7d\x1d\x76\x94\x69", 189, { 0xb8, 0x53, 0x92, 0x17, 0x2f, 0x30, 0x1b, 0x01, 0x33, 0xe6, 0xb7, 0x90, 0x96, 0x19, 0x4e, 0x6b }, { 0x22, 0x6b, 0x87, 0xa9, 0xc6, 0x9d, 0xfb, 0x97, 0x22, 0x6b, 0x87, 0xa9, 0xc6, 0x9d, 0xfb, 0x97 } },
|
||||
{ "\xc4\xad\xa9\x8f\x39\x92\x82\x92\x17\x3c\x66\x64\x96\x6f\x97\x60\x90\xea\xd9\x63\x25\x6c\x32\xaf\x36\x30\xb1\xc5\x19\x2c\x8a\x7f\x82\xbc\x6b\x07\x27\x6d\x5f\xdf\x56\xe6\x3c\x3e\xab\xb3\x67\x3a\xc8\x08\x9a\x10\x04\xd9\xbd\x35\xc4\x2e\x66\x96\xf3\x17\x32\x83\x9f\x76\xdd\x23\x1c\x22\xc7\xc0\x15\x79\xaa\x9a\x7d\x48\x7f\x44\xae\x34\xea\x2f\x09\x1a\xb8\x4d\xcd\x12\xab\x95\x22\x08\x61\xb7\x6e\x7e\x73\x87\x78\x8b\x6e\x57\x73\x54\xb0\x79\x67\x55\x41\x92\x6c\xf6\x13\xdf\xe7\x6c\x2b\x26\xcf\x74\xaf\xbd\xf4\xbb\xb2\x9e\x39\x7e\x4a\x63\xad\xbc\xe4\xd3\x9f\xe6\x3a\x01\x83\xda\xd4\xfa\x96\x89\x26\xa0\x81\x8e\x2f\x20\x1c\xef\x75\x1f\x74\x11\xee\x8f\xc7\x60\xbd\x91\x57\x65\x34\x61\xa8\x96\xd5\xdb\x38\xd9\xac\x71\x99\xf8\xfd\xf6\xa8\x9f\xda\x30\xfc\x11\xc4\x67\x2e\x26", 190, { 0xe8, 0xa8, 0x06, 0xab, 0x76, 0xae, 0x8b, 0x67, 0xbd, 0x54, 0xd5, 0xb3, 0x4b, 0xa6, 0x75, 0x25 }, { 0xc2, 0x19, 0xec, 0xb4, 0xac, 0xa1, 0xae, 0x04, 0xc2, 0x19, 0xec, 0xb4, 0xac, 0xa1, 0xae, 0x04 } },
|
||||
{ "\x64\x82\x33\xe1\x54\x90\x00\x24\x03\xeb\x44\xaa\xe3\x79\xfb\x98\x9b\x1e\x9b\xef\x71\xf1\x49\x90\x46\xf4\x90\x04\xf3\x2f\x3e\x3e\x92\x27\x8b\x8b\x61\x73\xcd\x0a\x6d\x0f\x4a\x06\x75\xd4\x85\x2f\x11\x5c\x78\xe0\x42\x3b\xb9\x43\xca\x57\xf8\x4b\xad\x96\xb1\x17\x4d\x53\xe5\xcf\x89\xbe\xbf\x4b\x3b\x8a\xd8\xdd\x17\x28\x74\x58\xbc\xe6\xf0\xd9\x8a\x28\x99\x02\x2f\xc9\x31\x14\x30\x08\x14\x12\x84\x12\x57\xa1\x9c\xd3\xe0\x37\x74\x2a\x5f\x0d\xf4\x31\x97\x95\xe3\xf7\xb3\xf2\x3c\x17\xef\xc4\xb6\x3d\xf6\xe2\x48\x8e\xfc\x36\x83\xcc\xe0\x92\x01\xba\xa7\xff\x2f\x33\x0d\x1b\x03\x99\xde\x11\x21\x52\xaf\x3b\xcb\xe0\xb6\x15\x9f\x10\x0f\x5a\x0a\xb6\xe7\x74\x7f\x1b\xe5\x32\xd3\x19\xc3\xa9\x3c\x38\xf6\x28\x45\x3d\x1a\x00\x47\x31\xe0\xd2\x20\x9c\x0f\x86\xdb\x56\x65\x3c\x03\x8f\xf5", 191, { 0x5b, 0x68, 0x26, 0x79, 0x41, 0x15, 0xa0, 0x20, 0x02, 0x72, 0x8e, 0x16, 0x61, 0x0f, 0xbb, 0x5a }, { 0x41, 0xde, 0xda, 0x91, 0x3d, 0x19, 0xb7, 0x86, 0x41, 0xde, 0xda, 0x91, 0x3d, 0x19, 0xb7, 0x86 } },
|
||||
{ "\x51\xd7\x12\x2b\x1c\xe2\x90\xb2\x4e\xf4\xdb\x4d\x57\x52\x88\x83\x8f\x5c\x69\x92\x6f\x0e\xcc\xfb\x28\x23\x26\x3c\xa1\xfd\x4d\x03\x08\x22\xa3\x00\xf5\x81\x9a\x01\x13\xe5\x8b\x7e\x8b\x62\x80\xb0\xa0\x4b\x1e\x1b\x7d\xc7\x01\x64\x37\x3d\x73\x2d\x91\x3e\x22\xe4\x17\xfc\x0b\x0b\x96\xc6\xb9\xe9\x00\x9c\x9f\x2b\x57\x12\xde\x66\x8d\x48\x72\x84\xe8\xb7\xb7\xca\xc5\x04\xcb\xd7\x28\x2c\xd7\xef\x79\x7a\x69\x75\x5f\xcc\x72\x89\xb4\xa0\x2a\x78\xa4\x33\x39\x89\xf5\x49\xab\x6e\x9b\xf3\xdb\xe8\x2f\xae\x73\xcf\x02\xaa\x80\xf8\xa5\x40\x3c\x28\x0c\x6b\x08\xb4\xab\x1e\x33\x24\xc1\x3b\x38\xc3\x63\x4e\x10\x07\xd9\x5e\xc8\x3f\xbf\x70\x2f\xd9\x15\xae\x8e\x7b\x24\xe9\x30\xa9\x80\x63\x3c\xf2\x02\xdb\xae\xf4\x6b\x85\xa0\x67\x0e\x87\x55\x69\x71\x8c\xe4\x31\xd4\xb2\x2d\x97\xbf\xf4\x17\x73", 192, { 0x72, 0xd9, 0x82, 0x7d, 0x93, 0x33, 0xe8, 0xc2, 0xaa, 0xbd, 0xb5, 0xc4, 0x7f, 0xbd, 0x83, 0x7b }, { 0x71, 0xa3, 0x8a, 0x65, 0x6e, 0xf2, 0x1f, 0x4f, 0x71, 0xa3, 0x8a, 0x65, 0x6e, 0xf2, 0x1f, 0x4f } },
|
||||
{ "\xd1\x6d\x63\x42\x2a\x9c\x0c\xcc\x60\x22\x1b\xe4\x07\x57\xdd\xe1\x3d\x74\xce\xfa\xc8\x5b\xe8\x9c\x91\xa5\xde\xa3\x46\x22\x0b\x8d\xa8\xd0\x9d\x5f\xf2\x04\x76\xb0\x35\x0d\x64\xe0\xc5\x84\xbf\x40\xdb\xb8\x66\xfb\xbd\x7c\xb4\xc0\xef\x2c\x02\x87\x04\x75\x98\x86\x5c\x11\xb6\x47\x7b\xc6\x9a\xd9\x69\x5f\xa5\xd6\x37\x8e\x4b\x9c\xfc\xa6\xbe\xcb\x38\x2f\x09\x94\x0c\x85\xa1\xbb\xfa\xa8\x98\x7a\xdb\x27\x0f\x60\xe4\x67\x7d\x14\xde\xa3\x23\xfa\x26\x91\x2c\x92\xf0\xfc\x5b\xe9\xda\xef\x15\xeb\x70\x4d\x26\xa4\x15\xe4\x73\x88\xac\x74\x2c\x26\xd0\x85\x39\x0c\xe6\x39\xaf\x15\xf7\xcf\xb4\x4f\x02\x74\x4b\x0b\xf9\xdb\x52\x56\x94\x98\x6a\xc4\xdc\x9a\x58\x02\x3f\x63\x20\xc8\xe5\x96\x9d\x52\xcb\x92\xe3\xd0\xf4\xcf\xe9\x8c\x5e\x81\x5c\x9c\x3c\x8b\x57\xae\x99\xa8\x5f\x02\x7d\x14\xff\x24\xd2", 193, { 0x21, 0x69, 0x84, 0x9e, 0x48, 0xb5, 0xc0, 0xb2, 0x56, 0x52, 0xa8, 0x98, 0xe0, 0xde, 0xe2, 0xf8 }, { 0xbe, 0xdf, 0x51, 0x76, 0x45, 0x89, 0x65, 0x3b, 0xbe, 0xdf, 0x51, 0x76, 0x45, 0x89, 0x65, 0x3b } },
|
||||
{ "\x34\x4c\x20\x72\xcb\x01\x51\x0e\xc6\x33\xa2\x1d\x73\xf9\x84\xf1\xc6\xd8\xd0\x29\x11\x3d\x37\xc2\xa1\xdf\xda\x45\x56\xbe\xb0\x1e\x2e\x8c\x25\x6f\x16\x5b\x70\x21\xc3\xc2\x49\xa6\x21\xfe\xcc\xd8\xc7\x14\x80\x3e\x3f\x23\xe3\x8e\xc3\xdb\x22\xf7\xda\xc6\x46\x61\x55\x1b\xf5\xb5\x93\xd0\x2c\x53\x09\x6a\xa0\xa7\x1b\x2a\x87\xf1\x25\x02\x05\x5d\xba\x78\x8f\x3c\xce\xf9\xfb\x4a\x80\x80\x20\xc6\x1e\xb5\x65\x1f\xd3\xd4\xd6\x28\x5e\x25\x2e\xba\x5c\x39\xf8\x17\xfa\xa8\xe7\xec\x99\x39\x81\xf0\xfa\x12\x63\xc9\x04\xf4\x5a\x4f\xed\x94\x80\x25\x62\x03\x02\x99\xa8\x2d\xb8\x70\x2a\xb1\xe3\x5d\x86\x15\xf1\xc1\x6c\xc7\x33\x17\xf7\x1d\xb4\x1e\xd9\x51\x91\xd0\xb7\xe8\xff\x2a\x3c\x1a\xe9\x50\x92\x18\x4e\xfb\xdc\x3e\xe7\x21\xec\x3c\x13\x0e\x02\x79\x67\xcf\x75\xe9\xd5\x9b\x0d\x66\x5b\x32\xf8\x85", 194, { 0x3c, 0x52, 0x5b, 0x8d, 0xbe, 0xb9, 0x70, 0x28, 0xcc, 0x64, 0x1c, 0xac, 0x0d, 0x15, 0x01, 0x71 }, { 0xb7, 0x52, 0x10, 0x89, 0x50, 0x06, 0xeb, 0xfc, 0xb7, 0x52, 0x10, 0x89, 0x50, 0x06, 0xeb, 0xfc } },
|
||||
{ "\x1a\x2b\x6f\x91\x58\x2f\x7c\xe2\x8c\x51\xee\x22\xf3\x64\xdb\x3e\x7b\x88\x8f\x89\x29\x60\x6f\x46\x8c\xd4\x22\x04\xcc\x7b\xc4\xa9\x2d\x8a\x8b\x29\x7c\x4a\x45\x27\x8c\x9d\xed\x31\x60\xff\x91\x97\xbf\xb2\x15\x2a\x44\xe6\x6e\x75\x2d\x10\x2c\x31\xee\x04\xff\xa2\x97\x2a\x30\xe7\x93\x89\x36\x4c\xf4\xa2\xf4\xeb\x0e\xb0\x18\x8e\x81\x98\x78\x39\xa6\xf3\x1c\x5e\x43\x14\x2b\xa2\x72\xaa\xf8\x62\xa4\x26\x63\x7c\x1c\x3c\x79\x64\x67\x84\x0d\xef\x21\x23\x30\x72\x30\xb9\x27\x7c\x50\xb9\x96\x10\x1c\xaa\x6c\x6a\xfe\xb7\xa9\x8a\xa0\x61\x7e\x93\x29\x6c\x67\x2c\xc9\x76\x22\x94\xe9\x31\xb3\x4d\x01\xfc\xf2\xd5\xb4\xeb\xcf\xab\x59\x37\x3f\x89\x11\xb9\xd0\x32\xa3\xe6\xe3\x32\x8a\x22\x70\xcd\x6c\xa1\x98\x1b\x4f\xa4\x63\xcb\xb6\xe8\xde\xa1\x29\x9e\xee\x40\x7b\xb9\x91\x09\x72\xdd\xbc\x74\x8c\x59\x7f", 195, { 0x56, 0x86, 0xb1, 0xe1, 0x9e, 0x22, 0x9b, 0x86, 0x69, 0x4f, 0x16, 0x13, 0x74, 0xd0, 0xc0, 0xac }, { 0x2a, 0x8c, 0x43, 0x99, 0x9e, 0x77, 0x62, 0xc8, 0x2a, 0x8c, 0x43, 0x99, 0x9e, 0x77, 0x62, 0xc8 } },
|
||||
{ "\x73\x8b\x0a\x8e\x9e\x4e\x32\x7c\xf0\x6f\xd9\xd0\x9e\x38\xaf\x5b\xb9\x9a\x39\x8a\x0c\x8a\x63\x8b\x22\x29\x80\x90\x70\xef\x65\x86\x9a\x79\x07\x35\xd1\x6b\x33\xd1\x7e\x14\xa9\xb3\xd9\x33\x89\x73\x5d\xc2\x20\x6d\x27\x87\x40\x43\xb8\xae\x40\x83\x6b\x49\xae\xd9\xb5\xa8\x64\x2d\xd9\xca\x22\xcc\x50\x10\x15\x55\xea\x48\x6d\x08\x1a\xe7\xf9\xc5\x70\xb9\xe0\x5a\x14\x68\x7b\x7a\xbc\xde\x76\x7e\x2b\x8c\x7d\x11\x83\x40\x8f\x2e\x97\x5e\x02\x1b\xdc\xa9\xbf\x25\xf0\x02\xd3\xb5\xa4\x5e\x5e\x7d\x78\x01\xb0\x7e\x68\xff\xcc\x44\xfa\x3e\x81\x80\x4b\xb4\x7b\xf4\x76\xea\xf9\xb2\x9d\xf8\xc0\x8a\xe4\xf1\x68\x3b\x66\xb3\x1c\x8b\x70\xd3\x14\xf1\x68\xe2\x1a\x6f\xf1\x64\xad\xef\x21\xa6\xcc\xf1\xfb\x32\x57\xc9\x5c\xd3\x88\xbf\xe5\x0c\xff\xa3\xda\xff\x65\xd5\xb0\x73\x3d\xf0\xa9\xac\x4b\x24\x37\xbd\xc8\x67", 196, { 0x43, 0xc8, 0xcd, 0x6b, 0x73, 0xc2, 0xe5, 0xab, 0x30, 0xd0, 0xb4, 0x3c, 0xef, 0x48, 0xe4, 0xfe }, { 0x95, 0x3f, 0x29, 0xad, 0xc6, 0x47, 0xde, 0x68, 0x95, 0x3f, 0x29, 0xad, 0xc6, 0x47, 0xde, 0x68 } },
|
||||
{ "\x7c\x49\x96\x50\x98\x19\x5e\xac\xea\x97\x8c\x1e\xee\x0e\x4f\x1e\xb4\x68\xc9\x16\x72\x21\x33\x7a\x7a\x7c\xae\x91\xb2\xb4\x57\xa4\xcf\x6c\x76\x07\x55\xc3\x59\xf7\x1d\xf0\x82\x64\x31\x6b\x26\x57\x19\xc3\x0c\x61\x7c\xd4\xa8\xd8\x7f\x13\x6f\xa2\x3e\x68\x20\x18\xf5\x89\x73\xf5\x5c\xc0\x65\xeb\x58\xa6\xda\x04\x87\xd1\x5d\xa3\xde\x9d\xce\x3d\xef\x52\x5e\x9b\x63\x06\x87\x64\x84\x73\xe7\xcb\xdf\xac\xad\xd5\xaa\x76\x5e\x99\x9c\x77\x7e\x81\x20\xc0\x16\x4e\x70\xa4\xfb\x9e\x48\xd0\xf5\xf8\x9d\xf1\xf4\xf8\xa4\x34\xe8\xd3\x94\xc0\xc5\x4f\xe4\x39\xc6\x72\x9b\xe9\x4e\x08\x20\x94\x5b\x6a\xab\x92\x15\x18\x2c\xf2\xd5\x0e\x89\x28\xd4\x64\x8b\xd0\x0a\xcc\x84\x59\xdf\x49\x87\xd5\x27\x26\xd2\xe5\xb8\x9c\x30\x28\x1d\xd0\x89\x66\xb9\x33\x81\xbc\x25\xf3\x58\x9d\x10\x46\x5b\x0b\x6e\x64\xdb\x4d\xbf\x78\x8a", 197, { 0xe6, 0xa5, 0xfb, 0x5a, 0x06, 0x89, 0xc3, 0x04, 0x07, 0xa0, 0xeb, 0x68, 0xcd, 0xf7, 0x02, 0x00 }, { 0x9e, 0xcb, 0xe0, 0x7f, 0xe3, 0x55, 0xda, 0x6c, 0x9e, 0xcb, 0xe0, 0x7f, 0xe3, 0x55, 0xda, 0x6c } },
|
||||
{ "\xaf\x77\x5d\x18\x48\x07\xe9\x28\x6c\xaf\xb8\x46\x35\x8d\x05\xcc\x6f\xbc\xcd\x0e\xe9\x51\x49\xbe\xf1\x2b\x4e\x4e\xd2\x9d\x2f\x47\x57\x39\xa3\x2b\x70\x6e\x43\xc1\x22\xe1\x5c\xa8\xee\x20\xec\x63\x59\xe6\x6d\xa9\x02\x7b\x7c\xdc\xd3\x43\x83\x79\x13\x8b\x41\x0d\x9c\xe1\xba\xb5\xb6\xd6\x1d\x7f\xbe\x28\xf3\xda\x86\x5f\x1d\xbf\x10\x36\x4d\xa1\xe2\x53\x6a\xc6\xa9\xb3\x5d\x6b\x3c\x78\xe2\xed\x1b\xc8\x03\xed\x72\xa3\xd1\x3e\x05\xd0\xc3\xbd\x56\x25\x58\xd5\x96\xed\x13\x86\x96\x50\x1f\xd8\x80\xf6\x0c\xaf\xf4\xe6\xa2\x1a\xc5\x59\x82\x6b\x07\x94\xd8\x07\xc9\x9b\x30\x3c\xa0\xec\x61\x5c\x8b\x0b\x9a\xe5\x6f\x42\xd4\xfd\x98\x64\xba\x42\xe0\x85\x0c\xce\x29\xf7\xcf\xde\xc1\xa4\x4c\x3f\x37\x60\x04\xca\x3b\xd2\x6f\xb9\x39\xa4\x6f\xd6\x60\x9e\xc2\xee\xe6\xd1\x1d\x46\x74\x95\x1f\x0e\x83\x7b\x0e\x67\x46\x0d", 198, { 0x4e, 0x41, 0xfa, 0x67, 0x80, 0xf4, 0x83, 0xca, 0xf1, 0x04, 0xd4, 0xb2, 0x63, 0xb5, 0x1a, 0xf5 }, { 0x19, 0x6d, 0x40, 0xf8, 0x18, 0xd6, 0x5f, 0x86, 0x19, 0x6d, 0x40, 0xf8, 0x18, 0xd6, 0x5f, 0x86 } },
|
||||
{ "\x2e\xee\xa2\xe9\xe5\xa9\x0d\x99\x55\x87\xe3\x9d\xde\x5f\x85\x6c\xef\x2b\x71\x46\xa5\x66\xf7\x30\x9b\x55\xc3\x07\x22\xab\x67\xc5\x6e\xa8\xda\x3a\xd6\xb8\x18\x14\xa4\x60\xf3\xab\x79\xa0\xb4\x0d\x0b\xcb\x8c\x39\x2e\xeb\x61\x0f\x6a\x03\x1c\xfa\x4e\x5c\x54\x1e\x65\x6b\xe1\x9a\x95\x78\x16\xe6\x37\x3d\x15\x6b\xf6\x98\x9f\x6c\x96\x40\x03\xe6\x43\x80\x0d\xa6\xbd\x8c\xd4\xb5\xff\x3b\x80\x53\xa6\x00\x43\xf5\xe7\x2f\x5f\x31\xaf\x16\x54\xa3\x29\xc0\xb3\xcc\x9a\x0f\x62\xa1\xf3\x07\x04\x15\xa8\x9f\xab\xf8\x1d\xdc\xfc\xd4\x07\x5f\xdb\xc1\x0c\x4d\x20\x18\x4a\xd1\x84\xcc\x1c\xc0\x80\xf6\x4c\xaa\x10\x98\x2a\x9e\xd4\x83\x76\x3e\xfd\xc0\x62\x64\x16\x9c\xd9\xb4\xa0\x6b\x05\xae\x64\x12\x72\xdf\x68\x05\xe0\x02\x64\x24\x4e\xa8\x52\x07\xe7\xfc\xfc\xd1\x9f\x9e\x69\xd3\x3e\xa1\x73\x48\x8e\xf2\x2d\x11\xa8\x61\x0c", 199, { 0x13, 0x69, 0x80, 0x26, 0xb4, 0x4a, 0xb1, 0xf3, 0xae, 0x2a, 0x07, 0x7e, 0xe3, 0xb6, 0xfe, 0x7d }, { 0x14, 0x08, 0x91, 0xd6, 0x90, 0xa0, 0xd9, 0x80, 0x14, 0x08, 0x91, 0xd6, 0x90, 0xa0, 0xd9, 0x80 } },
|
||||
{ "\x97\x1e\xe3\x1c\x49\x98\xba\xc6\x12\x69\xea\x2b\xa7\xcd\x76\x06\xcc\xd6\x5e\x31\x61\xb7\x3d\x10\xdc\xed\xc1\xae\x2b\x51\xe1\xd9\xda\xcd\xfc\x17\x0c\x73\xbb\xd1\xf4\x51\x8a\x87\xcf\xed\x65\xef\xf6\xf2\x92\x8d\x5b\xe8\xea\xaf\xa4\x7a\x6e\x02\x7e\x0c\xd6\xb8\x67\xeb\x90\xcd\x9d\x96\x4a\xa0\x06\x2e\x74\x8a\xa8\xd1\xd8\x94\x65\x63\x4b\x13\xee\x29\x1b\xbb\xd1\xc4\xc4\x8e\xf1\xde\x2b\x92\xdc\x23\xed\x82\xbf\x7e\xa6\x39\x44\x77\xfe\x21\x5f\xa8\xca\x6b\x33\xde\x04\xff\x95\xe7\x51\x60\x38\xc6\xad\x87\x08\x07\xd0\x1c\x68\x1b\x62\xc9\x8e\x27\x82\xbc\x41\x4b\x22\x49\x4c\x1d\x0a\xe3\xd6\xc3\x0a\x46\x4e\x30\x4e\x38\xf6\x35\x73\xff\x58\x75\xcf\xca\x6e\x16\xea\xdf\x4d\x30\x29\xe1\xb0\x8d\x5d\xf7\x8e\x56\x93\xc3\xbf\x75\xf9\x0a\x32\x92\x6c\x3d\x65\xf0\x50\x7c\x74\xe4\x43\x96\x31\xbc\xaa\x53\x95\xc3\x18\x40", 200, { 0x97, 0x07, 0xf2, 0xfa, 0x3a, 0x29, 0x1e, 0xb9, 0x2c, 0x0a, 0x92, 0x99, 0x3b, 0x14, 0x8f, 0x99 }, { 0x37, 0xf5, 0x73, 0xfb, 0xb0, 0xf4, 0x25, 0x53, 0x37, 0xf5, 0x73, 0xfb, 0xb0, 0xf4, 0x25, 0x53 } },
|
||||
{ "\x83\x83\x87\x45\xf7\xfa\x5a\xcf\xb3\x0a\x4d\xf0\xa1\xc7\x9b\x9f\x29\x7b\x24\x35\x95\xbc\x0b\xed\x28\x50\x64\x44\x76\xa0\xe1\xdc\x54\x14\xd2\x7e\xe0\xd5\x69\x67\x1e\x2b\x5a\x7f\xb7\x06\x10\x5e\x9e\x6d\x25\xe1\x2a\x1d\x81\x40\x73\x4a\x61\x2c\x46\x7a\xde\x31\x29\x2e\x0a\x46\x59\x32\x11\x9a\xda\x77\xdd\x90\x3b\x7c\xf8\xbf\xbb\x53\x43\x98\x14\x87\x6a\x50\x4c\x38\xff\xba\xfa\x22\xce\x92\x1c\x0d\xfc\xdb\x9a\x96\xed\xc9\xe6\xe7\x7a\x08\xec\x0f\x06\x3d\x71\x6e\xf6\xee\x43\x76\xbf\x93\x69\x9c\xe2\x61\x89\xea\xab\x1e\x89\xea\x1d\x1c\xf9\x4d\xf0\x54\x77\x49\x40\x4c\xa3\xf4\x9f\x9f\x10\x9b\xdb\xad\xd9\x03\x96\xaa\x5a\xb4\x95\x2a\x07\x30\x45\x1f\x38\x1a\xe4\xfa\xed\x91\x93\x02\xd2\xef\x77\xb3\x63\x54\x64\xd8\xbe\x0e\xe2\x8d\x71\xc7\xdb\xec\x37\x86\x0a\xad\xee\x2c\xa2\x34\x4e\x45\xaf\x2e\x78\xe1\x23\xa3\x9e", 201, { 0xe7, 0xfc, 0x8f, 0xff, 0x2f, 0x45, 0xda, 0x2b, 0xef, 0xed, 0x85, 0x62, 0x8e, 0x85, 0x42, 0xb5 }, { 0x82, 0xe8, 0x4c, 0x05, 0x89, 0x52, 0x1d, 0x50, 0x82, 0xe8, 0x4c, 0x05, 0x89, 0x52, 0x1d, 0x50 } },
|
||||
{ "\xb6\x3a\x1c\x3b\x1d\xd8\xce\xcf\x5f\x8a\x91\xeb\x10\x7c\x82\xcd\xbd\x91\xd9\xd9\x1a\x67\x2c\x7a\x4a\x43\xc9\xea\x78\x37\x14\x38\xe6\x7c\x8a\xa8\xad\xe3\xfb\xef\xb7\xa1\x28\xcb\xb9\x1d\x90\x6b\xfc\x56\xe9\x2e\x35\xeb\xbb\x10\x1d\xde\xa5\x3b\xff\x7b\x39\x2a\x7f\x14\xd7\x88\x40\x4c\x1d\x10\x16\x23\x33\x8c\xb7\x17\x3b\x5c\x46\xc1\x79\xd3\x52\xe8\x0d\xf4\x28\x10\x43\x56\xc1\x3b\x1a\x47\xb7\xc8\xf2\x35\xea\x3b\x2a\x4c\x20\xf4\x0a\x67\x1a\x54\x87\x4a\xa2\x7b\x38\x51\x22\x7c\x39\x3a\xbc\x61\x81\xb9\x80\xe8\x64\xee\x9b\xf2\x66\xf0\xd8\xc3\x4a\x08\x92\xf0\x15\x45\xf4\x7d\xb3\x8c\xd7\x44\xbc\x74\x57\xc2\xb6\x33\x06\x57\x0c\xdf\xb6\x2e\x1c\xea\xd9\x13\xb8\x53\xae\xf8\x2a\xd0\x29\x38\x39\xb6\xeb\x7f\xcd\xf4\x01\xa6\xeb\x40\x98\xf9\x65\x38\x10\xf1\xd3\xd3\x23\xbf\xd7\x9c\x05\x3b\x22\xb7\x71\x97\x28\xfe\x4a\x8a", 202, { 0x6e, 0xb1, 0xa3, 0xa9, 0xb4, 0xfe, 0x59, 0xf7, 0xca, 0xbe, 0xa2, 0xd3, 0x91, 0x2d, 0x27, 0xe9 }, { 0xda, 0x32, 0xea, 0x09, 0xb9, 0xa3, 0x47, 0xf0, 0xda, 0x32, 0xea, 0x09, 0xb9, 0xa3, 0x47, 0xf0 } },
|
||||
{ "\x2b\x8b\x43\xef\x0c\x8b\x1a\xb9\x2f\xfb\xf8\x4c\x2c\x56\x5a\xd4\x97\x79\xd9\xd4\x1d\x3c\xde\x2b\xaf\x1b\xa5\x7a\x78\x70\xd4\x58\x1a\x2d\xf2\x1e\x98\x7a\x54\x59\x7d\xe7\xfb\x16\x2a\xa1\x5b\xe9\xd1\x7a\x08\x90\xd8\xd3\x31\xf9\xb4\x16\xe4\x40\x66\xdf\x17\xfc\xdd\x74\xb8\x6f\x73\x24\xff\xa2\x49\x3a\x7c\x51\x55\xc0\xd7\x6a\xac\x6b\x4e\xf7\xcf\xe6\x8d\xcc\x11\x0e\x96\x27\xf1\xd9\x1e\xfc\x97\x2e\xb1\xef\xd3\xf8\xf4\x6c\x00\xf3\x1e\x5b\x5c\xe6\x91\xbd\x8d\x0f\x9a\x7d\x2f\xf1\x2c\xee\x44\x82\x18\x6e\x2b\x5c\x3e\x42\xda\x6a\xbe\xb1\x75\xa7\xcd\xfe\x46\x07\x39\xf3\x5e\xd9\x84\x70\xd4\x95\x68\x87\x0c\x76\x6f\xf4\xc6\x22\x78\xd9\x41\xbc\x5b\x2a\x74\xa4\x46\x3e\xf9\x94\xd3\xf2\xfa\x2a\xb9\x96\xd2\xb0\xac\x19\x35\x8f\xee\x71\x64\x09\x23\xd1\x72\xa0\xf8\xd0\x40\xf6\xc8\x9f\xf3\x75\xfc\x09\x9f\xf1\x5b\x85\x00\x6c\x68", 203, { 0x39, 0x10, 0x2d, 0x86, 0x53, 0xf4, 0x1b, 0x47, 0x60, 0x86, 0x17, 0x9f, 0x1c, 0xac, 0xe6, 0xfc }, { 0x69, 0x03, 0x9d, 0xf8, 0xf4, 0x0d, 0x4a, 0x64, 0x69, 0x03, 0x9d, 0xf8, 0xf4, 0x0d, 0x4a, 0x64 } },
|
||||
{ "\x33\x6f\x8f\x26\xc7\x01\x03\x52\x5e\x87\x92\x01\xb6\x97\x37\x5f\x62\xb9\x57\x1b\x6c\xa7\x70\x06\x32\x97\xb8\x0a\x32\x29\xb8\x06\x99\x1a\x48\xdd\x47\x8b\xa1\x48\x5c\x3b\xe5\xf6\x29\x7c\x4c\xff\xcb\xd1\x60\x64\x23\x21\xa4\x39\x0c\x98\xf0\x53\x3a\x59\x0b\x49\xff\x11\xea\xc8\xf2\x83\x5c\xd9\x85\x9d\x61\xd3\x11\x0d\x89\x44\x27\xec\x9e\xb0\x2a\x67\x18\x38\xdc\x5e\x83\xef\xca\x59\xcc\x1c\x73\x76\x7f\x8e\x77\xca\x74\x01\x1e\x30\xf5\xee\x9b\xbf\x75\x44\xde\x2e\xf0\xbd\x6c\xfc\x06\x8c\x9d\x7b\x3a\x01\x3a\x92\xc1\x2f\x21\x6d\xd0\xea\xf0\x44\x58\x68\x29\x45\xb9\x9c\xe4\xe3\x8e\x05\x84\xd3\x8d\x6d\xdf\x62\x2b\x87\xa3\x41\x06\xcd\xbd\x24\x89\x31\x4a\x27\xa4\xe5\x5a\x3f\xbc\x22\xa8\xe7\x78\x96\x15\x36\xca\x1c\x8b\x13\x84\x45\xcc\xd1\xfe\x9f\x17\x19\x77\xd0\x32\xf2\x8c\x76\x60\xf8\xf4\xaf\x1d\xfd\x5a\x55\x1d\xc0\x5e\xe4", 204, { 0x36, 0xf1, 0x1b, 0x59, 0xee, 0x92, 0x05, 0xcf, 0xb1, 0x6b, 0xab, 0x4a, 0x4a, 0x6c, 0x26, 0x21 }, { 0xf0, 0x1e, 0xad, 0xbe, 0x3f, 0xad, 0x55, 0xf8, 0xf0, 0x1e, 0xad, 0xbe, 0x3f, 0xad, 0x55, 0xf8 } },
|
||||
{ "\x9d\xfa\x3b\x9d\x41\xfd\x2d\xab\x36\x5c\x71\xc0\x6d\xd4\x9f\x1f\xa2\xd5\x1a\x61\x4c\x17\x22\xab\xad\x08\x81\x68\x3c\xf1\x15\x96\xe7\x80\xed\x16\xa5\xc0\xab\x51\x84\xbb\x26\xb5\x63\x78\xf7\xc3\x56\xad\xcd\x7f\x71\xc9\x99\xc7\x3e\x20\x27\x94\x38\xde\x0c\x2c\xdd\x8c\xa8\xb7\x50\xcb\xa7\x72\xdb\x13\x16\x03\xf6\x19\x95\x05\x61\xf2\xe7\xfe\x9b\x8f\x21\x75\x14\xd3\x40\xdb\x55\xb9\xda\xf6\xbc\x1a\x11\x15\xbc\xdb\x04\x7b\x13\xab\xe4\xed\xe1\x1a\x8c\x42\x2f\xbe\x21\x2f\x66\xc3\x75\x8d\x56\xf7\x8e\xfd\xc1\xad\xc4\x91\x6b\x5e\x3d\xf8\x77\xfa\xee\x8c\x41\x9a\x3d\x24\x8a\x0a\x68\x0f\x49\x6c\x9c\xd2\xe9\x12\x42\xeb\xec\xf0\x32\xe5\xf6\x29\xce\x00\x67\x4d\xcf\x55\x91\x3d\xec\xdf\x29\xfa\x4e\x49\x98\x9e\x55\xd4\xe0\x24\x5a\xb9\xc1\x84\x5c\x3f\xf0\xd1\xdd\x8e\x81\x4e\x81\x18\xf7\xfd\x44\xf2\x8d\xe6\x8d\x13\x73\x3f\xcb\x6a\x0c", 205, { 0x24, 0x2f, 0x23, 0x46, 0xb2, 0xf8, 0x55, 0xbc, 0x71, 0x05, 0xaf, 0x08, 0x6b, 0x36, 0xa0, 0x5f }, { 0x73, 0x67, 0xe3, 0x32, 0x34, 0xdd, 0x0b, 0x14, 0x73, 0x67, 0xe3, 0x32, 0x34, 0xdd, 0x0b, 0x14 } },
|
||||
{ "\xb6\xb4\x58\x31\x4d\xf6\x2f\x6b\x8d\x5b\x18\xe6\xbf\xd0\xea\xa8\x99\x71\xb4\xf8\x52\xf9\xa5\xdb\x3c\x72\x88\xb4\x8f\x0e\x39\x6b\xa5\x5c\x63\x5b\x9f\xc4\xd7\x8f\x2b\x88\xdb\x33\x5a\xa7\x3a\x50\xcf\x9e\x38\x45\x89\xf1\x77\xc9\xd1\x74\x91\x3f\x75\x14\xf0\xc0\x8c\xba\x1a\x61\xc8\x09\xc7\x6e\x8d\x88\x34\x69\xec\x67\x51\x32\x8e\x02\x89\x73\x75\x2f\x27\x2d\xb3\xb4\x33\xad\xeb\x11\x36\xbe\xaf\x1a\xc3\x46\x65\xf4\x58\xb5\x02\xbb\xeb\xab\x75\xb5\x24\x89\xe1\xc7\x58\x08\xae\xf3\x69\x8f\x68\xd6\xc4\xdc\xd3\x9f\x1e\x9c\xaa\xf0\xbd\x34\xca\xdc\x14\xed\xbf\x01\x89\xa7\xf3\x59\x47\x05\x05\xac\xad\xb5\xb0\xdb\xdb\x2f\x3e\x6e\x18\xa3\x37\x62\xdb\x38\x01\x6c\x05\x15\x0c\xb7\x37\x06\x85\x95\x8a\xdf\xda\xdf\xf5\x41\xc5\x80\x02\x5f\xa7\x44\x09\x80\x4a\x8a\x70\x62\xa7\x7f\xf6\xd2\x9b\xaa\x9a\x44\x52\xd4\xe8\x28\xf5\xff\x1a\x99\x7d\xde", 206, { 0x02, 0x52, 0x66, 0xa4, 0x5b, 0x17, 0xf2, 0x43, 0xcf, 0xb9, 0xe5, 0xf7, 0xd3, 0x72, 0xd4, 0x16 }, { 0x21, 0x9d, 0x14, 0xf8, 0x87, 0x98, 0xc1, 0xb7, 0x21, 0x9d, 0x14, 0xf8, 0x87, 0x98, 0xc1, 0xb7 } },
|
||||
{ "\x93\x58\xad\x54\x7d\x31\xcb\x55\xb8\xd5\x5f\x68\xe8\xfb\xed\xde\xc5\xc5\x6b\x85\x00\x5f\x23\x2f\xa9\xbc\x67\x6c\x0a\x01\xf5\xe8\xb7\x40\x35\x13\x41\x4a\x09\x71\x2a\xfc\x62\x7b\x06\xbf\xd4\x48\x33\xdd\x5d\xbf\x55\x1b\x89\x8b\x22\xf1\x04\x42\x8d\xff\x7d\x54\x72\x6c\xc4\xd7\x9e\x4a\xd8\x97\xdf\x5b\xf2\xaf\xb2\x29\x13\x49\x13\x46\x3b\x62\x50\x5b\x7c\x7c\x18\xa9\x8b\xef\x8e\xcf\x5c\xcb\x08\xc4\x56\x34\xa3\xe3\x81\x26\x5a\x8f\x01\xde\xfc\x83\x70\x7d\x5d\xca\xbc\x93\x13\x99\xa2\x6b\x3c\xfd\xad\x67\xa5\x57\x58\xbf\x9b\x74\xb9\xc5\xf0\x64\x63\xbb\xfb\x2e\x63\xa5\x12\x54\x3e\xf8\x65\x58\x2b\xeb\x3c\x4c\x78\x9c\xc0\x22\xb9\xf5\x29\x74\xc4\x29\xbf\x29\x3e\x3f\x16\x10\x22\xb8\xa8\xc0\x98\x02\x67\xb2\xf3\xc3\xbb\xb2\x7c\x69\x1d\xfb\xc3\xa2\xa3\x62\x2f\xe0\xd2\xa2\x0d\x3d\x8c\x75\x1b\xa2\xfb\x8b\x16\x23\x30\x6f\xd3\xfa\x54\x4a\xe6", 207, { 0x36, 0xca, 0xa7, 0x3a, 0xf9, 0x0c, 0x53, 0x8c, 0xb0, 0x8c, 0x83, 0x06, 0x2c, 0x58, 0x3a, 0xd7 }, { 0x85, 0x74, 0x2f, 0x96, 0x3b, 0x94, 0xd2, 0xa3, 0x85, 0x74, 0x2f, 0x96, 0x3b, 0x94, 0xd2, 0xa3 } },
|
||||
{ "\x17\xb9\x48\xdd\x43\x3d\x81\xad\xcd\x5e\x45\xbe\x18\x76\xec\xec\xed\x2f\xed\x7b\x89\x90\x00\xac\xe8\x50\x58\x08\x47\x57\x55\x1f\xe7\x98\x3f\xab\xf5\x5d\x03\x8b\x56\xd3\x9a\x9f\x01\xc2\x01\xbb\xee\x86\x57\xfa\x56\x67\x14\x4a\x6b\x70\x53\x7b\x06\x15\x30\xd3\x6d\xba\x31\xe3\xe6\x87\xed\xfe\x45\x73\x99\xeb\x58\x6c\x54\xc1\xb6\x70\x52\xc6\x25\x34\x7b\x71\x0a\x99\xd9\xff\xba\xa7\x01\xb8\xcc\x35\xa7\x87\xb9\xb9\xae\xf7\x85\x4f\x3a\xd0\x3a\xec\xea\xcf\x94\x69\xeb\x37\x3b\x1d\x85\xa3\x06\xee\xe8\x3a\xcc\xf8\x77\x79\xa9\x0c\x90\x3c\x2b\x6c\xf0\x46\x90\x8b\xee\x97\xa5\xf1\x69\x06\x0d\xca\xa5\x1f\xb2\xa7\x84\x69\xf5\x09\xfb\x79\xe6\x2f\xc3\xc7\x1c\x49\xb0\xa6\x82\xb8\xc0\x2a\x99\x27\x52\x90\x16\x6b\x6b\x6c\x2e\x61\xf3\x24\x7c\xfa\xdf\xeb\x0f\xaa\x52\xa4\x6e\xfe\xdc\x59\x34\x1a\xa1\xc6\xe2\x7d\xa0\x15\xe3\xe7\xdd\x69\x86\x46\x29\x8f", 208, { 0x5b, 0x2e, 0xb9, 0x18, 0xf9, 0x19, 0x1a, 0x3f, 0x14, 0x29, 0x91, 0xf4, 0xfa, 0xae, 0xd1, 0xc4 }, { 0x14, 0xf5, 0x53, 0x40, 0xd7, 0xa6, 0x90, 0xfa, 0x14, 0xf5, 0x53, 0x40, 0xd7, 0xa6, 0x90, 0xfa } },
|
||||
{ "\xea\xb8\xfb\x8e\xb4\xf0\x1e\xfb\x86\xf4\xf8\xd3\xd9\x02\x74\xfb\x2d\xbf\xe7\xed\xe5\xff\x4c\x49\x11\xf7\x5f\x1f\xc1\xea\x1e\x23\x81\xf8\x38\x4c\x29\x62\xe1\xe4\xac\xb2\xcb\x12\x3a\xb0\x01\x1e\x60\xe1\x0f\xe2\x55\xc3\xbd\xd0\x02\x31\xc4\xb9\xaf\xbf\xbe\x61\x67\x56\xa4\xd5\xd4\x45\x70\x4d\xe7\x00\x9b\x2f\x36\x43\xe0\x6a\x53\x74\x4a\x4d\xfd\xe2\x66\x07\x79\xd7\x6a\x86\x83\xde\x7f\x14\x16\x23\xc5\x8d\x54\x80\x31\x1f\x2b\xc3\xfd\x55\xb4\x34\x99\xff\xe3\x0d\xd6\x04\xa1\x02\x95\x08\x2a\xcf\x8a\xf1\xa1\xc7\x53\x29\x65\x30\x7b\x72\xae\x7e\xaf\xe7\xbb\x03\xc5\xb9\xb4\xa8\x77\x57\x4c\x99\x3b\xbd\xc6\xc1\xae\x3d\x59\xe9\xab\xd5\x7e\xe8\xf9\x65\x40\xd6\xe3\xed\x50\x55\x97\x26\x5c\xb1\x9b\x3b\x78\xf2\x4d\xc4\x06\xae\x60\x0c\x2b\x4c\xde\xc6\x5e\xb9\x68\xa4\xfe\xf2\x43\x4e\x2e\xe1\x3f\x6c\x10\x7e\x97\xd7\x59\x31\x89\xb0\xd9\x6a\x2c\x80\x86", 209, { 0x31, 0x25, 0x6f, 0xfd, 0x35, 0x22, 0xe8, 0x07, 0xc3, 0x32, 0xf2, 0xd6, 0x13, 0xa7, 0x8e, 0x45 }, { 0x0f, 0xdd, 0xb0, 0x43, 0x14, 0xfa, 0x95, 0xa7, 0x0f, 0xdd, 0xb0, 0x43, 0x14, 0xfa, 0x95, 0xa7 } },
|
||||
{ "\xad\x22\xec\x00\x1f\xf3\x53\x2e\x7e\xf1\xe1\xc1\x56\xdc\x63\xa5\x95\x6a\x6e\xea\xd4\xcb\xef\x77\x7b\x72\x34\xaa\x41\xb7\xfe\x52\x52\x3e\xcd\x5d\xe5\x5a\xab\xb2\x0c\x79\xb7\x56\x36\xb1\xd6\x20\x6e\xe1\xb1\x69\xe0\x5a\x66\xa1\x9f\x77\xf3\x76\x17\xd2\xf3\xb8\x1e\x7f\x7d\x6b\x17\xc8\xc8\xec\x9a\x1d\x24\xbb\x64\xa8\xae\x30\x9d\x36\x6a\x70\xfe\xa0\x5d\x03\x3e\x2e\xff\x0f\x32\x44\x49\x4a\x29\x7a\x22\x66\x46\x3b\xfd\xf9\x6f\xec\xf4\x13\x59\x85\xdc\x16\xc4\x73\xf0\x7d\xc6\x08\x86\xbe\xaf\xc6\x1e\x5e\x0b\xf8\x89\x8e\xee\x8b\x27\x24\xc5\x09\x9f\xd6\x7a\x3b\xa2\xf3\x9b\x9c\x34\xc3\x0d\x25\x9c\x1a\x83\xf7\x52\xd3\x84\xdd\x57\xd8\x3e\xcd\x57\xac\xf0\x81\x31\x7e\x8c\x3f\x19\xf7\x31\xce\xc9\xad\x3a\x03\xa5\x65\x48\x93\x45\x59\xae\xbe\x40\x2b\x01\xb3\xc6\xdb\x94\x15\xfe\x6b\x9e\x3d\x62\x82\x7d\xb1\x2b\x8a\xff\xe0\xfe\x93\x69\x11\x8a\x0b\xbc\x7f", 210, { 0x5d, 0x67, 0x04, 0x3d, 0xa2, 0x1a, 0xaa, 0xa7, 0xd4, 0x27, 0x26, 0x9a, 0x8c, 0xbe, 0x4a, 0x8d }, { 0x57, 0x8e, 0x17, 0x27, 0xfd, 0x23, 0xe5, 0xac, 0x57, 0x8e, 0x17, 0x27, 0xfd, 0x23, 0xe5, 0xac } },
|
||||
{ "\x79\x40\x60\xc1\x58\xf4\x6d\x72\xa3\xa6\xcf\xb3\x19\x30\x24\x3f\x69\x3e\x64\xa9\x4d\xfe\x1a\x0b\xcf\xba\xa3\x18\x4f\xb8\x8f\x94\x3a\x77\x5e\x53\x01\xb6\xed\xcd\x87\xbe\xfd\x2e\x7b\xe1\x86\xd6\xc0\x8a\xf2\x9a\x06\x8c\xc2\x86\xb4\xce\x10\x9d\x6d\x61\xbb\xf1\x09\xb8\x0a\xe0\xa3\x6c\x05\xa2\x3a\x04\x4f\x49\x97\xde\xcc\xef\xdd\xab\x51\xa5\xa6\x02\xdd\xf4\x9f\xe4\xc6\xea\x3f\xd1\x98\x87\x01\x0e\xc5\x4d\xb7\xc1\x95\x1d\xdd\xba\x21\x13\x74\xf2\xd9\xa2\xc0\x9b\xdd\x50\x67\x0b\xcd\xf4\xdc\x32\xb0\xbf\x70\xbc\x32\x1d\xbf\xd2\x27\x7f\x2b\x62\xc3\x76\x18\xae\x60\x66\x6c\x6a\xc6\xf5\x81\x86\xfb\x58\x5f\xb7\x89\xca\x37\xa6\xb5\x81\x51\x06\x8c\xe7\xbf\x2d\x4d\x41\xb2\x6e\x77\x43\x62\x8d\xe7\xc6\x27\xbe\x16\xad\x35\x95\x96\xc4\xa7\x5b\x96\xad\xc9\xb9\xdd\x28\x8e\xae\x40\x60\x1a\x93\xf6\xba\x08\xf6\x1c\xe7\x30\x46\xf4\xe4\xcc\xe8\x5f\x05\xee\x49\xa9", 211, { 0xc8, 0xf2, 0xc8, 0x9f, 0x12, 0x4e, 0x17, 0x42, 0x89, 0xe7, 0x90, 0x65, 0x70, 0x3d, 0xae, 0x43 }, { 0xec, 0x0c, 0xe0, 0x65, 0xc8, 0x52, 0x70, 0x0e, 0xec, 0x0c, 0xe0, 0x65, 0xc8, 0x52, 0x70, 0x0e } },
|
||||
{ "\x9c\x75\xef\xa4\x2a\x5c\x71\x38\xbf\x16\x56\x09\x48\x5f\xdc\x54\x4e\x0b\x1f\x6b\x0f\xa2\xd8\x17\xe6\x8d\xcf\xbd\xe3\x23\x4f\xfc\xd5\x5a\x60\xf1\xd2\xc5\xa3\x7d\x3e\xcb\x67\x2f\xef\x35\xa0\x31\xda\x5f\xd9\xa0\x4a\xe9\xcd\x30\x41\x16\x19\xfb\x5f\x88\x1c\x9c\xd4\xb7\x3e\xc1\x51\xa8\x58\xc7\xf2\xc5\xed\x65\x3d\x4c\x6f\xd7\xa6\xff\xed\xa6\x7d\x8a\xf3\x93\x0f\xa3\xd0\x8e\xef\x4e\x00\x75\xe4\x15\xa3\x03\x04\xb7\xca\x3d\x0e\x08\x92\x1f\xbf\xbe\x36\x1f\xd6\xa2\x55\x27\x9b\x5c\xa3\xee\xf4\x40\x05\xb4\x0e\x10\xae\x3f\xb9\x4f\x37\x68\x59\x22\xf2\x85\x36\xe0\xb3\x5c\x56\x58\x07\xc8\xdb\x92\x57\x42\x08\x41\x1b\x27\x95\x15\xe8\x85\x7a\x25\xfa\xfb\x10\x16\x7a\x4b\xbc\xfd\x89\x15\x33\x7a\xe1\xea\xc2\x44\x48\xf4\x4a\xf6\x96\xa5\x69\xed\x2e\xab\xd9\x48\x1f\x31\x3c\x7f\x9f\x38\x82\x5b\x03\x1e\xcd\x14\x48\x2c\xb9\x93\xe0\xe5\x7c\x24\xaf\xc0\xa0\x97\xf9\xd1", 212, { 0xb2, 0x70, 0xee, 0xf6, 0x91, 0x40, 0x4c, 0xed, 0x9c, 0x55, 0x38, 0x16, 0xe6, 0xa1, 0x20, 0x0a }, { 0xf7, 0x72, 0x51, 0xea, 0x0a, 0x59, 0x9b, 0x56, 0xf7, 0x72, 0x51, 0xea, 0x0a, 0x59, 0x9b, 0x56 } },
|
||||
{ "\xb7\xcd\x26\x3a\x19\x55\x31\xb4\x80\x00\x79\x1f\x3f\x1c\x31\x66\x9c\x35\x5d\xa3\xc1\xd6\x6c\xb3\xfd\x75\xb6\xc3\x41\xf6\x5f\xfe\x9a\x90\x42\x2d\x55\x83\x01\x98\xc2\xa1\x95\x35\xd9\x1d\x01\x9c\x4f\x83\xef\xa2\xb5\x22\xb1\xe9\xa3\x61\x54\x4e\xd2\x7c\xbe\xab\xa4\x38\x70\x2b\x58\x77\xb6\x49\x57\x82\xe4\xb3\xc6\x7d\x03\x88\xd8\x0e\x81\x05\xfd\xfd\x73\x39\xa2\xa8\x0c\x69\x1c\x05\x16\xae\x20\x26\x8a\x2f\xbe\xd5\x43\xc4\xef\x95\xc7\xf1\xd5\x2f\xce\x41\x4e\x1b\xf0\x64\x3e\x7f\x6f\x89\x33\x10\x40\x86\x43\xce\x50\x01\x52\x98\x10\xc2\x94\x02\x4b\x61\xe8\x1c\x2b\x86\x4b\xdb\xe6\x21\x0b\xf5\x3d\xf3\x4a\xf1\x29\x28\x09\xd9\x68\x32\xdc\xac\xda\x65\x65\xbc\xfb\x1c\x89\x99\x65\x9a\xd8\x9a\x2b\xa3\xa3\x6c\xf1\xe4\xa7\x22\x24\xa4\x5d\xbe\x62\x5c\x89\x2c\x86\xaf\xd2\xb6\x3c\x36\x9e\x14\x3d\x8f\xf9\xe9\x60\xe3\x1d\x87\xd2\x3c\x6a\xa8\x90\x2d\x0c\x8f\xa6\x76\x04", 213, { 0x37, 0x38, 0x31, 0xd8, 0xd3, 0x34, 0x29, 0xd8, 0x76, 0x1a, 0x81, 0x13, 0x50, 0x27, 0xd2, 0xf5 }, { 0x12, 0xe8, 0x35, 0x95, 0xaf, 0xd0, 0x46, 0x9c, 0x12, 0xe8, 0x35, 0x95, 0xaf, 0xd0, 0x46, 0x9c } },
|
||||
{ "\xdc\x4d\x18\xfd\xc9\x68\x4e\x52\x14\x20\xa1\x65\xe9\x76\x90\xee\x3e\xfc\x34\xd6\x8f\x08\x97\xe3\x9b\x60\x75\xbf\x30\x61\x2e\x75\xd6\xfb\xfd\x84\x91\x9c\x33\xe2\x4c\x07\xbb\x52\xa2\xfd\x8c\x33\x49\xb3\x22\xbe\x93\x33\x2a\xec\xc9\xd7\x64\xbe\x34\x27\xd8\x6d\xc6\xc2\xfa\x16\x09\xa4\x64\x31\x96\x17\x43\x94\x5a\xce\xa4\x75\x72\x11\x5c\x75\xf2\x16\xd3\x6a\x1f\x42\x3a\x2a\xe3\x59\xd5\xb9\xa2\x26\x4e\x57\x53\x3c\x28\x5c\xb7\x63\xb5\xeb\xc5\x5c\xc6\x67\xb6\xcb\xbd\x63\x9a\x80\x07\x11\x8c\x3f\x0a\x28\x3d\x8f\xae\xa2\xa4\x24\xf4\x6e\x27\x24\x73\x05\xd5\x4b\x4d\x8b\x3e\xe2\x92\x3c\xb7\x5b\x1c\x35\xa5\x5f\x2b\x0c\x8a\x6b\x73\x16\x70\x30\x3b\xcb\x4f\x69\x40\x17\x1d\xbe\x3c\xd8\x73\xd2\xfe\xbb\xe0\x0f\x48\x39\x84\xb5\x80\xb0\xfc\x30\x76\xc5\x84\x20\xfa\xc5\x31\x59\x93\x60\xa4\x52\xab\x67\x82\xca\xac\x5f\xe9\xa3\x7e\xe2\x81\xec\xdd\x12\xea\x3d\x1b\xd4\xcd\x86", 214, { 0x39, 0xc8, 0x4f, 0x25, 0x1c, 0x7a, 0xc5, 0x3e, 0xe3, 0xbf, 0xce, 0xab, 0x55, 0x47, 0xce, 0xf0 }, { 0xdd, 0x76, 0xa7, 0x62, 0x1b, 0xc1, 0xac, 0xe0, 0xdd, 0x76, 0xa7, 0x62, 0x1b, 0xc1, 0xac, 0xe0 } },
|
||||
{ "\x28\x93\x6b\x79\x63\x8f\x60\x3b\x56\x3e\xdf\x68\xc5\xa1\x29\x5b\x1a\xec\xb2\x65\x70\x51\xb5\xb2\xc3\x48\x1c\x0a\x7f\x78\xa7\x23\x52\x9a\xa4\xae\x81\x17\xe3\x04\xd3\xfc\x75\x85\x7a\xfd\xaa\xc3\xd5\xb9\x62\xaa\x31\x29\x36\x4e\x2f\xdd\x6c\x4b\x72\x10\x5b\xb6\x5c\xb2\x20\x21\xae\x1d\x7c\xb3\x94\xe0\xdd\x4a\x5a\xe2\xd4\xad\x57\xa3\x6c\x0a\xc0\x3c\xf0\x6a\x83\x7d\x7c\x67\x50\x81\xa3\xa1\x7b\x3f\x4c\xb0\x01\x6a\xb0\xf2\x30\x55\x9f\xd0\x8d\x17\xe7\xa3\xa9\xe1\xde\x53\x8d\x9f\xb9\x31\x29\xb9\xd2\xf7\x40\x03\xeb\x67\xe6\xd2\x54\x32\xa5\x25\x66\xa8\xb3\x2d\x21\x27\xdd\x18\x2d\x4a\x3d\x9c\x8a\x13\xd1\x60\x26\xc0\x5e\x9c\xe1\xe8\xc1\x7c\x04\x3c\x75\xbd\x26\x84\x5e\xc4\xa8\xcc\x5d\xec\xe5\xde\x35\xc2\xb0\xce\x0f\xea\xdf\xb8\xe3\x64\x67\xc4\xf3\x0f\x23\x2f\x95\x64\xe2\x00\x87\x28\xf0\x53\x90\xd6\xfe\xb7\xd6\x6e\x91\x71\x1e\x9c\x4a\xcc\x1a\x4c\x4b\x98\x06\xfa\x13", 215, { 0xa6, 0x58, 0xbd, 0x4a, 0x1d, 0x08, 0x84, 0x68, 0x2f, 0x78, 0x55, 0xd3, 0x4e, 0x1c, 0xe2, 0x3e }, { 0x80, 0x0f, 0x12, 0x7f, 0xcb, 0x86, 0x9a, 0x6e, 0x80, 0x0f, 0x12, 0x7f, 0xcb, 0x86, 0x9a, 0x6e } },
|
||||
{ "\x7f\x03\x83\x7e\x98\x09\xd3\x31\x60\xa2\x78\xce\x13\xb2\x30\x18\x5d\xf3\x3f\x90\x12\x14\x7d\xdb\x62\x01\x5f\x09\x14\xce\x15\x7c\x9b\x42\xf3\x77\x54\x3a\x1a\x92\x1e\xe6\x32\xc1\xb0\x8b\xba\x23\xd5\xf8\x1c\x16\x7a\xf4\x1f\x2f\x8a\x98\xf6\xb3\xa7\x56\x3f\x47\xe3\x6a\xc2\xd2\x04\x2e\x9c\x1a\x54\x37\x88\xa4\x54\x70\x5c\x85\x3a\xaa\x30\x10\x27\xf7\x08\x8e\xaa\x46\xfb\x84\xfa\xb4\x92\xb6\xc9\xac\x0d\x43\xe3\x91\xe4\xa7\xef\x94\xff\x78\xed\x15\x43\x16\x00\x86\x82\xf0\xdb\xa9\x8b\x80\x2a\x77\xb1\xa0\xe4\x52\xfd\xa2\x7b\x4b\x5f\x90\x8b\xcc\xcb\x38\x28\xd0\xa5\xb0\xe1\x65\xf9\x86\x61\xcb\xf6\xcb\x83\x45\x15\x3c\x34\x13\x47\x43\xf0\x81\xf7\x85\xcc\x9c\x47\x27\x66\x97\x3b\x51\x4a\x88\xc0\xa4\x66\xc7\xf9\x7c\x03\x37\xd6\xb2\xab\x3b\xab\x5f\x42\x5c\x7c\x42\x15\x9f\x8f\x08\x35\xa3\xb3\xc5\xc5\xe3\xb1\xd2\xea\x15\xf0\x11\x4a\x36\x78\x4e\x7f\xf8\x6a\x37\x87\xd2\x67\x39", 216, { 0xb6, 0xb6, 0xc1, 0x98, 0x0e, 0xf0, 0x0b, 0x4c, 0x03, 0x06, 0xdd, 0x86, 0xba, 0xc4, 0xa2, 0x93 }, { 0xcc, 0x8c, 0xef, 0xc9, 0x58, 0x28, 0x9d, 0xa8, 0xcc, 0x8c, 0xef, 0xc9, 0x58, 0x28, 0x9d, 0xa8 } },
|
||||
{ "\xb3\xa8\xf4\x49\x6d\xcc\xc0\x22\xb3\x82\x19\x0c\xd3\x62\xd5\x02\x71\x84\xa2\x74\x70\xca\x7d\x95\xce\x5d\xa5\x7e\x8e\x21\xd3\xaf\xed\x8a\xb5\x04\x5c\xe2\x9d\x89\x5e\xda\x50\xa6\xad\x06\xf2\x45\xeb\x51\x83\x70\xad\x14\x0f\x4f\x4f\x77\x39\x00\xf8\xcf\xf3\xd4\x1d\x45\x32\x38\xcd\xbf\x09\x4c\xa8\x85\x95\xa9\x9e\xbf\xe2\xd6\xdb\x27\xae\xf0\x5d\x50\x71\xde\xee\x80\x9a\xfd\xc7\x93\x25\xd2\x26\xe8\x79\xc3\xc6\x6f\x38\xaf\xcd\x48\x2f\x57\x5b\xa9\x1a\x5d\xae\x26\x7a\xcc\x1d\xa9\xc5\x1c\x31\xdf\x2b\xa2\x2a\x18\x3e\x6f\xdb\xa0\xa7\x01\xef\x36\xb5\x78\xb2\xf7\x43\x69\x7b\x96\x8c\x1b\x9a\xbd\xfe\x89\xb8\x96\x46\xeb\x23\xc7\x22\x6a\x2e\x6d\x11\xe0\x3e\x25\xfe\x41\xf2\xc2\xa6\x90\xbb\x5f\x3e\x6c\x80\xd1\xa4\x57\xc1\xb4\x13\xca\x36\x65\xa5\xf3\xb9\x72\x92\x4d\xbc\x97\xc4\xe0\xc8\x87\x29\x6f\xad\xd9\x0a\x5a\x77\xa2\x8c\xa5\xe0\x4d\x13\xd2\xb4\xc8\x8b\x1c\xd6\x84\x28\x49\x20", 217, { 0x97, 0xbc, 0xdc, 0x33, 0x32, 0x46, 0x32, 0x32, 0x43, 0x56, 0x50, 0xce, 0xa6, 0x19, 0xf3, 0xfe }, { 0x62, 0x5c, 0x0a, 0xff, 0x34, 0x30, 0x66, 0x57, 0x62, 0x5c, 0x0a, 0xff, 0x34, 0x30, 0x66, 0x57 } },
|
||||
{ "\x08\x90\xa2\x11\x86\x21\xb1\x4a\x89\x52\xb2\x69\x3c\xa4\x7e\xe1\x71\x56\x6f\x51\x0f\x89\x1b\x95\x39\x2d\x66\x23\x06\x09\xcf\x98\xb5\xf0\x87\x82\x7f\x82\x31\x72\xfa\x7c\x19\x75\xf6\x45\xf4\x93\x1c\xa9\xb7\x49\x42\x5f\x98\xa9\x3f\x93\x35\xe6\xa5\xe1\x40\x86\xda\xae\x5d\x9c\xf6\x63\xb3\x84\x7d\x58\x4f\x0c\x9f\xc0\xcb\x4d\xa6\x3d\x4a\xfd\x1e\x5c\x16\x4f\x9e\x90\xcc\x8f\xdb\x81\x8c\xb2\x58\x8c\x0d\x85\x5e\x8c\xbe\x9e\x40\x61\xaf\x38\xb4\xd8\x7b\x4f\x6e\xfc\x61\x95\xce\xf2\x22\x1a\x67\xfe\x39\x7b\xc1\x34\x71\x18\xad\x39\xb8\x64\x59\xc9\x2e\xd4\x4e\xbd\x46\x2c\x89\x56\x00\x77\x4c\xd6\x08\xfa\x86\x1b\x91\x00\x56\xaf\x4c\xdd\xa9\x9d\xe6\xf0\xd7\x68\x27\xac\xcb\x68\x44\xf8\x8c\x70\xfe\xcc\xfc\x9f\x81\xa7\x98\xd2\x37\x03\xa0\x6e\xe0\x07\x3d\x58\x34\x09\x2f\xac\x26\xa0\x87\x96\xd1\x3b\xed\xec\x0b\x0a\xd3\x6e\x18\x68\x89\x4a\xe0\xf2\xc1\x76\x40\x69\xd2\xf8\xe6\xd6\x7b\x01", 218, { 0x26, 0x73, 0x15, 0x7b, 0xbd, 0x4d, 0xd2, 0x3b, 0x52, 0x24, 0xac, 0xcb, 0xdb, 0xa2, 0xb4, 0x85 }, { 0x42, 0x6a, 0xbb, 0xc6, 0x57, 0xcd, 0x21, 0xdf, 0x42, 0x6a, 0xbb, 0xc6, 0x57, 0xcd, 0x21, 0xdf } },
|
||||
{ "\x1d\xf8\x02\xc9\x98\x06\x10\x7f\x28\x21\xb5\x6a\x2f\x97\x4a\x35\x51\x13\xeb\xb1\x95\xe5\x77\xa4\x54\x54\x4c\x6a\x41\x72\xf5\x0b\x55\x64\x4a\x6a\xb0\x66\xb4\x54\xdc\x4a\x71\xff\x93\xed\xd8\x79\x69\xeb\x4f\xde\x93\xbc\x87\x19\x9b\x7e\xc1\x1c\xcc\x69\x65\x23\xd5\xc7\xd2\x80\x3a\x32\x3d\x6b\x5e\xbd\xcd\x84\x15\x8f\x2d\xdc\xc6\xdf\x4f\x55\x42\x15\x6b\x91\x9e\x5f\xfe\x53\x0b\x11\x78\x50\x1f\xe0\x97\x12\x0b\xee\x71\xe3\xb8\x48\x88\xb6\x17\x6d\x55\x9a\x31\xc7\x07\xdc\x63\x66\x86\xe0\xda\xc2\x82\x61\x74\x44\xf5\xf8\xa9\xa0\xb5\x74\x45\xff\xe3\x92\x59\xfc\xa4\xaf\x9a\xf6\xf9\x60\xaf\xde\xa5\xaa\xc3\x5d\xcd\xbf\xfc\x94\x53\xd5\x5d\x6a\x83\xe1\x3a\xa2\x2d\xbe\x39\x0d\x14\xe9\x0f\xe4\x52\x8a\x66\x23\x5f\x9a\x37\xf2\x2c\xee\x50\x62\x22\x07\x9e\xf5\x9d\x4c\xaf\xae\x92\xae\x7c\x38\xc2\x83\xe2\x0e\xa2\xd4\xf1\xae\xca\x29\x50\x3f\x35\x8c\x1b\xb7\x29\xdb\xbd\x11\x3d\x9a\xdc\x58\x7e", 219, { 0xf8, 0xf6, 0xd7, 0x27, 0xb4, 0x06, 0x41, 0xbf, 0xb5, 0x85, 0xcd, 0x36, 0x96, 0x1f, 0x60, 0x2c }, { 0x80, 0x8a, 0x36, 0x5b, 0x06, 0x36, 0x75, 0x0e, 0x80, 0x8a, 0x36, 0x5b, 0x06, 0x36, 0x75, 0x0e } },
|
||||
{ "\x26\x5e\xf8\xf7\x70\xd3\xc9\x13\x9f\xfe\xc8\x6d\xe8\xce\x2b\x3a\xf7\x32\x7b\x64\x3f\xaf\xa0\xeb\x1a\x10\x44\x0a\x7b\x92\xd5\xea\xe7\x21\x9d\x36\x88\xff\xb3\xf2\xc7\xa9\x5f\x9d\x1e\x80\xb5\xe1\x4f\xc3\x66\xaa\x91\x98\xa7\xf3\xb8\xe8\x69\x9d\x1a\x76\x96\x36\xcc\x11\x01\x4d\xa5\x1e\x90\x7e\x92\xca\xd9\x3f\xdb\x0a\x9e\xe9\x22\x44\x9c\x91\x45\x79\x1f\x95\xbd\xbe\xd0\x35\xd9\xd2\x25\x74\x9e\xad\xb0\x15\xc4\xc7\x5e\xa5\xbe\x5a\x35\x2c\x2d\x0a\x4c\x8e\xf3\xf8\x99\x47\x42\x87\x17\xd5\x33\xf5\x9e\xd0\xef\xec\x34\xf8\x7c\xe2\x0f\x6e\x3d\x31\xec\xa8\x41\x9e\x71\xdf\x68\x12\x6d\xd4\xf8\x46\xf0\xa8\xf2\x41\x6f\xf5\xfe\xfb\xca\xb2\x43\x73\xbb\xdc\xd9\x1a\x17\xb1\x52\x67\xbb\xc3\x09\xb8\x91\xe7\x57\x9e\xfe\xd5\x9f\x59\xdd\x1a\x96\x4e\x06\xc7\xd0\x1c\xcf\x53\xaa\x8f\x24\x48\x83\x4f\x59\x46\x38\x86\xb4\x08\x74\x14\x8d\x78\x76\x53\x61\x55\x1a\x44\xe6\xf0\x36\xd4\x11\x7c\xc4\x47\xbb\xa8", 220, { 0x47, 0xce, 0x0b, 0x67, 0x8a, 0x9a, 0x81, 0x09, 0xcb, 0xd9, 0xb7, 0x6f, 0x4d, 0x42, 0x49, 0x98 }, { 0x08, 0xc8, 0x40, 0xde, 0x0f, 0x17, 0xd4, 0x27, 0x08, 0xc8, 0x40, 0xde, 0x0f, 0x17, 0xd4, 0x27 } },
|
||||
{ "\x4d\x5b\xf6\x3f\xe0\x51\xcd\x35\x6c\x53\xa1\x3c\xf2\xf6\xcc\x4d\xf6\x92\xb6\x16\x6f\xc7\x1b\x0b\x6a\x76\x0b\xd1\x4b\x5f\x8f\x1c\xfb\xc3\xfe\xf3\xd8\x90\x42\x65\x48\xc8\xbd\xcd\x89\x22\x1c\x08\x3c\x74\xa6\x76\xb7\xaf\x61\xc6\xf4\x81\x9c\x5e\x31\x08\x82\xc5\x9e\x47\x48\x93\x30\x68\xbe\xd2\x80\xd9\x81\x76\xca\x90\x3c\xd5\x19\x40\xf3\x50\x10\xe4\xae\x82\x34\x91\x74\x1d\x8d\xa9\x68\x10\xf3\x58\xd1\x4f\xad\x3f\x4e\x9d\x2e\x81\x88\x79\xcf\x7f\xa6\x72\xce\xc0\xdf\xbe\x6f\xf0\x5f\x36\x1b\xfd\x7a\x9f\x42\x79\xe9\x9d\xf8\xd6\xc8\x71\xdb\x4c\x09\x91\x14\xa8\x9e\x57\x5b\xe6\x96\x66\x64\xd5\x89\xbd\x81\xdc\x40\x7a\xe4\xf6\xc9\x56\x6a\xce\x36\x23\xfc\x85\x77\x08\x07\xfc\x16\xa6\x56\x3f\xbb\xd7\xe2\x2c\x13\xae\xac\xa1\xc2\x53\xfb\x13\xa2\x1a\x24\x9f\xc5\x96\xbe\x3c\xfd\xb8\x55\xdf\x06\xce\x96\xcd\x52\xe9\xe4\x59\x81\x8b\x6c\x9f\xfe\xba\xa9\x8a\x3a\x94\x32\x11\x6b\x57\xb3\xb7\x1c\x0a\xcc", 221, { 0xae, 0xac, 0x87, 0xf5, 0x0c, 0x04, 0xea, 0x14, 0x8a, 0x90, 0x0b, 0x60, 0x65, 0x29, 0x9a, 0xed }, { 0x6a, 0xe6, 0xaf, 0x3f, 0x81, 0x33, 0xf6, 0x44, 0x6a, 0xe6, 0xaf, 0x3f, 0x81, 0x33, 0xf6, 0x44 } },
|
||||
{ "\x05\x84\xd9\x8d\x21\x6d\xe5\x23\x6c\x99\x13\xa2\x4c\x63\xba\x50\x4c\x60\xfc\x18\x9d\x2e\xb8\x6b\xf5\xcb\x2a\x56\xbb\x44\x1d\xd0\x8a\xaf\xec\xe3\x6a\x93\xbb\x97\x41\x68\x68\xdb\xbd\xa4\x0a\x26\x53\x8e\xf1\x85\x80\xa6\x54\xc7\x8e\x9b\x7d\x03\x66\xbf\x06\x47\x3c\xc5\x57\xa5\xb3\x36\xdc\xf7\x56\xac\xb8\x9e\xe4\x14\xf8\x63\x24\x63\xdf\x44\xc8\x48\x18\x4e\x2b\xbb\x85\xf3\x9f\xf7\xfd\x70\x57\x8c\xb5\x24\x71\x2c\xca\xbd\x4a\xaa\x12\x57\xe4\x7a\xe4\xda\x47\x9e\xc6\xeb\x09\x4b\xd9\xab\x39\x71\xa4\x43\xcc\x72\xc0\xa9\x63\xbd\x0e\xee\x8b\xf7\x22\x0e\xc0\xf3\x7c\x41\x51\xc1\x48\x32\x5d\x37\x83\x0f\xb4\x88\x4c\x7c\x64\x6f\x35\xa1\xb8\xc6\xe2\x76\xac\xa2\x58\x52\x77\x8c\x58\xb9\x21\x59\x69\xd5\x73\x74\xc3\x27\xaf\x1d\x6e\x81\x41\xf0\x09\x3d\xeb\xed\xa0\x75\xd3\x9e\xc8\x1c\xfe\xa8\x06\x60\x1b\xb0\xba\x46\x4e\xa8\x99\x83\xf8\xea\x3d\xa3\xfc\x97\x4b\x91\xde\x4c\xc5\x42\xdd\x19\xee\xec\x24\x77", 222, { 0x2f, 0xa0, 0x06, 0xef, 0xa2, 0x2c, 0x2d, 0xe9, 0x26, 0x73, 0x5b, 0x5f, 0xf7, 0xc1, 0x43, 0x5c }, { 0x44, 0x98, 0x8a, 0x21, 0x95, 0x3a, 0xd5, 0x13, 0x44, 0x98, 0x8a, 0x21, 0x95, 0x3a, 0xd5, 0x13 } },
|
||||
{ "\x12\xbf\xc8\x64\x86\x35\xd6\x60\x43\x73\x71\x4b\xb4\x29\x6b\x15\xcd\x5b\x33\xc9\x5a\x8a\x81\xe9\xa5\xf6\x25\x5b\x5a\xbd\x80\xee\x1a\xec\x1b\x01\x89\x66\x53\x9c\x4d\x25\x54\xa9\x08\xe8\x5d\x27\xfa\x2b\x49\x16\xae\x32\x31\xfd\x1c\xe5\x8a\x5c\x4a\x3a\x74\xe4\x2c\x1b\xa2\x8c\x71\x4f\xbf\x43\xa7\xd4\x59\x5b\x86\xf3\xbd\x0b\x30\xc8\xa1\xcf\x18\x8a\xf6\xae\x8d\xd6\x24\xe0\x6f\x79\x3d\x54\x4e\xb8\x42\x06\xef\xf0\x1f\xa7\x36\xe6\xe0\x1a\x7d\x16\xef\x42\x23\xa4\x00\xcb\x0f\xd7\xb6\x20\xd9\x7c\x92\x7a\xfe\xda\x9e\x7c\xed\x0d\xa0\x7f\xdc\xfe\xf0\x0e\x66\xf3\x48\xbd\x04\xe6\x55\xac\x73\x23\x6f\xb5\xbb\xd1\x7f\x23\xf2\x12\xb9\x42\xe9\x60\x6c\x2c\x18\xcb\x5f\x60\x91\xc7\x82\xf4\x8d\xed\x67\x74\xaf\x71\x74\xb3\xd9\x6a\xda\x4e\xc0\xd3\x70\x04\x27\x3d\x28\xa1\xd8\x28\x7d\x35\x5c\x50\x01\x7c\x9d\xe8\x46\xc1\x21\x60\x9b\x92\xee\xbc\xd3\x7e\x88\xb6\xfa\x07\x3c\xba\x46\xee\xb3\x0b\xb8\x58\x3a\xe0\xa5", 223, { 0x4e, 0x54, 0xab, 0xd3, 0x1c, 0x89, 0xbd, 0xd9, 0xad, 0x12, 0x65, 0x02, 0x2b, 0x04, 0x97, 0xa1 }, { 0x8d, 0xde, 0xb6, 0x05, 0xcd, 0x2c, 0xc9, 0x60, 0x8d, 0xde, 0xb6, 0x05, 0xcd, 0x2c, 0xc9, 0x60 } },
|
||||
{ "\x9c\xc0\xcd\x97\x15\x01\x0f\xbd\x19\x8d\x85\xaf\x58\xea\x2d\x20\xe8\xd3\xfd\x74\x95\x0a\xba\x58\x09\x52\x4b\x2f\x03\x5a\x19\xc5\xe5\x44\xe3\xee\xa8\x88\x37\x94\x73\x37\x3a\x77\x6a\x88\xe4\xa1\x40\xf4\x07\x8e\x9c\x28\x7c\xfd\x83\xd3\x3a\x19\xa3\x3f\x50\xdb\xa3\x5c\x0e\x6e\xcf\x13\x18\x9e\xca\x51\x99\xab\x06\x5e\xe1\x92\x01\x85\x3e\xc0\x3b\x60\xd7\x61\xa8\x01\x7e\xc4\x32\x30\xea\x77\x4e\x7d\x88\xb6\xd7\x07\x6c\x9c\xdd\x72\x43\x02\x14\x5d\x58\x25\xfb\xe8\xb3\xd3\xd5\x6b\x8a\x40\xea\x13\x61\xb1\x96\x43\x27\x2b\x6c\x25\xd0\x47\x7a\x59\x56\x8d\x75\x9a\xff\xad\x24\x54\x16\xe1\x61\x20\xd1\x59\x9d\xa2\x53\x75\x5a\x72\x6b\xbf\x6c\xc0\x97\xb9\xb3\xcf\x9e\xbc\x3b\x0c\x68\x11\x3d\xc0\x0e\xb9\xe1\xfb\x7d\x19\x44\x90\xf5\x32\xcc\x92\x7a\x64\x96\x9c\xd8\x4e\xc3\xd6\x61\x00\xac\x39\x44\x98\x5b\x27\xab\xbb\x18\xa1\x26\x04\x91\xa1\xe4\xb0\xe3\x31\xfb\x19\x7e\xb7\xa0\x5d\xb8\x88\xe0\xf9\xaf\x19\xc3\x3d", 224, { 0xfb, 0x75, 0xc2, 0x4f, 0x1f, 0xd2, 0x57, 0x14, 0x57, 0x01, 0xee, 0xac, 0xd1, 0x77, 0x2a, 0x86 }, { 0x34, 0x98, 0x36, 0x4b, 0x45, 0x85, 0x86, 0x4d, 0x34, 0x98, 0x36, 0x4b, 0x45, 0x85, 0x86, 0x4d } },
|
||||
{ "\x58\xba\xa8\xc4\x5f\x74\x48\x60\xf7\x28\x4e\xd3\x3c\xcf\xf7\x57\x36\xfc\x75\x91\xc6\x4e\x93\x58\xeb\xc3\xbe\x24\x9b\x43\xa2\x4a\x5a\x2e\x44\x4d\x41\x44\xbe\xd6\x07\x57\xb8\xe4\xdb\xc5\x64\x7d\x55\xec\x4a\xf2\xad\x65\xdb\x7f\xcc\xfa\xa0\x62\x67\xf8\x94\x21\x3d\xc6\x98\x8e\x0c\x0c\xee\xe5\x3c\xab\x88\x31\xb4\x7f\xc6\x99\x04\x48\xfc\x93\xf5\x83\x09\xa0\xe5\x54\x7d\x96\x78\xfa\xb2\x2f\x38\x39\xae\x9c\x25\x8d\x5a\xaa\x60\x88\x8f\x99\x6d\xde\x35\xfd\x8b\x63\x02\xb4\x81\xef\x99\xe7\xdf\x1b\xf4\xad\x42\xc7\x4f\x76\xda\x0c\xa2\x64\x3c\x6d\x4f\x89\xe2\x3d\x98\xe3\x6b\x03\x9b\xf5\x5f\xb8\x4c\xdf\xbe\x89\xe9\x98\xca\xf1\xbd\xdc\xb8\xef\x6f\xf4\xa8\xad\xb6\xbf\x33\xc4\xf0\x2a\xcf\x61\xc3\x71\x09\xd6\x18\x41\xae\xd8\x72\x19\xe7\xa0\xfe\x3b\x5d\x03\x4a\x67\x15\x83\x20\xf2\x47\xe8\x73\xc5\xa2\x15\xfb\xc9\x6a\x49\xaa\x15\x3f\x6a\x63\xce\xb4\x87\x87\xb6\x5a\x61\xef\x01\x2a\x7f\x25\x8d\xd1\x05\xfe\x2f\xc2", 225, { 0xba, 0xba, 0xf5, 0x0c, 0x38, 0xf4, 0x1e, 0x29, 0xcd, 0x39, 0x31, 0x5e, 0x72, 0xd5, 0x46, 0x2f }, { 0x0a, 0x3e, 0xdf, 0x15, 0x45, 0xf5, 0xa3, 0x38, 0x0a, 0x3e, 0xdf, 0x15, 0x45, 0xf5, 0xa3, 0x38 } },
|
||||
{ "\x17\x03\xf0\x87\x53\x7d\x89\xf6\x56\x7c\xf6\x34\x38\xab\x76\xef\x94\x4c\xed\x2f\xed\x41\x4a\x3c\x0f\xab\xae\xe1\x2b\xe4\x3c\xb8\x91\xaf\xee\x5a\x36\xd0\x90\xbd\x9f\x48\xee\x3f\x1a\xb1\x63\xa6\x64\x53\x95\x16\xfc\xae\x99\x02\x3d\xf7\x8a\x0b\x56\x9f\xe7\xa5\x3f\xf0\xb8\xdc\xa6\xe9\x78\xed\x4c\xaf\x5b\x95\x86\xf5\x6e\xe8\xcb\x6b\xd9\x06\xc2\x61\xe4\xb1\x55\x5b\xdc\x8f\x3c\xdb\x4e\xd7\x24\xfe\x30\x9a\x7d\x27\xc3\x51\x69\x34\x60\xa3\x0e\xf3\xdd\x97\x15\x0e\xb6\xa9\x8d\x5c\xeb\x36\x45\x2c\x51\x75\xf6\xae\xa9\x72\xed\x4d\xd2\x73\x4c\x3e\xd2\xc4\x0d\x4c\x35\xbe\xbd\x1c\x93\x59\xfd\x69\x7e\xdf\x10\x52\xab\xad\xe5\xb2\x70\xd1\xa8\xb5\x69\x7e\xea\x7d\xd5\xd9\xf9\xf4\xfd\xf5\xc5\xb7\xd7\xb4\xeb\x95\x7c\xc6\x00\xbb\xdc\x31\xb0\x1b\xa5\x55\xf7\x68\xf1\x6a\xec\x7a\x03\x04\x81\x9c\x44\xaf\xed\xa9\x1e\xfb\x4d\x64\x08\x6f\x4f\xb8\xaa\x35\x24\x2d\xae\x3c\x1c\x25\x53\xb6\xd9\x7d\x1d\xe6\xf5\x2c\x86\x1b\xa5\x0b", 226, { 0x60, 0x37, 0x98, 0xca, 0x57, 0xe0, 0x5e, 0xd1, 0x6e, 0xc6, 0xbd, 0x58, 0x2a, 0x63, 0x49, 0x63 }, { 0x5f, 0x80, 0x78, 0xc8, 0x1d, 0xd4, 0x55, 0x78, 0x5f, 0x80, 0x78, 0xc8, 0x1d, 0xd4, 0x55, 0x78 } },
|
||||
{ "\x81\x48\x91\x9a\x76\x88\x82\xcf\x3a\xf9\xbb\x5e\x4f\x3c\x4d\x7f\x05\xde\x33\x06\x23\x5b\x9e\xbe\x3f\x3a\xa8\xef\x8e\x08\xa1\xde\x69\x89\x70\xd9\x20\x8a\x5a\xda\xf4\x68\xb9\x4e\x20\xce\xb0\xf0\x64\x51\xf8\x11\x83\x08\xfe\xb5\x80\xc7\xae\xad\x5f\xf0\xfe\x32\x6e\x99\x2d\x38\x9e\x72\x3d\xe9\x65\xa8\xa8\x55\x2f\x8d\x51\x49\x9e\x72\x2a\x3c\x9d\x9c\x95\x8a\xc0\x8e\xbc\x11\x54\x53\x1f\x2a\xfe\x27\x71\xec\x0f\x52\x17\x63\xf0\xba\xb0\x35\x9d\xb9\x3f\xda\x9f\x27\x6a\x35\xda\x1b\x1d\xe7\x71\xf8\xc0\x39\x4c\xe6\x72\x1d\x15\x61\x6b\xc4\x38\x88\x05\xa4\x58\x5a\x5a\x21\xd1\x79\x00\x8c\xc9\x1c\xb8\xde\x29\xe7\x49\x27\x42\xe3\xc9\xc9\x03\x31\xa9\xc2\x10\x19\x0c\xf8\x8a\x60\xdc\xd6\x2e\x53\xb8\xd0\xed\xa1\x48\xc6\x28\xe8\x53\xaa\xce\x17\xb4\x73\x79\x03\x16\x0c\x43\x2f\xc1\x4a\x27\x8c\x03\xb3\xf4\xa4\xb3\x8a\x7b\x95\xec\x66\x68\x7e\x53\x4c\x26\xfc\xb8\xbe\xa4\x53\x83\x3d\x7d\x79\x9f\x8d\xfb\x7d\xb0\xc6\x26\xaf\x2f", 227, { 0xc7, 0x29, 0x70, 0x84, 0xf3, 0x9a, 0xea, 0xe9, 0x8e, 0x1d, 0x28, 0x99, 0xcf, 0x23, 0x7e, 0x5b }, { 0x52, 0x45, 0x1d, 0x7e, 0x33, 0x34, 0x3f, 0x2e, 0x52, 0x45, 0x1d, 0x7e, 0x33, 0x34, 0x3f, 0x2e } },
|
||||
{ "\x4e\x79\x3d\xaf\x97\xb3\xdc\x14\xd2\x8d\x6f\x7d\xee\x50\x4f\xad\xa1\x57\x32\x9f\x5f\xf0\x60\xc7\x19\x8d\xf0\x40\xff\xe7\x4d\x69\xc7\x23\xd7\x63\xd3\x83\xd7\x87\x87\x78\x44\x5d\x0d\xe4\x46\xce\xbd\x6a\x5e\x14\x0c\xf8\x23\xf0\x28\x29\x53\x6a\x03\xee\x9d\xa6\x2a\xbd\xc4\xfe\x45\x9f\x7b\x7a\x92\x3f\xf1\xc7\xe5\xf0\xf6\xb0\x2a\x0e\xa4\x9c\x8e\x98\x16\x64\x3c\x32\x0c\x3a\xab\x04\xbc\xc6\xa8\xfd\x78\xf6\xb5\x1a\x14\x5c\x87\x3f\xf5\xe8\xf7\x4c\x00\x62\xe7\x3c\xd4\x1b\x65\xc3\x37\xb4\x29\x69\xaa\x7a\xea\xd3\x78\xe0\x20\x63\x60\xfd\x7d\x2b\xd6\x0d\x5d\x84\xb8\x82\x17\x39\xd6\x5c\x18\xd1\xcd\x0b\x09\xe9\xe0\x6d\x61\x5e\x0d\xb5\xb8\x65\x03\x85\xdd\x85\x90\x65\xe9\x2c\x18\xcd\x87\x90\xd9\x57\x80\xd6\x59\xfa\x2a\xc9\xf8\x8a\xc1\xf5\xac\x4c\xfd\xa5\x45\xd6\x90\xce\x4e\xc0\x1a\x0a\xfc\x61\x46\xb5\xc7\x55\xf3\xf7\xda\xb7\xcd\xed\x2b\x30\x35\x31\xfe\xf4\xad\x5b\x83\xbd\x96\x37\xd7\x26\x4e\xfd\xae\xe8\x18\x1f\xbd\x0d", 228, { 0x38, 0xf3, 0x77, 0x24, 0xe5, 0xb3, 0x8b, 0x82, 0x53, 0xa1, 0xf7, 0xa7, 0xf1, 0xe8, 0x45, 0x96 }, { 0xcb, 0x41, 0x1d, 0x44, 0x0d, 0xb6, 0xf8, 0x81, 0xcb, 0x41, 0x1d, 0x44, 0x0d, 0xb6, 0xf8, 0x81 } },
|
||||
{ "\x7d\x6b\xf8\x5e\x18\xf7\x54\x49\xe5\xe6\x85\x0d\x3e\x43\x89\x63\x86\x38\xef\x9f\x2a\xb6\xa2\x53\x63\x6a\xc5\x82\x87\x79\xd8\x04\xbf\x0e\x9f\x31\x1a\x51\x5d\xe1\xe0\xc5\x9b\xe3\x80\xf1\xc5\xbc\x7f\xc3\x66\xe0\x20\xe0\x3b\xa1\x07\xc1\x03\xab\x79\xf8\x3f\xad\x30\xa1\xd8\x11\xea\xa8\x61\xe0\x59\x13\xc5\xc2\x7b\x5c\x0e\xc1\xb5\xde\xfe\xde\x38\xaf\x9a\x72\x12\xbe\xb2\x38\xb7\xac\x78\x66\x9b\x05\x6d\xa0\x2f\x89\x18\x76\xd1\xaa\x26\x69\x90\x5b\xe1\xeb\x17\xf3\x59\xe3\xd8\xc0\x60\x9c\x53\x52\xaa\x8d\x64\xe3\xaf\x6e\xf3\x44\x04\xdc\xb8\x9b\xa7\x07\xad\x15\x19\xe7\xf5\xa3\x58\x07\x3b\x96\xe4\xd4\x57\x53\xe4\xcd\x24\xe1\x1a\xb4\x18\xdc\x37\x27\x4f\x9e\x22\xc8\x6b\xfb\x4e\xfe\x0e\x5b\x06\x48\x4a\x42\xbe\x9f\x43\x35\x6c\x26\x67\xeb\x95\xd2\x70\xf2\x02\xbe\x2e\xf3\xa9\xdd\xb7\xcc\x10\xe8\x06\x6a\x57\xdc\x53\xc2\x81\xdd\x24\x33\x7d\x14\x88\x31\x24\x54\x9b\x70\x1e\x38\x43\x15\xc8\x24\x1d\x1d\xcf\x54\xa3\xf2\xd6\x9b\x75", 229, { 0x5c, 0xb5, 0x5e, 0x8a, 0xf7, 0xe0, 0xae, 0x81, 0xb7, 0x74, 0xe0, 0xcd, 0xcf, 0x61, 0xdd, 0x04 }, { 0x44, 0x0b, 0x66, 0x01, 0xf8, 0xad, 0x6c, 0x6c, 0x44, 0x0b, 0x66, 0x01, 0xf8, 0xad, 0x6c, 0x6c } },
|
||||
{ "\xae\x06\xe9\xe9\x35\xb2\xae\xae\xf7\x68\x16\xac\xa5\x7f\x91\x2d\xfa\x30\x22\x5a\x6d\x21\x30\x43\x68\xbc\x3c\xc9\xa2\x54\x6b\xe6\x59\x1f\x61\x7c\x5c\x8b\x56\x40\x1c\x45\x17\xa4\xee\x96\xe5\x57\xc8\x97\x8d\x3c\x11\xd9\x87\x8d\x7f\x47\xbc\xfa\x87\x1e\xd7\x90\xd8\x4a\x03\x30\xad\x13\x42\xff\x24\xac\x28\x31\xfa\x84\xb8\x39\x54\xb4\xdf\x17\xf5\x6a\x5a\x5e\x8f\x40\x4a\x9c\x39\xc0\x21\xbd\xbb\xf6\x38\x25\xa2\x04\x37\x2a\xfe\x9d\x64\xab\x30\xd4\xfe\xcc\x2a\x43\x67\x6b\xe3\xa2\x05\x5a\x4b\x28\xb4\xfb\x79\x42\x55\x6d\xb1\xe7\x96\xb1\x03\x1e\xce\xf1\x84\x44\xe7\x85\x7a\xb3\x9a\xdf\x4c\x13\x42\x6f\xfb\x97\xc0\x33\x00\x93\x15\xf1\xea\xc3\x72\xaf\x76\xaa\xc7\x67\x14\x7d\x21\xf7\x31\x5c\x91\xc4\xfd\x80\xac\xcc\x1a\x3b\x09\x4a\xe2\x1b\xf7\xf1\xcf\x66\xa7\x23\x3a\xa1\x01\x49\x72\x80\x7f\x0e\x50\xdb\xb7\xad\xf8\x77\x31\xe6\xf2\x5d\x95\xbf\x10\xbc\x62\xba\xa1\xcf\x19\x70\xd6\x17\x14\x8e\x4a\xd8\xfb\x5f\x48\x60\x07\x65\x2d\xa8", 230, { 0x9e, 0x3d, 0x6a, 0xba, 0x2e, 0x07, 0x5b, 0x35, 0x42, 0x0e, 0x0c, 0x41, 0xc4, 0xd8, 0xc3, 0xc2 }, { 0xcb, 0xf6, 0x4f, 0xf5, 0x52, 0x8c, 0xc5, 0x27, 0xcb, 0xf6, 0x4f, 0xf5, 0x52, 0x8c, 0xc5, 0x27 } },
|
||||
{ "\x90\x31\x03\x48\xc2\x8e\x00\xa9\xac\x56\xe8\x7d\x4b\x60\xe5\x72\x56\x37\x24\x1f\x0f\x1b\xce\xf9\xe2\x09\x2f\xbe\x65\x5c\xc6\x6d\xaf\x41\xae\x8f\x7b\xfa\xa9\x82\xe5\x45\x80\x62\x15\x40\xd8\x0d\xff\xed\xfc\x4c\xfa\x06\x5f\xe2\xc8\xc9\x3b\x1e\xaa\x28\xd3\x18\x91\xf2\x4d\xce\xb7\x74\x6d\x21\x68\x70\x01\x51\xf5\x4e\xb5\x38\x71\xf9\xfb\x3e\x9f\xa5\x54\x58\xc7\x55\x6b\x94\x8e\x8f\x10\xba\x63\x7a\x20\xe5\x75\xbb\x98\x12\xc4\x46\x0d\x75\xc6\x09\xbd\x4c\x46\xdb\xe9\xbd\xe4\x75\x33\xef\xa3\xb9\x68\xb2\x46\xe3\xb9\x1a\x50\x3f\xb0\x42\xa4\x58\x70\xd8\x88\x86\xc7\x6f\xaa\xc5\x0a\xdc\x17\x73\x05\xaf\xca\x2e\x86\x99\x0e\x9c\x16\xa8\xa4\xeb\xd5\xd9\xbb\x38\xa4\x78\x9e\x4a\x1b\x40\xa8\x2c\x38\x6b\x97\xe1\x04\xbd\x66\x43\x26\x2a\x3c\x68\x1c\x25\xcc\x1e\x73\x1b\x25\x1e\xfc\x7e\x92\x6c\x0b\x21\xde\x9f\x32\xf2\xfa\x4e\x0f\x4e\x88\x25\x56\x1c\xd9\x67\x5f\x62\xaf\xe8\x06\xda\xeb\x5a\x73\x83\xc4\xa4\xb8\x85\xae\x6e\xe0\x0b\xb0\xf1\xa6", 231, { 0x54, 0xc2, 0xb1, 0xeb, 0xbb, 0xe0, 0x19, 0x7c, 0x2a, 0x6b, 0xee, 0x0e, 0xdf, 0xdf, 0x7c, 0xf5 }, { 0xac, 0xbf, 0xed, 0xbd, 0x88, 0xa1, 0x24, 0x35, 0xac, 0xbf, 0xed, 0xbd, 0x88, 0xa1, 0x24, 0x35 } },
|
||||
{ "\x5c\x63\x13\x25\xb1\xf8\xb3\xeb\x77\x96\xe5\xa4\xc3\x2c\x91\x42\x34\x2d\x78\x51\x29\xbb\xcc\xdb\x3c\x15\xbb\xef\x5b\x48\xb2\xd8\xc0\x72\x91\x3d\xf4\x02\x41\xf0\x97\xa4\x8b\x08\xb6\x9a\xf7\xe3\xf7\xce\x20\x8b\x5b\x07\x27\x26\x7f\x7e\x35\x0c\xd9\x4d\x40\xc5\xd1\xad\x41\x5f\xa8\x38\x4f\x7a\x39\xbb\x5d\x5d\x57\x08\xa5\xcb\x35\x69\x75\x30\x4e\x11\x2c\xae\x9c\xff\x34\x97\xee\x00\x99\x93\xd4\xa1\xe0\x35\x3d\x1e\xc0\x5f\x9e\x19\xa3\x8d\x52\x32\x9e\xa1\xac\x7e\x05\x18\x49\x4a\xd4\xff\xb3\xb4\x2e\xe0\x56\x36\x31\xb4\x6b\xe3\x29\x6d\x09\x6b\x4d\x6a\x8d\x73\x21\x85\x30\x8c\x94\x69\xec\xa6\x74\x7b\x8b\x90\x08\x82\x4e\x8f\x37\x46\x0d\xca\xe8\xfd\x44\x96\x0f\xec\x5a\x67\x6a\x79\x12\x78\x5b\xe8\xf4\x78\xc2\xf3\x65\xb4\x50\x10\xd9\x12\x9f\xdc\xa4\x2e\x8a\x62\xe4\x08\xd3\x8c\xa9\xc8\x03\x3c\x43\x95\x2c\x47\xc1\xe8\x84\xdb\x1f\x48\x2b\xfc\xd5\x6a\xdc\xd3\x19\xf2\x73\x01\x68\xaf\xc6\x97\x3d\x35\xd0\x54\xaf\x44\xb8\xc2\x55\xa0\x8a\x24", 232, { 0x9b, 0x08, 0xe0, 0x81, 0xf7, 0x5f, 0x85, 0x56, 0x14, 0xb0, 0x46, 0xd7, 0xd6, 0x93, 0xe4, 0x41 }, { 0x23, 0x8c, 0x6d, 0x94, 0x41, 0x89, 0xe8, 0xdb, 0x23, 0x8c, 0x6d, 0x94, 0x41, 0x89, 0xe8, 0xdb } },
|
||||
{ "\xe9\x2d\x65\xe4\x17\x14\x5d\xc0\xb7\xdc\x5a\xf0\xf8\x81\xa2\x4e\xb0\x90\x86\x8b\x16\xf1\x57\x04\x78\xcf\x7a\x2e\xd7\xd3\x4b\x4d\xe8\xe3\x39\xa7\x7e\x77\x67\x02\xd2\xd0\x39\xcc\x8c\xa5\x00\x40\x76\xa5\x0b\xe3\x44\x2e\x6e\x19\xd9\xf3\x01\xab\xe2\x31\x62\xe9\x5b\xf8\x65\x1c\xa7\xc9\x71\x36\x03\xb1\x82\x00\xbb\x4e\x87\x41\x4b\xd6\x20\x74\xb7\xc0\xed\x4f\x4e\xb8\xac\xbb\x17\x89\xd9\xe5\xe2\xb3\x2b\xe4\x74\x01\xe8\xc8\x04\x1c\x75\x25\x98\xec\x7b\x3c\x5b\x8b\x36\x84\x96\x06\xd4\x91\xe8\x27\xea\x14\x2b\x50\xe3\x02\x39\x6a\x37\xf4\xd0\xf2\x4d\x4f\x79\xa0\x8c\x0e\xfe\x8e\xdb\xb5\x97\xec\x2d\x33\xb5\x6c\x50\x53\x4d\x72\x37\x22\x02\x41\x64\x17\xb9\xff\xbb\x0d\x8f\x91\xed\x8b\x0c\x67\xc9\xcb\x97\xb5\xf3\x65\xbf\xdd\xae\x60\x65\x8c\xd0\xdf\x27\xc3\xcf\xbf\xd0\x6e\x04\x79\xca\x9d\x23\x30\xc0\x8c\x57\xbe\xea\x28\x2e\x90\xd4\x82\x27\xd1\xa4\xca\x70\x57\xa7\xf2\x33\x04\xd7\x0f\x6e\xc1\x9f\xf3\xbd\xde\x79\x6f\x3b\xad\xa3\x35\x56\xb2\xef", 233, { 0xd1, 0x29, 0xd7, 0x66, 0xb4, 0xf9, 0xc8, 0x53, 0xd5, 0x69, 0x45, 0xcf, 0xb7, 0x5c, 0x01, 0x9a }, { 0x72, 0x33, 0x8b, 0xa6, 0xe1, 0x90, 0xed, 0x7d, 0x72, 0x33, 0x8b, 0xa6, 0xe1, 0x90, 0xed, 0x7d } },
|
||||
{ "\x56\xe5\xa7\x39\x9d\xfa\x29\x72\x7d\x2d\xb9\xf6\x73\xea\xd0\x61\x24\xb6\x00\x8f\xd7\x3b\xb4\xb2\xf6\x87\xce\xc3\x78\xaa\x0f\xca\x87\xd0\xb7\xfa\x78\xa7\xfd\x8b\x78\xc9\x28\x96\x17\x32\x2b\x8a\x22\x8e\x6e\x30\x5a\x24\xd7\x71\x7f\x14\xf5\x2b\xac\x4d\xd7\x35\x47\x12\x74\xd2\x5c\xd9\x57\x60\x0d\x63\x7d\x7a\x10\xce\xe8\x9a\x32\xa3\x65\x37\x43\xee\xe5\x71\x9f\x0a\x3c\x5c\x21\x8f\xc8\x0c\x91\x37\xef\x57\xde\xd3\x56\xc1\x15\xd8\x01\x87\x02\x1b\xef\x84\x99\x21\x75\x7f\x6b\xde\x13\x95\xb4\x5a\x68\x62\x47\xa1\x36\xd8\x5b\x83\xbe\x3f\xa2\x26\x53\x03\xc4\x39\x95\x2d\x3d\xfa\xc4\x85\xc9\xf0\xbb\xc6\x35\x54\xaf\x71\x5b\x6a\x05\x8d\x65\x58\x47\x85\xec\x69\xa7\x3e\x76\x07\x60\x33\x87\xcf\x20\xae\x27\x2f\x35\x03\xa5\x65\xc0\x81\x55\x6b\x7e\x54\xd2\xfa\x73\x5a\x93\x1b\x79\x12\x60\x46\x1a\x6e\x13\x48\x29\x91\xcb\x3b\xa3\x37\xab\x53\xed\x0c\xe4\x5c\x96\x16\xdf\xe5\xa5\x9a\x97\xdc\xb6\xee\x97\x21\xb1\xd1\xae\x27\x56\xbb\x5d\x68\x23\x8b\x24\x7b", 234, { 0x21, 0x31, 0x17, 0xdf, 0xe8, 0xee, 0x49, 0xf9, 0xfa, 0xe4, 0x6d, 0x52, 0xf7, 0x68, 0xf1, 0x33 }, { 0x28, 0x7a, 0x02, 0x21, 0x50, 0x03, 0x7a, 0xa1, 0x28, 0x7a, 0x02, 0x21, 0x50, 0x03, 0x7a, 0xa1 } },
|
||||
{ "\xd7\x1e\x9a\x2c\x8f\x91\x92\x20\x25\x3a\x64\x08\xbd\x7a\x43\x34\x12\xe6\x7f\x5f\x9e\x67\xc3\xff\xc2\x9f\x73\x86\xe9\xcb\x0c\x86\x35\x67\x06\xd3\xfd\x83\xf2\x1e\x2d\xf2\x11\x62\xda\x0e\x1c\xc0\xa3\x17\x63\xe6\x84\x12\xe6\xa4\xb8\x19\x62\x8d\xfc\x4e\x3c\x2a\x93\x59\x8b\x9e\x4c\xf5\x44\x29\xee\x41\x48\x22\xa4\x7b\xc1\x5d\xa4\xc4\x22\x2c\x2a\x57\xd5\xc6\xfa\xd2\x0d\xea\x9a\x08\x03\xbb\x49\x95\xa2\xbc\xa2\xa2\x67\x9b\x4f\xe8\x70\x47\x49\xe2\x7d\xe9\xca\x19\xa8\x38\xf9\xab\xed\xfb\x2c\x32\x5b\x68\xe0\xbf\x8a\x79\xa1\xc1\xe5\xbd\x91\x9e\x26\xc1\x22\x3f\x4c\xbc\x2f\x83\xb6\x47\x5c\xae\x32\xe5\xcc\xc9\xdd\x2f\xc6\x96\xe0\x40\xed\xfd\x41\x5c\x6b\x3d\x48\xfc\xdf\xe5\x06\x21\xaa\x72\x57\xb8\xdf\x1e\x97\xad\xfd\xae\xa7\xc2\x90\xcd\x83\x99\xa9\x82\xc7\xf4\x32\x82\xac\x04\xef\xe2\x3d\xfa\xd4\xe6\x33\xde\x6e\xe3\x16\xdd\x78\xa3\x59\xee\xbf\x3c\xae\x39\x27\x3a\xff\x6f\x0a\xb4\x0f\xc5\xa4\x3c\xf2\x59\x43\x10\x70\x8e\x0e\x33\x02\xef\x59\x12\x6a", 235, { 0xc6, 0x82, 0x09, 0x7f, 0x6b, 0x09, 0x44, 0xa2, 0xd5, 0xc2, 0x9b, 0x47, 0xa7, 0x82, 0x9e, 0xe7 }, { 0x7f, 0x96, 0xdf, 0xc3, 0x6c, 0xc5, 0xb0, 0x6f, 0x7f, 0x96, 0xdf, 0xc3, 0x6c, 0xc5, 0xb0, 0x6f } },
|
||||
{ "\x52\x77\xf5\xfd\x4b\xa7\x24\xba\x56\x04\x2c\xda\xaa\x3d\x4f\x64\x5f\x39\xab\x0c\xfb\x22\x7d\xa6\xaa\x62\x77\xc3\x5f\xa1\x9e\xa8\x10\x2c\xf5\x46\xbb\x7a\x12\x37\xd5\x89\x33\xa8\xf7\x33\x73\x6f\x3f\xc4\x5a\xef\xe4\x47\xfc\x47\x50\x54\x9d\x8c\x68\xa4\xe0\xe6\xf5\x83\x76\x5c\x1a\x1c\xb9\x19\xa2\x2d\x7e\xfc\x9e\x7f\x58\x31\x93\x33\xf6\x17\x12\x70\xe7\x97\x1c\x45\xb9\x49\xb8\x61\x49\x58\x76\xa3\x3a\x34\x24\x1c\x90\x4e\x71\xb8\x1d\x8d\x10\xc3\x42\xd7\xc6\xac\xcd\x1d\x21\x5f\x76\x63\xf7\xcb\xb7\xf2\x1a\xb8\xfc\xad\xf6\x12\x68\x4d\x41\x3b\x41\xb5\x4c\x5e\x02\xcb\xdd\xa1\xd6\xbb\x2f\x48\x11\x06\x8b\x71\x72\x7b\xd2\xe8\x79\x70\xa4\xeb\x47\x9c\x26\xaf\x03\xe6\x35\x2e\x86\x1f\xf8\xb8\x13\xda\xec\x5b\x3f\xe0\xce\x14\x88\xc0\x02\x2c\x5d\x18\x5f\x8e\xfa\x84\x8d\xc9\x6c\x1e\xca\x5e\x90\x8a\xba\xfe\x9f\x60\xa8\x78\xc1\x63\x38\xb7\x09\xe8\x50\xe7\x0f\xfa\x44\x67\x0c\x8e\xd5\x4a\x38\x04\xde\x21\xd9\x4b\x01\x57\x5e\x8b\x57\x8a\x30\x97\xb3\xcf\xf8\x69", 236, { 0xf2, 0xb4, 0x91, 0x22, 0xbb, 0x26, 0x7a, 0xf1, 0x45, 0x2f, 0xdd, 0x18, 0x0b, 0x95, 0xa5, 0x86 }, { 0xe8, 0xcb, 0x7e, 0x25, 0x61, 0x7b, 0xc7, 0x95, 0xe8, 0xcb, 0x7e, 0x25, 0x61, 0x7b, 0xc7, 0x95 } },
|
||||
{ "\xce\xa9\xde\xce\x18\x35\x69\xe4\x6a\xf0\x50\xcf\x7e\x0b\x86\x1d\xc3\xce\x50\x71\xe5\x1d\xb2\xca\xb3\x61\xfa\xa8\x66\xcc\x77\xbf\xea\xef\xe9\x42\x7c\x96\x25\x9a\xe5\x43\x12\xb7\xbe\xb6\xca\x0c\xff\x85\x31\x84\xd3\x4c\x94\xc8\x7b\x67\x38\xc9\x2a\xc1\x79\xf0\x37\xfc\xa8\x99\x27\xa7\x88\xa1\xa9\xb3\xf7\x4a\x80\x93\x9e\x48\x11\x6f\x94\x9b\x4a\xb6\xe5\xec\x11\x39\x34\x95\x2c\x4d\x6e\xf2\xca\x2d\xa8\x54\x2c\xe1\x1b\xc1\xaf\xc2\xcc\x99\xa6\x65\x75\x74\xd6\x9c\xa8\xa1\x5c\xb5\xc4\x43\x6b\x4e\x09\x2a\xa5\x63\x16\xd6\xe3\x52\xb8\x15\x1c\x34\xa2\x3d\x9e\x19\xab\x22\x6c\x7c\xc3\x4e\x21\xe1\x03\x49\x8e\x8e\x84\xca\x29\xb7\x53\x6f\xd6\x38\x37\x77\x93\x6c\x2d\x11\xe4\x5e\x92\x87\xcf\x31\x48\x1a\xbd\x39\x03\xfb\x62\x23\xa1\xdb\x72\xd9\xfd\x9c\x60\x39\xc0\xd8\xd9\x44\x4b\x45\x4b\x5e\xd3\x51\xb8\xe7\xdb\xbc\x54\xbb\x8e\x00\xaf\x23\x3b\x86\xf2\xc9\x4c\x2f\x26\x5a\xa4\x12\x6d\xcb\xe8\x18\x44\x41\x8b\x6e\x24\x65\xcd\xe1\x3d\xae\x0d\x77\xf6\x4d\xe7\x22\x1a", 237, { 0xc2, 0xf0, 0x4c, 0xb0, 0x1e, 0xba, 0x45, 0xb0, 0x54, 0x2d, 0x47, 0x36, 0x85, 0x19, 0x2b, 0x60 }, { 0x25, 0x49, 0x61, 0x2f, 0xe7, 0xe3, 0xd8, 0xd8, 0x25, 0x49, 0x61, 0x2f, 0xe7, 0xe3, 0xd8, 0xd8 } },
|
||||
{ "\x1c\x88\xae\x38\x32\x92\x52\xa2\xdc\x30\xed\x5e\xeb\x40\xbd\x2f\xef\xd0\x13\x9b\x08\xac\xa6\x26\x99\x29\x2c\xcf\x99\x95\x83\xec\x1d\xee\x87\x1e\x19\xb2\x4a\xc8\x4a\x5c\x31\x5d\xee\x72\xa4\x88\x94\x76\x23\xce\xdf\xc0\x40\xe5\xf2\x81\x97\xf3\xf6\x78\x3b\x2e\xc3\xa4\x40\x12\x30\xf5\x7d\x28\x53\x7a\x5e\x89\x12\xe1\xe0\xaa\x89\x66\xf7\x7c\x86\x05\x8d\xad\xb8\xed\x15\x98\x61\x98\x75\xe7\x34\x4c\x41\x78\xec\x6f\xef\xaf\xa8\x02\x48\xa2\xfa\xcb\x27\x5a\x8f\x82\xe7\xe3\x77\x0a\xe3\xa1\x2d\xaf\x8d\xbd\x14\xe6\x65\xfe\xff\xe8\xcb\xb2\x30\xad\x72\x62\x6e\x7b\x15\x07\x6c\x81\x78\xc0\xd6\xae\x99\x05\xbb\xcd\x54\x6a\xb3\x1c\x15\x61\xdc\xbb\x43\xe3\x82\xbe\x97\x89\x71\xe3\x22\xa0\xf3\x9c\xb9\xd0\x3f\xaf\x8e\x43\x0f\x72\x83\x51\x5d\xd7\x09\xf0\x3d\x3b\x2c\xe2\x79\x5f\x1b\xab\xf2\xab\xef\xd1\x6d\xe3\x3c\x47\x48\xbc\x77\x88\x3c\xd0\x3c\x0e\xec\x33\xf4\xce\x6b\x64\xfe\xcb\x13\x6f\x57\x8f\xca\x36\xa5\xdd\x2a\x10\xd0\x41\xd2\x8d\x26\x05\x41\xc7\xe1\x9e\xc3\xa4", 238, { 0xfd, 0x92, 0xbc, 0x62, 0xc5, 0x59, 0x86, 0x83, 0x45, 0x52, 0x41, 0x2a, 0xc5, 0x9c, 0xe1, 0x8d }, { 0x52, 0x2c, 0x58, 0x8e, 0x58, 0xef, 0x42, 0x36, 0x52, 0x2c, 0x58, 0x8e, 0x58, 0xef, 0x42, 0x36 } },
|
||||
{ "\xc7\xbb\xdd\xc4\xaa\x66\xe7\xc7\x1d\xea\xcc\xd6\xff\xe3\x94\x55\x88\x56\xab\x37\x34\xfa\x7c\x14\x65\xa8\x1f\x5e\x29\xec\x49\xc0\x6f\x8d\x94\xa7\xca\x42\xb4\x1b\x5c\x5d\x85\xeb\xd2\x2d\x8a\x26\x4d\x19\xf6\xde\xdc\x50\x88\xfa\x98\xc9\xd8\xc4\x60\x27\xe2\x1d\xcb\x44\x41\x83\x94\x13\xaa\x0e\xf5\x3e\x3f\x52\x06\x40\xd9\x56\x3d\x73\xf3\xed\x58\x8c\x3b\xc9\xb6\x52\xb0\x04\x0d\xb8\xe4\x77\x32\xa3\x8c\x94\xd3\x89\xf7\x9e\x58\xdc\x61\x7f\x69\x5f\x65\x78\x94\x42\x7e\x4b\x32\xbe\x99\x54\xca\x55\x73\x4f\x96\xe6\x5e\x6c\x68\xea\x49\x58\x24\xbc\x44\xe9\x68\xf9\x38\x96\xb6\x31\x99\x33\x34\xc0\x4d\x7e\x63\xc8\x98\x25\x9f\x69\x77\x3b\x80\xcc\x64\x43\x9a\x35\x45\x53\x80\x53\xd8\xc5\x6a\x40\x9f\x32\xa2\x53\xa4\xa7\x71\x8e\x77\x01\xa1\x96\xc9\xe1\xc2\xb4\x4a\x4b\x74\x3f\xd8\xd4\x0c\x98\xfb\x43\x18\xb4\x27\xe9\x28\x34\x0b\xb2\x2e\xc6\xdb\x02\x8b\x05\x03\x9d\xa9\x27\x98\x48\xbb\x15\x6d\x1b\xf4\x7a\x6d\x00\x4d\x9c\xc9\xca\x08\xec\xde\xbf\x7b\x8d\xde\x62\x30\x71\x56", 239, { 0xd8, 0x19, 0x58, 0x67, 0xed, 0xc1, 0x60, 0xa1, 0x2f, 0x6c, 0x98, 0xd1, 0xfe, 0x10, 0x59, 0xe9 }, { 0x88, 0xa7, 0x44, 0xcf, 0x95, 0xb5, 0x8b, 0x1f, 0x88, 0xa7, 0x44, 0xcf, 0x95, 0xb5, 0x8b, 0x1f } },
|
||||
{ "\xe8\xed\xc0\x76\xdc\x07\xbe\xcb\x5a\xa0\x80\x55\xf9\xf8\x48\x7f\x7d\x50\x76\x08\xa6\x02\x93\xbb\x72\x87\x65\x34\x5f\xbf\x33\x89\xb8\xd5\x4e\x02\xef\x91\x3b\x36\xd2\x9a\xd6\x55\x6e\x25\xf1\x6b\xa9\xe3\x65\x13\xb3\x80\x27\xd5\x98\xbb\x12\x2a\x8c\x50\xb6\xf1\x1f\xa2\xe8\xba\x50\x3a\xd2\x6e\x29\x0f\xbf\x22\x63\xac\xb5\x40\xad\x36\xeb\x61\x6d\xf2\x11\xb0\x1d\x10\xd1\xf7\x15\x71\x58\xc2\x05\x44\x27\xca\xfc\x56\x9f\x7f\x67\x57\x69\xbe\x1d\x02\x2a\x75\xaf\xee\xee\xdf\x1f\x64\x0a\xdf\x19\x64\x8a\x52\x95\x41\xf3\xf6\x5e\x9d\x09\x62\x29\x72\xc3\xc9\xb4\xfb\x69\xa8\xda\x37\xa2\x7a\x3d\xc7\x96\xe2\x5f\x04\x01\x11\x9e\x00\x9e\x39\xb4\xc5\x1c\x4c\x7c\xc6\x1a\x4b\x66\x98\xd6\x08\x26\x70\xf3\xaf\xed\xa3\xc3\x26\xd0\x63\x0f\x0e\xc8\x1d\x80\x84\xc5\xce\xa4\x2e\x2d\x3c\x31\x1a\xb6\x7c\x8d\x19\x67\x3c\x12\x0f\x7e\xee\x10\x34\xd5\x23\xb6\x18\xce\x52\x2a\xea\xf2\xd8\xe9\x97\x46\xc4\x31\x3a\xa5\xc2\x61\x23\x3d\xef\x8b\xee\x93\x40\xa6\x10\x3c\xe4\x0f\x4e\x4f\xc3\x8b\xe5", 240, { 0x90, 0x0f, 0x95, 0xfe, 0xc7, 0xf9, 0x4b, 0x74, 0x07, 0xbc, 0xcd, 0xb4, 0xc3, 0x8e, 0xd3, 0x1c }, { 0x24, 0xe8, 0xe6, 0xc3, 0x4d, 0x81, 0x64, 0xf6, 0x24, 0xe8, 0xe6, 0xc3, 0x4d, 0x81, 0x64, 0xf6 } },
|
||||
{ "\xe8\x2a\xbd\x11\xda\xc5\x25\x25\xad\xa0\x22\xf8\x5f\xf5\x17\x7d\x35\xb0\x84\x5b\xd0\x16\x88\xf6\xa8\xff\x9f\xbe\xc9\x8e\x77\x0a\x1d\x04\x43\xee\x3b\xf4\xaa\xdb\x4c\xcd\x91\xbd\x19\x3e\xea\xe5\x86\x54\x3e\x20\x25\xfc\xc5\x26\x09\x33\x35\xfc\x2c\xbc\xb0\x2f\xfa\x82\xf5\x4b\x50\x70\x58\xff\x87\x2e\x4c\x12\xb6\xf0\xfc\x9f\xe8\x6e\xae\xab\xa5\x89\xd6\x65\x6a\x92\x28\x2a\x6e\xf7\xc7\x3a\xd7\x4d\x55\xb3\xf0\x9a\x21\x0e\x97\xe1\x7d\xab\x66\xa0\x2b\xc5\xe3\xbf\xf5\xd1\xcf\x1a\xf4\xb9\xe7\x55\x82\x96\x97\x18\x9d\x36\x3e\x83\xfa\x62\xee\x22\xcb\xd7\x53\x45\xe0\x7a\x1b\x7b\x7a\x4e\x0b\xd0\x10\x0b\xf0\xbc\xaf\xa6\x94\x8e\x8c\x1a\x3f\x08\x84\x16\x87\xa7\x8f\x7d\x0e\x19\x29\x94\x51\x60\xa0\x02\x86\x61\x54\x45\x69\x96\x35\x90\xfe\xc3\x1d\xcd\x0b\xfc\x7f\xe5\x5e\x83\xf9\x0a\xe8\x7b\x62\xdd\x66\xb7\x99\xc2\xc1\xdc\x23\xad\x0b\x45\x63\xd3\xd7\x43\xb1\x0b\xa2\xb5\x59\x41\x28\xa1\xb9\xe2\xae\x6e\x1c\x55\x78\x6b\xac\x61\xb8\x85\xa3\x48\xbb\xbe\x47\x79\xfd\x17\x31\xa3\x36", 241, { 0x14, 0x21, 0xb2, 0xac, 0x0e, 0x07, 0x7c, 0x11, 0x11, 0xb0, 0xf5, 0xdd, 0x3f, 0x20, 0xd4, 0x41 }, { 0xbe, 0xd8, 0xaf, 0x36, 0x2c, 0xf5, 0xb1, 0x43, 0xbe, 0xd8, 0xaf, 0x36, 0x2c, 0xf5, 0xb1, 0x43 } },
|
||||
{ "\x49\x23\xeb\x4d\x9f\x5b\x30\xcb\xba\xdb\xfd\xe4\x5a\xc1\x9d\xb1\x9c\x52\xa0\x64\x18\x0d\x38\x4c\x9b\xcb\xba\x9b\x32\x9f\x98\x42\x0c\xb7\xa4\xce\x27\x0d\xdf\x69\xe8\x69\x29\x6e\x8f\x19\x77\x3b\xb2\x19\x70\x6e\x0c\x0e\x28\x5c\xe4\xf8\x9a\x11\x0c\x0f\x52\xbd\x16\xbc\xec\xe7\x05\x03\xa6\xad\x28\xc6\xb6\x8a\x44\x3f\x21\x51\x28\x9e\xe6\xea\x63\xa5\xdb\x58\x6b\x0b\x34\xb4\x28\x29\x4d\x88\x4c\x2a\xc0\x95\xd2\x55\xab\x37\xae\xd0\x78\x41\x1b\x3c\x96\x03\xe5\x7b\x97\x62\x9f\xe6\xe0\xbd\xfe\x3e\x99\x91\xc0\x41\x8d\x53\xec\x35\xbc\xf3\x85\xae\xd1\x39\xe2\xec\x32\xa3\x66\xe9\x59\x14\x5e\xa8\x18\x5b\x16\x01\x3c\x63\x3f\xae\x46\xe6\x60\x83\x0d\x63\xf3\x22\x12\x39\xc2\x72\x97\xc3\x5b\xa7\xb6\x63\x87\x54\xf0\x14\xfb\x09\xbf\x01\xaf\xac\x6e\xfc\x2b\xbb\x79\x22\xc4\xfd\x4b\x95\xfd\x77\x01\x28\x35\x89\x9c\x92\xa9\xdd\xd3\x6f\x39\x5a\x92\xd0\xbb\xd8\x89\x95\x38\xe8\x18\xf7\xcd\x1b\x59\xa8\x7e\xbc\x9e\xc0\x10\x73\xa5\x8c\x05\xd9\x92\x67\x6d\xf8\x39\xc1\xcf\x8d\x97\x61\x6e\x57", 242, { 0x26, 0xe0, 0x19, 0xb0, 0x21, 0x0f, 0x12, 0x8e, 0xff, 0xab, 0x8f, 0x25, 0x75, 0x0b, 0x59, 0xce }, { 0x90, 0x66, 0x63, 0x12, 0x2c, 0x20, 0x9e, 0x05, 0x90, 0x66, 0x63, 0x12, 0x2c, 0x20, 0x9e, 0x05 } },
|
||||
{ "\x0b\x94\x4f\xd5\xd0\x17\x7e\xd9\x26\x23\x79\x9b\x01\xc6\x3e\x39\x78\xdb\x54\xb8\xf7\x87\x52\x93\x41\x12\x16\x5b\xc0\xf4\xce\x98\x5e\x42\x50\xc9\xc6\x01\x4e\x7a\x63\x8b\x0a\xc5\x46\x78\x54\x97\x83\x52\xcf\xa8\x91\xcc\x34\x64\x2b\x34\x0d\x01\x41\x4e\x4c\x12\x99\xd4\x41\x14\xbb\xc1\x2c\x34\xbf\x2a\x87\x20\xc3\x1a\x0e\x4a\x79\x1a\x2a\x0b\x38\x96\x3b\x83\x5d\x60\x86\x8d\xa5\xd6\x52\xca\x1f\xb0\x5c\xec\xca\xef\x5b\x3d\x60\x2b\xcb\x9b\x5e\x0f\x73\x31\x9c\x83\x10\x2f\x57\xc2\xcf\xda\xc5\xdd\x98\x15\x5c\x07\xd1\x32\x5b\x74\x0d\x4c\xf7\x45\xda\x55\x5f\x6f\xbb\xbd\x47\x6e\x1c\x25\x08\xe3\xd6\x59\xb5\xf0\xfc\xbe\x61\xeb\x0f\x9c\xab\x32\x13\x0d\xb3\x14\xf5\x85\x18\x2d\x29\xdc\x95\xfe\x56\x60\x80\xfe\xcc\xcd\x50\xdc\x01\x2c\x5c\xf2\x60\x0f\x36\x88\xb7\x89\x47\x9a\xd9\x80\xcb\x8f\x0e\xe9\x4e\x32\xd6\xa2\x4d\xf4\xde\xd0\x1c\x8b\xf6\x32\x89\xcb\xab\xd1\x35\x8c\x20\x1c\x38\xb9\x00\xe9\x3a\x7b\x65\x6f\xdb\x1c\xc8\xc5\x96\xa8\x20\xa5\xaa\x5c\xd0\xab\x0a\x2e\x48\xb9\x5c\xf0\x2b", 243, { 0x6c, 0x13, 0x76, 0xaa, 0xdf, 0xc0, 0x34, 0x79, 0x13, 0x6a, 0xcc, 0xdd, 0x7c, 0xee, 0xbe, 0x6e }, { 0x7c, 0xa5, 0xcd, 0x6b, 0xd0, 0x5c, 0x9f, 0x5b, 0x7c, 0xa5, 0xcd, 0x6b, 0xd0, 0x5c, 0x9f, 0x5b } },
|
||||
{ "\x39\x14\x65\x48\xb3\xf2\xee\xce\x5f\x8a\x99\x46\x64\xb8\x0c\xfa\x1e\x4f\x44\xa0\x11\xe0\xac\x3e\x53\x74\xdb\xbf\x4e\x19\xa3\xf0\x4d\xe6\xe2\xf4\x67\x4b\xaa\x05\xce\x2a\x50\x89\xc0\xbe\xb0\xe0\xbc\xe2\xef\xc7\x3a\x93\x54\xdd\x8b\xac\x90\x7d\x94\x96\x2c\x95\x42\xee\x3e\x93\x6f\xa3\x08\x26\x2e\x0e\xd0\x1f\x99\x66\x85\x4e\x76\xc7\x7b\x09\x54\xbd\x58\xe3\xd1\x2c\x0b\x3a\x97\xc5\x05\xd9\xd7\x34\x9a\x68\x84\x31\x8f\x9c\x58\x62\x9f\xbe\xfc\xb2\xfe\xc0\x51\xda\x1b\x4a\x48\x48\x86\x0d\x1b\x38\xbe\xe3\x3e\x3e\x87\xf0\x3f\x02\xe2\x4f\x6f\x54\xdf\x41\x61\x37\xa3\xd4\xf0\x61\x68\x2a\xe6\xef\xa4\xa0\x82\x01\x32\xb8\x08\x1a\xa5\x38\x8b\xf2\x0e\x2c\x3c\x67\xa2\x75\xba\x3e\x4a\x0e\x4f\x1e\xd1\x81\xe3\xeb\xf4\x01\x3e\x69\x42\x64\x1f\x80\x8a\x0a\x03\x15\x4e\x97\x9a\xe1\x36\x03\x93\x97\x2b\xae\x33\xae\x3c\x74\x4c\x6c\xda\x20\x74\xe1\x30\xe2\xb7\xcb\x2f\x87\xb6\xb5\x44\x86\x58\x51\x3b\x8b\x18\xe5\xe3\x90\x73\xed\xab\x40\x35\xb4\x04\x16\x81\x01\x53\x44\x1b\x5c\x04\x35\x09\x49\x10\x98", 244, { 0x71, 0xe0, 0xbb, 0x94, 0x43, 0x35, 0xb9, 0xfa, 0x05, 0xc2, 0x1f, 0xaa, 0xfc, 0x25, 0x22, 0xd5 }, { 0xff, 0xfd, 0x47, 0xe5, 0xff, 0x08, 0xe4, 0x71, 0xff, 0xfd, 0x47, 0xe5, 0xff, 0x08, 0xe4, 0x71 } },
|
||||
{ "\x44\xe8\x6d\x76\x89\x63\xc2\x2d\x02\xa4\x51\x50\x79\xb4\xe2\x37\x4c\xb1\x4c\x4b\xcf\x53\xa0\xc7\xf2\xe2\x42\x7c\xb4\x50\x88\x8d\x8a\xc7\xea\x67\xf7\x89\x0d\x30\xb2\x07\x9f\x32\xa4\x99\x29\x5b\xf6\x61\x57\xa4\x48\x52\x99\x7b\x48\xea\x1d\xb9\xe3\xf9\xa4\xc1\x0f\x80\xa7\xd7\x07\x75\xfb\xe4\xe8\xc3\xb1\x7d\x3a\x61\xff\x90\x07\x8e\xe1\xa2\x4b\xa8\xd3\x3d\xee\x0a\x76\x01\x7a\x06\x3d\x20\x4c\x56\x8a\xee\x38\x19\x18\x2f\x22\x3a\x96\xbe\x65\x86\x24\xb8\xba\x0b\xc5\xad\x5b\xbf\xf6\x62\xa6\xad\x29\xe5\xa3\x95\x1b\x11\xf3\x14\x9d\x6e\xea\x4e\x8d\x8e\x6e\x3b\x36\x95\x71\xee\x57\xb1\x65\xac\xa2\x19\xb1\xb8\x31\x24\xb9\x65\xf3\x94\xd9\x5b\xd1\xe8\x1c\xe3\x3f\x44\xd3\x76\x32\xf6\xe9\x77\x7c\x2f\x4f\x0b\x1a\xb9\xee\x69\xb8\xa8\xb7\xbc\xbc\x0f\x76\xfe\xe9\x86\x05\x56\x38\x35\x5b\xaf\x61\x7a\x46\x97\x98\xa2\x9e\xea\x44\x49\x4f\x89\x3c\xda\xe2\x36\x6e\x05\xd1\xfc\x70\x47\x93\x3a\x87\xe7\x40\x74\xbc\x1d\x0a\xff\xb0\x52\x7f\xe6\xea\x2e\x4a\xdd\xda\x58\x3a\xe0\x06\xfa\xce\x59\x35\xc0\xc8", 245, { 0x29, 0xa7, 0x10, 0x28, 0x32, 0xe2, 0xdd, 0xb7, 0x3e, 0xb6, 0xc0, 0xa8, 0xab, 0x3c, 0x8a, 0x01 }, { 0x13, 0xbc, 0x78, 0x48, 0xcd, 0xf3, 0xee, 0xdb, 0x13, 0xbc, 0x78, 0x48, 0xcd, 0xf3, 0xee, 0xdb } },
|
||||
{ "\xfd\xd8\x29\x3c\x32\xab\x0c\x82\x86\x9f\x33\x4e\x0a\xfe\x94\xfb\xbd\xc0\x65\x6e\x2f\x20\x4a\x83\x2c\x7c\xbd\x73\x91\x3b\xb4\x9b\xba\x2f\x36\x74\xba\x77\x91\x2e\x93\x46\x9c\x7c\x7a\xfc\x7b\x3e\xa6\xc1\xc3\x4c\xad\x6f\xcc\x3f\x4f\x3a\x74\x82\x1f\xf5\xde\xf1\xb5\xc6\xd7\x42\x1b\x6d\xb8\x9b\x40\xb2\x62\x73\x6b\x21\x9b\xd7\xe6\x96\x6e\x78\xb5\x53\xdc\xd4\x95\xaa\xa9\x6e\x7c\x85\xfc\x82\xe4\x75\xf7\x7b\x59\x8b\xbc\x25\xa4\x01\x1a\xa9\xfb\xd8\x5c\xa9\xda\xc5\xf1\x60\x87\x2d\x42\xe2\x53\xb5\x5e\xb4\x4d\xde\x1e\x82\x61\x7a\x5b\x5f\x41\x9b\x7b\xba\xe6\x11\xb1\x07\x09\xae\x4c\xdb\xbd\x63\x40\x70\x62\x83\xe6\xe5\x0a\x92\xa5\xa9\xc3\x4f\xcf\xef\xbe\x94\x01\xfb\xf8\x1e\x6d\xe0\x25\xf2\x81\xab\xd0\xde\xa7\x8b\x6e\x46\x2a\xf2\x4c\x8e\x93\x4f\x8f\xa5\x1b\xd6\x7d\x3b\x1c\x48\x67\x08\x35\x17\x57\x99\xed\x43\xfa\x4f\x9a\x5b\x80\x96\x76\xb8\x15\xcf\x21\xc0\xd0\xf8\xd2\xe7\xb0\xaf\x28\x1a\x77\xc4\x8d\xd6\xca\xa3\x06\x34\xe6\x92\xfa\x74\x83\xac\x81\x1f\x3b\xec\x3e\x87\xf5\x83\x39\x44\xb7\xee", 246, { 0x52, 0xdc, 0x96, 0x32, 0xa6, 0x13, 0xc2, 0xc2, 0xef, 0x67, 0x15, 0xe9, 0x74, 0x4c, 0x0d, 0xb0 }, { 0x94, 0x84, 0x69, 0x95, 0x48, 0xea, 0x11, 0xf9, 0x94, 0x84, 0x69, 0x95, 0x48, 0xea, 0x11, 0xf9 } },
|
||||
{ "\x4f\xf2\xe7\xbf\xf3\xeb\x1c\x5a\xcf\x1a\x5b\x8c\xd9\xb4\x59\x2c\xef\x3b\xd4\x6f\x51\xd9\xf8\xc9\x4f\xc9\x4b\x27\x6e\x33\x87\xd3\x5d\x63\xdb\xc0\x25\xd7\xcb\x4f\x05\x6e\x7a\x01\x11\x26\xb2\xe9\xf0\xde\x12\x0c\x12\x76\x47\xca\x55\xad\xe9\x49\xb1\x37\x6f\x32\xe0\x1a\x15\x55\x89\xa0\x48\x6a\x69\xb1\x31\xf4\xc5\xcf\x9a\x73\xc2\xa4\xd5\xb9\x17\x6d\xc5\xac\xa5\x11\xda\x10\xc4\x60\xad\xe0\xe9\x48\xe0\x93\xa9\xb5\xd5\x73\x8b\x66\x15\x87\xf6\xe9\xdb\x2a\x71\xda\xe8\x77\x21\x24\xbf\xae\x97\xbe\x8d\x8a\xc6\x2e\xd3\xd9\x2d\x07\x95\x76\x34\x88\xe4\x57\xdb\x83\xc7\x2f\xb8\xbb\xfb\x7b\x83\x66\xb2\x23\xef\x1d\xae\xc4\x35\x8d\x75\xd0\x53\x78\xaf\xb9\x2a\xb3\xe3\x18\x19\x8f\x6e\x0e\x3b\x19\x46\x68\x44\x86\x8d\x37\x13\xc8\xe0\x4d\xe4\xe0\x30\x89\xa7\xbb\x15\x47\x7b\x9f\x55\x42\x25\x29\x3f\x49\x9e\x55\x18\x10\x73\x06\x09\xe6\x21\xe7\xd4\x8e\x57\x48\xff\x50\x01\xfd\x95\x62\x25\x21\x79\x48\x16\xa9\xda\x13\xd6\x16\xa5\x48\xd6\xc7\x01\xe4\xfd\x17\xd6\x79\x67\x63\x6f\x3e\x2d\x55\x9e\x06\x0a\xba\x0b", 247, { 0x37, 0x75, 0x81, 0x35, 0xad, 0x65, 0xd8, 0x9e, 0xba, 0x00, 0xd8, 0xc2, 0x86, 0x94, 0x22, 0xd9 }, { 0x45, 0xd8, 0x82, 0x34, 0x00, 0xb6, 0x3e, 0xfc, 0x45, 0xd8, 0x82, 0x34, 0x00, 0xb6, 0x3e, 0xfc } },
|
||||
{ "\xd9\xed\x48\x24\x24\xa1\x89\x24\x8e\xda\x2f\x96\x82\x4d\x4e\x17\xa5\x0a\x31\x20\x99\x6c\x17\xdc\xb0\x7d\xf3\x28\x5f\xe3\x6b\x85\x5e\xa7\x80\x59\x4f\xaa\x6c\x73\xcd\x96\xb9\xdc\x95\xed\x5d\x26\xa9\x4b\x4b\xa7\x63\xff\x2f\x61\x52\x47\xe4\x79\x05\x9f\x0e\x7d\xfa\xb9\x5b\x4d\xbd\xcf\x9b\x12\x11\xfb\xc9\x03\xf5\x57\xb1\xd8\x62\x00\x27\x88\xdb\x7d\x02\x25\x86\x21\xd8\xfa\xa3\x1c\xa6\x85\xe1\xc5\xa7\xe8\xfd\xb4\x8b\x8d\xd4\x2d\xbe\x32\x48\x8a\xc2\x70\x33\x94\xef\x06\x59\x14\x9b\x90\x8e\x9d\xca\x6c\x36\xda\x0d\x31\x8a\x41\x69\x39\xc1\xd1\xb1\x8e\x86\xc6\x57\xf1\x46\x2a\x0c\xf5\x98\x94\x2b\x4b\xe7\xb3\xb4\x5e\xdd\x04\x9d\xed\x8a\x32\x44\x23\xad\xb6\x66\x15\x7b\x51\xc6\x76\x2f\xe5\x3e\x8b\x1f\x1e\xee\x82\x7c\x08\xeb\x0c\xb8\xf3\x52\x01\x7c\x62\x77\xb8\xb7\x9c\x7e\x53\x88\x8a\x13\x92\x54\xe4\x22\x29\xa8\x25\x12\x9b\x20\xeb\x3b\x7e\xad\x90\xe5\x70\xe1\xc8\x9e\x3d\x42\xa2\x1e\xb2\x55\x6a\x62\x9e\x0c\x53\xa5\x4d\x78\xb6\x23\xfd\x22\x53\x27\x81\xe3\x89\x69\xcf\x04\x31\x31\x05\xed\x01\x2f\xce", 248, { 0x19, 0xb9, 0xa0, 0xae, 0x20, 0x0e, 0xc8, 0xe0, 0x56, 0x57, 0xfa, 0x56, 0x0a, 0x47, 0xbe, 0xd0 }, { 0x6e, 0x8e, 0x5d, 0xed, 0x7f, 0xf5, 0xae, 0x85, 0x6e, 0x8e, 0x5d, 0xed, 0x7f, 0xf5, 0xae, 0x85 } },
|
||||
{ "\xd2\x26\x56\x98\x9e\xfa\x37\xb4\x7c\x01\x84\x65\xd4\x54\x22\x0f\x83\xf3\x31\x17\xb4\x51\xd6\x23\x5d\x2c\xeb\xb3\x2e\x7b\xf8\xec\x8b\x57\x62\x82\x7c\x54\xa3\xc4\x5c\x9b\x84\x7c\x3d\x51\x62\xbf\x06\x38\x54\xe3\x8e\xab\xa8\x1a\xf2\x9f\xe0\x36\x12\x3e\x93\x0a\x0a\xbf\x44\x78\x7b\xf2\x43\x08\x2b\x86\x93\x17\x33\xfd\x5e\x94\x5a\xe6\x7d\x48\x3e\xa3\xf5\xa6\xee\xc8\x95\x0a\x9e\x37\xe6\x4e\xdc\x9a\xaa\x9e\x3d\xa2\x51\x40\x94\xf0\xab\x74\x09\xf2\xf0\xd5\x63\x04\xd6\x84\xa3\x1d\x4a\x2d\xd7\xd2\x4f\x9e\x49\x7c\x22\xcd\x2c\xb5\xe0\x87\xfc\x9e\xbc\xf5\xd3\x38\x0d\xf9\x16\x4d\x7f\xa5\x83\xbe\x9f\x09\x4a\x36\x06\x1d\x05\x70\x03\x99\x4b\x59\x7d\xd3\x0a\xcb\x5f\xf0\xf4\x19\x0b\x9b\x25\x4d\x10\x75\xd4\x49\xad\x69\x4a\x59\x34\xae\x5e\x1c\x16\xfc\xbe\x7f\xdd\x17\x89\x37\x96\xba\x99\xef\xc3\x4a\xc1\xf0\x00\x9e\x0e\xfe\xd8\xa0\xc2\xd6\xdd\x26\xa1\x1d\x11\x6d\x54\xa7\x68\x8e\x11\x75\xad\x9c\xc2\x34\xaf\x31\x85\x07\xc4\xdf\xb0\x61\x67\x2c\xaf\x1a\x99\x7d\xbb\x93\x4a\x4b\x7e\x6e\xa7\x34\x65\xdd\xda\xe9\xbb", 249, { 0xc2, 0xb2, 0xf8, 0x42, 0x9a, 0xaf, 0xea, 0x34, 0xfe, 0x37, 0xe4, 0xfb, 0xbb, 0x44, 0xc6, 0x8e }, { 0x51, 0xd9, 0xdd, 0x93, 0x9e, 0x04, 0x79, 0x70, 0x51, 0xd9, 0xdd, 0x93, 0x9e, 0x04, 0x79, 0x70 } },
|
||||
{ "\xcd\xb0\x94\x95\xb4\x37\x0c\x0b\xed\x5f\x12\xc9\x7a\xcd\xfa\xdf\x9b\xf7\x26\x73\xd5\xde\x0d\x7a\xa6\xc1\xa6\x3f\x82\xe2\x4c\x34\xdc\xaf\x57\xe0\xf5\xaa\xbd\xae\xe4\xd1\x7c\x45\xf9\x8d\xd9\x23\x9a\xbb\xf9\x01\xd0\x47\x9b\x5a\x7a\x0a\x62\x46\xe7\x52\xad\x57\x52\xc4\xc3\x1e\x92\x13\xd2\x7a\x19\xfb\x0b\x07\xde\xf0\x75\xc7\x98\x28\x23\xea\xad\xd9\xdb\xd1\x17\x08\x03\x73\x0c\x6f\x25\x52\x6f\x5c\x86\x5a\x8a\x5a\x8a\xf1\x76\x30\x2d\x8e\xa4\x65\x33\x39\xef\x9c\xde\xf4\x96\xd5\xbd\x1c\x1e\xb9\x05\xa7\x34\x9d\x17\xf2\x93\x6a\xb2\x3e\x66\x4d\xb1\x0c\x8f\xc2\x9b\xeb\xbb\xd6\x67\xc4\xef\x9e\x0d\x85\x5d\x95\xdc\x87\x80\x18\x32\xb9\xb0\x05\x61\x01\xaf\xc6\x02\xa6\x6d\xd3\xd0\x04\xda\x0b\xf8\xff\x2b\xc4\xbf\x4b\xec\x2c\x7e\x92\x1f\xf7\xb9\x9c\x76\xf9\x8c\x8c\xc9\x19\x1e\x43\x0c\x00\xa7\xd9\xf6\x9c\xbe\x51\xac\xdc\x0a\xc9\x75\xb3\xf3\xdf\xda\xae\xfa\xd6\x64\x98\xdc\x33\x99\xb7\xa7\xe6\x3c\xad\xa0\x2a\x9c\x65\x17\x01\x2b\xdd\x62\x2d\x99\x90\xe8\xd6\x3c\x2b\xc1\xa9\xde\x81\xbb\x6d\x20\xda\xd7\x40\xd7\x82", 250, { 0x0f, 0x8a, 0xa8, 0x34, 0x80, 0x72, 0x4c, 0x5a, 0x8f, 0xc3, 0x1d, 0x81, 0x28, 0x35, 0x09, 0x61 }, { 0xbb, 0xd8, 0xbe, 0x9c, 0x96, 0xc6, 0xaa, 0x4b, 0xbb, 0xd8, 0xbe, 0x9c, 0x96, 0xc6, 0xaa, 0x4b } },
|
||||
{ "\x02\x8b\x7c\x20\xe6\x1b\x89\xf6\x27\x2a\x04\x3e\x2c\xf3\x62\x2b\xf7\xb7\x98\x24\xa9\x79\xc1\x1a\xc6\xdc\x01\x5a\x62\x34\xa9\xa2\x1d\x4c\x22\x32\xfe\x6e\xaa\xf9\xb2\x56\x75\x30\x95\xb6\x19\xaa\xf1\xf4\x92\xa9\xab\xc3\x22\xf3\xa7\x24\x02\x27\x61\x5d\x74\x9e\xc5\xd9\xf9\x53\x1c\x67\x1e\xe1\x69\xd5\x17\x70\xe8\x8d\x9f\x69\x28\xcb\x94\x30\x52\xb6\x83\xe0\xc2\x68\xae\xd7\xae\x5e\xa0\x03\x2a\x83\xc5\xb2\xcc\x68\x03\xd4\x23\x46\x97\x6e\xa8\xe9\xb3\xf7\xcf\xe2\x49\x4e\xbe\xe3\x9e\x63\xd0\x93\xb1\x3f\xa3\x40\x2f\xbf\x86\x47\x87\x4e\x91\xe0\xcb\x6d\x79\x0a\xb6\x0b\x08\xa2\x3c\x0f\x51\x07\xf7\x80\x80\x16\x46\x75\xd2\x98\xac\xef\x76\x6c\xbd\x29\x8c\x26\x88\x4a\xb2\xf6\xa0\xe2\xd2\x8b\x7b\x55\xbe\x3c\xec\x49\x36\xfe\x0e\x90\x01\x3d\xa1\xa7\xe7\xea\x87\x0f\x07\xf8\x8f\x37\x0a\xa5\xfa\x8f\x79\xd5\xa4\x58\x20\x02\x04\xf6\xec\x59\x41\x84\x64\x92\xb7\x49\x24\x8d\x78\x67\x54\x81\xc6\x9c\xca\x4f\xe9\x3e\xda\x80\x99\xd2\xad\xdf\xee\x10\x8b\xa5\x8c\xbc\x63\xeb\x0c\xcd\x8b\x9d\x50\x40\xc5\x1f\x99\x75\x53\x1c\x03", 251, { 0xe3, 0x11, 0xd8, 0xe4, 0x8e, 0x11, 0xa5, 0x2e, 0x07, 0xf5, 0x0b, 0x2f, 0xb1, 0xcc, 0x04, 0xc3 }, { 0xd5, 0x9b, 0x53, 0xa1, 0xa6, 0x66, 0x9c, 0x75, 0xd5, 0x9b, 0x53, 0xa1, 0xa6, 0x66, 0x9c, 0x75 } },
|
||||
{ "\xd8\x65\x98\xd9\xea\x61\x46\x37\xdd\x4b\xde\x52\xd1\x50\x70\x2a\xe2\x66\xb3\x4d\x6d\x03\x02\x3b\x61\x7a\x0b\x1b\x1d\x19\x06\xcc\x44\x77\x55\x02\x1c\x06\x3b\x02\xd3\x2e\xc6\x61\xf8\x8c\xeb\x09\x53\xc0\x6d\x38\x78\x93\xcd\x10\x48\xe4\xe2\xf9\xf0\xe1\x74\xee\xad\x06\x56\x8d\xb6\xf9\x94\x1a\xbc\x16\x6b\xaa\x2c\xa1\x55\xfc\x47\xaf\x5e\xdb\xc4\xf3\xec\xd4\x7c\x99\x0e\x47\x36\x6e\x7f\x57\xaf\x82\x42\x2e\x17\x8e\x79\x35\x8c\x7e\xce\x19\xf5\xc7\xe0\x55\xd5\x76\xec\x3f\xe3\x0e\x7a\x56\x38\x0a\x5d\x40\xd6\x1b\x15\x7b\x0b\x7e\x95\x53\x22\xb7\xc8\x56\x46\x0e\x43\x53\xe9\xe7\x91\x89\x15\x78\xde\xc7\xd7\x62\x34\x31\xa6\x19\x26\x1f\x0e\xcf\xd0\x28\xc5\x18\xff\x02\xa8\xe0\x92\x5c\x21\xb3\xf5\x93\xe1\x13\xb0\xcc\x7a\x94\x33\x7b\x25\xcd\x06\x53\xf8\xc7\x45\x3d\x48\xd2\xf5\xf5\x63\xd6\x85\xe7\xfb\xe3\xcf\x43\x6b\x93\xc5\x97\xb7\x5c\x72\xa7\xd2\x47\x33\x3b\xc6\x96\x03\xf3\xf8\x9b\xf4\x28\x22\xa3\x40\x5d\x46\x39\x30\x77\x8a\xa6\x61\x30\x2c\x32\x28\x56\x8a\x1d\x17\xcd\x90\x6e\xbc\xac\xf9\x45\xaf\x2c\x3e\x5b\xca\x0c", 252, { 0x36, 0x19, 0x20, 0xba, 0xb3, 0xfe, 0xa9, 0x35, 0x69, 0x3c, 0xd2, 0xa5, 0x4e, 0x46, 0x6a, 0xa7 }, { 0x60, 0xda, 0x44, 0x1d, 0x71, 0xa1, 0xaa, 0x37, 0x60, 0xda, 0x44, 0x1d, 0x71, 0xa1, 0xaa, 0x37 } },
|
||||
{ "\x07\x5c\x84\xbf\x58\x19\x72\x71\x4d\x16\x9d\x0a\x74\x72\xbb\x27\xc1\x1e\x98\x18\xb6\xbe\x61\x1c\xe0\x98\x1d\x2f\xcd\x71\xff\xa5\xa6\x57\x1f\x84\x88\xce\x21\xcd\xbf\xe6\xb2\x68\xf1\xc8\x1f\x4b\xf6\xbe\x14\x1d\xdd\x1d\xfe\xea\xd1\xff\x3e\x60\xd0\x43\xe7\x21\x99\xc9\xc2\x2e\x72\x13\xae\xee\x04\xb1\x7b\xd9\x9e\x54\x3f\x25\x42\x24\xe3\xf2\x49\xc4\x04\x5d\x60\x8e\xcc\x02\x94\x3e\xe4\x65\xe1\x77\x8f\xde\xa1\x38\xfb\x1a\x0e\xa2\x8a\x6d\x8b\x62\x2e\xa6\x94\x6e\x6d\xfc\x41\x25\xbe\xfc\x7e\xee\x94\xc4\xb0\xa9\x78\xbc\xc8\x2f\x8e\x56\x39\xce\xb7\xad\x66\xe7\xe4\x38\xf7\x44\x4e\x92\x98\x63\x80\x93\xce\x2e\xe9\xea\x49\xc4\x7b\x32\xbf\x67\xe3\x8e\x16\x1b\x09\x25\x01\x63\x50\x61\x26\x6d\xdf\x1f\xf7\x52\xa2\x7c\x22\xd0\x07\x99\x7e\xa3\xc5\x5a\x69\x22\xd9\xfc\x93\xb0\xf4\x88\x10\x4e\x54\xbc\xad\x0c\x46\x5d\x11\xa1\x24\xfd\xff\x72\x47\xc1\x90\x3b\xbe\x7a\xfc\x7d\xb8\xb6\xcf\x11\x76\x31\xc8\x1a\xf9\xb0\xf6\x61\x31\x5a\xd6\xd4\xa5\x32\x5d\xb9\x2a\x51\xc7\x29\x81\x18\xcf\x8b\x6c\xa6\x91\x09\x9c\x02\xfa\x38\x9b\x65\xaa", 253, { 0xa5, 0xc2, 0xbf, 0x94, 0x36, 0xae, 0x8e, 0x9a, 0x95, 0xaa, 0xb9, 0x77, 0x74, 0x77, 0x6f, 0x0f }, { 0x5d, 0x89, 0x67, 0x63, 0x99, 0xc9, 0x74, 0xa2, 0x5d, 0x89, 0x67, 0x63, 0x99, 0xc9, 0x74, 0xa2 } },
|
||||
{ "\x60\x2f\x3e\x63\x70\x2d\x8f\x36\x4a\x07\xa7\x62\x35\xa2\x72\xff\xd7\xbf\x26\x1c\x3c\x6e\xbe\x32\xd5\xab\xe9\x82\x00\x18\xd4\x92\x72\x44\xe3\x09\x26\x73\x62\xcf\x6d\xf3\x7e\xe8\x8b\xfe\x81\xaf\xdd\x74\x98\x5b\xd5\x0a\x40\xea\xb3\x4a\xb8\xbf\xe7\xb6\xea\x01\x86\xdd\x4d\x48\x81\x95\x73\x24\x8b\xf5\xa8\xea\xab\xc8\xf6\x9c\x0f\x93\x40\xdd\xf8\x0a\x4a\x99\x62\x60\x02\x3e\x9c\xab\x63\x8d\x87\x9e\xb0\xdd\xf4\x7b\x75\xf6\x82\x4a\x3d\x25\x93\x89\x65\x24\xba\x99\xa3\x4e\x47\x74\x1e\x0e\x85\xe2\x05\xc5\x56\x5d\x16\x4a\x91\x17\xd3\xe5\x31\x98\xf9\xb5\xbf\xe5\xf2\x95\x9d\x95\x0d\x62\x0c\x43\x7c\x7a\x5e\xc0\x7a\x99\x7c\x8c\x1e\x2f\xa1\x90\x4c\x38\xf5\x86\x82\x92\x42\x38\x79\x6a\x53\xa0\x99\xe9\x0f\xcd\x5a\xb3\x47\x41\x20\x2f\xb9\x4a\xc2\x81\x6f\x67\xf5\x68\xe2\x5c\x80\x81\x92\x1e\x6b\x69\x9f\xbe\x12\x55\xbc\x77\x4d\x84\xbe\xab\x71\x6e\x0a\x5e\x5a\x8c\xa7\xf8\x1a\x1c\x45\xd3\xd5\x25\xd2\xc1\xd8\x28\x00\x71\x21\xe7\x78\xa1\x73\x65\x86\x73\x73\x3a\x86\xd5\x1f\xe8\x1b\xa0\x1e\xfc\x3e\xbb\x82\x90\xaf\x94\x46\x05\x28\x27", 254, { 0x67, 0x2b, 0x47, 0xac, 0x71, 0xd0, 0xef, 0x97, 0xae, 0x8b, 0x37, 0xa1, 0xb4, 0x13, 0x81, 0x6a }, { 0xb4, 0xe9, 0xe2, 0xa0, 0x62, 0x50, 0xb9, 0x5a, 0xb4, 0xe9, 0xe2, 0xa0, 0x62, 0x50, 0xb9, 0x5a } },
|
||||
{ "\x3b\x96\xd2\xd5\x69\x6e\x4a\x53\x08\x68\x4e\x6a\xce\x2c\x76\x19\x7f\x79\xa4\x21\x5f\xf8\x68\xc2\xbb\x6b\xce\x66\xfd\x5c\x8d\x17\x88\x85\x53\xda\x05\x59\x27\x42\xf5\x2b\x7e\xc4\x3b\xb4\x07\x98\xee\x01\x2b\xb8\x31\x2c\x7e\x34\xc8\x22\xe2\x5d\x66\x75\x52\x9c\x29\x99\x00\x1a\x22\xbc\x56\x34\x3d\x3a\x31\x33\x64\x83\x45\x31\xcb\x50\x35\x25\x4d\x46\xcd\x94\x32\x9c\xc5\x96\x04\xe2\x08\x5d\x81\xa0\x0c\x65\x4d\x25\xf8\xa9\xf4\x1a\x79\xe3\x40\xc0\x20\x48\x7e\x69\x5d\x9a\xce\x6f\xf9\x27\x82\x3c\xf5\xf8\x5d\xf4\x6c\xb2\xaa\x04\x31\x35\xaf\x30\x66\x1d\xd9\xe4\x95\x33\x09\xaf\xbc\xfe\x9a\x66\x04\x2a\x3e\x3f\x47\xcc\x60\xbd\xfa\xf1\x26\x01\x36\x82\x93\xc8\xcf\x1c\x58\x4b\xa1\x44\x86\x1f\x2c\x4a\x42\x63\xd8\xfb\x16\xfe\xcf\x07\x74\x74\xd2\xa4\xe6\xb3\x1b\x7f\x41\x54\xbc\x15\x01\xf9\x0c\x91\xce\x95\x03\xda\xf6\x7d\x11\xca\x51\xd8\x96\x6f\x9b\xea\xd9\x30\x7a\xe7\xc4\xf7\xfd\x0a\x2e\x2e\xc5\x4a\x20\xc2\xec\xdd\x58\x0d\x28\xd8\xab\x87\x8e\x63\xdb\x4c\x0f\xc9\x7d\xfd\x2c\x52\x82\xff\xca\x29\x8c\xc4\xb5\x15\x74\x42\x26\x73\x0c", 255, { 0xe2, 0x09, 0x34, 0x36, 0xe1, 0x1e, 0xf8, 0xa6, 0xef, 0xbc, 0x63, 0x4c, 0x45, 0xec, 0x8c, 0x7a }, { 0xdf, 0xff, 0x20, 0xd7, 0x21, 0xd8, 0x1f, 0x7a, 0xdf, 0xff, 0x20, 0xd7, 0x21, 0xd8, 0x1f, 0x7a } },
|
||||
{ "\x2c\x23\xef\xc0\xa4\x05\x78\x47\xaf\x7f\x15\x89\xe4\xf2\x3c\xa5\x35\x07\x14\x02\xda\x40\xd4\x99\x67\xf2\x8f\x44\xac\x34\x1a\x54\xfd\x33\x21\xab\x77\x83\x41\x7f\x84\xa2\x05\xd3\x11\x2d\x63\xbd\x17\xa4\x75\xfa\x27\xf5\x52\xbb\x11\x2f\xb8\x93\x3f\x4e\xbe\xf1\x36\x09\xbc\xd0\xe6\x03\x59\x1f\x61\x73\x52\x0d\x7d\xed\x4e\x5d\x6f\xa5\xb7\x44\x9f\x57\x87\x4b\x83\x87\xa8\xcf\xae\x53\xa8\xb3\x01\x2b\xd9\xbc\xb0\xcc\x93\x08\xb7\x90\x50\x0a\x01\x50\x90\x45\x9d\xef\x6e\xc8\x72\xa0\xf7\xb5\xeb\x23\xb6\x54\x82\xf6\xad\x8d\x97\xc4\x50\xb8\x35\x14\x6b\x27\x42\x99\x58\x7c\x26\x25\x6d\xa4\xad\xd3\xb8\x8a\x55\xca\xd3\x12\xa3\xf0\xf1\xa0\x11\x26\x1f\xe4\x99\x86\x9e\xb1\x05\xb2\x41\xca\x54\x4a\xa9\x2d\x93\xfc\x82\xe0\xac\x93\x0e\x86\x04\xa9\x0b\x5b\x3d\xf8\x2d\xc0\x5d\x00\x5c\x01\xdb\x9e\x70\x2a\xd2\xa4\x73\x0e\xcb\xba\x3c\x3e\x98\xe8\x8c\x3e\x15\x1a\xa5\xea\xe4\xb6\x57\xf2\xb4\x7d\x94\x51\x1b\x15\x28\xcd\xf7\xb0\x34\xeb\x4d\xb3\xc7\xda\xad\xe7\x4b\xc6\x41\x46\x64\x42\x19\xec\x15\x8e\xc6\xd9\xd7\xa8\x49\x14\x5f\x21\x95\x39\xa8\x55", 256, { 0xf8, 0x03, 0x02, 0xa9, 0x4a, 0x3e, 0xbd, 0x04, 0x75, 0x76, 0x65, 0x11, 0xf4, 0x75, 0x25, 0x1e }, { 0xb4, 0x89, 0x09, 0x17, 0xad, 0xba, 0x4c, 0xdd, 0xb4, 0x89, 0x09, 0x17, 0xad, 0xba, 0x4c, 0xdd } },
|
||||
|
||||
3501
cmdline/mingw.c
3501
cmdline/mingw.c
File diff suppressed because it is too large
Load diff
2484
cmdline/mingwapp.c
Normal file
2484
cmdline/mingwapp.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,18 +1,16 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2015 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "stream.h"
|
||||
#include "support.h"
|
||||
|
||||
volatile int global_interrupt = 0;
|
||||
|
||||
#define STREAM_MAX 8
|
||||
#define BUFFER_MAX 64
|
||||
#define STR_MAX 128
|
||||
|
||||
void test(void)
|
||||
void test(int advise_mode)
|
||||
{
|
||||
struct stream* s;
|
||||
char file[32];
|
||||
|
|
@ -22,11 +20,10 @@ void test(void)
|
|||
uint32_t u32 = -1L;
|
||||
uint64_t u64 = -1LL;
|
||||
uint32_t put_crc_stored;
|
||||
uint32_t put_crc_computed;
|
||||
|
||||
crc32c_init();
|
||||
|
||||
s = sopen_multi_write(STREAM_MAX, STREAM_FLAGS_CRC);
|
||||
s = sopen_multi_write(STREAM_MAX, advise_mode | STREAM_FLAGS_CRC);
|
||||
for (i = 0; i < STREAM_MAX; ++i) {
|
||||
snprintf(file, sizeof(file), "stream%u.bin", i);
|
||||
remove(file);
|
||||
|
|
@ -81,13 +78,6 @@ void test(void)
|
|||
}
|
||||
|
||||
put_crc_stored = scrc(s);
|
||||
put_crc_computed = scrc_stream(s);
|
||||
|
||||
if (put_crc_stored != put_crc_computed) {
|
||||
/* LCOV_EXCL_START */
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (sputble32(put_crc_stored, s) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -106,7 +96,7 @@ void test(void)
|
|||
uint32_t get_crc_computed;
|
||||
snprintf(file, sizeof(file), "stream%u.bin", i);
|
||||
|
||||
s = sopen_read(file, STREAM_FLAGS_CRC);
|
||||
s = sopen_read(file, advise_mode | STREAM_FLAGS_CRC);
|
||||
if (s == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -154,7 +144,7 @@ void test(void)
|
|||
char copy[STR_MAX];
|
||||
memset(str, ' ' + j, j - 1);
|
||||
str[j - 1] = 0;
|
||||
if (sgetbs(s, copy, sizeof(copy)) != 0 || strcmp(copy, str) != 0) {
|
||||
if (sgetbs(s, copy, sizeof(copy)) != (ssize_t)(j - 1) || strcmp(copy, str) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -195,7 +185,7 @@ void test(void)
|
|||
unsigned char buf[4];
|
||||
snprintf(file, sizeof(file), "stream%u.bin", i);
|
||||
|
||||
s = sopen_read(file, STREAM_FLAGS_CRC);
|
||||
s = sopen_read(file, advise_mode | STREAM_FLAGS_CRC);
|
||||
if (s == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -250,7 +240,13 @@ int main(void)
|
|||
|
||||
printf("Test stream buffer size %u\n", i);
|
||||
|
||||
test();
|
||||
test(ADVISE_DEFAULT);
|
||||
}
|
||||
|
||||
STREAM_SIZE = 64 * 1024;
|
||||
for (i = ADVISE_SEQUENTIAL; i <= ADVISE_DISCARD_WINDOW; ++i) {
|
||||
printf("Test stream advise mode %u\n", i);
|
||||
test(i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
|
||||
volatile int global_interrupt = 0;
|
||||
|
||||
/****************************************************************************/
|
||||
/* random */
|
||||
|
||||
|
|
@ -15,14 +13,14 @@ volatile int global_interrupt = 0;
|
|||
*/
|
||||
unsigned long long seed = 0;
|
||||
|
||||
unsigned rnd(unsigned max)
|
||||
size_t rnd(size_t max)
|
||||
{
|
||||
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
|
||||
|
||||
return (seed >> 32) % max;
|
||||
}
|
||||
|
||||
unsigned rndnz(unsigned max)
|
||||
size_t rndnz(size_t max)
|
||||
{
|
||||
if (max <= 1)
|
||||
return 1;
|
||||
|
|
@ -30,17 +28,17 @@ unsigned rndnz(unsigned max)
|
|||
return rnd(max - 1) + 1;
|
||||
}
|
||||
|
||||
void rndnz_range(unsigned char* data, int size)
|
||||
void rndnz_range(unsigned char* data, ssize_t size)
|
||||
{
|
||||
int i;
|
||||
ssize_t i;
|
||||
|
||||
for (i = 0; i < size; ++i)
|
||||
data[i] = rndnz(256);
|
||||
}
|
||||
|
||||
void rndnz_damage(unsigned char* data, int size)
|
||||
void rndnz_damage(unsigned char* data, ssize_t size)
|
||||
{
|
||||
int i;
|
||||
ssize_t i;
|
||||
|
||||
/* corrupt ensuring always different data */
|
||||
for (i = 0; i < size; ++i) {
|
||||
|
|
@ -59,7 +57,7 @@ char CHARSET[] = "qwertyuiopasdfghjklzxcvbnm1234567890 .-+";
|
|||
|
||||
void rnd_name(char* file)
|
||||
{
|
||||
int l = 1 + rnd(20);
|
||||
ssize_t l = 1 + rnd(20);
|
||||
|
||||
while (l) {
|
||||
*file++ = CHARSET[rnd(CHARSET_LEN)];
|
||||
|
|
@ -128,7 +126,7 @@ int fallback(int f, struct stat* st)
|
|||
* Create a file with random content.
|
||||
* - If the file exists it's rewritten, but avoiding to truncating it to 0.
|
||||
*/
|
||||
void cmd_generate_file(const char* path, int size)
|
||||
void cmd_generate_file(const char* path, ssize_t size)
|
||||
{
|
||||
unsigned char* data;
|
||||
int f;
|
||||
|
|
@ -148,12 +146,14 @@ void cmd_generate_file(const char* path, int size)
|
|||
|
||||
data = malloc(size);
|
||||
|
||||
/* We don't write zero bytes because we want to test */
|
||||
/* the recovering of new files, after an aborted sync */
|
||||
/* If the files contains full blocks at zero */
|
||||
/* this is an impossible condition to recover */
|
||||
/* because we cannot differentiate between an unused block */
|
||||
/* and a file filled with 0 */
|
||||
/*
|
||||
* We don't write zero bytes because we want to test
|
||||
* the recovering of new files, after an aborted sync
|
||||
* If the files contains full blocks at zero
|
||||
* this is an impossible condition to recover
|
||||
* because we cannot differentiate between an unused block
|
||||
* and a file filled with 0
|
||||
*/
|
||||
rndnz_range(data, size);
|
||||
|
||||
f = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NOFOLLOW, 0600);
|
||||
|
|
@ -208,12 +208,12 @@ void cmd_generate_symlink(const char* path, const char* linkto)
|
|||
/**
|
||||
* Create a file or a symlink with a random name.
|
||||
*/
|
||||
void cmd_generate(int disk, int size)
|
||||
void cmd_generate(const char* tag, int disk, ssize_t size)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
char* file;
|
||||
|
||||
snprintf(path, sizeof(path), "bench/disk%d/", disk);
|
||||
snprintf(path, sizeof(path), "bench/%s%d/", tag, disk);
|
||||
file = path + strlen(path);
|
||||
|
||||
/* add a directory */
|
||||
|
|
@ -276,7 +276,7 @@ void cmd_generate(int disk, int size)
|
|||
* - The written data may be equal or not at the already existing one.
|
||||
* - If it's a symlink nothing is done.
|
||||
*/
|
||||
void cmd_write(const char* path, int size)
|
||||
void cmd_write(const char* path, ssize_t size)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
@ -347,12 +347,14 @@ void cmd_write(const char* path, int size)
|
|||
* - The file timestamp is NOT modified.
|
||||
* - If it's a symlink nothing is done.
|
||||
*/
|
||||
void cmd_damage(const char* path, int size)
|
||||
void cmd_damage(const char* path, ssize_t size)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
/* here a 0 size means to change nothing */
|
||||
/* as also the timestamp should not be changed */
|
||||
/*
|
||||
* Here a 0 size means to change nothing
|
||||
* as also the timestamp should not be changed
|
||||
*/
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
|
|
@ -444,7 +446,7 @@ void cmd_damage(const char* path, int size)
|
|||
* - The file must exist.
|
||||
* - If it's a symlink nothing is done.
|
||||
*/
|
||||
void cmd_append(const char* path, int size)
|
||||
void cmd_append(const char* path, ssize_t size)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
@ -495,7 +497,7 @@ void cmd_append(const char* path, int size)
|
|||
* - The file is NEVER truncated to 0.
|
||||
* - If it's a symlink nothing is done.
|
||||
*/
|
||||
void cmd_truncate(const char* path, int size)
|
||||
void cmd_truncate(const char* path, ssize_t size)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
@ -563,7 +565,7 @@ void cmd_delete(const char* path)
|
|||
* Change a file. Or deleted/truncated/append/created.
|
||||
* - The file must exist.
|
||||
*/
|
||||
void cmd_change(const char* path, int size)
|
||||
void cmd_change(const char* path, ssize_t size)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
@ -603,7 +605,7 @@ void cmd_change(const char* path, int size)
|
|||
cmd_generate_symlink(path, linkto);
|
||||
}
|
||||
} else if (S_ISREG(st.st_mode)) {
|
||||
int r;
|
||||
size_t r;
|
||||
|
||||
r = rnd(4);
|
||||
|
||||
|
|
@ -623,9 +625,9 @@ void help(void)
|
|||
{
|
||||
printf("Test for " PACKAGE " v" VERSION " by Andrea Mazzoleni, " PACKAGE_URL "\n");
|
||||
printf("Usage:\n");
|
||||
printf("\tmktest generate SEED DISK_NUM FILE_NUM FILE_SIZE\n");
|
||||
printf("\tmktest damage SEED NUM SIZE FILE\n");
|
||||
printf("\tmktest write SEED NUM SIZE FILE\n");
|
||||
printf("\tmktest generate SEED DISK_TAG DISK_NUM FILE_NUM FILE_SIZE\n");
|
||||
printf("\tmktest damage SEED COUNT SIZE FILE\n");
|
||||
printf("\tmktest write SEED COUNT SIZE FILE\n");
|
||||
printf("\tmktest change SEED SIZE FILE\n");
|
||||
printf("\tmktest append SEED SIZE FILE\n");
|
||||
printf("\tmktest truncate SEED SIZE FILE\n");
|
||||
|
|
@ -644,8 +646,9 @@ int main(int argc, char* argv[])
|
|||
|
||||
if (strcmp(argv[1], "generate") == 0) {
|
||||
int disk, file, size;
|
||||
const char* tag;
|
||||
|
||||
if (argc != 6) {
|
||||
if (argc != 7) {
|
||||
/* LCOV_EXCL_START */
|
||||
help();
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -653,20 +656,21 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
seed = atoi(argv[2]);
|
||||
disk = atoi(argv[3]);
|
||||
file = atoi(argv[4]);
|
||||
size = atoi(argv[5]);
|
||||
tag = argv[3];
|
||||
disk = atoi(argv[4]);
|
||||
file = atoi(argv[5]);
|
||||
size = atoi(argv[6]);
|
||||
|
||||
for (i = 0; i < disk; ++i) {
|
||||
for (j = 0; j < file; ++j) {
|
||||
if (j == 0)
|
||||
/* create at least a big one */
|
||||
cmd_generate(i + 1, size);
|
||||
cmd_generate(tag, i + 1, size);
|
||||
else if (j == 1)
|
||||
/* create at least an empty one */
|
||||
cmd_generate(i + 1, 0);
|
||||
cmd_generate(tag, i + 1, 0);
|
||||
else
|
||||
cmd_generate(i + 1, rnd(size));
|
||||
cmd_generate(tag, i + 1, rnd(size));
|
||||
}
|
||||
}
|
||||
} else if (strcmp(argv[1], "write") == 0) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// MurmurHash3 was written by Austin Appleby, and is placed in the public
|
||||
// domain. The author hereby disclaims copyright to this source code.
|
||||
|
||||
/* Finalization mix - force all bits of a hash block to avalanche */
|
||||
/* finalization mix - force all bits of a hash block to avalanche */
|
||||
static inline uint32_t fmix32(uint32_t h)
|
||||
{
|
||||
h ^= h >> 16;
|
||||
|
|
@ -25,47 +25,20 @@ static inline uint32_t fmix32(uint32_t h)
|
|||
return h;
|
||||
}
|
||||
|
||||
/*
|
||||
* Warning!
|
||||
* Don't declare these variables static, otherwise the gcc optimizer
|
||||
* may generate very slow code for multiplication with these constants,
|
||||
* like:
|
||||
|
||||
-> .cpp
|
||||
k1 *= c1;
|
||||
-> .asm
|
||||
152: 8d 14 80 lea (%eax,%eax,4),%edx
|
||||
155: 8d 14 90 lea (%eax,%edx,4),%edx
|
||||
158: c1 e2 03 shl $0x3,%edx
|
||||
15b: 29 c2 sub %eax,%edx
|
||||
15d: 8d 14 d2 lea (%edx,%edx,8),%edx
|
||||
160: 8d 14 90 lea (%eax,%edx,4),%edx
|
||||
163: 8d 14 d0 lea (%eax,%edx,8),%edx
|
||||
166: 8d 14 90 lea (%eax,%edx,4),%edx
|
||||
169: 8d 14 50 lea (%eax,%edx,2),%edx
|
||||
16c: 8d 14 90 lea (%eax,%edx,4),%edx
|
||||
16f: 8d 14 92 lea (%edx,%edx,4),%edx
|
||||
172: 8d 14 50 lea (%eax,%edx,2),%edx
|
||||
175: 8d 04 d0 lea (%eax,%edx,8),%eax
|
||||
178: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
|
||||
17f: 29 d0 sub %edx,%eax
|
||||
|
||||
* resulting in speeds of 500 MB/s instead of 3000 MB/s.
|
||||
*
|
||||
* Verified with gcc 4.4.4 compiling with :
|
||||
*
|
||||
* g++ -g -c -O2 MurmurHash3.cpp -o MurmurHash3.o
|
||||
/**
|
||||
* Non-static variables are intentionally used instead of static const
|
||||
* because keeping these constants in CPU registers yields measurably
|
||||
* higher throughput than using 32-bit immediate constants in imul.
|
||||
*/
|
||||
uint32_t c1 = 0x239b961b;
|
||||
uint32_t c2 = 0xab0e9789;
|
||||
uint32_t c3 = 0x38b34ae5;
|
||||
uint32_t c4 = 0xa1e38b93;
|
||||
|
||||
void MurmurHash3_x86_128(const void* data, size_t size, const uint8_t* seed, void* digest)
|
||||
static void MurmurHash3_x86_128(const void* data, size_t size, const uint8_t* seed, void* digest)
|
||||
{
|
||||
size_t nblocks;
|
||||
const uint32_t* blocks;
|
||||
const uint32_t* end;
|
||||
const uint8_t* p;
|
||||
const uint8_t* end;
|
||||
size_t size_remainder;
|
||||
uint32_t h1, h2, h3, h4;
|
||||
|
||||
|
|
@ -74,23 +47,20 @@ void MurmurHash3_x86_128(const void* data, size_t size, const uint8_t* seed, voi
|
|||
h3 = util_read32(seed + 8);
|
||||
h4 = util_read32(seed + 12);
|
||||
|
||||
nblocks = size / 16;
|
||||
blocks = data;
|
||||
end = blocks + nblocks * 4;
|
||||
p = data;
|
||||
end = p + (size & ~15);
|
||||
|
||||
/* body */
|
||||
while (blocks < end) {
|
||||
uint32_t k1 = blocks[0];
|
||||
uint32_t k2 = blocks[1];
|
||||
uint32_t k3 = blocks[2];
|
||||
uint32_t k4 = blocks[3];
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
k1 = util_swap32(k1);
|
||||
k2 = util_swap32(k2);
|
||||
k3 = util_swap32(k3);
|
||||
k4 = util_swap32(k4);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC unroll 8
|
||||
#elif defined(__clang__)
|
||||
#pragma unroll 8
|
||||
#endif
|
||||
while (p < end) {
|
||||
uint32_t k1 = util_read32(p + 0);
|
||||
uint32_t k2 = util_read32(p + 4);
|
||||
uint32_t k3 = util_read32(p + 8);
|
||||
uint32_t k4 = util_read32(p + 12);
|
||||
|
||||
k1 *= c1; k1 = util_rotl32(k1, 15); k1 *= c2; h1 ^= k1;
|
||||
|
||||
|
|
@ -108,13 +78,13 @@ void MurmurHash3_x86_128(const void* data, size_t size, const uint8_t* seed, voi
|
|||
|
||||
h4 = util_rotl32(h4, 13); h4 += h1; h4 = h4 * 5 + 0x32ac3b17;
|
||||
|
||||
blocks += 4;
|
||||
p += 16;
|
||||
}
|
||||
|
||||
/* tail */
|
||||
size_remainder = size & 15;
|
||||
if (size_remainder != 0) {
|
||||
const uint8_t* tail = (const uint8_t*)blocks;
|
||||
const uint8_t* tail = p;
|
||||
|
||||
uint32_t k1 = 0;
|
||||
uint32_t k2 = 0;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* of this license, visit: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Analysis of the BFast variant and blinding multiplication
|
||||
*
|
||||
* Many fast non-cryptographic hashes (wyhash, rapidhash) use "folding
|
||||
|
|
@ -150,7 +150,7 @@ static const uint64_t MUSEAIR_CONSTANT[13] = {
|
|||
do { \
|
||||
l = a; \
|
||||
h = b; \
|
||||
util_mum(&l, &h); \
|
||||
tommy_mum(&l, &h); \
|
||||
} while (0)
|
||||
|
||||
#define likely(a) tommy_likely(a)
|
||||
|
|
@ -190,6 +190,11 @@ static void MuseAirLoong(const void* bytes, size_t len, const uint8_t* seed, uin
|
|||
state[5] ^= seed_b & MASK_K;
|
||||
|
||||
if (unlikely(q > u64x(12))) {
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC unroll 2
|
||||
#elif defined(__clang__)
|
||||
#pragma unroll 2
|
||||
#endif
|
||||
do {
|
||||
state[0] ^= util_read64(p + u64x(0));
|
||||
state[1] ^= util_read64(p + u64x(1));
|
||||
|
|
|
|||
532
cmdline/parity.c
532
cmdline/parity.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
* Pseudo random limits for parity
|
||||
*/
|
||||
#define PARITY_LIMIT(size, split, level) \
|
||||
size ? size + (123562341 + split * 634542351 + level * 983491341) % size : 0
|
||||
(size ? (size) + (123562341U + (split) * 634542351U + (level) * 983491341U) % (size) : 0)
|
||||
|
||||
/****************************************************************************/
|
||||
/* parity */
|
||||
|
|
@ -31,9 +31,11 @@ block_off_t parity_allocated_size(struct snapraid_state* state)
|
|||
/* start from the declared size */
|
||||
block_off_t block = fs_size(disk);
|
||||
|
||||
/* decrease the block until an allocated one, but part of a file */
|
||||
/* we don't stop at deleted blocks, because we want to have them cleared */
|
||||
/* if they are at the end of the parity */
|
||||
/*
|
||||
* Decrease the block until an allocated one, but part of a file
|
||||
* we don't stop at deleted blocks, because we want to have them cleared
|
||||
* if they are at the end of the parity
|
||||
*/
|
||||
while (block > parity_block && !block_has_file(fs_par2block_find(disk, block - 1)))
|
||||
--block;
|
||||
|
||||
|
|
@ -42,6 +44,11 @@ block_off_t parity_allocated_size(struct snapraid_state* state)
|
|||
parity_block = block;
|
||||
}
|
||||
|
||||
if (parity_block > (block_off_t)INT64_MAX / state->block_size) {
|
||||
log_fatal(ESOFT, "Parity with %" PRIu64 " blocks is too large for block size %u.\n", parity_block, state->block_size);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return parity_block;
|
||||
}
|
||||
|
||||
|
|
@ -125,9 +132,43 @@ void parity_size(struct snapraid_parity_handle* handle, data_off_t* out_size)
|
|||
*out_size = size;
|
||||
}
|
||||
|
||||
void parity_physical_size(struct snapraid_parity_handle* handle, data_off_t* out_size)
|
||||
{
|
||||
unsigned s;
|
||||
data_off_t size;
|
||||
|
||||
/*
|
||||
* Compute the physical size of the logical parity layout across splits.
|
||||
*
|
||||
* Physical presence is determined directly from EOF and is independent of
|
||||
* parity validity. For split parity, if an earlier split is physically shorter
|
||||
* than its logical size, subsequent splits cannot extend the logical extent
|
||||
* past that missing region.
|
||||
*/
|
||||
size = 0;
|
||||
|
||||
for (s = 0; s < handle->split_mac; ++s) {
|
||||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
data_off_t run = split->st.st_size;
|
||||
|
||||
/* don't count physical data outside the logical split */
|
||||
if (run > split->size)
|
||||
run = split->size;
|
||||
|
||||
size += run;
|
||||
|
||||
/* later splits cannot extend the logical extent past this boundary */
|
||||
if (run < split->size)
|
||||
break;
|
||||
}
|
||||
|
||||
*out_size = size;
|
||||
}
|
||||
|
||||
int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode, uint32_t block_size, data_off_t limit_size)
|
||||
{
|
||||
unsigned s;
|
||||
int zero_seen = 0;
|
||||
data_off_t block_mask;
|
||||
|
||||
/* mask of bits used by the block size */
|
||||
|
|
@ -146,8 +187,11 @@ int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_p
|
|||
split->size = parity->split_map[s].size;
|
||||
split->limit_size = PARITY_LIMIT(limit_size, s, level);
|
||||
|
||||
/* opening in sequential mode in Windows */
|
||||
flags = O_RDWR | O_CREAT | O_BINARY | advise_flags(&split->advise);
|
||||
/*
|
||||
* Open for writing.
|
||||
* O_NOFOLLOW: do not follow links to ensure to open the real parity file.
|
||||
*/
|
||||
flags = O_RDWR | O_CREAT | O_BINARY | O_NOFOLLOW | advise_flags(&split->advise);
|
||||
split->f = open(split->path, flags, 0600);
|
||||
if (split->f == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -168,13 +212,18 @@ int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_p
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* the initial valid size is the size on disk */
|
||||
split->valid_size = split->st.st_size;
|
||||
if (!S_ISREG(split->st.st_mode)) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(errno, "Error accessing parity file '%s' for not regular file.\n", split->path);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* If the parity size is not yet set, set it now.
|
||||
* This happens when expanding the number of parities,
|
||||
* or when upgrading from a content file that has not split->size data.
|
||||
* This happens when adding a new parity level or split that has
|
||||
* no persisted size yet.
|
||||
*/
|
||||
if (split->size == PARITY_SIZE_INVALID) {
|
||||
split->size = split->st.st_size;
|
||||
|
|
@ -182,12 +231,29 @@ int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_p
|
|||
/* ensure that the resulting size if block aligned */
|
||||
if ((split->size & block_mask) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(ESOFT, "Error in preallocated size of parity file '%s' with size %" PRIu64 " and block %u .\n", split->path, split->size, block_size);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-empty parity splits must form a contiguous prefix.
|
||||
* Once an empty split is found, all following splits must
|
||||
* also be empty. Otherwise logical parity would contain an
|
||||
* internal hole in the split layout.
|
||||
*/
|
||||
if (split->size == 0) {
|
||||
zero_seen = 1;
|
||||
} else if (zero_seen) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(ESOFT, "Invalid parity split layout: parity file '%s' has size %" PRIu64 " after an empty split.\n", split->path, split->size);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = advise_open(&split->advise, split->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -218,7 +284,7 @@ static int parity_handle_grow(struct snapraid_split_handle* split, data_off_t pr
|
|||
|
||||
/* simulate a failure for testing limits */
|
||||
if (split->limit_size != 0 && size > (data_off_t)split->limit_size) {
|
||||
errno = ENXIO;
|
||||
errno = ENOSPC;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -289,9 +355,9 @@ static int parity_handle_grow(struct snapraid_split_handle* split, data_off_t pr
|
|||
#endif
|
||||
|
||||
if (ret != 0)
|
||||
log_tag("split:grow:%s:%" PRIu64 ": failed with error %s\n", split->path, size, strerror(errno));
|
||||
log_tag("split:grow:%s:%" PRIu64 ": failed with error %s\n", esc_tag(split->path), size, strerror(errno));
|
||||
else
|
||||
log_tag("split:grow:%s:%" PRIu64 ": ok\n", split->path, size);
|
||||
log_tag("split:grow:%s:%" PRIu64 ": ok\n", esc_tag(split->path), size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -303,13 +369,36 @@ static int parity_handle_shrink(struct snapraid_split_handle* split, data_off_t
|
|||
ret = ftruncate(split->f, size);
|
||||
|
||||
if (ret != 0)
|
||||
log_tag("split:shrink:%s:%" PRIu64 ": failed with error %s\n", split->path, size, strerror(errno));
|
||||
log_tag("split:shrink:%s:%" PRIu64 ": failed with error %s\n", esc_tag(split->path), size, strerror(errno));
|
||||
else
|
||||
log_tag("split:shrink:%s:%" PRIu64 ": ok\n", split->path, size);
|
||||
log_tag("split:shrink:%s:%" PRIu64 ": ok\n", esc_tag(split->path), size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an exact physical split size without attempting a partial allocation.
|
||||
*/
|
||||
static int parity_setsize(struct snapraid_split_handle* split, data_off_t size, int skip_fallocate)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (split->st.st_size < size)
|
||||
ret = parity_handle_grow(split, split->st.st_size, size, skip_fallocate);
|
||||
else if (split->st.st_size > size)
|
||||
ret = parity_handle_shrink(split, size);
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (ret != 0)
|
||||
return -1;
|
||||
|
||||
/* the exact resize succeeded, so keep the cached EOF current */
|
||||
split->st.st_size = size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the highest bit set.
|
||||
*/
|
||||
|
|
@ -354,8 +443,13 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
|
|||
|
||||
/* note that in Windows ftruncate is really allocating space */
|
||||
if (ftruncate(spaceholder_f, WINDOWS_SPACEHOLDER_SIZE) != 0) {
|
||||
log_fatal(errno, "WARNING Failed to resize the space holder file '%s' to %u bytes.\n", spaceholder_path, WINDOWS_SPACEHOLDER_SIZE);
|
||||
log_fatal(errno, "Assuming that no more space is available.\n");
|
||||
if (is_hw(errno)) {
|
||||
log_fatal(errno, "DANGER! Hardware error while resizing space holder file '%s'. %s.\n", spaceholder_path, strerror(errno));
|
||||
close(spaceholder_f);
|
||||
remove(spaceholder_path);
|
||||
return -1;
|
||||
}
|
||||
log_info(errno, "WARNING Failed to resize the space holder file '%s' to %u bytes. Assuming that no more space is available. %s.\n", spaceholder_path, WINDOWS_SPACEHOLDER_SIZE, strerror(errno));
|
||||
close(spaceholder_f);
|
||||
remove(spaceholder_path);
|
||||
return 0;
|
||||
|
|
@ -384,14 +478,16 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
|
|||
/* present size */
|
||||
base = split->st.st_size;
|
||||
|
||||
/* truncate it to block size multiplier */
|
||||
/* in case of damage the size may get wrong */
|
||||
/*
|
||||
* Truncate it to block size multiplier
|
||||
* in case of damage the size may get wrong
|
||||
*/
|
||||
base &= ~block_mask;
|
||||
|
||||
/* size we have to increase */
|
||||
delta = size - base;
|
||||
|
||||
log_tag("split:fill:%s:%" PRIu64 ":%" PRIu64 ":\n", split->path, base, size);
|
||||
log_tag("split:fill:%s:%" PRIu64 ":%" PRIu64 ":\n", esc_tag(split->path), base, size);
|
||||
|
||||
/* grow the size one bit at time, like a kind of binary search */
|
||||
while (delta != 0) {
|
||||
|
|
@ -401,10 +497,19 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
|
|||
/* mask out the bit we process */
|
||||
delta &= ~run;
|
||||
|
||||
log_tag("split:delta:%s:%" PRIu64 ":%" PRIu64 ":\n", split->path, base, run);
|
||||
log_tag("split:delta:%s:%" PRIu64 ":%" PRIu64 ":\n", esc_tag(split->path), base, run);
|
||||
|
||||
ret = parity_handle_grow(split, base, base + run, skip_fallocate);
|
||||
if (ret != 0) {
|
||||
/* some filesystems report capacity limits without ENOSPC; stop only for hardware errors */
|
||||
if (is_hw(errno)) {
|
||||
log_fatal(errno, "DANGER! Hardware error while growing the parity file '%s' to size %" PRIu64 ". %s.\n", split->path, base + run, strerror(errno));
|
||||
#ifdef _WIN32
|
||||
remove(spaceholder_path);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* we cannot grow, fallback enabling all the smaller bits */
|
||||
delta = run - 1;
|
||||
|
||||
|
|
@ -425,15 +530,20 @@ static int parity_handle_fill(struct snapraid_split_handle* split, data_off_t si
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
/* now delete the spaceholder file */
|
||||
if (remove(spaceholder_path) != 0) {
|
||||
log_error(errno, "WARNING Failed to remove the space holder file '%s'.\n", spaceholder_path);
|
||||
log_error(errno, "Continuing anyway.\n");
|
||||
/* release the reserved space only if the holder was created */
|
||||
if (!skip_space_holder && remove(spaceholder_path) != 0) {
|
||||
if (is_hw(errno)) {
|
||||
log_fatal(errno, "DANGER! Hardware error while removing the space holder file '%s'. %s.\n", spaceholder_path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
log_error(errno, "WARNING! Failed to remove the space holder file '%s', continuing anyway. %s.\n", spaceholder_path, strerror(errno));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* shrink to the expected size to ensure to throw away any extra */
|
||||
/* data allocated when the grow operation fails */
|
||||
/*
|
||||
* Shrink to the expected size to ensure to throw away any extra
|
||||
* data allocated when the grow operation fails
|
||||
*/
|
||||
return parity_handle_shrink(split, base);
|
||||
}
|
||||
|
||||
|
|
@ -483,15 +593,92 @@ static int parity_handle_chsize(struct snapraid_split_handle* split, data_off_t
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* if we shrink, update the valid size, but don't update when growing */
|
||||
if (split->valid_size > split->st.st_size)
|
||||
split->valid_size = split->st.st_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int parity_restore(struct snapraid_parity_handle* handle, data_off_t size, uint32_t block_size, int skip_fallocate)
|
||||
{
|
||||
int ret;
|
||||
unsigned s;
|
||||
unsigned physical_split;
|
||||
data_off_t block_mask;
|
||||
|
||||
/* mask of bits used by the block size */
|
||||
block_mask = ((data_off_t)block_size) - 1;
|
||||
|
||||
if (size < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
physical_split = 0;
|
||||
for (s = 0; s < handle->split_mac; ++s) {
|
||||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
data_off_t run = split->size;
|
||||
|
||||
/* preserve persisted split boundaries and cut only the logical tail */
|
||||
if (run > size)
|
||||
run = size;
|
||||
|
||||
if ((run & block_mask) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(EINTERNAL, "Split '%s' size with extra '%" PRIu64 "' bytes.\n", split->path, run & block_mask);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* defer growth until a parity block is actually written */
|
||||
if (split->st.st_size > run) {
|
||||
ret = parity_setsize(split, run, 0);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
if (split->st.st_size != 0)
|
||||
physical_split = s;
|
||||
|
||||
size -= run;
|
||||
}
|
||||
|
||||
/*
|
||||
* After capping the tail, a non-empty later split belongs to the required
|
||||
* layout and requires every preceding persisted boundary to exist exactly.
|
||||
*/
|
||||
for (s = 0; s < physical_split; ++s) {
|
||||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
|
||||
ret = parity_setsize(split, split->size, skip_fallocate);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int parity_split_is_fixed(struct snapraid_parity_handle* handle, unsigned s)
|
||||
{
|
||||
/*
|
||||
* Parity splits concatenate into a single logical file.
|
||||
*
|
||||
* Once a following split contains data, this split's boundary becomes
|
||||
* fixed: changing it would shift logical offsets in all subsequent
|
||||
* splits, invalidating their parity positions.
|
||||
*
|
||||
* Only the last active split may grow. If total parity shrinks into a
|
||||
* previously fixed split, that split becomes the new tail and may shrink.
|
||||
*
|
||||
* An elastic split may also grow partially; remaining space is allocated
|
||||
* in the next split.
|
||||
*/
|
||||
/* next one */
|
||||
++s;
|
||||
|
||||
|
|
@ -528,8 +715,10 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
data_off_t run;
|
||||
|
||||
if (is_fixed) {
|
||||
/* if the required size is smaller, we have to reduce also the file */
|
||||
/* ignoring the previous size */
|
||||
/*
|
||||
* If the required size is smaller, we have to reduce also the file
|
||||
* ignoring the previous size
|
||||
*/
|
||||
if (size <= split->size) {
|
||||
/* mark it as not fixed anymore for the later check */
|
||||
is_fixed = 0;
|
||||
|
|
@ -542,7 +731,7 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
if ((run & block_mask) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(EINTERNAL, "Internal inconsistency in split '%s' size with extra '%" PRIu64 "' bytes.\n", split->path, run & block_mask);
|
||||
log_fatal(EINTERNAL, "Split '%s' size with extra '%" PRIu64 "' bytes.\n", split->path, run & block_mask);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -566,9 +755,14 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
} else if (is_fixed && split->st.st_size < run) {
|
||||
/*
|
||||
* A fixed split must always reach its logical boundary because changing
|
||||
* it would shift the logical offsets of data already present in following
|
||||
* splits.
|
||||
*/
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(errno, "Failed restoring parity file '%s' to size %" PRIu64 " resulting in size %" PRIu64 ".\n", split->path, run, (uint64_t)split->st.st_size);
|
||||
log_fatal(errno, "Failed resizing parity file '%s' to size %" PRIu64 " resulting in size %" PRIu64 ".\n", split->path, run, (uint64_t)split->st.st_size);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
} else {
|
||||
|
|
@ -582,6 +776,23 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-empty parity splits must form a contiguous prefix.
|
||||
*
|
||||
* If this split cannot allocate even one block while
|
||||
* parity space is still required, do not skip it and
|
||||
* continue allocation in a later split. Doing so would
|
||||
* create an internal zero-sized split such as
|
||||
* [100, 0, 50].
|
||||
*/
|
||||
if (run == 0 && size != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_fatal(errno, "Failed to allocate all the required parity space. You miss %" PRIu64 " bytes.\n", size);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* store what we have allocated */
|
||||
split->size = run;
|
||||
|
||||
|
|
@ -619,6 +830,7 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode, uint32_t block_size, data_off_t limit_size)
|
||||
{
|
||||
unsigned s;
|
||||
int zero_seen = 0;
|
||||
data_off_t block_mask;
|
||||
|
||||
handle->level = level;
|
||||
|
|
@ -637,9 +849,12 @@ int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_par
|
|||
split->size = parity->split_map[s].size;
|
||||
split->limit_size = PARITY_LIMIT(limit_size, s, level);
|
||||
|
||||
/* open for read */
|
||||
/* O_NOATIME: do not change access time */
|
||||
flags = O_RDONLY | O_BINARY | advise_flags(&split->advise);
|
||||
/*
|
||||
* Open for read
|
||||
* O_NOATIME: do not change access time
|
||||
* O_NOFOLLOW: do not follow links to ensure to open the real parity file
|
||||
*/
|
||||
flags = O_RDONLY | O_BINARY | O_NOFOLLOW | advise_flags(&split->advise);
|
||||
|
||||
split->f = open_noatime(split->path, flags);
|
||||
if (split->f == -1) {
|
||||
|
|
@ -661,13 +876,18 @@ int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_par
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* the initial valid size is the size on disk */
|
||||
split->valid_size = split->st.st_size;
|
||||
if (!S_ISREG(split->st.st_mode)) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(errno, "Error accessing parity file '%s' for not regular file.\n", split->path);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* If the parity size is not yet set, set it now.
|
||||
* This happens when expanding the number of parities,
|
||||
* or when upgrading from a content file that has not split->size data.
|
||||
* This happens when adding a new parity level or split that has
|
||||
* no persisted size yet.
|
||||
*/
|
||||
if (split->size == PARITY_SIZE_INVALID) {
|
||||
split->size = split->st.st_size;
|
||||
|
|
@ -675,12 +895,29 @@ int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_par
|
|||
/* ensure that the resulting size if block aligned */
|
||||
if ((split->size & block_mask) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(ESOFT, "Error in preallocated size of parity file '%s' with size %" PRIu64 " and block %u .\n", split->path, split->size, block_size);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-empty parity splits must form a contiguous prefix.
|
||||
* Once an empty split is found, all following splits must
|
||||
* also be empty. Otherwise logical parity would contain an
|
||||
* internal hole in the split layout.
|
||||
*/
|
||||
if (split->size == 0) {
|
||||
zero_seen = 1;
|
||||
} else if (zero_seen) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ESOFT;
|
||||
log_fatal(ESOFT, "Invalid parity split layout: parity file '%s' has size %" PRIu64 " after an empty split.\n", split->path, split->size);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = advise_open(&split->advise, split->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -712,65 +949,125 @@ int parity_sync(struct snapraid_parity_handle* handle)
|
|||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
int ret;
|
||||
|
||||
/* Ensure that data changes are written to disk. */
|
||||
/* This is required to ensure that parity is more updated than content */
|
||||
/* in case of a system crash. */
|
||||
/*
|
||||
* Ensure that data changes are written to disk.
|
||||
* This is required to ensure that parity is more updated than content
|
||||
* in case of a system crash.
|
||||
*
|
||||
* On macOS, standard fsync() only pushes data from kernel buffers to the
|
||||
* drive's volatile cache without requesting a physical media flush. F_FULLFSYNC
|
||||
* forces the drive controller to commit all cached data to permanent storage.
|
||||
* Because F_FULLFSYNC is not supported on directory descriptors, the subsequent
|
||||
* directory fsync() only flushes to the drive cache and is not guaranteed to be
|
||||
* instantly persistent across power loss. However, major database engines such
|
||||
* as SQLite and PostgreSQL follow this exact same pattern on Darwin, making it
|
||||
* the standard industry practice.
|
||||
*
|
||||
* See:
|
||||
* https://github.com/sqlite/sqlite/blob/f3b9f74d81132426dee1ccc07a67fdad2ccfeaa9/src/os_unix.c#L3928-L3953
|
||||
* https://github.com/postgres/postgres/blob/74c77052bc20017076100f0649ca0f44b1b98c29/src/backend/storage/file/fd.c#L835-L852
|
||||
*/
|
||||
#if defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
ret = fcntl(split->f, F_FULLFSYNC);
|
||||
if (ret != 0 && (errno == ENOTSUP || errno == EINVAL))
|
||||
ret = fsync(split->f);
|
||||
#else
|
||||
ret = fsync(split->f);
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error syncing parity file '%s'. %s.\n", split->path, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
/*
|
||||
* Sync the parent directory to ensure the directory entry of a newly
|
||||
* created parity split is durable before content state is published.
|
||||
*/
|
||||
char dir[PATH_MAX];
|
||||
char* slash;
|
||||
int handle_dir;
|
||||
int flags;
|
||||
|
||||
pathcpy(dir, sizeof(dir), split->path);
|
||||
|
||||
slash = strrchr(dir, '/');
|
||||
if (slash)
|
||||
slash[1] = 0;
|
||||
else
|
||||
pathcpy(dir, sizeof(dir), ".");
|
||||
|
||||
flags = O_RDONLY;
|
||||
#ifdef O_DIRECTORY
|
||||
flags |= O_DIRECTORY;
|
||||
#endif
|
||||
|
||||
/* open the directory to get the handle */
|
||||
handle_dir = open(dir, flags);
|
||||
if (handle_dir < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error opening the directory '%s'. %s.\n", dir, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* sync the directory */
|
||||
if (fsync(handle_dir) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error syncing the directory '%s'. %s.\n", dir, strerror(errno));
|
||||
close(handle_dir);
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (close(handle_dir) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error closing the directory '%s'. %s.\n", dir, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int parity_truncate(struct snapraid_parity_handle* handle)
|
||||
{
|
||||
unsigned s;
|
||||
int f_ret = 0;
|
||||
|
||||
for (s = 0; s < handle->split_mac; ++s) {
|
||||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
int ret;
|
||||
|
||||
/* truncate any data that we know it's not valid */
|
||||
ret = ftruncate(split->f, split->valid_size);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error truncating the parity file '%s' to size %" PRIu64 ". %s.\n", split->path, split->valid_size, strerror(errno));
|
||||
f_ret = -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
/* continue to truncate the others */
|
||||
}
|
||||
}
|
||||
|
||||
return f_ret;
|
||||
}
|
||||
|
||||
int parity_close(struct snapraid_parity_handle* handle)
|
||||
{
|
||||
unsigned s;
|
||||
int f_ret = 0;
|
||||
int f_errno = 0;
|
||||
|
||||
for (s = 0; s < handle->split_mac; ++s) {
|
||||
struct snapraid_split_handle* split = &handle->split_map[s];
|
||||
int ret;
|
||||
|
||||
advise_close(&split->advise, split->f);
|
||||
int ret = advise_close(&split->advise, split->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (f_ret == 0) {
|
||||
f_ret = -1;
|
||||
f_errno = errno;
|
||||
}
|
||||
log_fatal(errno, "Error advising parity file '%s'. %s.\n", split->path, strerror(errno));
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
ret = close(split->f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
/* This is a serious error, as it may be the result of a failed write */
|
||||
/* identified at later time. */
|
||||
/* In a normal file-system (not NFS) it should never happen */
|
||||
if (f_ret == 0) {
|
||||
f_ret = -1;
|
||||
f_errno = errno;
|
||||
}
|
||||
/*
|
||||
* This is a serious error, as it may be the result of a failed write
|
||||
* identified at later time.
|
||||
* In a normal file-system (not NFS) it should never happen
|
||||
*/
|
||||
log_fatal(errno, "Error closing parity file '%s'. %s.\n", split->path, strerror(errno));
|
||||
f_ret = -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
/* continue to close the others */
|
||||
|
|
@ -780,6 +1077,9 @@ int parity_close(struct snapraid_parity_handle* handle)
|
|||
split->f = -1;
|
||||
}
|
||||
|
||||
if (f_ret != 0)
|
||||
errno = f_errno;
|
||||
|
||||
return f_ret;
|
||||
}
|
||||
|
||||
|
|
@ -802,15 +1102,17 @@ struct snapraid_split_handle* parity_split_find(struct snapraid_parity_handle* h
|
|||
return 0;
|
||||
}
|
||||
|
||||
int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigned char* block_buffer, unsigned block_size)
|
||||
int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigned char* block_buffer, unsigned block_size, int skip_fallocate)
|
||||
{
|
||||
ssize_t write_ret;
|
||||
data_off_t offset;
|
||||
struct snapraid_split_handle* split;
|
||||
unsigned long split_idx;
|
||||
unsigned s;
|
||||
unsigned count;
|
||||
int ret;
|
||||
|
||||
offset = pos * (data_off_t)block_size;
|
||||
offset = pos * block_size;
|
||||
|
||||
split = parity_split_find(handle, &offset);
|
||||
if (!split) {
|
||||
|
|
@ -820,17 +1122,48 @@ int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigne
|
|||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
split_idx = split - handle->split_map;
|
||||
|
||||
/* update the valid range */
|
||||
if (split->valid_size < offset + block_size)
|
||||
split->valid_size = offset + block_size;
|
||||
/*
|
||||
* Parity blocks cannot cross split boundaries: offsets and split sizes
|
||||
* are block-aligned, so the entire block belongs to this split.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Grow parity only as writes reach it. A write in a later split requires
|
||||
* every preceding split to reach its persisted logical boundary, otherwise
|
||||
* the physical files would not represent a contiguous logical high-water mark.
|
||||
* Allocation still says nothing about parity validity, which is tracked and
|
||||
* verified independently.
|
||||
*/
|
||||
for (s = 0; s <= split_idx; ++s) {
|
||||
struct snapraid_split_handle* grow_split = &handle->split_map[s];
|
||||
data_off_t grow_size;
|
||||
|
||||
if (s < split_idx)
|
||||
grow_size = grow_split->size;
|
||||
else
|
||||
grow_size = offset;
|
||||
|
||||
if (grow_split->st.st_size < grow_size) {
|
||||
ret = parity_setsize(grow_split, grow_size, skip_fallocate);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bw_limit(handle->bw, block_size);
|
||||
|
||||
count = 0;
|
||||
do {
|
||||
bw_limit(handle->bw, block_size - count);
|
||||
|
||||
write_ret = pwrite(split->f, block_buffer + count, block_size - count, offset + count);
|
||||
if (write_ret == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno == ENOSPC) {
|
||||
log_fatal(errno, "Failed to grow parity file '%s' using write due lack of space.\n", split->path);
|
||||
|
|
@ -851,6 +1184,9 @@ int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigne
|
|||
count += write_ret;
|
||||
} while (count < block_size);
|
||||
|
||||
if (split->st.st_size < offset + block_size)
|
||||
split->st.st_size = offset + block_size;
|
||||
|
||||
ret = advise_write(&split->advise, split->f, offset, block_size);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -870,7 +1206,7 @@ int parity_read(struct snapraid_parity_handle* handle, block_off_t pos, unsigned
|
|||
struct snapraid_split_handle* split;
|
||||
int ret;
|
||||
|
||||
offset = pos * (data_off_t)block_size;
|
||||
offset = pos * block_size;
|
||||
|
||||
split = parity_split_find(handle, &offset);
|
||||
if (!split) {
|
||||
|
|
@ -881,8 +1217,17 @@ int parity_read(struct snapraid_parity_handle* handle, block_off_t pos, unsigned
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* if read is completely out of the valid range */
|
||||
if (offset >= split->valid_size) {
|
||||
/*
|
||||
* Parity blocks cannot cross split boundaries: offsets and split sizes
|
||||
* are block-aligned, so the entire block belongs to this split.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Physical EOF only limits whether bytes can be read. It does not imply that
|
||||
* the parity is valid, synchronized, or initialized; validity is determined
|
||||
* independently by the higher-level check/recovery logic.
|
||||
*/
|
||||
if (offset >= split->st.st_size) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = ENXIO;
|
||||
log_error(errno, "Reading over the end from parity file '%s' at offset %" PRIu64 " for size %u.\n", split->path, offset, block_size);
|
||||
|
|
@ -890,13 +1235,15 @@ int parity_read(struct snapraid_parity_handle* handle, block_off_t pos, unsigned
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
count = 0;
|
||||
errno = 0;
|
||||
do {
|
||||
bw_limit(handle->bw, block_size - count);
|
||||
bw_limit(handle->bw, block_size);
|
||||
|
||||
count = 0;
|
||||
do {
|
||||
read_ret = pread(split->f, block_buffer + count, block_size - count, offset + count);
|
||||
if (read_ret == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error reading parity file '%s' at offset %" PRIu64 " for size %u. %s.\n", split->path, offset + count, block_size - count, strerror(errno));
|
||||
return -1;
|
||||
|
|
@ -904,8 +1251,7 @@ int parity_read(struct snapraid_parity_handle* handle, block_off_t pos, unsigned
|
|||
}
|
||||
if (read_ret == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno == 0)
|
||||
errno = ENXIO;
|
||||
errno = ENXIO;
|
||||
log_error(errno, "Unexpected end of parity file '%s' at offset %" PRIu64 ". %s.\n", split->path, offset, strerror(errno));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __PARITY_H
|
||||
#define __PARITY_H
|
||||
#ifndef PARITY_H
|
||||
#define PARITY_H
|
||||
|
||||
#include "support.h"
|
||||
#include "bw.h"
|
||||
|
|
@ -25,16 +25,6 @@ struct snapraid_split_handle {
|
|||
*/
|
||||
data_off_t size;
|
||||
|
||||
/**
|
||||
* Valid size of the parity split.
|
||||
* This is the size effectively written, and not the result of a chsize operation.
|
||||
* It's used to make read operations failing if read over that size.
|
||||
*
|
||||
* Parity is also truncated to that size when fixing it, in case of a Break (Ctrl+C)
|
||||
* of the program.
|
||||
*/
|
||||
data_off_t valid_size;
|
||||
|
||||
/**
|
||||
* Artificial size limit for testing.
|
||||
* 0 means unlimited.
|
||||
|
|
@ -83,10 +73,24 @@ int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_p
|
|||
|
||||
/**
|
||||
* Change the parity size.
|
||||
* \param out_size Return the size of the parity file. The out_size is set also on error to reflect a partial resize.
|
||||
*
|
||||
* An elastic split that cannot reach the requested size may keep the size
|
||||
* actually allocated and leave the remaining space to following splits.
|
||||
* The resulting split layout is returned in parity.
|
||||
*/
|
||||
int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity* parity, int* is_modified, data_off_t size, uint32_t block_size, int skip_fallocate, int skip_space_holder);
|
||||
|
||||
/**
|
||||
* Restore the parity split layout already stored in the handle, limited to size.
|
||||
*
|
||||
* Persisted split boundaries are preserved. If size ends inside the persisted
|
||||
* layout, only its logical tail is removed: the containing split is shortened
|
||||
* and all following splits are truncated to zero. If a split is physically
|
||||
* non-empty, all preceding splits are restored to their exact logical size.
|
||||
* The remaining physical tail is grown lazily by parity_write().
|
||||
*/
|
||||
int parity_restore(struct snapraid_parity_handle* handle, data_off_t size, uint32_t block_size, int skip_fallocate);
|
||||
|
||||
/**
|
||||
* Get the size of the parity.
|
||||
*
|
||||
|
|
@ -94,6 +98,18 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
|
|||
*/
|
||||
void parity_size(struct snapraid_parity_handle* handle, data_off_t* out_size);
|
||||
|
||||
/**
|
||||
* Get the physical size of the logical parity file across splits.
|
||||
*
|
||||
* This composes the physical EOF of consecutive splits within their logical
|
||||
* boundaries. If an earlier split is physically shorter than its logical size,
|
||||
* later splits cannot extend the logical offset past that missing region.
|
||||
*
|
||||
* Physical presence does not imply parity validity. Parity may be invalid,
|
||||
* stale, unwritten, sparse, or contain holes independently of its physical EOF.
|
||||
*/
|
||||
void parity_physical_size(struct snapraid_parity_handle* handle, data_off_t* out_size);
|
||||
|
||||
/**
|
||||
* Open an already existing parity file.
|
||||
*/
|
||||
|
|
@ -104,11 +120,6 @@ int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_par
|
|||
*/
|
||||
int parity_sync(struct snapraid_parity_handle* handle);
|
||||
|
||||
/**
|
||||
* Truncate the parity file to the valid size.
|
||||
*/
|
||||
int parity_truncate(struct snapraid_parity_handle* handle);
|
||||
|
||||
/**
|
||||
* Close the parity file.
|
||||
*/
|
||||
|
|
@ -122,13 +133,27 @@ int parity_read(struct snapraid_parity_handle* handle, block_off_t pos, unsigned
|
|||
/**
|
||||
* Write a block in the parity file.
|
||||
*/
|
||||
int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigned char* block_buffer, unsigned block_size);
|
||||
int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigned char* block_buffer, unsigned block_size, int skip_fallocate);
|
||||
|
||||
/**
|
||||
* Flush and sync the parity files.
|
||||
* Wait for all scheduled read-ahead before writing content state.
|
||||
* state_write() bypasses extent locks and may remove obsolete extents, while
|
||||
* reader workers look up extents and update fs_last. They must finish first to
|
||||
* avoid races. Completed results remain queued for later use.
|
||||
*/
|
||||
int state_flush(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur);
|
||||
void state_read_barrier(struct snapraid_io* io);
|
||||
|
||||
/**
|
||||
* Establish the durability and read-ahead barrier before publishing sync state.
|
||||
* Wait for parity writes and reject writer errors, then sync the parity files.
|
||||
* Content must not record completed BLK/EMPTY states until their parity is
|
||||
* durable. Finally wait for read-ahead so state_write() can access extent trees
|
||||
* without racing reader workers; completed results remain queued for later use.
|
||||
*
|
||||
* If io is 0, only the parity files are synced. Return -1 on a write or sync
|
||||
* failure; the caller must not publish completed state in that case.
|
||||
*/
|
||||
int state_write_barrier(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -30,13 +30,19 @@ struct snapraid_pool* pool_alloc(const char* dir, const char* name, const char*
|
|||
return pool;
|
||||
}
|
||||
|
||||
static inline tommy_uint32_t pool_hash(const char* file)
|
||||
static inline tommy_hash_t pool_hash(const char* file)
|
||||
{
|
||||
#if TOMMY_SIZE_BIT == 64
|
||||
return tommy_hash_u64(0, file, strlen(file));
|
||||
#else
|
||||
return tommy_hash_u32(0, file, strlen(file));
|
||||
#endif
|
||||
}
|
||||
|
||||
void pool_free(struct snapraid_pool* pool)
|
||||
static void pool_free(void* void_pool)
|
||||
{
|
||||
struct snapraid_pool* pool = void_pool;
|
||||
|
||||
free(pool);
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +86,7 @@ static int clean_dir(const char* dir)
|
|||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (dd == 0 && errno == 0) {
|
||||
if (dd == 0) {
|
||||
break; /* finished */
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +101,10 @@ static int clean_dir(const char* dir)
|
|||
/* convert dirent to lstat result */
|
||||
dirent_lstat(dd, &st);
|
||||
|
||||
/* if the st_mode field is missing, takes care to fill it using normal lstat() */
|
||||
/* at now this can happen only in Windows */
|
||||
/*
|
||||
* If the st_mode field is missing, takes care to fill it using normal lstat()
|
||||
* at now this can happen only in Windows
|
||||
*/
|
||||
if (st.st_mode == 0) {
|
||||
if (lstat(path_next, &st) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -126,9 +134,11 @@ static int clean_dir(const char* dir)
|
|||
if (ret < 0) {
|
||||
#ifdef _WIN32
|
||||
if (errno == EACCES) {
|
||||
/* in Windows just ignore EACCES errors removing directories */
|
||||
/* because it could happen that the directory is in use */
|
||||
/* and it cannot be removed */
|
||||
/*
|
||||
* In Windows just ignore EACCES errors removing directories
|
||||
* because it could happen that the directory is in use
|
||||
* and it cannot be removed
|
||||
*/
|
||||
log_fatal(errno, "Directory '%s' not removed because it's in use.\n", path_next);
|
||||
full = 1;
|
||||
} else
|
||||
|
|
@ -192,7 +202,7 @@ static void read_dir(tommy_hashdyn* poolset, const char* base_dir, const char* s
|
|||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (dd == 0 && errno == 0) {
|
||||
if (dd == 0) {
|
||||
break; /* finished */
|
||||
}
|
||||
|
||||
|
|
@ -207,8 +217,10 @@ static void read_dir(tommy_hashdyn* poolset, const char* base_dir, const char* s
|
|||
/* convert dirent to lstat result */
|
||||
dirent_lstat(dd, &st);
|
||||
|
||||
/* if the st_mode field is missing, takes care to fill it using normal lstat() */
|
||||
/* at now this can happen only in Windows */
|
||||
/*
|
||||
* If the st_mode field is missing, takes care to fill it using normal lstat()
|
||||
* at now this can happen only in Windows
|
||||
*/
|
||||
if (st.st_mode == 0) {
|
||||
if (lstat(path_next, &st) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -230,7 +242,7 @@ static void read_dir(tommy_hashdyn* poolset, const char* base_dir, const char* s
|
|||
if (S_ISLNK(st.st_mode)) {
|
||||
struct snapraid_pool* pool;
|
||||
char linkto[PATH_MAX];
|
||||
int ret;
|
||||
ssize_t ret;
|
||||
|
||||
ret = readlink(path_next, linkto, sizeof(linkto));
|
||||
if (ret < 0 || ret >= PATH_MAX) {
|
||||
|
|
@ -351,7 +363,8 @@ static void make_link(tommy_hashdyn* poolset, const char* pool_dir, const char*
|
|||
ret = symlink(linkto_exported, path);
|
||||
if (ret != 0) {
|
||||
if (errno == EEXIST) {
|
||||
log_fatal(errno, "WARNING! Duplicate pooling for '%s'\n", path);
|
||||
log_error(errno, "WARNING! Pool path '%s' already exists\n", path);
|
||||
return;
|
||||
#ifdef _WIN32
|
||||
} else if (errno == EPERM) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -436,12 +449,12 @@ void state_pool(struct snapraid_state* state)
|
|||
msg_progress("Cleaning...\n");
|
||||
|
||||
/* delete all the remaining links */
|
||||
tommy_hashdyn_foreach_arg(&poolset, (tommy_foreach_arg_func*)remove_link, pool_dir);
|
||||
tommy_hashdyn_foreach_arg(&poolset, remove_link, pool_dir);
|
||||
|
||||
/* delete empty dirs */
|
||||
clean_dir(pool_dir);
|
||||
|
||||
tommy_hashdyn_foreach(&poolset, (tommy_foreach_func*)pool_free);
|
||||
tommy_hashdyn_foreach(&poolset, pool_free);
|
||||
tommy_hashdyn_done(&poolset);
|
||||
|
||||
if (count)
|
||||
|
|
@ -449,7 +462,7 @@ void state_pool(struct snapraid_state* state)
|
|||
else
|
||||
msg_status("No link\n");
|
||||
|
||||
log_tag("summary:link_count::%u\n", count);
|
||||
log_tag("summary:link_count:%u\n", count);
|
||||
log_tag("summary:exit:ok\n");
|
||||
log_flush();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -18,6 +18,7 @@ void state_rehash(struct snapraid_state* state)
|
|||
{
|
||||
block_off_t blockmax;
|
||||
block_off_t i;
|
||||
int has_pending_dealloc = 0;
|
||||
|
||||
blockmax = parity_allocated_size(state);
|
||||
|
||||
|
|
@ -38,13 +39,32 @@ void state_rehash(struct snapraid_state* state)
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* deleted-only positions are not counted in unsynced_blocks, but their hashes still need the current generation */
|
||||
for (tommy_node* node = state->disklist; node != 0; node = node->next) {
|
||||
struct snapraid_disk* disk = node->data;
|
||||
if (!tommy_list_empty(&disk->dealloclist)) {
|
||||
has_pending_dealloc = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* a rehash can start only from a fully synchronized state */
|
||||
if (state->unsynced_blocks != 0 || has_pending_dealloc) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("summary:exit:sync_required\n");
|
||||
log_fatal(EUSER, "You cannot start a rehash with an incomplete sync.\n");
|
||||
log_fatal(EUSER, "Run 'snapraid sync' first.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* copy the present hash as previous one */
|
||||
state->prevhash = state->hash;
|
||||
memcpy(state->prevhashseed, state->hashseed, HASH_MAX);
|
||||
|
||||
/* set the new hash and seed */
|
||||
state->hash = state->besthash;
|
||||
if (randomize(state->hashseed, HASH_MAX) != 0) {
|
||||
if (os_randomize(state->hashseed, HASH_MAX) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Failed to get random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <windows.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "config.h"
|
||||
|
||||
1 RT_MANIFEST "resource.manifest"
|
||||
|
||||
|
|
|
|||
1320
cmdline/scan.c
1320
cmdline/scan.c
File diff suppressed because it is too large
Load diff
510
cmdline/scrub.c
510
cmdline/scrub.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -11,6 +11,216 @@
|
|||
#include "io.h"
|
||||
#include "raid/raid.h"
|
||||
|
||||
/**
|
||||
* SnapRAID scrub model
|
||||
*
|
||||
* Scrub periodically verifies data and parity without modifying either of
|
||||
* them. It reads selected parity positions, checks the data blocks against
|
||||
* their stored hashes when a current hash is available, recomputes all parity
|
||||
* levels from the data read, and compares the result with physical parity.
|
||||
*
|
||||
* The unit of scrub processing is a parity position, not an individual file
|
||||
* block. Selecting one position means considering all mapped data blocks and
|
||||
* all parity levels belonging to the same stripe.
|
||||
*
|
||||
* Scrub does modify the content state. For each processed position it records
|
||||
* when the position was last verified, maintains the persistent bad flag, and
|
||||
* can progressively migrate block hashes while a rehash is in progress.
|
||||
*
|
||||
* Verification model
|
||||
* ------------------
|
||||
*
|
||||
* The block states have different meanings for scrub:
|
||||
*
|
||||
* State File Stored hash Data verification Parity
|
||||
* ------------------------------------------------------------------------
|
||||
* EMPTY no none zero input expected
|
||||
* BLK yes CURRENT hash checked expected
|
||||
* CHG yes OLD not hash checked unsynced
|
||||
* REP yes NEW hash checked unsynced
|
||||
* DELETED no OLD/INVALID zero input unsynced
|
||||
* REBUILD yes CURRENT hash checked unsynced
|
||||
*
|
||||
* BLK, REP and REBUILD have a hash describing their current file data and can
|
||||
* therefore be checked directly.
|
||||
*
|
||||
* CHG is deliberately different. Its stored hash describes the OLD data, so
|
||||
* comparing the current file contents against block->hash would not validate
|
||||
* the current block. Scrub still reads the current data because it is needed
|
||||
* to recompute parity, but does not use the CHG hash as a current-data check.
|
||||
*
|
||||
* EMPTY and DELETED have no current file contribution and are supplied to the
|
||||
* RAID computation as zero. DELETED still makes the position unsynced because
|
||||
* physical parity may contain its previous contribution.
|
||||
*
|
||||
* A position is also considered unsynced when a file's current size or
|
||||
* modification time differs from the metadata recorded in the content state.
|
||||
* This does not by itself abort scrub. It changes how a later data or parity
|
||||
* mismatch is classified.
|
||||
*
|
||||
* Parity is recomputed only when every required data input was read without an
|
||||
* error and every applicable current hash matched. Without a complete and
|
||||
* trustworthy set of data inputs, a parity comparison would not identify
|
||||
* whether an error belongs to data or parity.
|
||||
*
|
||||
* Error classification model
|
||||
* --------------------------
|
||||
*
|
||||
* A current-data hash mismatch is a silent data error for BLK and REBUILD when
|
||||
* the file metadata still matches the content state. REBUILD retains the
|
||||
* trusted CURRENT hash inherited from BLK even though its physical parity is
|
||||
* untrusted.
|
||||
*
|
||||
* REP mismatches remain soft errors because REP represents a pending
|
||||
* unsynchronized state. If the file metadata differs from the content state,
|
||||
* a current-data hash mismatch may likewise be the normal consequence of a
|
||||
* legitimate file change and is therefore reported as a soft error.
|
||||
*
|
||||
* A parity mismatch is a silent parity error only when the complete position is
|
||||
* expected to be synchronized. CHG, REP, DELETED and REBUILD make physical
|
||||
* parity untrusted, so a parity mismatch at such a position is reported as a
|
||||
* soft synchronization error.
|
||||
*
|
||||
* These classifications affect only the meaning of a mismatch. They do not
|
||||
* make the position fail automatically. If the data that can be checked is
|
||||
* correct and physical parity already agrees with the current logical inputs,
|
||||
* the scrub of that position can still complete.
|
||||
*
|
||||
* I/O errors are tracked separately from logical or hash mismatches. A
|
||||
* recoverable per-position I/O failure marks the position bad; errors severe
|
||||
* enough to abort processing may terminate the command before normal
|
||||
* per-position bookkeeping is completed.
|
||||
*
|
||||
* Scrub plan model
|
||||
* ----------------
|
||||
*
|
||||
* Scrub selection is based on the per-position snapraid_info stored in the
|
||||
* content file. An info entry records:
|
||||
*
|
||||
* - the last time the position was known to be correct,
|
||||
* - whether the position is marked bad,
|
||||
* - whether its hashes still use the previous hash algorithm,
|
||||
* - whether it was just synchronized and has never been scrubbed.
|
||||
*
|
||||
* Positions without an info entry are not scrub candidates.
|
||||
*
|
||||
* Bad positions override every scrub plan and are always selected. This makes
|
||||
* the persistent bad flag self-checking: a later scrub rechecks the complete
|
||||
* position regardless of its age or the requested normal plan.
|
||||
*
|
||||
* The explicit plans otherwise select positions as follows:
|
||||
*
|
||||
* full all tracked positions
|
||||
* even even parity positions
|
||||
* new positions never scrubbed since synchronization
|
||||
* bad only positions marked bad
|
||||
*
|
||||
* The automatic plan selects the oldest positions first. The bucket list
|
||||
* groups positions by their last-known-good timestamp and is sorted from the
|
||||
* oldest timestamp to the newest.
|
||||
*
|
||||
* Selection is limited by both the requested amount and the optional age
|
||||
* limit. When the requested count ends inside a timestamp bucket, timelimit
|
||||
* identifies that bucket and lastlimit specifies how many positions from that
|
||||
* exact timestamp may be selected. block_is_enabled() is called in increasing
|
||||
* parity-position order, providing a deterministic tie break inside the
|
||||
* bucket.
|
||||
*
|
||||
* Bad positions do not consume this boundary quota: they are selected before
|
||||
* normal plan filtering and may therefore make the actual scrub count larger
|
||||
* than the requested automatic amount.
|
||||
*
|
||||
* The complete block selection is materialized before I/O starts. Autosaves
|
||||
* performed during the run may rebuild the scrub-time bucket list in the
|
||||
* content state, but they do not change the set of positions selected for the
|
||||
* current scrub.
|
||||
*
|
||||
* Bad state and persistence model
|
||||
* -------------------------------
|
||||
*
|
||||
* The bad flag belongs to the whole parity position. It does not identify a
|
||||
* specific data disk or parity level. A silent data/parity error or a
|
||||
* continuable I/O error at any contribution makes the complete position bad,
|
||||
* because scrub cannot safely reduce that observation to a single trusted
|
||||
* component.
|
||||
*
|
||||
* When a position fails with a silent or I/O error, info_set_bad() preserves
|
||||
* its previous timestamp and all other flags. In particular, a failed scrub
|
||||
* does not make the position appear recently verified and does not discard
|
||||
* pending rehash or just-synchronized state.
|
||||
*
|
||||
* A generic soft error also leaves the previous info unchanged. Such a
|
||||
* position has not completed a successful scrub and therefore retains its
|
||||
* previous scrub age.
|
||||
*
|
||||
* A successful position records the new last-known-good time and clears bad
|
||||
* and just-synchronized state:
|
||||
*
|
||||
* info_make(now, 0, rehash, 0)
|
||||
*
|
||||
* For a synchronized position (or one not undergoing rehash), rehash is
|
||||
* cleared as well (info_make(now, 0, 0, 0)). If the position is in rehash but
|
||||
* contains unsynchronized blocks, rehash remains pending (info_make(now, 0, 1, 0)).
|
||||
* Consequently, "scrub -p bad" clears a bad position only after the whole
|
||||
* position can again be verified successfully.
|
||||
*
|
||||
* Scrub writes only content metadata and hashes; it never writes user data or
|
||||
* parity. Autosave can therefore persist completed scrub positions
|
||||
* independently. A crash before the next content save may lose some scrub
|
||||
* progress, causing those positions to be checked again, but cannot leave a
|
||||
* partially repaired data/parity state because scrub performs no such repair.
|
||||
*
|
||||
* Rehash model
|
||||
* ------------
|
||||
*
|
||||
* Rehash state is also tracked per parity position. While rehash is pending,
|
||||
* hashes that can be validated are checked with the previous hash algorithm,
|
||||
* while hashes using the new algorithm are computed into temporary storage.
|
||||
*
|
||||
* The new hashes are not committed independently for each disk. They are
|
||||
* staged until the complete parity position has passed data reads, applicable
|
||||
* hash checks, and parity verification, and can only be published if the
|
||||
* complete position is synchronized.
|
||||
*
|
||||
* Unsynchronized blocks (such as CHG or DELETED) retain OLD hashes that
|
||||
* recovery in check.c relies on to distinguish OLD and CURRENT generations
|
||||
* after an interrupted sync. Overwriting a CHG hash with the digest of CURRENT
|
||||
* bytes would destroy that provenance, causing valid recovery to be rejected.
|
||||
*
|
||||
* Because the rehash state is position-wide, if any block at the position is
|
||||
* unsynchronized, publication of all staged new hashes for that position is
|
||||
* deferred and the rehash flag remains set. All blocks at that position retain
|
||||
* their previous-generation hashes until a later successful sync resolves the
|
||||
* unsynchronized state and publishes the new hashes.
|
||||
*
|
||||
* Only when a position is fully synchronized and passes scrub are the staged
|
||||
* hashes copied into the block state and the per-position rehash flag cleared.
|
||||
* This keeps the hash generation and its info flag consistent across content
|
||||
* saves: a persisted rehash flag means the previous algorithm must still be
|
||||
* used for that position, while clearing the flag publishes the newly computed
|
||||
* hashes at the same successful scrub checkpoint.
|
||||
*
|
||||
* Live filesystem model
|
||||
* ---------------------
|
||||
*
|
||||
* Scrub does not freeze the data filesystem. Files can be modified while the
|
||||
* command is running.
|
||||
*
|
||||
* A size or modification-time difference observed when opening a file marks
|
||||
* that file and parity position as unsynced for error classification. Scrub
|
||||
* continues reading so that it can still report the state actually observed.
|
||||
*
|
||||
* If the changed file later produces a hash or parity mismatch, the mismatch
|
||||
* is treated as a soft synchronization error rather than silent corruption.
|
||||
* If its bytes still agree with the stored hash and parity, scrub may complete
|
||||
* successfully even though the metadata difference remains for a later sync
|
||||
* to process.
|
||||
*
|
||||
* As with other metadata-based operations, a concurrent modification that
|
||||
* preserves all metadata used for change detection cannot be distinguished
|
||||
* reliably from silent corruption by metadata checks alone.
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
/* scrub */
|
||||
|
||||
|
|
@ -23,7 +233,11 @@ static const char* es(int err)
|
|||
}
|
||||
|
||||
/**
|
||||
* Buffer for storing the new hashes.
|
||||
* Staged hashes for a rehash operation.
|
||||
*
|
||||
* New hashes are kept here until the complete parity position has passed
|
||||
* verification. They are copied into the block state only together with
|
||||
* clearing the per-position rehash flag.
|
||||
*/
|
||||
struct snapraid_rehash {
|
||||
unsigned char hash[HASH_MAX];
|
||||
|
|
@ -32,12 +246,16 @@ struct snapraid_rehash {
|
|||
|
||||
/**
|
||||
* Scrub plan to use.
|
||||
*
|
||||
* AUTO selects complete buckets older than timelimit and, when the requested
|
||||
* count cuts through the boundary bucket, at most lastlimit positions whose
|
||||
* timestamp is exactly timelimit.
|
||||
*/
|
||||
struct snapraid_plan {
|
||||
struct snapraid_state* state;
|
||||
int plan; /**< One of the SCRUB_*. */
|
||||
time_t timelimit; /**< Time limit. Valid only with SCRUB_AUTO. */
|
||||
block_off_t lastlimit; /**< Number of blocks allowed with time exactly at ::timelimit. Valid only with SCRUB_AUTO. */
|
||||
block_off_t lastlimit; /**< Maximum number of normal AUTO selections whose timestamp is exactly timelimit. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -53,7 +271,13 @@ static int block_is_enabled(struct snapraid_plan* plan, block_off_t* countlast,
|
|||
if (info == 0)
|
||||
return 0;
|
||||
|
||||
/* bad blocks are always scrubbed in all plans */
|
||||
/*
|
||||
* Bad is an override, not a normal plan criterion.
|
||||
*
|
||||
* Always recheck bad positions so a successful scrub can clear the persistent
|
||||
* bad flag even if the position would normally be excluded by age, parity,
|
||||
* NEW, or any other plan.
|
||||
*/
|
||||
if (info_get_bad(info))
|
||||
return 1;
|
||||
|
||||
|
|
@ -65,7 +289,7 @@ static int block_is_enabled(struct snapraid_plan* plan, block_off_t* countlast,
|
|||
/* in 'even' plan, scrub only even blocks */
|
||||
return i % 2 == 0;
|
||||
case SCRUB_NEW :
|
||||
/* in 'sync' plan, only blocks never scrubbed */
|
||||
/* in 'new' plan, only positions never scrubbed after sync */
|
||||
return info_get_justsynced(info);
|
||||
case SCRUB_BAD :
|
||||
/* in 'bad' plan, only bad blocks (already reported) */
|
||||
|
|
@ -79,8 +303,14 @@ static int block_is_enabled(struct snapraid_plan* plan, block_off_t* countlast,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* if the time is less than the limit, always include */
|
||||
/* otherwise, check if we reached the last limit count */
|
||||
/*
|
||||
* AUTO buckets have timestamp granularity, so the count limit may end inside
|
||||
* a bucket shared by many positions.
|
||||
*
|
||||
* All positions older than timelimit are selected. At timelimit select only
|
||||
* lastlimit normal positions; block_is_enabled() is called in ascending parity
|
||||
* order, which provides the deterministic tie break.
|
||||
*/
|
||||
if (blocktime == plan->timelimit) {
|
||||
/* if we reached the count limit */
|
||||
if (*countlast >= plan->lastlimit) {
|
||||
|
|
@ -103,6 +333,10 @@ static void scrub_data_reader(struct snapraid_worker* worker, struct snapraid_ta
|
|||
block_off_t blockcur = task->position;
|
||||
unsigned char* buffer = task->buffer;
|
||||
int ret;
|
||||
|
||||
/* tasks are reused, so a previous close failure must not affect this position */
|
||||
task->unrelated_error = 0;
|
||||
|
||||
/* if the disk position is not used */
|
||||
if (!disk) {
|
||||
/* use an empty block */
|
||||
|
|
@ -132,12 +366,15 @@ static void scrub_data_reader(struct snapraid_worker* worker, struct snapraid_ta
|
|||
ret = handle_close(handle);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
/* This one is really an unexpected error, because we are only reading */
|
||||
/* and closing a descriptor should never fail */
|
||||
log_tag("%s:%u:%s:%s: Close error. %s.\n", es(errno), blockcur, disk->name, esc_tag(report->sub), strerror(errno));
|
||||
/*
|
||||
* This one is really an unexpected error, because we are only reading
|
||||
* and closing a descriptor should never fail
|
||||
*/
|
||||
log_tag("%s::%s:%s: Close error. %s.\n", es(errno), disk->name, esc_tag(report->sub), strerror(errno));
|
||||
log_fatal_errno(errno, disk->name);
|
||||
log_fatal(errno, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(errno, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
|
||||
task->unrelated_error = 1;
|
||||
if (is_hw(errno)) {
|
||||
task->state = TASK_STATE_IOERROR;
|
||||
} else {
|
||||
|
|
@ -150,11 +387,11 @@ static void scrub_data_reader(struct snapraid_worker* worker, struct snapraid_ta
|
|||
|
||||
ret = handle_open(handle, task->file, state->file_mode, 0);
|
||||
if (ret == -1) {
|
||||
log_tag("%s:%u:%s:%s: Open error. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), strerror(errno));
|
||||
log_tag("%s:%" PRIu64 ":%s:%s: Open error. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, disk->name);
|
||||
log_fatal(errno, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(errno, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
task->state = TASK_STATE_IOERROR;
|
||||
return;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -175,13 +412,15 @@ static void scrub_data_reader(struct snapraid_worker* worker, struct snapraid_ta
|
|||
/* follow */
|
||||
}
|
||||
|
||||
/* note that we intentionally don't abort if the file has different attributes */
|
||||
/* from the last sync, as we are expected to return errors if running */
|
||||
/* in an unsynced array. This is just like the check command. */
|
||||
/*
|
||||
* Note that we intentionally don't abort if the file has different attributes
|
||||
* from the last sync, as we are expected to return errors if running
|
||||
* in an unsynced array. This is just like the check command.
|
||||
*/
|
||||
|
||||
task->read_size = handle_read(handle, task->file_pos, buffer, state->block_size, 0);
|
||||
if (task->read_size == -1) {
|
||||
log_tag("%s:%u:%s:%s: Read error at position %u. %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), task->file_pos, strerror(errno));
|
||||
log_tag("%s:%" PRIu64 ":%s:%s: Read error at position %" PRIu64 ". %s.\n", es(errno), blockcur, disk->name, esc_tag(task->file->sub), task->file_pos, strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, disk->name);
|
||||
|
|
@ -213,7 +452,7 @@ static void scrub_parity_reader(struct snapraid_worker* worker, struct snapraid_
|
|||
/* read the parity */
|
||||
ret = parity_read(parity_handle, blockcur, buffer, state->block_size);
|
||||
if (ret == -1) {
|
||||
log_tag("parity_%s:%u:%s: Read error. %s.\n", es(errno), blockcur, lev_config_name(level), strerror(errno));
|
||||
log_tag("parity_%s:%" PRIu64 ":%s: Read error. %s.\n", es(errno), blockcur, lev_config_name(level), strerror(errno));
|
||||
if (is_hw(errno)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal_errno(errno, lev_config_name(level));
|
||||
|
|
@ -265,18 +504,23 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
buffermax = diskmax + 2 * state->level;
|
||||
|
||||
/* initialize the io threads */
|
||||
io_init(&io, state, state->opt.io_cache, buffermax, scrub_data_reader, handle, diskmax, scrub_parity_reader, 0, parity_handle, state->level);
|
||||
io_init(&io, state, state->opt.io_cache, buffermax, handle, diskmax, 0, scrub_data_reader, 0, parity_handle, state->level, 0, scrub_parity_reader, 0);
|
||||
|
||||
/* possibly waiting disks */
|
||||
waiting_mac = diskmax > RAID_PARITY_MAX ? diskmax : RAID_PARITY_MAX;
|
||||
waiting_map = malloc_nofail(waiting_mac * sizeof(unsigned));
|
||||
waiting_map = nalloc_nofail(waiting_mac, sizeof(unsigned));
|
||||
|
||||
soft_error = 0;
|
||||
silent_error = 0;
|
||||
io_error = 0;
|
||||
|
||||
msg_progress("Selecting...\n");
|
||||
|
||||
/*
|
||||
* Materialize the complete selection before starting I/O.
|
||||
*
|
||||
* Autosave may later rebuild state->bucketlist as scrub timestamps change, but
|
||||
* the current run must continue using the plan computed from the state that
|
||||
* existed at startup.
|
||||
*/
|
||||
/* first count the number of blocks to process */
|
||||
countmax = 0;
|
||||
countlast = 0;
|
||||
|
|
@ -288,9 +532,13 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
++countmax;
|
||||
}
|
||||
|
||||
/* compute the autosave size for all disk, even if not read */
|
||||
/* this makes sense because the speed should be almost the same */
|
||||
/* if the disks are read in parallel */
|
||||
/*
|
||||
* Convert the byte autosave interval to parity positions.
|
||||
*
|
||||
* A selected position normally reads all data columns in parallel, so use the
|
||||
* aggregate data width rather than the actual serialized number of bytes read.
|
||||
* Autosave only persists scrub metadata/hashes; data and parity are read-only.
|
||||
*/
|
||||
autosavelimit = state->autosave / (diskmax * state->block_size);
|
||||
autosavemissing = countmax; /* blocks to do */
|
||||
autosavedone = 0; /* blocks done */
|
||||
|
|
@ -304,15 +552,15 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
msg_progress("Scrubbing...\n");
|
||||
|
||||
/* start all the worker threads */
|
||||
io_start(&io, blockstart, blockmax, block_enabled);
|
||||
|
||||
int alert = state_progress_begin(state, blockstart, blockmax, countmax);
|
||||
if (alert > 0)
|
||||
goto end;
|
||||
if (alert < 0)
|
||||
goto bail;
|
||||
|
||||
/* start all the worker threads */
|
||||
io_start(&io, blockstart, blockmax, block_enabled);
|
||||
|
||||
while (1) {
|
||||
unsigned char* buffer_recov[LEV_MAX];
|
||||
snapraid_info info;
|
||||
|
|
@ -340,8 +588,10 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
silent_error_on_this_block = 0;
|
||||
io_error_on_this_block = 0;
|
||||
|
||||
/* if all the blocks at this address are synced */
|
||||
/* if not, parity is not even checked */
|
||||
/*
|
||||
* If all the blocks at this address are synced
|
||||
* if not, parity is not even checked
|
||||
*/
|
||||
block_is_unsynced = 0;
|
||||
|
||||
/* get block specific info */
|
||||
|
|
@ -353,7 +603,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
/* for each disk, process the block */
|
||||
for (j = 0; j < diskmax; ++j) {
|
||||
struct snapraid_task* task;
|
||||
int read_size;
|
||||
ssize_t read_size;
|
||||
unsigned char hash[HASH_MAX];
|
||||
struct snapraid_block* block;
|
||||
int file_is_unsynced;
|
||||
|
|
@ -362,8 +612,10 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
block_off_t file_pos;
|
||||
unsigned diskcur;
|
||||
|
||||
/* if the file on this disk is synced */
|
||||
/* if not, silent errors are assumed as expected error */
|
||||
/*
|
||||
* If the file on this disk is synced
|
||||
* if not, silent errors are assumed as expected error
|
||||
*/
|
||||
file_is_unsynced = 0;
|
||||
|
||||
/* until now is misc */
|
||||
|
|
@ -391,11 +643,19 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
state_usage_file(state, disk, file);
|
||||
|
||||
/* if the block is unsynced, errors are expected */
|
||||
/*
|
||||
* Do this before skipping blocks without a current file.
|
||||
*
|
||||
* Invalid parity makes the whole position unsynced for parity comparison.
|
||||
* It also makes data mismatches soft for pending states such as REP, except
|
||||
* for REBUILD whose stored hash is the trusted CURRENT hash inherited from
|
||||
* the synchronized BLK state.
|
||||
*/
|
||||
if (block_has_invalid_parity(block)) {
|
||||
/* report that the block and the file are not synced */
|
||||
/* report that the parity position is not synced */
|
||||
block_is_unsynced = 1;
|
||||
file_is_unsynced = 1;
|
||||
if (block_state_get(block) != BLOCK_STATE_REBUILD)
|
||||
file_is_unsynced = 1;
|
||||
/* follow */
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +663,13 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
if (!block_has_file(block))
|
||||
continue;
|
||||
|
||||
/* if the block is unsynced, errors are expected */
|
||||
/*
|
||||
* Metadata mismatch does not itself make this scrub position bad.
|
||||
*
|
||||
* It only tells us that the current file is not the version described by the
|
||||
* content metadata. Any later data/parity mismatch is therefore an expected
|
||||
* synchronization error, not evidence of silent corruption.
|
||||
*/
|
||||
if (task->is_timestamp_different) {
|
||||
/* report that the block and the file are not synced */
|
||||
block_is_unsynced = 1;
|
||||
|
|
@ -415,6 +681,11 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
if (task->state == TASK_STATE_IOERROR) {
|
||||
/* LCOV_EXCL_START */
|
||||
++io_error;
|
||||
/* closing the previous file says nothing about this parity position */
|
||||
if (!task->unrelated_error) {
|
||||
info_set(&state->infoarr, blockcur, info_set_bad(info));
|
||||
state->need_write = 1;
|
||||
}
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -434,7 +705,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
if (io_error >= state->opt.io_error_limit) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EIO, "DANGER! Too many input/output errors in the %s disk. It isn't possible to continue.\n", disk->dir);
|
||||
log_fatal(EIO, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(EIO, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -452,33 +723,53 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
countsize += read_size;
|
||||
|
||||
/* now compute the hash */
|
||||
/*
|
||||
* During rehash, validate the existing content state with the previous hash
|
||||
* algorithm and stage the digest for the new algorithm separately.
|
||||
*
|
||||
* Do not publish the new digest yet: another data block or parity level at the
|
||||
* same position may still fail verification.
|
||||
*/
|
||||
if (rehash) {
|
||||
memhash(state->prevhash, state->prevhashseed, hash, buffer[diskcur], read_size);
|
||||
memhash_block(state->prevhash, state->prevhashseed, hash, buffer[diskcur], read_size, state->block_size);
|
||||
|
||||
/* compute the new hash, and store it */
|
||||
rehandle[diskcur].block = block;
|
||||
memhash(state->hash, state->hashseed, rehandle[diskcur].hash, buffer[diskcur], read_size);
|
||||
memhash_block(state->hash, state->hashseed, rehandle[diskcur].hash, buffer[diskcur], read_size, state->block_size);
|
||||
} else {
|
||||
memhash(state->hash, state->hashseed, hash, buffer[diskcur], read_size);
|
||||
memhash_block(state->hash, state->hashseed, hash, buffer[diskcur], read_size, state->block_size);
|
||||
}
|
||||
|
||||
/* until now is hash */
|
||||
state_usage_hash(state);
|
||||
|
||||
/*
|
||||
* BLK, REP and REBUILD contain a hash for the current file data.
|
||||
*
|
||||
* CHG deliberately skips this comparison because block->hash describes its
|
||||
* OLD parity contribution. A CHG can still participate in the parity check
|
||||
* using the current bytes read from disk.
|
||||
*/
|
||||
if (block_has_updated_hash(block)) {
|
||||
/* compare the hash */
|
||||
if (memcmp(hash, block->hash, BLOCK_HASH_SIZE) != 0) {
|
||||
unsigned diff = memdiff(hash, block->hash, BLOCK_HASH_SIZE);
|
||||
|
||||
/* it's a silent error only if we are dealing with synced files */
|
||||
/*
|
||||
* A mismatch is evidence of silent corruption only when this file is expected
|
||||
* to match the synchronized content state.
|
||||
*
|
||||
* For an already unsynced file the difference may simply be the legitimate
|
||||
* file modification that requires the next sync, so report it as soft and do
|
||||
* not mark the parity position bad.
|
||||
*/
|
||||
if (file_is_unsynced) {
|
||||
log_tag("error:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error:%" PRIu64 ":%s:%s: Data error at position %" PRIu64 ", diff hash bits %u/%zu\n", blockcur, disk->name, esc_tag(file->sub), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
++soft_error;
|
||||
error_on_this_block = 1;
|
||||
} else {
|
||||
log_tag("error_data:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error(EDATA, "Data error in file '%s' at position '%u', diff hash bits %u/%u\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error_data:%" PRIu64 ":%s:%s: Data error at position %" PRIu64 ", diff hash bits %u/%zu\n", blockcur, disk->name, esc_tag(file->sub), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error(EDATA, "Data error in file '%s' at position '%" PRIu64 "', diff hash bits %u/%zu\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
@ -532,7 +823,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
if (io_error >= state->opt.io_error_limit) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EIO, "DANGER! Too many input/output errors in the %s disk. It isn't possible to continue.\n", lev_name(levcur));
|
||||
log_fatal(EIO, "Stopping at block %u\n", blockcur);
|
||||
log_fatal(EIO, "Stopping at block %" PRIu64 "\n", blockcur);
|
||||
goto bail;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -552,25 +843,38 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
}
|
||||
}
|
||||
|
||||
/* if we have read all the data required and it's correct, proceed with the parity check */
|
||||
/*
|
||||
* Recomputed parity is meaningful only with a complete trusted set of current
|
||||
* data inputs.
|
||||
*
|
||||
* If any data read or applicable hash check failed, skip parity comparison:
|
||||
* a mismatch could be caused entirely by the missing/bad data input and would
|
||||
* not identify a parity error.
|
||||
*/
|
||||
if (!error_on_this_block && !silent_error_on_this_block && !io_error_on_this_block) {
|
||||
|
||||
/* compute the parity */
|
||||
raid_gen(diskmax, state->level, state->block_size, buffer);
|
||||
raid_gen(diskmax, state->level, state->block_size, buffer, 0);
|
||||
|
||||
/* compare the parity */
|
||||
for (l = 0; l < state->level; ++l) {
|
||||
if (buffer_recov[l] && memcmp(buffer[diskmax + l], buffer_recov[l], state->block_size) != 0) {
|
||||
unsigned diff = memdiff(buffer[diskmax + l], buffer_recov[l], state->block_size);
|
||||
|
||||
/* it's a silent error only if we are dealing with synced blocks */
|
||||
/*
|
||||
* Invalid block states or changed file metadata mean that physical parity is
|
||||
* not required to match parity recomputed from the current filesystem.
|
||||
*
|
||||
* Report such a mismatch as a synchronization error. Only a mismatch on a
|
||||
* position expected to be fully synchronized is a silent parity error.
|
||||
*/
|
||||
if (block_is_unsynced) {
|
||||
log_tag("parity_error:%u:%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_tag("parity_error:%" PRIu64 ":%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
++soft_error;
|
||||
error_on_this_block = 1;
|
||||
} else {
|
||||
log_tag("parity_error_data:%u:%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_error(EDATA, "Data error in parity '%s' at position '%u', diff parity bits %u/%u\n", lev_config_name(l), blockcur, diff, state->block_size * 8);
|
||||
log_tag("parity_error_data:%" PRIu64 ":%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_error(EDATA, "Data error in parity '%s' at position '%" PRIu64 "', diff parity bits %u/%u\n", lev_config_name(l), blockcur, diff, state->block_size * 8);
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
@ -582,24 +886,47 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
}
|
||||
|
||||
if (silent_error_on_this_block || io_error_on_this_block) {
|
||||
/* set the error status keeping other info */
|
||||
/*
|
||||
* Mark the complete parity position bad, preserving its previous time,
|
||||
* rehash state and just-synced state.
|
||||
*
|
||||
* A failed scrub must not refresh the last-known-good time or make pending
|
||||
* metadata work appear completed.
|
||||
*/
|
||||
info_set(&state->infoarr, blockcur, info_set_bad(info));
|
||||
} else if (error_on_this_block) {
|
||||
/* do nothing, as this is a generic error */
|
||||
/* likely caused by a not synced array */
|
||||
/*
|
||||
* A soft error does not establish either success or corruption.
|
||||
*
|
||||
* Keep the previous info unchanged: do not mark the position bad, but also do
|
||||
* not refresh its scrub time, clear justsynced, or complete a pending rehash.
|
||||
*/
|
||||
} else {
|
||||
/* if rehash is needed */
|
||||
if (rehash) {
|
||||
/* store all the new hash already computed */
|
||||
/*
|
||||
* A completely clean scrub establishes a new last-known-good checkpoint for
|
||||
* the whole parity position.
|
||||
*
|
||||
* During rehash, staged hashes can be published only if the complete position
|
||||
* is synchronized. Unsynchronized blocks (such as CHG or DELETED) retain OLD
|
||||
* hashes that recovery relies on to distinguish generations after an interrupted
|
||||
* sync.
|
||||
*
|
||||
* Rehash state is position-wide, so if any block at this position is unsynced,
|
||||
* keep all hashes in the previous generation and leave rehash pending. A later
|
||||
* successful sync will resolve the unsynced state and publish the new hashes.
|
||||
*/
|
||||
if (rehash && !block_is_unsynced) {
|
||||
/* store all the new hashes already computed */
|
||||
for (j = 0; j < diskmax; ++j) {
|
||||
if (rehandle[j].block)
|
||||
memcpy(rehandle[j].block->hash, rehandle[j].hash, BLOCK_HASH_SIZE);
|
||||
hash_copy(rehandle[j].block->hash, rehandle[j].hash);
|
||||
}
|
||||
|
||||
/* complete the rehash */
|
||||
rehash = 0;
|
||||
}
|
||||
|
||||
/* update the time info of the block */
|
||||
/* and clear any other flag */
|
||||
info_set(&state->infoarr, blockcur, info_make(now, 0, 0, 0));
|
||||
info_set(&state->infoarr, blockcur, info_make(now, 0, rehash, 0));
|
||||
}
|
||||
|
||||
/* mark the state as needing write */
|
||||
|
|
@ -622,12 +949,18 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
state_progress_stop(state);
|
||||
|
||||
/* complete all read-ahead without consuming the results */
|
||||
io_quiesce(&io);
|
||||
|
||||
state_thermal_cooldown(state);
|
||||
|
||||
state_progress_restart(state);
|
||||
|
||||
/* drop until now */
|
||||
state_usage_waste(state);
|
||||
|
||||
if (os_signal_interrupt())
|
||||
break;
|
||||
}
|
||||
|
||||
/* autosave */
|
||||
|
|
@ -643,6 +976,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
state_progress_stop(state);
|
||||
|
||||
msg_progress("Autosaving...\n");
|
||||
state_read_barrier(&io);
|
||||
state_write(state);
|
||||
|
||||
state_progress_restart(state);
|
||||
|
|
@ -655,10 +989,6 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
end:
|
||||
state_progress_end(state, countpos, countmax, countsize, "Nothing to scrub. Use the -p PLAN option to select a different plan, like -p full.\n");
|
||||
|
||||
/* save the new state if required */
|
||||
if (state->need_write || state->opt.force_content_write)
|
||||
state_write(state);
|
||||
|
||||
state_usage_print(state);
|
||||
|
||||
if (soft_error || silent_error || io_error) {
|
||||
|
|
@ -666,8 +996,6 @@ end:
|
|||
msg_status("%8u soft errors\n", soft_error);
|
||||
msg_status("%8u io errors\n", io_error);
|
||||
msg_status("%8u data errors\n", silent_error);
|
||||
} else {
|
||||
msg_status("Everything OK\n");
|
||||
}
|
||||
|
||||
if (soft_error)
|
||||
|
|
@ -703,7 +1031,11 @@ bail:
|
|||
ret = handle_close(&handle[j]);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("%s:%u:%s:%s: Close error. %s.\n", es(errno), blockcur, disk->name, esc_tag(file->sub), strerror(errno));
|
||||
/*
|
||||
* If handle_close fails, the handle was open (f != -1), which
|
||||
* guarantees that both file and disk pointers are valid.
|
||||
*/
|
||||
log_tag("%s::%s:%s: Close error. %s.\n", es(errno), disk->name, esc_tag(file->sub), strerror(errno));
|
||||
log_fatal_errno(errno, disk->name);
|
||||
|
||||
if (is_hw(errno)) {
|
||||
|
|
@ -739,7 +1071,7 @@ bail:
|
|||
/**
|
||||
* Return a * b / c approximated to the upper value.
|
||||
*/
|
||||
static uint32_t md(uint32_t a, uint32_t b, uint32_t c)
|
||||
static uint64_t md(uint64_t a, uint32_t b, uint32_t c)
|
||||
{
|
||||
uint64_t v = a;
|
||||
|
||||
|
|
@ -853,6 +1185,14 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
|
||||
tommy_node* j = tommy_list_head(&state->bucketlist);
|
||||
block_off_t processed_count = 0;
|
||||
|
||||
/*
|
||||
* Buckets are sorted oldest first. Walk them until either the age cutoff or
|
||||
* requested count is reached.
|
||||
*
|
||||
* If the count ends inside a bucket, timelimit identifies that bucket and
|
||||
* lastlimit records how many positions from it may be selected.
|
||||
*/
|
||||
while (j) {
|
||||
struct snapraid_bucket* bucket = j->data;
|
||||
block_off_t bucket_count = bucket->count_justsynced + bucket->count_scrubbed;
|
||||
|
|
@ -874,15 +1214,21 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
j = j->next;
|
||||
}
|
||||
|
||||
/* if nothing to scrub, disable also other limits */
|
||||
/*
|
||||
* Disable selection completely when no normal AUTO position is eligible.
|
||||
* Leaving timelimit initialized to 'now' would otherwise make the subsequent
|
||||
* per-position filter appear permissive.
|
||||
*
|
||||
* Bad positions are unaffected because they bypass AUTO limits.
|
||||
*/
|
||||
if (processed_count == 0) {
|
||||
ps.timelimit = 0;
|
||||
ps.lastlimit = 0;
|
||||
}
|
||||
|
||||
log_tag("count_limit:%u\n", countlimit);
|
||||
log_tag("count_limit:%" PRIu64 "\n", countlimit);
|
||||
log_tag("time_limit:%" PRIu64 "\n", (uint64_t)ps.timelimit);
|
||||
log_tag("last_limit:%u\n", ps.lastlimit);
|
||||
log_tag("last_limit:%" PRIu64 "\n", ps.lastlimit);
|
||||
} else {
|
||||
/* avoid compiler warnings */
|
||||
ps.timelimit = 0;
|
||||
|
|
@ -894,7 +1240,7 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
ret = parity_open(&parity_handle[l], &state->parity[l], l, state->file_mode, state->block_size, state->opt.parity_limit_size);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("parity_%s:%u:%s: Open error. %s.\n", es(errno), blockmax, lev_config_name(l), strerror(errno));
|
||||
log_tag("parity_%s:%u:%s: Open error. %s.\n", es(errno), 0, lev_config_name(l), strerror(errno));
|
||||
log_fatal_errno(errno, lev_config_name(l));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -913,7 +1259,7 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
ret = parity_close(&parity_handle[l]);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("parity_%s:%u:%s: Close error. %s.\n", es(errno), blockmax, lev_config_name(l), strerror(errno));
|
||||
log_tag("parity_%s::%s: Close error. %s.\n", es(errno), lev_config_name(l), strerror(errno));
|
||||
log_fatal_errno(errno, lev_config_name(l));
|
||||
|
||||
++process_error;
|
||||
|
|
@ -922,8 +1268,20 @@ int state_scrub(struct snapraid_state* state, int plan100, int olderthan)
|
|||
}
|
||||
}
|
||||
|
||||
/* persist progress and error markings only after all parity handles are closed */
|
||||
if (state->need_write || state->opt.force_content_write)
|
||||
state_write(state);
|
||||
|
||||
if (process_error != 0)
|
||||
return -1;
|
||||
|
||||
if (log_hardware_errors() != 0) {
|
||||
msg_status("Everything done, but hardware errors were encountered in the process\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
msg_status("Everything OK\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
192
cmdline/search.c
192
cmdline/search.c
|
|
@ -1,18 +1,28 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2014 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "search.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
static const char* es(int err)
|
||||
{
|
||||
if (is_hw(err))
|
||||
return "error_io";
|
||||
else
|
||||
return "error";
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* search */
|
||||
|
||||
static void search_file(struct snapraid_state* state, const char* path, data_off_t size, int64_t mtime_sec, int mtime_nsec)
|
||||
{
|
||||
struct snapraid_search_file* file;
|
||||
tommy_uint32_t file_hash;
|
||||
tommy_hash_t file_hash;
|
||||
|
||||
file = malloc_nofail(sizeof(struct snapraid_search_file));
|
||||
file->path = strdup_nofail(path);
|
||||
|
|
@ -25,8 +35,10 @@ static void search_file(struct snapraid_state* state, const char* path, data_off
|
|||
tommy_hashdyn_insert(&state->searchset, &file->node, file, file_hash);
|
||||
}
|
||||
|
||||
void search_file_free(struct snapraid_search_file* file)
|
||||
void search_file_free(void* void_file)
|
||||
{
|
||||
struct snapraid_search_file* file = void_file;
|
||||
|
||||
free(file->path);
|
||||
free(file);
|
||||
}
|
||||
|
|
@ -37,7 +49,7 @@ struct search_file_compare_arg {
|
|||
const struct snapraid_file* file;
|
||||
unsigned char* buffer;
|
||||
data_off_t offset;
|
||||
unsigned read_size;
|
||||
size_t read_size;
|
||||
int prevhash;
|
||||
};
|
||||
|
||||
|
|
@ -50,6 +62,7 @@ int search_file_compare(const void* void_arg, const void* void_data)
|
|||
const char* path = file->path;
|
||||
int f;
|
||||
ssize_t ret;
|
||||
size_t count;
|
||||
|
||||
/* compare file info */
|
||||
if (arg->file->size != file->size)
|
||||
|
|
@ -64,62 +77,70 @@ int search_file_compare(const void* void_arg, const void* void_data)
|
|||
/* read the block and compare the hash */
|
||||
f = open(path, O_RDONLY | O_BINARY);
|
||||
if (f == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno == ENOENT) {
|
||||
log_fatal(EUSER, "DANGER! file '%s' disappeared.\n", path);
|
||||
log_fatal(EUSER, "If you moved it, please rerun the same command.\n");
|
||||
} else {
|
||||
log_fatal(errno, "Error opening file '%s'. %s.\n", path, strerror(errno));
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
if (errno == ENOENT)
|
||||
log_error(EUSER, "WARNING! Search candidate file '%s' disappeared.\n", path);
|
||||
else
|
||||
log_error(errno, "WARNING! Error opening search candidate '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = pread(f, arg->buffer, arg->read_size, arg->offset);
|
||||
if (ret < 0 || (unsigned)ret != arg->read_size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error reading file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
count = 0;
|
||||
do {
|
||||
ret = pread(f, (char*)arg->buffer + count, arg->read_size - count, arg->offset + count);
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
log_error(errno, "WARNING! Error reading search candidate '%s'. %s.\n", path, strerror(errno));
|
||||
if (close(f) != 0)
|
||||
log_error(errno, "WARNING! Error closing search candidate '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) {
|
||||
log_error(EUSER, "WARNING! Unexpected end of file in search candidate '%s'.\n", path);
|
||||
if (close(f) != 0)
|
||||
log_error(errno, "WARNING! Error closing search candidate '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
count += ret;
|
||||
} while (count < arg->read_size);
|
||||
|
||||
ret = close(f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Error closing file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* compute the hash */
|
||||
if (arg->prevhash)
|
||||
memhash(state->prevhash, state->prevhashseed, buffer_hash, arg->buffer, arg->read_size);
|
||||
else
|
||||
memhash(state->hash, state->hashseed, buffer_hash, arg->buffer, arg->read_size);
|
||||
|
||||
/* check if the hash is matching */
|
||||
if (memcmp(buffer_hash, arg->block->hash, BLOCK_HASH_SIZE) != 0)
|
||||
log_error(errno, "WARNING! Error closing search candidate '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (arg->read_size != state->block_size) {
|
||||
/* fill the remaining with 0 */
|
||||
memset(arg->buffer + arg->read_size, 0, state->block_size - arg->read_size);
|
||||
}
|
||||
|
||||
/* compute the block hash from the canonical buffer */
|
||||
if (arg->prevhash)
|
||||
memhash_block(state->prevhash, state->prevhashseed, buffer_hash, arg->buffer, arg->read_size, state->block_size);
|
||||
else
|
||||
memhash_block(state->hash, state->hashseed, buffer_hash, arg->buffer, arg->read_size, state->block_size);
|
||||
|
||||
/* check if the hash is matching */
|
||||
if (memcmp(buffer_hash, arg->block->hash, BLOCK_HASH_SIZE) != 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int state_search_fetch(struct snapraid_state* state, int prevhash, struct snapraid_file* missing_file, block_off_t missing_file_pos, struct snapraid_block* missing_block, unsigned char* buffer)
|
||||
{
|
||||
struct snapraid_search_file* file;
|
||||
tommy_uint32_t file_hash;
|
||||
tommy_hash_t file_hash;
|
||||
struct search_file_compare_arg arg;
|
||||
|
||||
arg.state = state;
|
||||
arg.block = missing_block;
|
||||
arg.file = missing_file;
|
||||
arg.buffer = buffer;
|
||||
arg.offset = state->block_size * (data_off_t)missing_file_pos;
|
||||
arg.offset = state->block_size * missing_file_pos;
|
||||
arg.read_size = file_block_size(missing_file, missing_file_pos, state->block_size);
|
||||
arg.prevhash = prevhash;
|
||||
|
||||
|
|
@ -134,10 +155,13 @@ int state_search_fetch(struct snapraid_state* state, int prevhash, struct snapra
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void search_dir(struct snapraid_state* state, struct snapraid_disk* disk, const char* dir, const char* sub)
|
||||
static void search_dir(struct snapraid_state* state, struct snapraid_disk* disk, const struct fsidentity* root_identity, const char* dir, const char* sub)
|
||||
{
|
||||
DIR* d;
|
||||
|
||||
size_t mount_point_len = disk != 0 ? strlen(disk->mount_point) : 0;
|
||||
size_t sub_len = strlen(sub);
|
||||
|
||||
d = opendir(dir);
|
||||
if (!d) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -178,25 +202,35 @@ static void search_dir(struct snapraid_state* state, struct snapraid_disk* disk,
|
|||
|
||||
/* exclude hidden files even before calling lstat() */
|
||||
if (disk != 0 && filter_hidden(state->filter_hidden, dd) != 0) {
|
||||
msg_verbose("Excluding hidden '%s'\n", path_next);
|
||||
continue;
|
||||
if (pathcmp(".snapraidignore", dd->d_name) != 0) {
|
||||
msg_verbose("Excluding hidden '%s'\n", path_next);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* exclude content files even before calling lstat() */
|
||||
if (disk != 0 && filter_content(&state->contentlist, path_next) != 0) {
|
||||
if (disk != 0 && filter_content(&state->contentlist, disk->mount_point, mount_point_len, sub, sub_len, name) != 0) {
|
||||
msg_verbose("Excluding content '%s'\n", path_next);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* exclude snapshot container even before calling lstat() */
|
||||
if (disk != 0 && filter_snapshot(state->snapshot, sub, name) != 0) {
|
||||
msg_verbose("Excluding snapshots directory '%s'\n", path_next);
|
||||
continue;
|
||||
}
|
||||
|
||||
#if HAVE_STRUCT_DIRENT_D_STAT
|
||||
/* convert dirent to lstat result */
|
||||
dirent_lstat(dd, &st);
|
||||
|
||||
/* if the st_mode field is missing, takes care to fill it using normal lstat() */
|
||||
/* at now this can happen only in Windows (with HAVE_STRUCT_DIRENT_D_STAT defined), */
|
||||
/* because we use a directory reading method that doesn't read info about ReparsePoint. */
|
||||
/* Note that here we cannot call here lstat_sync(), because we don't know what kind */
|
||||
/* of file is it, and lstat_sync() doesn't always work */
|
||||
/*
|
||||
* If the st_mode field is missing, takes care to fill it using normal lstat()
|
||||
* at now this can happen only in Windows (with HAVE_STRUCT_DIRENT_D_STAT defined),
|
||||
* because we use a directory reading method that doesn't read info about ReparsePoint.
|
||||
* Note that here we cannot call here lstat_sync(), because we don't know what kind
|
||||
* of file is it, and lstat_sync() doesn't always work
|
||||
*/
|
||||
if (st.st_mode == 0) {
|
||||
if (lstat(path_next, &st) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -216,16 +250,51 @@ static void search_dir(struct snapraid_state* state, struct snapraid_disk* disk,
|
|||
#endif
|
||||
|
||||
if (S_ISREG(st.st_mode)) {
|
||||
if (disk == 0 || filter_path(&state->filterlist, &reason, disk->name, sub_next) == 0) {
|
||||
if (disk == 0
|
||||
|| pathcmp(".snapraidignore", name) == 0
|
||||
|| filter_path(&state->filterlist, &reason, disk->name, sub_next) == 0) {
|
||||
search_file(state, path_next, st.st_size, st.st_mtime, STAT_NSEC(&st));
|
||||
} else {
|
||||
msg_verbose("Excluding link '%s' for rule '%s'\n", path_next, filter_type(reason, out, sizeof(out)));
|
||||
msg_verbose("Excluding file '%s' for rule '%s'\n", path_next, filter_type(reason, out, sizeof(out)));
|
||||
}
|
||||
} else if (S_ISDIR(st.st_mode)) {
|
||||
if (disk == 0 || filter_subdir(&state->filterlist, &reason, disk->name, sub_next) == 0) {
|
||||
#ifndef _WIN32
|
||||
/*
|
||||
* Automatic array search must stay within the same filesystem,
|
||||
* mount, and subvolume boundaries as the normal data-disk scan.
|
||||
* Explicit -i imports pass no root identity and may cross them.
|
||||
*/
|
||||
if (root_identity) {
|
||||
struct fsidentity identity;
|
||||
|
||||
if (fsidentity(path_next, &st, &identity) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("%s:%u:%s:%s: Statx error. %s.\n", es(errno), 0, disk->name, esc_tag(path_next), strerror(errno));
|
||||
log_fatal(errno, "Error accessing directory '%s'. %s.\n", path_next, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (identity.device != root_identity->device) {
|
||||
log_tag("%s:%u:%s:%s: Ignoring mount point.\n", es(ESOFT), 0, disk->name, esc_tag(path_next));
|
||||
log_error(ESOFT, "WARNING! Ignoring mount point '%s' because it appears to be in a different device\n", path_next);
|
||||
continue;
|
||||
} else if (identity.mnt_id != root_identity->mnt_id) {
|
||||
log_tag("%s:%u:%s:%s: Ignoring mount point.\n", es(ESOFT), 0, disk->name, esc_tag(path_next));
|
||||
log_error(ESOFT, "WARNING! Ignoring mount point '%s' because it belongs to a different mount\n", path_next);
|
||||
continue;
|
||||
} else if (identity.subvol != root_identity->subvol) {
|
||||
log_tag("%s:%u:%s:%s: Ignoring nested subvolume.\n", es(ESOFT), 0, disk->name, esc_tag(path_next));
|
||||
log_error(ESOFT, "WARNING! Ignoring nested subvolume '%s' because it belongs to a different subvolume\n", path_next);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
pathslash(path_next, sizeof(path_next));
|
||||
pathslash(sub_next, sizeof(sub_next));
|
||||
search_dir(state, disk, path_next, sub_next);
|
||||
search_dir(state, disk, root_identity, path_next, sub_next);
|
||||
} else {
|
||||
msg_verbose("Excluding directory '%s' for rule '%s'\n", path_next, filter_type(reason, out, sizeof(out)));
|
||||
}
|
||||
|
|
@ -250,7 +319,7 @@ void state_search(struct snapraid_state* state, const char* dir)
|
|||
pathimport(path, sizeof(path), dir);
|
||||
pathslash(path, sizeof(path));
|
||||
|
||||
search_dir(state, 0, path, "");
|
||||
search_dir(state, 0, 0, path, "");
|
||||
}
|
||||
|
||||
void state_search_array(struct snapraid_state* state)
|
||||
|
|
@ -267,7 +336,30 @@ void state_search_array(struct snapraid_state* state)
|
|||
|
||||
msg_progress("Searching disk %s...\n", disk->name);
|
||||
|
||||
search_dir(state, disk, disk->dir, "");
|
||||
#ifndef _WIN32
|
||||
struct stat st;
|
||||
struct fsidentity identity;
|
||||
|
||||
if (lstat(disk->dir, &st) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("%s:%u:%s:%s: Stat error. %s.\n", es(errno), 0, disk->name, esc_tag(disk->dir), strerror(errno));
|
||||
log_fatal(errno, "Error accessing directory '%s'. %s.\n", disk->dir, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (fsidentity(disk->dir, &st, &identity) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_tag("%s:%u:%s:%s: Statx error. %s.\n", es(errno), 0, disk->name, esc_tag(disk->dir), strerror(errno));
|
||||
log_fatal(errno, "Error accessing directory '%s'. %s.\n", disk->dir, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
search_dir(state, disk, &identity, disk->dir, "");
|
||||
#else
|
||||
search_dir(state, disk, 0, disk->dir, "");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2014 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SEARCH_H
|
||||
#define __SEARCH_H
|
||||
#ifndef SEARCH_H
|
||||
#define SEARCH_H
|
||||
|
||||
#include "elem.h"
|
||||
#include "state.h"
|
||||
|
|
@ -28,7 +28,7 @@ struct snapraid_search_file {
|
|||
/**
|
||||
* Deallocate a search file.
|
||||
*/
|
||||
void search_file_free(struct snapraid_search_file* file);
|
||||
void search_file_free(void* void_file);
|
||||
|
||||
/**
|
||||
* Fetch a file from the size, timestamp and name.
|
||||
|
|
|
|||
2846
cmdline/selftest.c
2846
cmdline/selftest.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +1,25 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SNAPRAID_H
|
||||
#define __SNAPRAID_H
|
||||
#ifndef SNAPRAID_H
|
||||
#define SNAPRAID_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* snapraid */
|
||||
|
||||
void speed(int period, int disks_number, int blocks_size);
|
||||
|
||||
/**
|
||||
* Runs the extensive test suite, including all unit tests and selftest.
|
||||
*/
|
||||
void test(int argc, char* argv[]);
|
||||
|
||||
/**
|
||||
* Runs a fast self-test for functionality that could be miscompiled,
|
||||
* primarily to verify inline assembly clobber and ABI requirements.
|
||||
*/
|
||||
void selftest(void);
|
||||
|
||||
int snapraid_main(int argc, char* argv[]);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
3327
cmdline/speed.c
3327
cmdline/speed.c
File diff suppressed because it is too large
Load diff
|
|
@ -43,19 +43,21 @@
|
|||
// slower than MD5.
|
||||
//
|
||||
|
||||
#define rd(data, x) util_read64((const uint8_t*)(data) + (x) * 8)
|
||||
|
||||
#define Mix(data, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11) \
|
||||
s0 += data[0]; s2 ^= s10; s11 ^= s0; s0 = util_rotl64(s0, 11); s11 += s1; \
|
||||
s1 += data[1]; s3 ^= s11; s0 ^= s1; s1 = util_rotl64(s1, 32); s0 += s2; \
|
||||
s2 += data[2]; s4 ^= s0; s1 ^= s2; s2 = util_rotl64(s2, 43); s1 += s3; \
|
||||
s3 += data[3]; s5 ^= s1; s2 ^= s3; s3 = util_rotl64(s3, 31); s2 += s4; \
|
||||
s4 += data[4]; s6 ^= s2; s3 ^= s4; s4 = util_rotl64(s4, 17); s3 += s5; \
|
||||
s5 += data[5]; s7 ^= s3; s4 ^= s5; s5 = util_rotl64(s5, 28); s4 += s6; \
|
||||
s6 += data[6]; s8 ^= s4; s5 ^= s6; s6 = util_rotl64(s6, 39); s5 += s7; \
|
||||
s7 += data[7]; s9 ^= s5; s6 ^= s7; s7 = util_rotl64(s7, 57); s6 += s8; \
|
||||
s8 += data[8]; s10 ^= s6; s7 ^= s8; s8 = util_rotl64(s8, 55); s7 += s9; \
|
||||
s9 += data[9]; s11 ^= s7; s8 ^= s9; s9 = util_rotl64(s9, 54); s8 += s10; \
|
||||
s10 += data[10]; s0 ^= s8; s9 ^= s10; s10 = util_rotl64(s10, 22); s9 += s11; \
|
||||
s11 += data[11]; s1 ^= s9; s10 ^= s11; s11 = util_rotl64(s11, 46); s10 += s0;
|
||||
s0 += rd(data, 0); s2 ^= s10; s11 ^= s0; s0 = util_rotl64(s0, 11); s11 += s1; \
|
||||
s1 += rd(data, 1); s3 ^= s11; s0 ^= s1; s1 = util_rotl64(s1, 32); s0 += s2; \
|
||||
s2 += rd(data, 2); s4 ^= s0; s1 ^= s2; s2 = util_rotl64(s2, 43); s1 += s3; \
|
||||
s3 += rd(data, 3); s5 ^= s1; s2 ^= s3; s3 = util_rotl64(s3, 31); s2 += s4; \
|
||||
s4 += rd(data, 4); s6 ^= s2; s3 ^= s4; s4 = util_rotl64(s4, 17); s3 += s5; \
|
||||
s5 += rd(data, 5); s7 ^= s3; s4 ^= s5; s5 = util_rotl64(s5, 28); s4 += s6; \
|
||||
s6 += rd(data, 6); s8 ^= s4; s5 ^= s6; s6 = util_rotl64(s6, 39); s5 += s7; \
|
||||
s7 += rd(data, 7); s9 ^= s5; s6 ^= s7; s7 = util_rotl64(s7, 57); s6 += s8; \
|
||||
s8 += rd(data, 8); s10 ^= s6; s7 ^= s8; s8 = util_rotl64(s8, 55); s7 += s9; \
|
||||
s9 += rd(data, 9); s11 ^= s7; s8 ^= s9; s9 = util_rotl64(s9, 54); s8 += s10; \
|
||||
s10 += rd(data, 10); s0 ^= s8; s9 ^= s10; s10 = util_rotl64(s10, 22); s9 += s11; \
|
||||
s11 += rd(data, 11); s1 ^= s9; s10 ^= s11; s11 = util_rotl64(s11, 46); s10 += s0;
|
||||
|
||||
#define EndPartial(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11) \
|
||||
h11 += h1; h2 ^= h11; h1 = util_rotl64(h1, 44); \
|
||||
|
|
@ -72,9 +74,9 @@
|
|||
h10 += h0; h1 ^= h10; h0 = util_rotl64(h0, 54);
|
||||
|
||||
#define End(data, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11) \
|
||||
h0 += data[0]; h1 += data[1]; h2 += data[2]; h3 += data[3]; \
|
||||
h4 += data[4]; h5 += data[5]; h6 += data[6]; h7 += data[7]; \
|
||||
h8 += data[8]; h9 += data[9]; h10 += data[10]; h11 += data[11]; \
|
||||
h0 += rd(data, 0); h1 += rd(data, 1); h2 += rd(data, 2); h3 += rd(data, 3); \
|
||||
h4 += rd(data, 4); h5 += rd(data, 5); h6 += rd(data, 6); h7 += rd(data, 7); \
|
||||
h8 += rd(data, 8); h9 += rd(data, 9); h10 += rd(data, 10); h11 += rd(data, 11); \
|
||||
EndPartial(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11); \
|
||||
EndPartial(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11); \
|
||||
EndPartial(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11);
|
||||
|
|
@ -92,19 +94,16 @@
|
|||
// * is a not-very-regular mix of 1's and 0's
|
||||
// * does not need any other special mathematical properties
|
||||
//
|
||||
#define sc_const 0xdeadbeefdeadbeefLL
|
||||
#define sc_const 0xdeadbeefdeadbeefULL
|
||||
|
||||
void SpookyHash128(const void* data, size_t size, const uint8_t* seed, uint8_t* digest)
|
||||
static void SpookyHash128(const void* data, size_t size, const uint8_t* seed, uint8_t* digest)
|
||||
{
|
||||
uint64_t h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11;
|
||||
uint64_t buf[sc_numVars];
|
||||
uint8_t buf[sc_blockSize];
|
||||
size_t nblocks;
|
||||
const uint64_t* blocks;
|
||||
const uint64_t* end;
|
||||
const uint8_t* p;
|
||||
const uint8_t* end;
|
||||
size_t size_remainder;
|
||||
#if WORDS_BIGENDIAN
|
||||
unsigned i;
|
||||
#endif
|
||||
|
||||
h9 = util_read64(seed + 0);
|
||||
h10 = util_read64(seed + 8);
|
||||
|
|
@ -114,32 +113,27 @@ void SpookyHash128(const void* data, size_t size, const uint8_t* seed, uint8_t*
|
|||
h2 = h5 = h8 = h11 = sc_const;
|
||||
|
||||
nblocks = size / sc_blockSize;
|
||||
blocks = data;
|
||||
end = blocks + nblocks * sc_numVars;
|
||||
p = data;
|
||||
end = p + nblocks * sc_blockSize;
|
||||
|
||||
/* body */
|
||||
while (blocks < end) {
|
||||
#if WORDS_BIGENDIAN
|
||||
for (i = 0; i < sc_numVars; ++i)
|
||||
buf[i] = util_swap64(blocks[i]);
|
||||
Mix(buf, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11);
|
||||
#else
|
||||
Mix(blocks, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC unroll 1
|
||||
#elif defined(__clang__)
|
||||
#pragma unroll 1
|
||||
#endif
|
||||
blocks += sc_numVars;
|
||||
while (p < end) {
|
||||
Mix(p, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11);
|
||||
p += sc_blockSize;
|
||||
}
|
||||
|
||||
/* tail */
|
||||
size_remainder = (size - ((const uint8_t*)end - (const uint8_t*)data));
|
||||
memcpy(buf, end, size_remainder);
|
||||
memset(((uint8_t*)buf) + size_remainder, 0, sc_blockSize - size_remainder);
|
||||
((uint8_t*)buf)[sc_blockSize - 1] = size_remainder;
|
||||
size_remainder = size - nblocks * sc_blockSize;
|
||||
memcpy(buf, p, size_remainder);
|
||||
memset(buf + size_remainder, 0, sc_blockSize - size_remainder);
|
||||
buf[sc_blockSize - 1] = size_remainder;
|
||||
|
||||
/* finalization */
|
||||
#if WORDS_BIGENDIAN
|
||||
for (i = 0; i < sc_numVars; ++i)
|
||||
buf[i] = util_swap64(buf[i]);
|
||||
#endif
|
||||
End(buf, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11);
|
||||
|
||||
util_write64(digest + 0, h0);
|
||||
|
|
|
|||
3461
cmdline/state.c
3461
cmdline/state.c
File diff suppressed because it is too large
Load diff
132
cmdline/state.h
132
cmdline/state.h
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __STATE_H
|
||||
#define __STATE_H
|
||||
#ifndef STATE_H
|
||||
#define STATE_H
|
||||
|
||||
#include "elem.h"
|
||||
|
||||
|
|
@ -27,6 +27,18 @@ const char* lev_name(unsigned level);
|
|||
*/
|
||||
const char* lev_config_name(unsigned level);
|
||||
|
||||
/**
|
||||
* Maximum byte length of a logical disk name.
|
||||
*/
|
||||
#define DISK_NAME_MAX 127
|
||||
|
||||
/**
|
||||
* Validate a logical disk name.
|
||||
*
|
||||
* Returns 0 if valid, or a static string error reason if invalid.
|
||||
*/
|
||||
const char* disk_name_invalid_reason(const char* name);
|
||||
|
||||
/****************************************************************************/
|
||||
/* state */
|
||||
|
||||
|
|
@ -42,10 +54,9 @@ const char* lev_config_name(unsigned level);
|
|||
#define GIBI (1024 * 1024 * 1024)
|
||||
#define TEBI (1024 * 1024 * 1024 * (uint64_t)1024)
|
||||
|
||||
#define SORT_PHYSICAL 1 /**< Sort by physical order. */
|
||||
#define SORT_DIR 1 /**< Sort by directory order. */
|
||||
#define SORT_INODE 2 /**< Sort by inode. */
|
||||
#define SORT_ALPHA 3 /**< Sort by alphabetic order. */
|
||||
#define SORT_DIR 4 /**< Sort by directory order. */
|
||||
|
||||
/**
|
||||
* Options set only at startup.
|
||||
|
|
@ -86,6 +97,8 @@ struct snapraid_option {
|
|||
int skip_disk_access; /**< Skip the data disk access for commands that don't need it. */
|
||||
int skip_content_access; /**< Skip the content access for commands that don't need it. */
|
||||
int kill_after_sync; /**< Kill the process after sync without saving the final state. */
|
||||
int kill_before_sync; /**< Kill the process before sync after saving the initial state. */
|
||||
int kill_after_resize; /**< Kill the process after parity resize before the normal post-resize state write. */
|
||||
int force_murmur3; /**< Force Murmur3 choice. */
|
||||
int force_spooky2; /**< Force Spooky2 choice. */
|
||||
int force_order; /**< Force sorting order. One of the SORT_* defines. */
|
||||
|
|
@ -112,11 +125,11 @@ struct snapraid_option {
|
|||
struct snapraid_state {
|
||||
struct snapraid_option opt; /**< Setup options. */
|
||||
int mapped_device; /**< Devices were already mapped */
|
||||
int snapshot; /**< Enable snapshot support */
|
||||
int filter_hidden; /**< Filter out hidden files. */
|
||||
uint64_t autosave; /**< Autosave after the specified amount of data. 0 to disable. */
|
||||
int need_write; /**< If the state is changed. */
|
||||
int written; /**< If the state was written at least one time */
|
||||
int checked_read; /**< If the state was read and checked. */
|
||||
uint32_t block_size; /**< Block size in bytes. */
|
||||
unsigned raid_mode; /**< Raid mode to use. RAID_MODE_DEFAULT or RAID_MODE_ALTERNATE. */
|
||||
int file_mode; /**< File access mode. Combination of ADVISE_* flags. */
|
||||
|
|
@ -132,13 +145,13 @@ struct snapraid_state {
|
|||
unsigned prevhash; /**< Previous hash kind used. In case of rehash. */
|
||||
unsigned besthash; /**< Best hash suggested. */
|
||||
const char* command; /**< Command running. */
|
||||
int smartignore[SMART_IGNORE_MAX]; /**< Smart attributes to ignore for all devices. */
|
||||
uint32_t rehash_blocks; /**< Blocks marked rehash */
|
||||
uint32_t bad_blocks; /**< Blocks marked bad */
|
||||
uint32_t unsynced_blocks; /**< If the parity is invalid, and a sync is needed. */
|
||||
uint32_t unscrubbed_blocks; /**< Blocks never scrubbed */
|
||||
uint32_t removed_files; /**< Files removed. Updated in scan */
|
||||
uint32_t updated_files; /**< Files updated. Updated in scan */
|
||||
struct smartignore_struct smartignore[SMART_IGNORE_MAX]; /**< Smart attributes to ignore for all devices. */
|
||||
uint64_t rehash_blocks; /**< Blocks marked rehash */
|
||||
uint64_t bad_blocks; /**< Blocks marked bad */
|
||||
uint64_t unsynced_blocks; /**< If the parity is invalid, and a sync is needed. */
|
||||
uint64_t unscrubbed_blocks; /**< Blocks never scrubbed */
|
||||
uint64_t removed_files; /**< Files removed. Updated in scan */
|
||||
uint64_t updated_files; /**< Files updated. Updated in scan */
|
||||
|
||||
tommy_list contentlist; /**< List of content files. */
|
||||
tommy_list disklist; /**< List of all the data disks. */
|
||||
|
|
@ -153,13 +166,14 @@ struct snapraid_state {
|
|||
tommy_list bucketlist; /**< Sorted list of info bucket. Derived from infoarr, but updated only state_read()/state_write() */
|
||||
block_off_t bucketcount; /**< Sum of all the counts of the list */
|
||||
|
||||
/* Thermal */
|
||||
/* thermal */
|
||||
tommy_list thermallist; /**< List of all thermal state */
|
||||
int thermal_stop_gathering; /**< If thermal data gathering is stopped */
|
||||
int thermal_ambient_temperature; /**< Ambient themperature. 0 if not available */
|
||||
int thermal_system_temperature; /**< System temperature. 0 if not available */
|
||||
int thermal_ambient_temperature; /**< Ambient temperature used as thermal model reference. 0 if not available */
|
||||
int thermal_highest_temperature; /**< Current highest temperature */
|
||||
time_t thermal_first; /**< Time of the first measure */
|
||||
time_t thermal_latest; /**< Time of latest measure */
|
||||
uint64_t thermal_first; /**< Monotonic time of the first measure */
|
||||
uint64_t thermal_latest; /**< Monotonic time of latest measure */
|
||||
int thermal_cooldown_time; /**< Cooldown wait time in seconds */
|
||||
int thermal_temperature_limit; /**< Upper limit temperature of the operating range */
|
||||
|
||||
|
|
@ -181,8 +195,6 @@ struct snapraid_state {
|
|||
*/
|
||||
uint64_t tick_last;
|
||||
|
||||
int clear_past_hash; /**< Clear all the hash from CHG and DELETED blocks when reading the state from an incomplete sync. */
|
||||
|
||||
time_t progress_whole_start; /**< Initial start of the whole process. */
|
||||
time_t progress_interruption; /**< Time of the start of the progress interruption. */
|
||||
time_t progress_wasted; /**< Time wasted in interruptions. */
|
||||
|
|
@ -227,11 +239,33 @@ void state_probe(struct snapraid_state* state);
|
|||
*/
|
||||
void state_read(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Check if all configured parity splits have persistent sizes.
|
||||
*/
|
||||
int state_is_write_ready(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Require initialized parity split sizes before commands that can save content.
|
||||
*/
|
||||
void state_require_write_ready(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Count the number of unsynced parity positions using an event sweep across extents.
|
||||
* Counts positions in [blockmin, blockmax). The caller must ensure that the disk list,
|
||||
* extent trees, and block states remain unchanged for the duration of the call.
|
||||
*/
|
||||
uint64_t fs_count_unsynced(struct snapraid_state* state, block_off_t blockmin, block_off_t blockmax);
|
||||
|
||||
/**
|
||||
* Write the new state.
|
||||
*/
|
||||
void state_write(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Signal that we reached a stable state with all parity computed.
|
||||
*/
|
||||
void state_commit(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Diff all the disks.
|
||||
*/
|
||||
|
|
@ -245,13 +279,23 @@ void state_scan(struct snapraid_state* state);
|
|||
/**
|
||||
* Set the nanosecond timestamp of all files that have a zero value.
|
||||
*/
|
||||
void state_touch(struct snapraid_state* state);
|
||||
int state_touch(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Map devices if not already done.
|
||||
*/
|
||||
void state_devmap(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Devices operations.
|
||||
*/
|
||||
int state_device(struct snapraid_state* state, int operation, tommy_list* filterlist_disk);
|
||||
|
||||
/**
|
||||
* Perform a device operation, continuing after a failed flush when force is set.
|
||||
*/
|
||||
int state_device_force(struct snapraid_state* state, int operation, tommy_list* filterlist_disk, int force);
|
||||
|
||||
/**
|
||||
* Sync the parity data.
|
||||
*/
|
||||
|
|
@ -391,9 +435,11 @@ void state_usage_print(struct snapraid_state* state);
|
|||
void state_fscheck(struct snapraid_state* state, const char* ope);
|
||||
|
||||
/**
|
||||
* Measure the temperature of all disks
|
||||
* Measure the temperature of all disks.
|
||||
* Return 0 if thermal information was successfully gathered, -1 if thermal gathering failed, is not supported, or no valid temperature is available.
|
||||
* Individual disks without a valid temperature are ignored as long as at least one disk provides a valid temperature.
|
||||
*/
|
||||
void state_thermal(struct snapraid_state* state, time_t now);
|
||||
int state_thermal(struct snapraid_state* state, time_t now);
|
||||
|
||||
/**
|
||||
* Check if the temperature is outside the operating range
|
||||
|
|
@ -413,13 +459,45 @@ int state_thermal_begin(struct snapraid_state* state, time_t now);
|
|||
/**
|
||||
* Load the ignore file .snapraidignore
|
||||
*/
|
||||
void state_load_ignore_file(tommy_list* filter_list, const char* path, const char* sub);
|
||||
int state_load_ignore_file(tommy_list* filter_list, const char* path, const char* sub);
|
||||
|
||||
/**
|
||||
* Report attributes into the log
|
||||
*/
|
||||
void state_attr(struct snapraid_state* state, tommy_list* low);
|
||||
|
||||
/**
|
||||
* Create (or reuse existing) scan snapshots
|
||||
*/
|
||||
int state_snapshot_scan(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Promote scan snapshots to pending before starting parity processing.
|
||||
*/
|
||||
int state_snapshot_pending(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Make the pending snapshots as stable
|
||||
*/
|
||||
int state_snapshot_commit(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Use the snapshots for reading only commands
|
||||
*/
|
||||
void state_snapshot_read(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Use the snapshots for the reading part (filtered out disks) of writing commands
|
||||
*/
|
||||
void state_snapshot_write(struct snapraid_state* state, tommy_list* filterlist_disk);
|
||||
|
||||
/**
|
||||
* Cleanup snapshots
|
||||
*
|
||||
* Required only in Windows.
|
||||
*/
|
||||
void state_snapshot_cleanup(struct snapraid_state* state);
|
||||
|
||||
/****************************************************************************/
|
||||
/* misc */
|
||||
|
||||
|
|
@ -428,5 +506,15 @@ void state_attr(struct snapraid_state* state, tommy_list* low);
|
|||
*/
|
||||
void generate_configuration(const char* content);
|
||||
|
||||
/**
|
||||
* Parse smartctl command.
|
||||
*/
|
||||
int parse_smartctl(const char* custom, char* smartctl, size_t smartctl_size, char* smartctl_info, size_t smartctl_info_size);
|
||||
|
||||
/**
|
||||
* Apply smart ignore logic to devinfo.
|
||||
*/
|
||||
void state_smart_ignore(struct snapraid_state* state, devinfo_t* devinfo);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "elem.h"
|
||||
|
|
@ -19,7 +19,9 @@ unsigned day_ago(time_t ref, time_t now)
|
|||
if (now < ref)
|
||||
return 0;
|
||||
|
||||
return (now - ref) / (24 * 3600);
|
||||
now -= ref;
|
||||
|
||||
return (unsigned)(now / (24 * 3600));
|
||||
}
|
||||
|
||||
#define GRAPH_COLUMN 70
|
||||
|
|
@ -38,9 +40,9 @@ int state_status(struct snapraid_state* state)
|
|||
block_off_t count;
|
||||
unsigned l;
|
||||
unsigned dayoldest, daymedian, daynewest;
|
||||
unsigned bar_scrubbed[GRAPH_COLUMN];
|
||||
unsigned bar_new[GRAPH_COLUMN];
|
||||
unsigned barmax;
|
||||
block_off_t bar_scrubbed[GRAPH_COLUMN];
|
||||
block_off_t bar_new[GRAPH_COLUMN];
|
||||
block_off_t barmax;
|
||||
time_t oldest, newest, median;
|
||||
unsigned x, y;
|
||||
tommy_node* node_disk;
|
||||
|
|
@ -51,6 +53,7 @@ int state_status(struct snapraid_state* state)
|
|||
uint64_t file_size;
|
||||
uint64_t file_block_count;
|
||||
uint64_t file_block_free;
|
||||
unsigned dealloc_count;
|
||||
block_off_t parity_block_free;
|
||||
uint64_t all_wasted;
|
||||
int free_not_zero;
|
||||
|
|
@ -64,19 +67,19 @@ int state_status(struct snapraid_state* state)
|
|||
blockmax = parity_allocated_size(state);
|
||||
|
||||
log_tag("summary:block_size:%u\n", state->block_size);
|
||||
log_tag("summary:parity_block_count:%u\n", blockmax);
|
||||
log_tag("summary:parity_block_count:%" PRIu64 "\n", blockmax);
|
||||
|
||||
/* get the minimum parity free space */
|
||||
parity_block_free = state->parity[0].free_blocks;
|
||||
for (l = 0; l < state->level; ++l) {
|
||||
log_tag("summary:parity_block_total:%s:%u\n", lev_config_name(l), state->parity[l].total_blocks);
|
||||
log_tag("summary:parity_block_free:%s:%u\n", lev_config_name(l), state->parity[l].free_blocks);
|
||||
log_tag("summary:parity_block_total:%s:%" PRIu64 "\n", lev_config_name(l), state->parity[l].total_blocks);
|
||||
log_tag("summary:parity_block_free:%s:%" PRIu64 "\n", lev_config_name(l), state->parity[l].free_blocks);
|
||||
if (state->parity[l].free_blocks < parity_block_free)
|
||||
parity_block_free = state->parity[l].free_blocks;
|
||||
if (state->parity[l].free_blocks != 0)
|
||||
free_not_zero = 1;
|
||||
}
|
||||
log_tag("summary:parity_block_free_min:%u\n", parity_block_free);
|
||||
log_tag("summary:parity_block_free_min:%" PRIu64 "\n", parity_block_free);
|
||||
|
||||
printf("SnapRAID status report:\n");
|
||||
printf("\n");
|
||||
|
|
@ -84,6 +87,7 @@ int state_status(struct snapraid_state* state)
|
|||
printf(" Files Fragments GB GB GB\n");
|
||||
|
||||
/* count fragments */
|
||||
dealloc_count = 0;
|
||||
file_count = 0;
|
||||
file_size = 0;
|
||||
file_block_count = 0;
|
||||
|
|
@ -110,6 +114,8 @@ int state_status(struct snapraid_state* state)
|
|||
uint64_t disk_free_bytes;
|
||||
int64_t wasted;
|
||||
|
||||
dealloc_count += tommy_list_count(&disk->dealloclist);
|
||||
|
||||
/* for each file in the disk */
|
||||
node = disk->filelist;
|
||||
while (node) {
|
||||
|
|
@ -124,9 +130,9 @@ int state_status(struct snapraid_state* state)
|
|||
++file_zerosubsecond;
|
||||
++disk_file_zerosubsecond;
|
||||
if (disk_file_zerosubsecond < 50)
|
||||
log_tag("zerosubsecond:%s:%s: \n", disk->name, file->sub);
|
||||
log_tag("zerosubsecond:%s:%s: \n", disk->name, esc_tag(file->sub));
|
||||
if (disk_file_zerosubsecond == 50)
|
||||
log_tag("zerosubsecond:%s:%s: (more follow)\n", disk->name, file->sub);
|
||||
log_tag("zerosubsecond:%s:%s: (more follow)\n", disk->name, esc_tag(file->sub));
|
||||
}
|
||||
|
||||
/* check fragmentation */
|
||||
|
|
@ -176,18 +182,22 @@ int state_status(struct snapraid_state* state)
|
|||
disk_block_max_by_space = disk_block_count + disk->free_blocks;
|
||||
disk_block_max_by_parity = blockmax + parity_block_free;
|
||||
|
||||
/* the maximum usable space in a disk is limited by the smallest */
|
||||
/* of the disk size and the parity size */
|
||||
/* the wasted space is the space that we have to leave */
|
||||
/* free on the data disk, when the parity is filled up */
|
||||
/*
|
||||
* The maximum usable space in a disk is limited by the smallest
|
||||
* of the disk size and the parity size
|
||||
* the wasted space is the space that we have to leave
|
||||
* free on the data disk, when the parity is filled up
|
||||
*/
|
||||
if (disk_block_max_by_space < disk_block_max_by_parity) {
|
||||
disk_block_max = disk_block_max_by_space;
|
||||
} else {
|
||||
disk_block_max = disk_block_max_by_parity;
|
||||
}
|
||||
|
||||
/* wasted space is the difference of the two maximum size */
|
||||
/* if negative, it's extra space available in parity */
|
||||
/*
|
||||
* Wasted space is the difference of the two maximum size
|
||||
* if negative, it's extra space available in parity
|
||||
*/
|
||||
wasted = (int64_t)disk_block_max_by_space - (int64_t)disk_block_max_by_parity;
|
||||
wasted *= state->block_size;
|
||||
|
||||
|
|
@ -216,17 +226,17 @@ int state_status(struct snapraid_state* state)
|
|||
printf(" %s\n", disk->name);
|
||||
|
||||
log_tag("summary:disk_file_count:%s:%u\n", disk->name, disk_file_count);
|
||||
log_tag("summary:disk_block_count:%s:%u\n", disk->name, disk_block_count);
|
||||
log_tag("summary:disk_block_count:%s:%" PRIu64 "\n", disk->name, disk_block_count);
|
||||
log_tag("summary:disk_fragmented_file_count:%s:%u\n", disk->name, disk_file_fragmented);
|
||||
log_tag("summary:disk_excess_fragment_count:%s:%u\n", disk->name, disk_extra_fragment);
|
||||
log_tag("summary:disk_zerosubsecond_file_count:%s:%u\n", disk->name, disk_file_zerosubsecond);
|
||||
log_tag("summary:disk_file_size:%s:%" PRIu64 "\n", disk->name, disk_file_size);
|
||||
log_tag("summary:disk_block_allocated:%s:%u\n", disk->name, disk_block_latest_used + 1);
|
||||
log_tag("summary:disk_block_total:%s:%u\n", disk->name, disk->total_blocks);
|
||||
log_tag("summary:disk_block_free:%s:%u\n", disk->name, disk->free_blocks);
|
||||
log_tag("summary:disk_block_max_by_space:%s:%u\n", disk->name, disk_block_max_by_space);
|
||||
log_tag("summary:disk_block_max_by_parity:%s:%u\n", disk->name, disk_block_max_by_parity);
|
||||
log_tag("summary:disk_block_max:%s:%u\n", disk->name, disk_block_max);
|
||||
log_tag("summary:disk_block_allocated:%s:%" PRIu64 "\n", disk->name, disk_block_latest_used + 1);
|
||||
log_tag("summary:disk_block_total:%s:%" PRIu64 "\n", disk->name, disk->total_blocks);
|
||||
log_tag("summary:disk_block_free:%s:%" PRIu64 "\n", disk->name, disk->free_blocks);
|
||||
log_tag("summary:disk_block_max_by_space:%s:%" PRIu64 "\n", disk->name, disk_block_max_by_space);
|
||||
log_tag("summary:disk_block_max_by_parity:%s:%" PRIu64 "\n", disk->name, disk_block_max_by_parity);
|
||||
log_tag("summary:disk_block_max:%s:%" PRIu64 "\n", disk->name, disk_block_max);
|
||||
log_tag("summary:disk_space_wasted:%s:%" PRId64 "\n", disk->name, wasted);
|
||||
|
||||
disk_used_bytes = disk_block_count * (uint64_t)state->block_size;
|
||||
|
|
@ -315,10 +325,10 @@ int state_status(struct snapraid_state* state)
|
|||
}
|
||||
|
||||
/* output scrub history as structured data */
|
||||
log_tag("scrub_graph_range:%u:%u\n", GRAPH_COLUMN, barmax);
|
||||
for (i = 0; i < GRAPH_COLUMN; ++i) {
|
||||
unsigned days_ago = dayoldest - (dayoldest - daynewest) * i / (GRAPH_COLUMN - 1);
|
||||
log_tag("scrub_graph_bar:%u:%u:%u:%u\n", i, days_ago, bar_scrubbed[i], bar_new[i]);
|
||||
log_tag("scrub_graph_range:%u:%" PRIu64 "\n", GRAPH_COLUMN, barmax);
|
||||
for (l = 0; l < GRAPH_COLUMN; ++l) {
|
||||
unsigned days_ago = dayoldest - (dayoldest - daynewest) * l / (GRAPH_COLUMN - 1);
|
||||
log_tag("scrub_graph_bar:%u:%u:%" PRIu64 ":%" PRIu64 "\n", l, days_ago, bar_scrubbed[l], bar_new[l]);
|
||||
}
|
||||
|
||||
printf("\n\n");
|
||||
|
|
@ -326,18 +336,18 @@ int state_status(struct snapraid_state* state)
|
|||
/* print the graph */
|
||||
for (y = 0; y < GRAPH_ROW; ++y) {
|
||||
if (y == 0)
|
||||
printf("%3u%%|", barmax * 100 / count);
|
||||
printf("%3" PRIu64 "%%|", barmax * 100 / count);
|
||||
else if (y == GRAPH_ROW - 1)
|
||||
printf(" 0%%|");
|
||||
else if (y == GRAPH_ROW / 2)
|
||||
printf("%3u%%|", barmax * 50 / count);
|
||||
printf("%3" PRIu64 "%%|", barmax * 50 / count);
|
||||
else
|
||||
printf(" |");
|
||||
for (x = 0; x < GRAPH_COLUMN; ++x) {
|
||||
unsigned pivot_upper = barmax * (GRAPH_ROW - y) / GRAPH_ROW;
|
||||
unsigned pivot_lower = barmax * (GRAPH_ROW - 1 - y) / GRAPH_ROW;
|
||||
unsigned both = bar_scrubbed[x] + bar_new[x];
|
||||
unsigned scrubbed = bar_scrubbed[x];
|
||||
block_off_t pivot_upper = barmax * (GRAPH_ROW - y) / GRAPH_ROW;
|
||||
block_off_t pivot_lower = barmax * (GRAPH_ROW - 1 - y) / GRAPH_ROW;
|
||||
block_off_t both = bar_scrubbed[x] + bar_new[x];
|
||||
block_off_t scrubbed = bar_scrubbed[x];
|
||||
|
||||
if (both > pivot_upper) {
|
||||
if (scrubbed > pivot_lower)
|
||||
|
|
@ -373,6 +383,16 @@ int state_status(struct snapraid_state* state)
|
|||
if (state->unsynced_blocks) {
|
||||
printf("WARNING! The array is NOT fully synced.\n");
|
||||
printf("You have a sync in progress at %u%%.\n", muldiv(blockmax - state->unsynced_blocks, 100, blockmax));
|
||||
if (dealloc_count) {
|
||||
printf("WARNING! There are %u files updated or deleted from the array that may reduce the recovery probability until the next sync.\n", dealloc_count);
|
||||
for (node_disk = state->disklist; node_disk != 0; node_disk = node_disk->next) {
|
||||
struct snapraid_disk* disk = node_disk->data;
|
||||
for (tommy_node* node = tommy_list_head(&disk->dealloclist); node != 0; node = node->next) {
|
||||
struct snapraid_dealloc* dealloc = node->data;
|
||||
msg_verbose("\t%s\n", fmt_term(disk, dealloc->sub));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printf("No sync is in progress.\n");
|
||||
}
|
||||
|
|
@ -401,7 +421,7 @@ int state_status(struct snapraid_state* state)
|
|||
}
|
||||
|
||||
if (state->bad_blocks) {
|
||||
printf("DANGER! In the array there are %u errors!\n\n", state->bad_blocks);
|
||||
printf("DANGER! In the array there are %" PRIu64 " errors!\n\n", state->bad_blocks);
|
||||
|
||||
block_off_t bad_range;
|
||||
block_off_t bad_count;
|
||||
|
|
@ -433,9 +453,9 @@ int state_status(struct snapraid_state* state)
|
|||
/* break the range */
|
||||
if (range_count) {
|
||||
if (range_count == 1) {
|
||||
printf(" %u", range_start);
|
||||
printf(" %" PRIu64 "", range_start);
|
||||
} else {
|
||||
printf(" %u-%u", range_start, range_start + range_count - 1);
|
||||
printf(" %" PRIu64 "-%" PRIu64 "", range_start, range_start + range_count - 1);
|
||||
}
|
||||
bad_count += range_count;
|
||||
++bad_range;
|
||||
|
|
@ -444,7 +464,7 @@ int state_status(struct snapraid_state* state)
|
|||
}
|
||||
|
||||
if (bad_range > 100) {
|
||||
printf(" and %u more...", state->bad_blocks - bad_count);
|
||||
printf(" and %" PRIu64 " more...", state->bad_blocks - bad_count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
628
cmdline/str.c
Normal file
628
cmdline/str.c
Normal file
|
|
@ -0,0 +1,628 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "str.h"
|
||||
#include "support.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* string */
|
||||
|
||||
char* strpolish(char* s)
|
||||
{
|
||||
char* i = s;
|
||||
|
||||
while (*i) {
|
||||
if (isspace((unsigned char)*i) || !isprint((unsigned char)*i))
|
||||
*i = ' ';
|
||||
++i;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
unsigned strsplit(char** split_map, unsigned split_max, char* str, const char* delimiters, const char* trim, int trim_empty)
|
||||
{
|
||||
unsigned mac = 0;
|
||||
|
||||
if (*str == 0)
|
||||
return 0;
|
||||
|
||||
while (mac < split_max) {
|
||||
char* begin = str;
|
||||
|
||||
str += strcspn(str, delimiters);
|
||||
|
||||
char* end = str;
|
||||
|
||||
int has_next = *str != 0;
|
||||
if (has_next) {
|
||||
*str = 0;
|
||||
++str;
|
||||
}
|
||||
|
||||
if (trim != 0) {
|
||||
begin += strspn(begin, trim);
|
||||
|
||||
while (end > begin && strchr(trim, end[-1]) != 0) {
|
||||
--end;
|
||||
*end = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!trim_empty || *begin != 0) {
|
||||
split_map[mac] = begin;
|
||||
++mac;
|
||||
}
|
||||
|
||||
if (!has_next)
|
||||
break;
|
||||
}
|
||||
|
||||
return mac;
|
||||
}
|
||||
|
||||
unsigned argsplit(const char** split_map, unsigned split_max, char* str)
|
||||
{
|
||||
unsigned mac = 0;
|
||||
|
||||
/* skip leading whitespace */
|
||||
while (*str != 0 && isspace((unsigned char)*str))
|
||||
++str;
|
||||
|
||||
while (*str != 0 && mac < split_max) {
|
||||
char* dst = str;
|
||||
split_map[mac++] = dst;
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* cmd.exe rules:
|
||||
* Unquoted: '^' escapes next char; '"' opens a quoted block.
|
||||
* Quoted: '"' closes the block; '^' is an ordinary character.
|
||||
*/
|
||||
int quoted = 0;
|
||||
|
||||
while (*str != 0 && (quoted || !isspace((unsigned char)*str))) {
|
||||
if (quoted) {
|
||||
if (*str == '"') {
|
||||
quoted = 0;
|
||||
++str;
|
||||
} else {
|
||||
*dst++ = *str++;
|
||||
}
|
||||
} else {
|
||||
if (*str == '^' && *(str + 1) != 0) {
|
||||
++str;
|
||||
*dst++ = *str++;
|
||||
} else if (*str == '"') {
|
||||
quoted = 1;
|
||||
++str;
|
||||
} else {
|
||||
*dst++ = *str++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
/*
|
||||
* bash rules:
|
||||
* Single-quoted block: everything literal, no exceptions.
|
||||
* Double-quoted block: '\' only escapes $, `, ", '\', newline;
|
||||
* other backslashes are copied verbatim.
|
||||
* Unquoted '\': always escapes the immediately following char.
|
||||
*/
|
||||
|
||||
/* set of characters that '\' can escape inside double quotes */
|
||||
static const char dq_escapable[] = "$`\"\\\n";
|
||||
|
||||
while (*str != 0 && !isspace((unsigned char)*str)) {
|
||||
|
||||
if (*str == '\'') {
|
||||
/* single-quoted block: truly everything is literal */
|
||||
++str;
|
||||
while (*str != 0 && *str != '\'')
|
||||
*dst++ = *str++;
|
||||
if (*str == '\'')
|
||||
++str;
|
||||
|
||||
} else if (*str == '"') {
|
||||
/* double-quoted block */
|
||||
++str;
|
||||
while (*str != 0 && *str != '"') {
|
||||
if (*str == '\\' && *(str + 1) != 0 && strchr(dq_escapable, *(str + 1))) {
|
||||
++str;
|
||||
}
|
||||
*dst++ = *str++;
|
||||
}
|
||||
if (*str == '"')
|
||||
++str;
|
||||
|
||||
} else if (*str == '\\') {
|
||||
/* unquoted backslash: next character always literal */
|
||||
++str;
|
||||
if (*str != 0)
|
||||
*dst++ = *str++;
|
||||
|
||||
} else {
|
||||
*dst++ = *str++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (*str != 0)
|
||||
++str; /* step past the delimiter */
|
||||
|
||||
/* skip whitespace before the next token */
|
||||
while (*str != 0 && isspace((unsigned char)*str))
|
||||
++str;
|
||||
|
||||
/* null-terminate after str has already moved on */
|
||||
*dst = 0;
|
||||
}
|
||||
|
||||
return mac;
|
||||
}
|
||||
|
||||
char* strtrim(char* str)
|
||||
{
|
||||
char* begin;
|
||||
char* end;
|
||||
|
||||
begin = str;
|
||||
while (begin[0] && isspace((unsigned char)begin[0]))
|
||||
++begin;
|
||||
|
||||
end = begin + strlen(begin);
|
||||
while (end > begin && isspace((unsigned char)end[-1]))
|
||||
--end;
|
||||
|
||||
end[0] = 0;
|
||||
|
||||
if (begin != str)
|
||||
memmove(str, begin, end - begin + 1);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char* strlwr(char* str)
|
||||
{
|
||||
char* s = str;
|
||||
|
||||
while (*s) {
|
||||
*s = tolower((unsigned char)*s);
|
||||
++s;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char* worddigitstr(const char* haystack, const char* needle)
|
||||
{
|
||||
size_t len = strlen(needle);
|
||||
const char* s;
|
||||
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
for (s = haystack; (s = strstr(s, needle)) != NULL; ++s) {
|
||||
|
||||
/* left boundary */
|
||||
if (s == haystack || isspace((unsigned char)s[-1]) || isdigit((unsigned char)s[-1])) {
|
||||
/* right boundary */
|
||||
if (s[len] == 0 || isspace((unsigned char)s[len]) || isdigit((unsigned char)s[len])) {
|
||||
return (char*)s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int strtoi(const char* nptr, char** endptr, int base)
|
||||
{
|
||||
long val;
|
||||
int save_errno = errno;
|
||||
|
||||
errno = 0;
|
||||
val = strtol(nptr, endptr, base);
|
||||
|
||||
if (errno == ERANGE) {
|
||||
return val > 0 ? INT_MAX : INT_MIN;
|
||||
}
|
||||
|
||||
if (val > INT_MAX) {
|
||||
errno = ERANGE;
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
if (val < INT_MIN) {
|
||||
errno = ERANGE;
|
||||
return INT_MIN;
|
||||
}
|
||||
|
||||
if (errno == 0) {
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
return (int)val;
|
||||
}
|
||||
|
||||
unsigned strtou(const char* nptr, char** endptr, int base)
|
||||
{
|
||||
const char* p = nptr;
|
||||
char* end;
|
||||
unsigned long val;
|
||||
int neg = 0;
|
||||
int save_errno = errno;
|
||||
|
||||
while (isspace((unsigned char)*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
if (*p == '-') {
|
||||
neg = 1;
|
||||
++p;
|
||||
} else if (*p == '+') {
|
||||
++p;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
val = strtoul(p, &end, base);
|
||||
|
||||
if (end == p) {
|
||||
/* no conversion was performed */
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
errno = save_errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (endptr) {
|
||||
*endptr = end;
|
||||
}
|
||||
|
||||
if (errno == ERANGE || val > UINT_MAX) {
|
||||
errno = ERANGE;
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
if (errno == 0) {
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
if (neg) {
|
||||
return (unsigned)-val;
|
||||
}
|
||||
|
||||
return (unsigned)val;
|
||||
}
|
||||
|
||||
unsigned strton(const char* nptr, char** endptr, int base)
|
||||
{
|
||||
const char* p = nptr;
|
||||
unsigned val;
|
||||
int save_errno = errno;
|
||||
|
||||
while (isspace((unsigned char)*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
if (*p == '-') {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
errno = ERANGE;
|
||||
return (unsigned)-1;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
val = strtou(nptr, endptr, base);
|
||||
|
||||
if (errno == ERANGE) {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
return (unsigned)-1;
|
||||
}
|
||||
|
||||
if (errno == 0) {
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
unsigned long strtonl(const char* nptr, char** endptr, int base)
|
||||
{
|
||||
const char* p = nptr;
|
||||
unsigned long val;
|
||||
int save_errno = errno;
|
||||
|
||||
while (isspace((unsigned char)*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
if (*p == '-') {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
errno = ERANGE;
|
||||
return (unsigned long)-1;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
val = strtoul(nptr, endptr, base);
|
||||
|
||||
if (errno == ERANGE) {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
return (unsigned long)-1;
|
||||
}
|
||||
|
||||
if (errno == 0) {
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
unsigned long long strtonll(const char* nptr, char** endptr, int base)
|
||||
{
|
||||
const char* p = nptr;
|
||||
unsigned long long val;
|
||||
int save_errno = errno;
|
||||
|
||||
while (isspace((unsigned char)*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
if (*p == '-') {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
errno = ERANGE;
|
||||
return (unsigned long long)-1;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
val = strtoull(nptr, endptr, base);
|
||||
|
||||
if (errno == ERANGE) {
|
||||
if (endptr) {
|
||||
*endptr = (char*)nptr;
|
||||
}
|
||||
return (unsigned long long)-1;
|
||||
}
|
||||
|
||||
if (errno == 0) {
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* wnmatch */
|
||||
|
||||
/**
|
||||
* Helper function for case-insensitive character comparison
|
||||
*/
|
||||
static inline int char_match(char p, char t)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return tolower((unsigned char)p) == tolower((unsigned char)t);
|
||||
#else
|
||||
return p == t;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Match character class [...]
|
||||
* Return 0 if NOT matched
|
||||
*/
|
||||
static const char* match_class(const char* p, char t)
|
||||
{
|
||||
int negate = 0;
|
||||
int matched = 0;
|
||||
|
||||
if (*p == '!' || *p == '^') {
|
||||
negate = 1;
|
||||
++p;
|
||||
}
|
||||
|
||||
while (*p && *p != ']') {
|
||||
if (p[1] == '-' && p[2] != ']' && p[2] != 0) {
|
||||
/* range [a-z] */
|
||||
unsigned char start = (unsigned char)*p;
|
||||
unsigned char end = (unsigned char)p[2];
|
||||
unsigned char c = (unsigned char)t;
|
||||
#ifdef WIN32
|
||||
start = tolower(start);
|
||||
end = tolower(end);
|
||||
c = tolower(c);
|
||||
#endif
|
||||
if (c >= start && c <= end)
|
||||
matched = 1;
|
||||
p += 3;
|
||||
} else {
|
||||
/* single character */
|
||||
if (char_match(*p, t))
|
||||
matched = 1;
|
||||
++p;
|
||||
}
|
||||
}
|
||||
|
||||
if (*p == ']')
|
||||
++p;
|
||||
|
||||
if (negate)
|
||||
matched = !matched;
|
||||
if (!matched)
|
||||
return 0;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to check end of match condition
|
||||
*/
|
||||
static inline int wnmatch_end(const char* t, int match_sub)
|
||||
{
|
||||
if (match_sub) {
|
||||
/* match successfully only if we are at a directory border */
|
||||
return *t != '/';
|
||||
} else {
|
||||
/* match successfully if we've consumed all text */
|
||||
return *t != 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int is_wild_escape(char c)
|
||||
{
|
||||
return c == '*'
|
||||
|| c == '?'
|
||||
|| c == '['
|
||||
|| c == ']'
|
||||
#ifdef _WIN32
|
||||
|| c == '^';
|
||||
#else
|
||||
|| c == '\\';
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Match with the previous pattern character provided in prev.
|
||||
*
|
||||
* An initial '**' needs to know if it was preceded by '/' to distinguish
|
||||
* between multi-directory recursive matching (like /##.ext) and single-directory
|
||||
* matching (like ##.ext).
|
||||
*/
|
||||
int wnmatch_sub_prev(const char* p, const char* t, int match_sub, char prev)
|
||||
{
|
||||
while (*p) {
|
||||
char p0 = *p;
|
||||
switch (p0) {
|
||||
#ifdef _WIN32
|
||||
case '^' :
|
||||
#else
|
||||
case '\\' :
|
||||
#endif
|
||||
/*
|
||||
* Escape wildcard metacharacters.
|
||||
*
|
||||
* If the following character is not escapable, the
|
||||
* escape character itself is matched literally.
|
||||
*/
|
||||
if (is_wild_escape(p[1]))
|
||||
++p;
|
||||
|
||||
if (*t == 0 || !char_match(*p, *t))
|
||||
return 1;
|
||||
|
||||
++p;
|
||||
++t;
|
||||
break;
|
||||
case '?' :
|
||||
/* ? matches any single character except / */
|
||||
if (*t == 0 || *t == '/')
|
||||
return 1;
|
||||
++p;
|
||||
++t;
|
||||
break;
|
||||
case '*' :
|
||||
/* check for ** */
|
||||
if (p[1] == '*') {
|
||||
/* skip the ** */
|
||||
p += 2;
|
||||
|
||||
/* munge all * */
|
||||
while (*p == '*')
|
||||
++p;
|
||||
|
||||
/* if its not near a slash, it's like a single * */
|
||||
if (prev == '/' || *p == '/') {
|
||||
/* a ** at end matches everything */
|
||||
if (*p == 0)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* In between slashes matches to nothing
|
||||
*
|
||||
* Check for /##/ or ^##/ (^ start of string)
|
||||
*
|
||||
* This is required for:
|
||||
* "/##/file.txt" matching "/file.txt"
|
||||
* "##/file.txt" matching "file.txt"
|
||||
* "x##/file.txt" NOT matching "xfile.txt"
|
||||
*/
|
||||
if (*p == '/' && (prev == 0 || prev == '/')) {
|
||||
/* try reducing to nothing */
|
||||
if (wnmatch_sub(p + 1, t, match_sub) == 0)
|
||||
return 0;
|
||||
/* otherwise / should match in the text */
|
||||
}
|
||||
|
||||
/* try matching with 0 or more characters */
|
||||
while (*t) {
|
||||
if (wnmatch_sub(p, t, match_sub) == 0)
|
||||
return 0;
|
||||
++t;
|
||||
}
|
||||
|
||||
/* try matching at the end */
|
||||
return wnmatch_sub(p, t, match_sub);
|
||||
}
|
||||
} else {
|
||||
/* skip the * */
|
||||
++p;
|
||||
}
|
||||
|
||||
/* a * at end matches rest of segment */
|
||||
if (*p == 0) {
|
||||
while (*t && *t != '/')
|
||||
++t;
|
||||
return wnmatch_end(t, match_sub);
|
||||
}
|
||||
|
||||
/* try matching with 0 or more characters */
|
||||
while (*t && *t != '/') {
|
||||
if (wnmatch_sub(p, t, match_sub) == 0)
|
||||
return 0;
|
||||
++t;
|
||||
}
|
||||
|
||||
/* try matching at the end */
|
||||
return wnmatch_sub(p, t, match_sub);
|
||||
case '[' :
|
||||
/* character class */
|
||||
if (*t == 0 || *t == '/')
|
||||
return 1;
|
||||
|
||||
p = match_class(p + 1, *t);
|
||||
if (!p)
|
||||
return 1;
|
||||
|
||||
++t;
|
||||
break;
|
||||
default :
|
||||
/* literal character */
|
||||
if (*t == 0 || !char_match(*p, *t))
|
||||
return 1;
|
||||
++p;
|
||||
++t;
|
||||
break;
|
||||
}
|
||||
prev = p0;
|
||||
}
|
||||
|
||||
return wnmatch_end(t, match_sub);
|
||||
}
|
||||
|
||||
int wnmatch_sub(const char* p, const char* t, int match_sub)
|
||||
{
|
||||
return wnmatch_sub_prev(p, t, match_sub, 0);
|
||||
}
|
||||
|
||||
168
cmdline/str.h
Normal file
168
cmdline/str.h
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#ifndef STR_H
|
||||
#define STR_H
|
||||
|
||||
#include "app.h"
|
||||
#include "str.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* string */
|
||||
|
||||
/**
|
||||
* Polish a string.
|
||||
*
|
||||
* Not printable chars are replaced by spaces.
|
||||
*
|
||||
* Note that the passed string is modified.
|
||||
*/
|
||||
char* strpolish(char* s);
|
||||
|
||||
/**
|
||||
* Split a string into tokens in-place.
|
||||
*
|
||||
* Scans @str for tokens separated by any character in @delimiters,
|
||||
* null-terminates each token by overwriting its trailing delimiter,
|
||||
* and stores a pointer to each token's start in @split_map.
|
||||
*
|
||||
* If @trim_empty is non-zero, leading and consecutive delimiters are
|
||||
* silently skipped, and tokens trimmed to empty are discarded.
|
||||
* If @trim_empty is zero, empty tokens are preserved.
|
||||
*
|
||||
* The input string is modified in-place; @split_map entries point
|
||||
* directly into @str and are only valid for its lifetime.
|
||||
*
|
||||
* \param split_map Output array receiving pointers to each token.
|
||||
* \param split_max Capacity of @split_map; at most this many tokens are stored.
|
||||
* \param str Input string to tokenise (modified in-place).
|
||||
* \param delimiters Null-terminated set of delimiter characters.
|
||||
* \param trim Null-terminated set of characters to trim from the start and end of each token.
|
||||
* \param trim_empty Whether to trim empty tokens and consecutive delimiters.
|
||||
* \return Number of tokens stored in @split_map.
|
||||
*
|
||||
* Example:
|
||||
* char buf[] = " one, two,, , three ";
|
||||
* char* map[8];
|
||||
* unsigned n = strsplit(map, 8, buf, ",", " ", 1);
|
||||
* // n == 3, map[] == { "one", "two", "three" }
|
||||
*/
|
||||
unsigned strsplit(char** split_map, unsigned split_max, char* str, const char* delimiters, const char* trim, int trim_empty);
|
||||
|
||||
/**
|
||||
* Split a command-line string into an argument vector,
|
||||
* applying the quoting rules of the platform's native shell.
|
||||
*
|
||||
* The input string is modified in-place: quotes and escape characters
|
||||
* are stripped and each token is null-terminated. Whitespace is the
|
||||
* implicit token delimiter on both platforms.
|
||||
*
|
||||
* bash quoting (Linux / macOS):
|
||||
* 'single quotes' - Everything literal; no escapes processed inside.
|
||||
* "double quotes" - '\' only escapes $, `, ", '\', and newline;
|
||||
* all other backslashes are kept as-is.
|
||||
* \x (unquoted) - Next character taken literally (even whitespace).
|
||||
*
|
||||
* cmd.exe quoting (Windows):
|
||||
* "double quotes" - Toggle quoted mode; inside, '^' is NOT special.
|
||||
* ^x (unquoted) - Next character taken literally.
|
||||
* Single quotes and '\' carry no special meaning in either mode.
|
||||
*
|
||||
* \param split_map Output array receiving pointers to each argument.
|
||||
* \param split_max Capacity of @split_map; at most this many tokens are stored.
|
||||
* \param str Input command-line string (modified in-place).
|
||||
* \return Number of arguments stored in @split_map.
|
||||
*
|
||||
* Example (bash):
|
||||
* char buf[] = "one 'two three' \"say \\\"hi\\\"\" back\\slash";
|
||||
* char* map[8];
|
||||
* unsigned n = argsplit(map, 8, buf);
|
||||
* // n==4, map[] == { "one", "two three", "say \"hi\"", "backslash" }
|
||||
*
|
||||
* Example (cmd.exe):
|
||||
* char buf[] = "one \"two three\" ^&safe ^\"quoted^\"";
|
||||
* char* map[8];
|
||||
* unsigned n = argsplit(map, 8, buf);
|
||||
* // n==4, map[] == { "one", "two three", "&safe", "\"quoted\"" }
|
||||
*/
|
||||
unsigned argsplit(const char** split_map, unsigned split_max, char* str);
|
||||
|
||||
/**
|
||||
* Trim spaces from the start and the end
|
||||
*/
|
||||
char* strtrim(char* s);
|
||||
|
||||
/**
|
||||
* Lower case
|
||||
*/
|
||||
char* strlwr(char* s);
|
||||
|
||||
/**
|
||||
* Find the first occurrence of 'needle' in 'haystack' only if it
|
||||
* appears as a separate word (space, number or string boundaries).
|
||||
*
|
||||
* Returns a pointer to the beginning of the match, or NULL if not found.
|
||||
*/
|
||||
char* worddigitstr(const char* haystack, const char* needle);
|
||||
|
||||
/**
|
||||
* Convert a string to an integer, with the same semantics as strtol.
|
||||
*/
|
||||
int strtoi(const char* nptr, char** endptr, int base);
|
||||
|
||||
/**
|
||||
* Convert a string to an unsigned integer, with the same semantics as strtoul.
|
||||
*/
|
||||
unsigned strtou(const char* nptr, char** endptr, int base);
|
||||
|
||||
/**
|
||||
* Convert strings to non-negative unsigned integers.
|
||||
* Negative or out-of-range values are rejected by returning (type)-1,
|
||||
* setting errno to ERANGE, and setting endptr to nptr.
|
||||
*/
|
||||
unsigned strton(const char* nptr, char** endptr, int base);
|
||||
unsigned long strtonl(const char* nptr, char** endptr, int base);
|
||||
unsigned long long strtonll(const char* nptr, char** endptr, int base);
|
||||
|
||||
/****************************************************************************/
|
||||
/* match */
|
||||
|
||||
/**
|
||||
* Wild match function.
|
||||
*
|
||||
* If match_sub is !=0, it matches sub directory. Specifically it matches if the
|
||||
* string "t" is not fully consumed and the next character to consume is a /.
|
||||
*
|
||||
* - ? matches any single character except /
|
||||
* - * matches any sequence of characters except /
|
||||
* - ** (nearby a /) matches everything including /
|
||||
* - ** (not near a /) like *
|
||||
* - ##/ reduces to nothing in addition to the normal matching of ** (using # instead of * to not mess the C comment)
|
||||
* - [...] matches character classes with support for ranges and negation lile [!...] or [^...], except /
|
||||
* - \ (Unix) or ^ (Windows) escapes *, ?, [, ], and the escape character itself
|
||||
*
|
||||
* \return 0 if it matches
|
||||
*/
|
||||
int wnmatch_sub(const char* p, const char* t, int match_sub);
|
||||
|
||||
/**
|
||||
* Match with the pattern character immediately before p provided as prev context.
|
||||
*
|
||||
* This is needed for absolute filters where the leading '/' in the filter pattern
|
||||
* is stripped before calling match (because target paths do not have a leading slash).
|
||||
* Providing prev='/' preserves the information that an initial '**' was preceded by
|
||||
* a slash, enabling recursive multi-directory matching (e.g. /##.ext or /##foo,
|
||||
* using # instead of * to avoid C comment delimiter collision).
|
||||
*
|
||||
* Recursive sub-matches intentionally start with prev=0 because intermediate matching
|
||||
* evaluates suffixes where preceding pattern characters are tracked in the loop.
|
||||
*/
|
||||
int wnmatch_sub_prev(const char* p, const char* t, int match_sub, char prev);
|
||||
|
||||
static inline int wnmatch(const char* p, const char* t)
|
||||
{
|
||||
return wnmatch_sub(p, t, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
290
cmdline/stream.c
290
cmdline/stream.c
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "util.h"
|
||||
|
|
@ -14,23 +14,24 @@ unsigned STREAM_SIZE = 64 * 1024;
|
|||
|
||||
STREAM* sopen_read(const char* file, int flags)
|
||||
{
|
||||
#if HAVE_POSIX_FADVISE
|
||||
int ret;
|
||||
#endif
|
||||
STREAM* s = malloc_nofail(sizeof(STREAM));
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
s->handle_size = 1;
|
||||
s->handle = malloc_nofail(sizeof(struct stream_handle));
|
||||
s->advise = malloc_nofail(sizeof(struct advise_struct));
|
||||
s->flags = flags;
|
||||
advise_init(&s->advise[0], s->flags & STREAM_FLAGS_ADVISE_MASK);
|
||||
|
||||
int open_flags = O_RDONLY | O_BINARY;
|
||||
if (s->flags & STREAM_FLAGS_SEQUENTIAL)
|
||||
open_flags |= O_SEQUENTIAL;
|
||||
int open_flags = O_RDONLY | O_BINARY | advise_flags(&s->advise[0]);
|
||||
if ((s->flags & STREAM_FLAGS_NOFOLLOW) != 0)
|
||||
open_flags |= O_NOFOLLOW;
|
||||
|
||||
pathcpy(s->handle[0].path, sizeof(s->handle[0].path), file);
|
||||
s->handle[0].f = open(file, open_flags);
|
||||
if (s->handle[0].f == -1) {
|
||||
free(s->advise);
|
||||
free(s->handle);
|
||||
free(s);
|
||||
return 0;
|
||||
|
|
@ -39,38 +40,29 @@ STREAM* sopen_read(const char* file, int flags)
|
|||
/* get file info */
|
||||
if (fstat(s->handle[0].f, &st) != 0) {
|
||||
close(s->handle[0].f);
|
||||
free(s->advise);
|
||||
free(s->handle);
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s->size = st.st_size;
|
||||
|
||||
#if HAVE_POSIX_FADVISE
|
||||
if (s->flags & STREAM_FLAGS_SEQUENTIAL) {
|
||||
/* advise sequential access */
|
||||
ret = posix_fadvise_wrapper(s->handle[0].f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret == ENOSYS) {
|
||||
log_error(errno, "WARNING! fadvise() is not supported in this platform. Performance may not be optimal!\n");
|
||||
/* call is not supported, like in armhf, see posix_fadvise manpage */
|
||||
ret = 0;
|
||||
}
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(s->handle[0].f);
|
||||
free(s->handle);
|
||||
free(s);
|
||||
errno = ret; /* posix_fadvise return the error code */
|
||||
return 0;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
ret = advise_open(&s->advise[0], s->handle[0].f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(s->handle[0].f);
|
||||
free(s->advise);
|
||||
free(s->handle);
|
||||
free(s);
|
||||
return 0;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
#endif
|
||||
|
||||
s->buffer_size = STREAM_SIZE;
|
||||
if (s->buffer_size > s->size)
|
||||
s->buffer_size = s->size; /* allocate only what is necessary */
|
||||
s->buffer = malloc_nofail_test(s->buffer_size);
|
||||
s->buffer = malloc_nofail(s->buffer_size);
|
||||
mtest_vector(1, s->buffer_size, (void**)&s->buffer);
|
||||
s->pos = s->buffer;
|
||||
s->end = s->buffer;
|
||||
s->state = STREAM_STATE_READ;
|
||||
|
|
@ -79,7 +71,6 @@ STREAM* sopen_read(const char* file, int flags)
|
|||
s->offset_uncached = 0;
|
||||
s->crc = 0;
|
||||
s->crc_uncached = 0;
|
||||
s->crc_stream = CRC_IV;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
@ -91,14 +82,18 @@ STREAM* sopen_multi_write(unsigned count, int flags)
|
|||
STREAM* s = malloc_nofail(sizeof(STREAM));
|
||||
|
||||
s->handle_size = count;
|
||||
s->handle = malloc_nofail(count * sizeof(struct stream_handle));
|
||||
s->handle = nalloc_nofail(count, sizeof(struct stream_handle));
|
||||
s->advise = nalloc_nofail(count, sizeof(struct advise_struct));
|
||||
s->flags = flags;
|
||||
|
||||
for (i = 0; i < count; ++i)
|
||||
for (i = 0; i < count; ++i) {
|
||||
s->handle[i].f = -1;
|
||||
advise_init(&s->advise[i], s->flags & STREAM_FLAGS_ADVISE_MASK);
|
||||
}
|
||||
|
||||
s->buffer_size = STREAM_SIZE;
|
||||
s->buffer = malloc_nofail_test(s->buffer_size);
|
||||
s->buffer = malloc_nofail(s->buffer_size);
|
||||
mtest_vector(1, s->buffer_size, (void**)&s->buffer);
|
||||
s->pos = s->buffer;
|
||||
s->end = s->buffer + s->buffer_size;
|
||||
s->state = STREAM_STATE_WRITE;
|
||||
|
|
@ -108,23 +103,17 @@ STREAM* sopen_multi_write(unsigned count, int flags)
|
|||
s->offset_uncached = 0;
|
||||
s->crc = 0;
|
||||
s->crc_uncached = 0;
|
||||
s->crc_stream = CRC_IV;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
int sopen_multi_file(STREAM* s, unsigned i, const char* file)
|
||||
{
|
||||
#if HAVE_POSIX_FADVISE
|
||||
int ret;
|
||||
#endif
|
||||
int f;
|
||||
|
||||
pathcpy(s->handle[i].path, sizeof(s->handle[i].path), file);
|
||||
|
||||
int open_flags = O_WRONLY | O_CREAT | O_EXCL | O_BINARY;
|
||||
if (s->flags & STREAM_FLAGS_SEQUENTIAL)
|
||||
open_flags |= O_SEQUENTIAL; ;
|
||||
int open_flags = O_WRONLY | O_CREAT | O_EXCL | O_BINARY | advise_flags(&s->advise[i]);
|
||||
|
||||
/* O_EXCL to be resilient ensure to always create a new file and not use a stale link to the original file */
|
||||
f = open(file, open_flags, 0600);
|
||||
|
|
@ -134,23 +123,17 @@ int sopen_multi_file(STREAM* s, unsigned i, const char* file)
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
#if HAVE_POSIX_FADVISE
|
||||
if (s->flags & STREAM_FLAGS_SEQUENTIAL) {
|
||||
/* advise sequential access */
|
||||
ret = posix_fadvise_wrapper(f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret == ENOSYS) {
|
||||
/* call is not supported, like in armhf, see posix_fadvise manpage */
|
||||
ret = 0;
|
||||
}
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = advise_open(&s->advise[i], f);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(f);
|
||||
errno = ret; /* posix_fadvise return the error code */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
s->handle[i].f = f;
|
||||
|
||||
|
|
@ -185,6 +168,11 @@ int sclose(STREAM* s)
|
|||
for (i = 0; i < s->handle_size; ++i) {
|
||||
/* if open failed, there is nothing to close */
|
||||
if (s->handle[i].f != -1) {
|
||||
if (advise_close(&s->advise[i], s->handle[i].f) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fail = 1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (close(s->handle[i].f) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fail = 1;
|
||||
|
|
@ -193,6 +181,7 @@ int sclose(STREAM* s)
|
|||
}
|
||||
}
|
||||
|
||||
free(s->advise);
|
||||
free(s->handle);
|
||||
free(s->buffer);
|
||||
free(s);
|
||||
|
|
@ -231,8 +220,9 @@ static int sfill(STREAM* s)
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* if we reached the end, doesn't try to read */
|
||||
/* expose the logical size boundary as EOF, just like EOF from the underlying file */
|
||||
if (s->offset >= s->size) {
|
||||
s->state = STREAM_STATE_EOF;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
|
|
@ -251,6 +241,13 @@ static int sfill(STREAM* s)
|
|||
}
|
||||
/* assume that it can be a shorter read, so ret < s->buffer_size doesn't mean that we reached EOF */
|
||||
|
||||
if (advise_read(&s->advise[0], s->handle[0].f, s->offset, ret) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
return EOF;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* update the crc */
|
||||
if (s->flags & STREAM_FLAGS_CRC) {
|
||||
s->crc_uncached = s->crc;
|
||||
|
|
@ -277,7 +274,7 @@ int sdeplete(STREAM* s, unsigned char* last)
|
|||
|
||||
while (1) {
|
||||
/* increase the position up to 4 bytes before the end */
|
||||
if (s->pos + 4 <= s->end)
|
||||
if (s->end - s->pos >= 4)
|
||||
s->pos = s->end - 4;
|
||||
|
||||
/* insert the last 4 bytes */
|
||||
|
|
@ -309,6 +306,7 @@ int sflush(STREAM* s)
|
|||
{
|
||||
ssize_t ret;
|
||||
ssize_t size;
|
||||
ssize_t count;
|
||||
unsigned i;
|
||||
|
||||
if (s->state != STREAM_STATE_WRITE) {
|
||||
|
|
@ -322,9 +320,37 @@ int sflush(STREAM* s)
|
|||
return 0;
|
||||
|
||||
for (i = 0; i < s->handle_size; ++i) {
|
||||
ret = write(s->handle[i].f, s->buffer, size);
|
||||
count = 0;
|
||||
do {
|
||||
ret = write(s->handle[i].f, s->buffer + count, size - count);
|
||||
|
||||
if (ret != size) {
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
s->state_index = i;
|
||||
return EOF;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = EIO;
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
s->state_index = i;
|
||||
return EOF;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
count += ret;
|
||||
} while (count < size);
|
||||
}
|
||||
|
||||
for (i = 0; i < s->handle_size; ++i) {
|
||||
/* ADVISE_DISCARD modes only discard ranges after waiting for writeback. */
|
||||
if (advise_write(&s->advise[i], s->handle[i].f, s->offset, size) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
s->state_index = i;
|
||||
|
|
@ -365,12 +391,6 @@ uint32_t scrc(STREAM* s)
|
|||
return crc32c(s->crc_uncached, s->buffer, s->pos - s->buffer);
|
||||
}
|
||||
|
||||
uint32_t scrc_stream(STREAM* s)
|
||||
{
|
||||
assert(s->flags & STREAM_FLAGS_CRC);
|
||||
return s->crc_stream ^ CRC_IV;
|
||||
}
|
||||
|
||||
int sgetc_uncached(STREAM* s)
|
||||
{
|
||||
/* if at the end of the buffer, fill it */
|
||||
|
|
@ -379,7 +399,7 @@ int sgetc_uncached(STREAM* s)
|
|||
return *s->pos++;
|
||||
}
|
||||
|
||||
int sgettok(STREAM* f, char* str, int size)
|
||||
ssize_t sgettok(STREAM* f, char* str, int size)
|
||||
{
|
||||
char* i = str;
|
||||
char* send = str + size;
|
||||
|
|
@ -416,38 +436,26 @@ int sgettok(STREAM* f, char* str, int size)
|
|||
return i - str;
|
||||
}
|
||||
|
||||
int sread(STREAM* f, void* void_data, unsigned size)
|
||||
int sread_uncached(STREAM* f, void* void_data, size_t size)
|
||||
{
|
||||
unsigned char* data = void_data;
|
||||
|
||||
/* if there is enough space in memory */
|
||||
if (sptrlookup(f, size)) {
|
||||
/* optimized version with all the data in memory */
|
||||
unsigned char* pos = sptrget(f);
|
||||
|
||||
/* copy it */
|
||||
while (size--)
|
||||
*data++ = *pos++;
|
||||
|
||||
sptrset(f, pos);
|
||||
} else {
|
||||
/* standard version using sgetc() */
|
||||
while (size--) {
|
||||
int c = sgetc(f);
|
||||
if (c == EOF) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
*data++ = c;
|
||||
/* standard version using sgetc() */
|
||||
while (size--) {
|
||||
int c = sgetc(f);
|
||||
if (c == EOF) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
*data++ = c;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgetline(STREAM* f, char* str, int size)
|
||||
ssize_t sgetline(STREAM* f, char* str, int size)
|
||||
{
|
||||
char* i = str;
|
||||
char* send = str + size;
|
||||
|
|
@ -515,9 +523,9 @@ int sgetline(STREAM* f, char* str, int size)
|
|||
return i - str;
|
||||
}
|
||||
|
||||
int sgetlasttok(STREAM* f, char* str, int size)
|
||||
ssize_t sgetlasttok(STREAM* f, char* str, int size)
|
||||
{
|
||||
int ret;
|
||||
ssize_t ret;
|
||||
|
||||
ret = sgetline(f, str, size);
|
||||
if (ret < 0) {
|
||||
|
|
@ -586,7 +594,7 @@ int sgetb32(STREAM* f, uint32_t* value)
|
|||
{
|
||||
uint32_t v;
|
||||
unsigned char b;
|
||||
unsigned char s;
|
||||
unsigned s;
|
||||
int c;
|
||||
|
||||
v = 0;
|
||||
|
|
@ -603,7 +611,7 @@ loop:
|
|||
if ((b & 0x80) == 0) {
|
||||
v |= (uint32_t)b << s;
|
||||
s += 7;
|
||||
if (s >= 32) {
|
||||
if (tommy_unlikely(s >= 32)) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -611,6 +619,13 @@ loop:
|
|||
goto loop;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for overflow: at s == 28 only 4 bits (0x0f) fit in uint32_t
|
||||
*/
|
||||
if (tommy_unlikely(s == 28 && (b & 0x70) != 0)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
v |= (uint32_t)(b & 0x7f) << s;
|
||||
|
||||
*value = v;
|
||||
|
|
@ -622,7 +637,7 @@ int sgetb64(STREAM* f, uint64_t* value)
|
|||
{
|
||||
uint64_t v;
|
||||
unsigned char b;
|
||||
unsigned char s;
|
||||
unsigned s;
|
||||
int c;
|
||||
|
||||
v = 0;
|
||||
|
|
@ -639,7 +654,7 @@ loop:
|
|||
if ((b & 0x80) == 0) {
|
||||
v |= (uint64_t)b << s;
|
||||
s += 7;
|
||||
if (s >= 64) {
|
||||
if (tommy_unlikely(s >= 64)) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -647,6 +662,13 @@ loop:
|
|||
goto loop;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for overflow: at s == 63 only 1 bit (0x01) fits in uint64_t
|
||||
*/
|
||||
if (tommy_unlikely(s == 63 && (b & 0x7e) != 0)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
v |= (uint64_t)(b & 0x7f) << s;
|
||||
|
||||
*value = v;
|
||||
|
|
@ -669,17 +691,17 @@ int sgetble32(STREAM* f, uint32_t* value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int sgetbs(STREAM* f, char* str, int size)
|
||||
ssize_t sgetbs(STREAM* f, char* str, size_t size)
|
||||
{
|
||||
uint32_t len;
|
||||
uint64_t len;
|
||||
|
||||
if (sgetb32(f, &len) < 0) {
|
||||
if (sgetb64(f, &len) < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (len + 1 > (uint32_t)size) {
|
||||
if (len >= size) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -687,43 +709,38 @@ int sgetbs(STREAM* f, char* str, int size)
|
|||
|
||||
str[len] = 0;
|
||||
|
||||
return sread(f, str, (int)len);
|
||||
if (sread(f, str, len) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int swrite(const void* void_data, unsigned size, STREAM* f)
|
||||
int swrite_uncached(const void* void_data, size_t size, STREAM* f)
|
||||
{
|
||||
const unsigned char* data = void_data;
|
||||
|
||||
/* if there is enough space in memory */
|
||||
if (sptrlookup(f, size)) {
|
||||
/* optimized version with all the data in memory */
|
||||
unsigned char* pos = sptrget(f);
|
||||
while (size) {
|
||||
size_t available;
|
||||
|
||||
/**
|
||||
* Update the crc *before* writing the data in the buffer
|
||||
*
|
||||
* This must be done before the memory write,
|
||||
* to be able to detect memory errors on the buffer,
|
||||
* happening before we write it on the file.
|
||||
*/
|
||||
if (f->flags & STREAM_FLAGS_CRC) {
|
||||
f->crc_stream = crc32c_plain(f->crc_stream, data, size);
|
||||
}
|
||||
|
||||
/* copy it */
|
||||
while (size--)
|
||||
*pos++ = *data++;
|
||||
|
||||
sptrset(f, pos);
|
||||
} else {
|
||||
/* standard version using sputc() */
|
||||
while (size--) {
|
||||
if (sputc(*data++, f) != 0) {
|
||||
if (f->pos == f->end) {
|
||||
if (sflush(f) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
available = (size_t)(f->end - f->pos);
|
||||
if (available > size)
|
||||
available = size;
|
||||
|
||||
memcpy(f->pos, data, available);
|
||||
f->pos += available;
|
||||
data += available;
|
||||
size -= available;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -787,7 +804,7 @@ int sputbs(const char* str, STREAM* f)
|
|||
{
|
||||
size_t len = strlen(str);
|
||||
|
||||
if (sputb32(len, f) != 0) {
|
||||
if (sputb64(len, f) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -802,7 +819,21 @@ int ssync(STREAM* s)
|
|||
unsigned i;
|
||||
|
||||
for (i = 0; i < s->handle_size; ++i) {
|
||||
if (fsync(s->handle[i].f) != 0) {
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* On macOS, standard fsync() only pushes data from kernel buffers to the
|
||||
* drive's volatile cache without requesting a physical media flush. F_FULLFSYNC
|
||||
* forces the drive controller to commit all cached data to permanent storage.
|
||||
*/
|
||||
#if defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
ret = fcntl(s->handle[i].f, F_FULLFSYNC);
|
||||
if (ret != 0 && (errno == ENOTSUP || errno == EINVAL))
|
||||
ret = fsync(s->handle[i].f);
|
||||
#else
|
||||
ret = fsync(s->handle[i].f);
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
s->state_index = i;
|
||||
|
|
@ -815,3 +846,20 @@ int ssync(STREAM* s)
|
|||
}
|
||||
#endif
|
||||
|
||||
int smtime(STREAM* s, int64_t mtime_sec, int mtime_nsec)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < s->handle_size; ++i) {
|
||||
if (s->handle[i].f != -1 && fmtime(s->handle[i].f, mtime_sec, mtime_nsec) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
s->state = STREAM_STATE_ERROR;
|
||||
s->state_index = i;
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __STREAM_H
|
||||
#define __STREAM_H
|
||||
#ifndef STREAM_H
|
||||
#define STREAM_H
|
||||
|
||||
#include "support.h"
|
||||
#include "util.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* stream */
|
||||
|
||||
#define STREAM_FLAGS_SEQUENTIAL 1 /**< Advise a squential read. */
|
||||
#define STREAM_FLAGS_CRC 2 /**< Enable the CRC computation. */
|
||||
#define STREAM_FLAGS_ADVISE_MASK 0xFF /**< Low bits containing one of ADVISE_*. */
|
||||
#define STREAM_FLAGS_CRC 0x100 /**< Enable the CRC computation. */
|
||||
#define STREAM_FLAGS_NOFOLLOW 0x200 /**< Don't follow the final symbolic link on open. */
|
||||
|
||||
/**
|
||||
* Size of the buffer of the stream.
|
||||
|
|
@ -64,25 +66,7 @@ struct stream {
|
|||
*/
|
||||
uint32_t crc_uncached;
|
||||
|
||||
/**
|
||||
* CRC of the data written to the stream.
|
||||
*
|
||||
* This is an extra check of the data that is written to
|
||||
* file to ensure that it's consistent even in case
|
||||
* of memory errors.
|
||||
*
|
||||
* This extra check takes about 2 seconds for each GB of
|
||||
* content file with the Intel CRC instruction,
|
||||
* and about 4 seconds without it.
|
||||
* But usually this doesn't slow down the write process,
|
||||
* as the disk is the bottle-neck.
|
||||
*
|
||||
* Note that this CRC doesn't have the IV processing.
|
||||
*
|
||||
* Not used in reading.
|
||||
* In writing, it's all the data wrote calling sput() functions.
|
||||
*/
|
||||
uint32_t crc_stream;
|
||||
struct advise_struct* advise; /**< Cache advice state for each handle. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -144,17 +128,13 @@ int64_t stell(STREAM* s);
|
|||
*/
|
||||
uint32_t scrc(STREAM* s);
|
||||
|
||||
/**
|
||||
* Get the CRC of the processed data in put.
|
||||
*/
|
||||
uint32_t scrc_stream(STREAM* s);
|
||||
|
||||
/**
|
||||
* Check if the buffer has enough data loaded.
|
||||
*/
|
||||
static inline int sptrlookup(STREAM* s, int size)
|
||||
static inline int sptrlookup(STREAM* s, size_t size)
|
||||
{
|
||||
return s->pos + size <= s->end;
|
||||
/* compute remaining distance to avoid pointer arithmetic out of buffer bounds */
|
||||
return size <= (size_t)(s->end - s->pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -210,6 +190,11 @@ static inline const char* serrorfile(STREAM* s)
|
|||
*/
|
||||
int ssync(STREAM* s);
|
||||
|
||||
/**
|
||||
* Change the modification time of all files in the stream.
|
||||
*/
|
||||
int smtime(STREAM* s, int64_t mtime_sec, int mtime_nsec);
|
||||
|
||||
/****************************************************************************/
|
||||
/* get */
|
||||
|
||||
|
|
@ -239,11 +224,26 @@ static inline void sungetc(int c, STREAM* s)
|
|||
--s->pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* \internal Used by sread() when the requested data crosses the buffered range.
|
||||
* \note Don't call this directly, but use sread().
|
||||
*/
|
||||
int sread_uncached(STREAM* f, void* void_data, size_t size);
|
||||
|
||||
/**
|
||||
* Read a fixed amount of chars.
|
||||
* Return 0 on success, or -1 on error.
|
||||
*/
|
||||
int sread(STREAM* f, void* void_data, unsigned size);
|
||||
static inline int sread(STREAM* f, void* void_data, size_t size)
|
||||
{
|
||||
if (tommy_unlikely(!sptrlookup(f, size)))
|
||||
return sread_uncached(f, void_data, size);
|
||||
|
||||
memcpy(void_data, f->pos, size);
|
||||
f->pos += size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a char from a stream, ignoring one '\r'.
|
||||
|
|
@ -283,19 +283,19 @@ static inline int sgetspace(STREAM* f)
|
|||
* Stop at the first ' ', '\t', '\n' or EOF.
|
||||
* Return <0 if the buffer is too small, or the number of chars read.
|
||||
*/
|
||||
int sgettok(STREAM* f, char* str, int size);
|
||||
ssize_t sgettok(STREAM* f, char* str, int size);
|
||||
|
||||
/**
|
||||
* Read until the end of line.
|
||||
* Stop at the first '\n' or EOF. Note that '\n' is left in the stream.
|
||||
* Return <0 if the buffer is too small, or the number of chars read.
|
||||
*/
|
||||
int sgetline(STREAM* f, char* str, int size);
|
||||
ssize_t sgetline(STREAM* f, char* str, int size);
|
||||
|
||||
/**
|
||||
* Like sgetline() but remove ' ' and '\t' at the end.
|
||||
*/
|
||||
int sgetlasttok(STREAM* f, char* str, int size);
|
||||
ssize_t sgetlasttok(STREAM* f, char* str, int size);
|
||||
|
||||
/**
|
||||
* Read a 32 bit number.
|
||||
|
|
@ -329,7 +329,7 @@ int sgetble32(STREAM* f, uint32_t* value);
|
|||
* Read a binary string.
|
||||
* Return -1 on error or if the buffer is too small, or the number of chars read.
|
||||
*/
|
||||
int sgetbs(STREAM* f, char* str, int size);
|
||||
ssize_t sgetbs(STREAM* f, char* str, size_t size);
|
||||
|
||||
/****************************************************************************/
|
||||
/* put */
|
||||
|
|
@ -345,16 +345,6 @@ static inline int sputc(int c, STREAM* s)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the crc *before* writing the data in the buffer
|
||||
*
|
||||
* This must be done before the memory write,
|
||||
* to be able to detect memory errors on the buffer,
|
||||
* happening before we write it on the file.
|
||||
*/
|
||||
if (s->flags & STREAM_FLAGS_CRC)
|
||||
s->crc_stream = crc32c_plain_char(s->crc_stream, c);
|
||||
|
||||
*s->pos++ = c;
|
||||
|
||||
return 0;
|
||||
|
|
@ -374,10 +364,25 @@ static inline int sputeol(STREAM* s)
|
|||
}
|
||||
|
||||
/**
|
||||
* Write a sized string.
|
||||
* \internal Used by swrite() when the data crosses the buffered range.
|
||||
* \note Don't call this directly, but use swrite().
|
||||
*/
|
||||
int swrite_uncached(const void* data, size_t size, STREAM* f);
|
||||
|
||||
/**
|
||||
* Write a sized buffer.
|
||||
* Return 0 on success or -1 on error.
|
||||
*/
|
||||
int swrite(const void* data, unsigned size, STREAM* f);
|
||||
static __always_inline int swrite(const void* data, size_t size, STREAM* f)
|
||||
{
|
||||
if (tommy_unlikely(!sptrlookup(f, size)))
|
||||
return swrite_uncached(data, size, f);
|
||||
|
||||
memcpy(f->pos, data, size);
|
||||
f->pos += size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* binary put */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,12 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SUPPORT_H
|
||||
#define __SUPPORT_H
|
||||
#ifndef SUPPORT_H
|
||||
#define SUPPORT_H
|
||||
|
||||
#include "app.h"
|
||||
#include "memory.h"
|
||||
#include "str.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* lock */
|
||||
|
|
@ -32,12 +36,6 @@ void lock_done(void);
|
|||
void lock_msg(void);
|
||||
void unlock_msg(void);
|
||||
|
||||
/**
|
||||
* Lock used for memory counter.
|
||||
*/
|
||||
void lock_memory(void);
|
||||
void unlock_memory(void);
|
||||
|
||||
/****************************************************************************/
|
||||
/* random */
|
||||
|
||||
|
|
@ -69,6 +67,11 @@ uint64_t random_u64(void);
|
|||
*/
|
||||
int is_hw(int err);
|
||||
|
||||
/**
|
||||
* Return the number of hardware errors logged so far.
|
||||
*/
|
||||
unsigned log_hardware_errors(void);
|
||||
|
||||
/**
|
||||
* Log errors with standard messages
|
||||
*/
|
||||
|
|
@ -88,8 +91,10 @@ typedef void log_ptr(int err, const char* format, ...) __attribute__((format(att
|
|||
*
|
||||
* Messages printed before an early termination.
|
||||
*
|
||||
* These messages go in the log file and in stderr unconditionally.
|
||||
* These messages go in the log file and in stderr, except in GUI mode
|
||||
* when the tagged log message is emitted successfully.
|
||||
*/
|
||||
void vlog_fatal(int err, const char* format, va_list ap, const char* post);
|
||||
void log_fatal(int err, const char* format, ...) __attribute__((format(attribute_printf, 2, 3)));
|
||||
|
||||
/**
|
||||
|
|
@ -103,8 +108,18 @@ void log_fatal(int err, const char* format, ...) __attribute__((format(attribute
|
|||
*
|
||||
* These messages go in the log file if specified, otherwise they go in stderr.
|
||||
*/
|
||||
void vlog_error(int err, const char* format, va_list ap, const char* post);
|
||||
void log_error(int err, const char* format, ...) __attribute__((format(attribute_printf, 2, 3)));
|
||||
|
||||
/**
|
||||
* Informational messages.
|
||||
*
|
||||
* Messages reporting general status information or warnings that do not indicate failure.
|
||||
*
|
||||
* These messages go in the log file if specified, otherwise they go in stderr.
|
||||
*/
|
||||
void log_info(int err, const char* format, ...) __attribute__((format(attribute_printf, 2, 3)));
|
||||
|
||||
/**
|
||||
* Expected error messages, without fallback to stderr.
|
||||
*
|
||||
|
|
@ -161,6 +176,11 @@ typedef void msg_ptr(const char* format, ...) __attribute__((format(attribute_pr
|
|||
*/
|
||||
extern int msg_level;
|
||||
|
||||
/**
|
||||
* Emit fatal messages on stderr also when a log is configured.
|
||||
*/
|
||||
extern int msg_fatal_stderr;
|
||||
|
||||
/**
|
||||
* State messages.
|
||||
*
|
||||
|
|
@ -238,7 +258,7 @@ void printl(const char* str, size_t pad);
|
|||
void printp(double v, size_t pad);
|
||||
|
||||
/****************************************************************************/
|
||||
/* string */
|
||||
/* escape */
|
||||
|
||||
#define ESC_MAX (PATH_MAX * 2 + 1)
|
||||
#define ESC_POOL_MAX 8
|
||||
|
|
@ -266,40 +286,6 @@ static inline const char* esc_shell(const char* str, char* buffer)
|
|||
return esc_shell_multi(&str, 1, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polish a string.
|
||||
*
|
||||
* Not printable chars are replaced by spaces.
|
||||
*
|
||||
* Note that the passed string is modified.
|
||||
*/
|
||||
char* strpolish(char* s);
|
||||
|
||||
/**
|
||||
* Split a string in multiple tokens separated by delimiters.
|
||||
*
|
||||
* Multiple delimiters are grouped together.
|
||||
*/
|
||||
unsigned strsplit(char** split_map, unsigned split_max, char* line, const char* delimiters);
|
||||
|
||||
/**
|
||||
* Trim spaces from the start and the end
|
||||
*/
|
||||
char* strtrim(char* s);
|
||||
|
||||
/**
|
||||
* Lower case
|
||||
*/
|
||||
char* strlwr(char* s);
|
||||
|
||||
/*
|
||||
* Find the first occurrence of 'needle' in 'haystack' only if it
|
||||
* appears as a separate word (space, number or string boundaries).
|
||||
*
|
||||
* Returns a pointer to the beginning of the match, or NULL if not found.
|
||||
*/
|
||||
char* worddigitstr(const char* haystack, const char* needle);
|
||||
|
||||
/****************************************************************************/
|
||||
/* path */
|
||||
|
||||
|
|
@ -360,12 +346,25 @@ void pathslash(char* dst, size_t size);
|
|||
*/
|
||||
void pathcut(char* dst);
|
||||
|
||||
/**
|
||||
* Given a string ending with slash, remove that ending slash and any char up to the previous slash.
|
||||
*
|
||||
* If there are not more slash, it returns the empty string.
|
||||
*/
|
||||
void pathup(char* dst);
|
||||
|
||||
/**
|
||||
* Compare two paths.
|
||||
* In Windows it's case insensitive and assumes \ equal at /.
|
||||
*/
|
||||
int pathcmp(const char* a, const char* b);
|
||||
|
||||
/**
|
||||
* Compare two paths up to n chars.
|
||||
* In Windows it's case insensitive and assumes \ equal at /.
|
||||
*/
|
||||
int pathncmp(const char* a, const char* b, size_t n);
|
||||
|
||||
/**
|
||||
* Check if the root is matching the start of the specified path.
|
||||
*
|
||||
|
|
@ -375,6 +374,18 @@ int pathcmp(const char* a, const char* b);
|
|||
*/
|
||||
int path_is_root_of(const char* root, const char* path);
|
||||
|
||||
/**
|
||||
* Check if the path is a canonical relative sub-path.
|
||||
*
|
||||
* A valid sub-path must:
|
||||
* - Not be empty
|
||||
* - Not start or end with a slash '/'
|
||||
* - Not contain backslashes '\\' (on Windows)
|
||||
* - Not start with a drive letter (e.g., "C:" on Windows)
|
||||
* - Not contain empty components ("//"), "." or ".."
|
||||
*/
|
||||
int path_is_sub(const char* sub);
|
||||
|
||||
/****************************************************************************/
|
||||
/* file-system */
|
||||
|
||||
|
|
@ -423,38 +434,7 @@ int advise_flags(struct advise_struct* advise);
|
|||
int advise_open(struct advise_struct* advise, int f);
|
||||
int advise_write(struct advise_struct* advise, int f, data_off_t offset, data_off_t size);
|
||||
int advise_read(struct advise_struct* advise, int f, data_off_t offset, data_off_t size);
|
||||
void advise_close(struct advise_struct* advise, int f);
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
||||
/**
|
||||
* Return the size of the cumulative allocated memory.
|
||||
*/
|
||||
size_t malloc_counter_get(void);
|
||||
|
||||
/**
|
||||
* Safe malloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* malloc_nofail(size_t size);
|
||||
|
||||
/**
|
||||
* Safe cmalloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* calloc_nofail(size_t count, size_t size);
|
||||
|
||||
/**
|
||||
* Safe strdup.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
char* strdup_nofail(const char* str);
|
||||
|
||||
/**
|
||||
* Helper for printing an error about a failed allocation.
|
||||
*/
|
||||
void malloc_fail(size_t size);
|
||||
int advise_close(struct advise_struct* advise, int f);
|
||||
|
||||
/****************************************************************************/
|
||||
/* smartctl */
|
||||
|
|
@ -463,12 +443,12 @@ void malloc_fail(size_t size);
|
|||
* Read smartctl attributes from a stream.
|
||||
* Return 0 on success.
|
||||
*/
|
||||
int smartctl_attribute(FILE* f, const char* file, const char* name, struct smart_attr* smart, uint64_t* info, char* serial, char* family, char* model, char* interf);
|
||||
int smartctl_attribute(OS_FILE* f, const char* file, const char* name, struct smart_attr* smart, uint64_t* info, char* serial, char* family, char* model, char* interf);
|
||||
|
||||
/**
|
||||
* Flush smartctl output from a stream.
|
||||
*/
|
||||
int smartctl_flush(FILE* f, const char* file, const char* name);
|
||||
int smartctl_flush(OS_FILE* f, const char* file, const char* name);
|
||||
|
||||
/**
|
||||
* Extract the temperature from the SMART info.
|
||||
|
|
@ -512,30 +492,5 @@ void* thread_getspecific(thread_key_t key);
|
|||
int thread_setspecific(thread_key_t key, void* value);
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* match */
|
||||
|
||||
/*
|
||||
* Wild match function.
|
||||
*
|
||||
* If match_sub is !=0, it matches sub directory. Specifically it matches if the
|
||||
* string "t" is not fully consumed and the next character to consume is a /.
|
||||
*
|
||||
* - ? matches any single character except /
|
||||
* - * matches any sequence of characters except /
|
||||
* - ** (nearby a /) matches everything including /
|
||||
* - ** (not near a /) like *
|
||||
* - ##/ reduces to nothing in addition to the normal matching of ** (using # instead of * to not mess the C comment)
|
||||
* - [...] matches character classes with support for ranges and negation lile [!...] or [^...], except /
|
||||
*
|
||||
* \return 0 if it matches
|
||||
*/
|
||||
int wnmatch_sub(const char* p, const char* t, int match_sub);
|
||||
|
||||
static inline int wnmatch(const char* p, const char* t)
|
||||
{
|
||||
return wnmatch_sub(p, t, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
1248
cmdline/sync.c
1248
cmdline/sync.c
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +1,14 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "thermal.h"
|
||||
#include "state.h"
|
||||
#include "io.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
struct snapraid_thermal* thermal_alloc(uint64_t dev, const char* name)
|
||||
{
|
||||
|
|
@ -16,17 +17,20 @@ struct snapraid_thermal* thermal_alloc(uint64_t dev, const char* name)
|
|||
thermal->device = dev;
|
||||
thermal->latest_temperature = 0;
|
||||
thermal->count = 0;
|
||||
memset(&thermal->params, 0, sizeof(thermal->params));
|
||||
pathcpy(thermal->name, sizeof(thermal->name), name);
|
||||
|
||||
return thermal;
|
||||
}
|
||||
|
||||
void thermal_free(struct snapraid_thermal* thermal)
|
||||
void thermal_free(void* void_thermal)
|
||||
{
|
||||
struct snapraid_thermal* thermal = void_thermal;
|
||||
|
||||
free(thermal);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fit exponential heating model to data using least squares
|
||||
*/
|
||||
struct snapraid_thermal_params fit_thermal_model(const struct snapraid_thermal_point* points, int n_points, double t_ambient)
|
||||
|
|
@ -103,12 +107,18 @@ struct snapraid_thermal_params fit_thermal_model(const struct snapraid_thermal_p
|
|||
}
|
||||
|
||||
model.rmse = sqrt(sum_squared_residuals / n_points);
|
||||
model.r_squared = 1.0 - (sum_squared_residuals / sum_total);
|
||||
|
||||
/* avoid sum_total underflow and division by zero */
|
||||
if (sum_total > FLT_EPSILON) {
|
||||
model.r_squared = 1.0 - (sum_squared_residuals / sum_total);
|
||||
} else {
|
||||
model.r_squared = 1.0;
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
void state_thermal(struct snapraid_state* state, time_t now)
|
||||
int state_thermal(struct snapraid_state* state, time_t now)
|
||||
{
|
||||
tommy_node* i;
|
||||
unsigned j;
|
||||
|
|
@ -117,7 +127,12 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
int ret;
|
||||
|
||||
if (state->thermal_temperature_limit == 0)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
/* reset the current highest temperature to ensure fail-open on measurement failure */
|
||||
state->thermal_highest_temperature = 0;
|
||||
|
||||
state_devmap(state);
|
||||
|
||||
tommy_list_init(&high);
|
||||
tommy_list_init(&low);
|
||||
|
|
@ -129,10 +144,12 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
|
||||
entry = calloc_nofail(1, sizeof(devinfo_t));
|
||||
|
||||
entry->device = disk->device;
|
||||
entry->device = disk->mount_device;
|
||||
device_name_set(entry, disk->name, 0);
|
||||
pathcpy(entry->mount, sizeof(entry->mount), disk->dir);
|
||||
entry->is_array = 1;
|
||||
pathcpy(entry->mount, sizeof(entry->mount), disk->mount_point);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), disk->smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), disk->smartctl_info);
|
||||
memcpy(entry->smartignore, disk->smartignore, sizeof(entry->smartignore));
|
||||
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
|
|
@ -148,8 +165,10 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
|
||||
entry->device = state->parity[j].split_map[s].device;
|
||||
device_name_set(entry, lev_config_name(j), s);
|
||||
entry->is_array = 1;
|
||||
pathcpy(entry->mount, sizeof(entry->mount), state->parity[j].split_map[s].path);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), state->parity[j].smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), state->parity[j].smartctl_info);
|
||||
memcpy(entry->smartignore, state->parity[j].smartignore, sizeof(entry->smartignore));
|
||||
pathcut(entry->mount); /* remove the parity file */
|
||||
|
||||
|
|
@ -164,40 +183,46 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
if (state->opt.fake_device) {
|
||||
ret = devtest(&high, &low, DEVICE_SMART);
|
||||
} else {
|
||||
ret = devquery(&high, &low, DEVICE_SMART);
|
||||
ret = devquery(&high, &low);
|
||||
if (ret == 0 && !tommy_list_empty(&low))
|
||||
ret = devrun(&low, DEVICE_SMART);
|
||||
}
|
||||
|
||||
/* on error, just disable thermal gathering */
|
||||
if (ret != 0)
|
||||
return;
|
||||
goto bail_error;
|
||||
|
||||
/* if the list is empty, it's not supported in this platform */
|
||||
if (tommy_list_empty(&low))
|
||||
return;
|
||||
goto bail_error;
|
||||
|
||||
/* report new attribute */
|
||||
state_attr(state, &low);
|
||||
|
||||
/* if ambient temperature is not set, set it now with the lowest HD temperature */
|
||||
/* if ambient temperature is not set, get the system temperature or fallback to the lowest HD temperature */
|
||||
if (state->thermal_ambient_temperature == 0) {
|
||||
state->thermal_ambient_temperature = ambient_temperature();
|
||||
state->thermal_system_temperature = ambient_temperature();
|
||||
state->thermal_ambient_temperature = state->thermal_system_temperature;
|
||||
|
||||
for (i = tommy_list_head(&low); i != 0; i = i->next) {
|
||||
devinfo_t* devinfo = i->data;
|
||||
if (state->thermal_ambient_temperature == 0) {
|
||||
for (i = tommy_list_head(&low); i != 0; i = i->next) {
|
||||
devinfo_t* devinfo = i->data;
|
||||
|
||||
int temp = smart_temp(devinfo);
|
||||
if (temp < 0)
|
||||
continue;
|
||||
int temp = smart_temp(devinfo);
|
||||
if (temp < 0)
|
||||
continue;
|
||||
|
||||
log_tag("thermal:system:candidate:%d\n", temp);
|
||||
log_tag("thermal:system:candidate:%d\n", temp);
|
||||
|
||||
if (state->thermal_ambient_temperature == 0 || state->thermal_ambient_temperature > temp)
|
||||
state->thermal_ambient_temperature = temp;
|
||||
if (state->thermal_ambient_temperature == 0 || state->thermal_ambient_temperature > temp)
|
||||
state->thermal_ambient_temperature = temp;
|
||||
}
|
||||
}
|
||||
|
||||
log_tag("thermal:system:final:%d\n", state->thermal_ambient_temperature);
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
int highest_temperature = 0;
|
||||
for (i = tommy_list_head(&low); i != 0; i = i->next) {
|
||||
tommy_node* t;
|
||||
|
|
@ -209,6 +234,8 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
if (temperature < 0)
|
||||
continue;
|
||||
|
||||
++count;
|
||||
|
||||
/* search of the entry */
|
||||
found = 0;
|
||||
for (t = tommy_list_head(&state->thermallist); t != 0; t = t->next) {
|
||||
|
|
@ -244,7 +271,7 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
|
||||
/* insert the new data point */
|
||||
found->data[found->count].temperature = temperature;
|
||||
found->data[found->count].time = now - state->thermal_first;
|
||||
found->data[found->count].time = state->thermal_latest - state->thermal_first;
|
||||
++found->count;
|
||||
|
||||
if (state->opt.fake_device) {
|
||||
|
|
@ -276,6 +303,10 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
found->params.rmse, found->params.r_squared, found->params.max_error);
|
||||
}
|
||||
|
||||
/* if no valid temperature was collected, report failure */
|
||||
if (count == 0)
|
||||
goto bail_error;
|
||||
|
||||
/* always update the highest temperature */
|
||||
state->thermal_highest_temperature = highest_temperature;
|
||||
|
||||
|
|
@ -284,6 +315,12 @@ void state_thermal(struct snapraid_state* state, time_t now)
|
|||
|
||||
tommy_list_foreach(&high, free);
|
||||
tommy_list_foreach(&low, free);
|
||||
return 0;
|
||||
|
||||
bail_error:
|
||||
tommy_list_foreach(&high, free);
|
||||
tommy_list_foreach(&low, free);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int state_thermal_alarm(struct snapraid_state* state)
|
||||
|
|
@ -300,42 +337,66 @@ int state_thermal_alarm(struct snapraid_state* state)
|
|||
|
||||
void state_thermal_cooldown(struct snapraid_state* state)
|
||||
{
|
||||
int sleep_time = state->thermal_cooldown_time;
|
||||
int cooldown_time = state->thermal_cooldown_time;
|
||||
|
||||
if (sleep_time == 0)
|
||||
sleep_time = 5 * 60; /* default sleep time */
|
||||
if (sleep_time < 3 * 60)
|
||||
sleep_time = 3 * 60; /* minimum sleep time */
|
||||
if (cooldown_time == 0)
|
||||
cooldown_time = 5 * 60; /* default sleep time */
|
||||
if (cooldown_time < 3 * 60)
|
||||
cooldown_time = 3 * 60; /* minimum sleep time */
|
||||
|
||||
/* from now on, stop any further data gathering as the heating is interrupted */
|
||||
state->thermal_stop_gathering = 1;
|
||||
|
||||
log_tag("thermal:spindown\n");
|
||||
state_device(state, DEVICE_DOWN, 0);
|
||||
for (;;) {
|
||||
int sleep_time = cooldown_time;
|
||||
|
||||
msg_progress("Cooldown...\n");
|
||||
log_tag("thermal:spindown\n");
|
||||
|
||||
log_tag("thermal:cooldown:%d\n", sleep_time);
|
||||
printf("Waiting for %d minutes...\n", sleep_time / 60);
|
||||
/*
|
||||
* Power management is best effort.
|
||||
*
|
||||
* Some devices may not support explicit spindown/spinup operations, or an
|
||||
* operation may fail only for a subset of the devices. This must not make the
|
||||
* whole thermal cooldown fail.
|
||||
*
|
||||
* Thermal safety is enforced by measuring the temperatures again after the
|
||||
* cooldown. If any disk is still above the configured limit, the cooldown is
|
||||
* repeated. Therefore failure to spin down a device only makes cooling less
|
||||
* effective; it does not allow the operation to resume while a measurable disk
|
||||
* is still above the temperature limit.
|
||||
*/
|
||||
state_device_force(state, DEVICE_DOWN, 0, 1);
|
||||
|
||||
log_flush();
|
||||
msg_progress("Cooldown...\n");
|
||||
|
||||
/* every 30 seconds spin down any disk that was spunup */
|
||||
while (sleep_time > 0) {
|
||||
state_device(state, DEVICE_DOWNIFUP, 0);
|
||||
log_tag("thermal:cooldown:%d\n", sleep_time);
|
||||
printf("Waiting for %d minutes...\n", sleep_time / 60);
|
||||
|
||||
sleep(30);
|
||||
sleep_time -= 30;
|
||||
}
|
||||
log_flush();
|
||||
|
||||
/* every 30 seconds spin down any disk that was spunup */
|
||||
while (sleep_time > 0 && !os_signal_interrupt()) {
|
||||
state_device_force(state, DEVICE_DOWNIFUP, 0, 1);
|
||||
|
||||
sleep(30);
|
||||
sleep_time -= 30;
|
||||
}
|
||||
|
||||
if (os_signal_interrupt())
|
||||
break; /* don't wake-up if we are interrupting */
|
||||
|
||||
if (!global_interrupt) { /* don't wake-up if we are interrupting */
|
||||
log_tag("thermal:spinup\n");
|
||||
|
||||
/* spinup */
|
||||
state_device(state, DEVICE_UP, 0);
|
||||
|
||||
/* log new thermal info */
|
||||
state_thermal(state, 0);
|
||||
if (state_thermal(state, time(0)) != 0)
|
||||
break;
|
||||
|
||||
/* repeat the cooldown if the temperature is still outside the operating range */
|
||||
if (!state_thermal_alarm(state))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -345,16 +406,16 @@ int state_thermal_begin(struct snapraid_state* state, time_t now)
|
|||
return 1;
|
||||
|
||||
/* initial thermal measure */
|
||||
state->thermal_first = now;
|
||||
state->thermal_latest = now;
|
||||
state->thermal_first = os_tick_sec();
|
||||
state->thermal_latest = state->thermal_first;
|
||||
state_thermal(state, now);
|
||||
|
||||
if (state->thermal_ambient_temperature != 0) {
|
||||
printf("System temperature is %u degrees\n", state->thermal_ambient_temperature);
|
||||
if (state->thermal_system_temperature != 0) {
|
||||
printf("System temperature is %u degrees\n", state->thermal_system_temperature);
|
||||
|
||||
if (state->thermal_temperature_limit != 0 && state->thermal_temperature_limit <= state->thermal_ambient_temperature) {
|
||||
if (state->thermal_temperature_limit != 0 && state->thermal_temperature_limit <= state->thermal_system_temperature) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EENVIRONMENT, "DANGER! System temperature of %d degrees is higher than the temperature limit of %d degrees. Unable to proceed!\n", state->thermal_ambient_temperature, state->thermal_temperature_limit);
|
||||
log_fatal(EENVIRONMENT, "DANGER! System temperature of %d degrees is higher than the temperature limit of %d degrees. Unable to proceed!\n", state->thermal_system_temperature, state->thermal_temperature_limit);
|
||||
log_flush();
|
||||
return 0;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
@ -362,11 +423,8 @@ int state_thermal_begin(struct snapraid_state* state, time_t now)
|
|||
}
|
||||
|
||||
if (state_thermal_alarm(state)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EENVIRONMENT, "DANGER! Hard disk temperature of %d degrees is already outside the operating range. Unable to proceed!\n", state->thermal_highest_temperature);
|
||||
log_flush();
|
||||
return 0;
|
||||
/* LCOV_EXCL_STOP */
|
||||
msg_progress("Hard disk temperature of %d degrees is already outside the operating range. Cooling down before starting...\n", state->thermal_highest_temperature);
|
||||
state_thermal_cooldown(state);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#ifndef __THERMAL_H
|
||||
#define __THERMAL_H
|
||||
#ifndef THERMAL_H
|
||||
#define THERMAL_H
|
||||
|
||||
#include "elem.h"
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ struct snapraid_thermal* thermal_alloc(uint64_t dev, const char* name);
|
|||
/**
|
||||
* Deallocate a thermal state.
|
||||
*/
|
||||
void thermal_free(struct snapraid_thermal* thermal);
|
||||
void thermal_free(void* void_thermal);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2014 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "elem.h"
|
||||
#include "state.h"
|
||||
#include "handle.h"
|
||||
|
||||
void state_touch(struct snapraid_state* state)
|
||||
int state_touch(struct snapraid_state* state)
|
||||
{
|
||||
tommy_node* i;
|
||||
unsigned counter = 0;
|
||||
int error = 0;
|
||||
|
||||
msg_progress("Setting sub-second timestamps...\n");
|
||||
|
||||
|
|
@ -24,9 +25,11 @@ void state_touch(struct snapraid_state* state)
|
|||
for (j = disk->filelist; j != 0; j = j->next) {
|
||||
struct snapraid_file* file = j->data;
|
||||
|
||||
/* if the file has a zero nanosecond timestamp */
|
||||
/* note that symbolic links are not in the file list */
|
||||
/* and then are not processed */
|
||||
/*
|
||||
* If the file has a zero nanosecond timestamp
|
||||
* note that symbolic links are not in the file list
|
||||
* and then are not processed
|
||||
*/
|
||||
if (file->mtime_nsec == 0) {
|
||||
char path[PATH_MAX];
|
||||
struct stat st;
|
||||
|
|
@ -42,7 +45,7 @@ void state_touch(struct snapraid_state* state)
|
|||
uint32_t nano;
|
||||
|
||||
/* get a random nanosecond value */
|
||||
if (randomize(&nano, sizeof(nano)) != 0) {
|
||||
if (os_randomize(&nano, sizeof(nano)) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(errno, "Failed to retrieve random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -52,8 +55,10 @@ void state_touch(struct snapraid_state* state)
|
|||
nsec = nano % 1000000000;
|
||||
} while (nsec == 0);
|
||||
|
||||
/* O_BINARY: open as binary file (Windows only) */
|
||||
/* O_NOFOLLOW: do not follow links to ensure to open the real file */
|
||||
/*
|
||||
* O_BINARY: open as binary file (Windows only)
|
||||
* O_NOFOLLOW: do not follow links to ensure to open the real file
|
||||
*/
|
||||
flags = O_BINARY | O_NOFOLLOW;
|
||||
#ifdef _WIN32
|
||||
/* in Windows we must have write access at the file */
|
||||
|
|
@ -76,6 +81,7 @@ void state_touch(struct snapraid_state* state)
|
|||
f = open(path, flags);
|
||||
if (windows_set_file_attributes(path, attributes) != 0) {
|
||||
log_error(errno, "Error restoring read-only attribute for '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -84,41 +90,71 @@ void state_touch(struct snapraid_state* state)
|
|||
}
|
||||
#endif
|
||||
if (f == -1) {
|
||||
/*
|
||||
* Ignore missing files because they may have been deleted
|
||||
* or moved since the last sync. Also ignore symbolic links
|
||||
* which fail with ELOOP due to O_NOFOLLOW.
|
||||
*/
|
||||
if (errno == ENOENT || errno == ENOTDIR || errno == ELOOP)
|
||||
continue;
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error opening file '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
continue;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* get the present timestamp, that may be different than the one */
|
||||
/* in the content file */
|
||||
/*
|
||||
* Get the present timestamp, that may be different than the one
|
||||
* in the content file
|
||||
*/
|
||||
ret = fstat(f, &st);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(f);
|
||||
log_error(errno, "Error accessing file '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
continue;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/*
|
||||
* Touch only regular files that are still unchanged compared to
|
||||
* the content file. Otherwise changing the timestamp here
|
||||
* could hide a modification from the following scan.
|
||||
*/
|
||||
if (!S_ISREG(st.st_mode)
|
||||
|| st.st_size != file->size
|
||||
|| st.st_mtime != file->mtime_sec
|
||||
|| STAT_NSEC(&st) != file->mtime_nsec
|
||||
) {
|
||||
close(f);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* set the tweaked modification time, with new nano seconds */
|
||||
ret = fmtime(f, st.st_mtime, nsec);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(f);
|
||||
log_error(errno, "Error timing file '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
continue;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* uses fstat again to get the present timestamp */
|
||||
/* this is needed because the value read */
|
||||
/* may be different than the written one */
|
||||
/*
|
||||
* Uses fstat again to get the present timestamp
|
||||
* this is needed because the value read
|
||||
* may be different than the written one
|
||||
*/
|
||||
ret = fstat(f, &st);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
close(f);
|
||||
log_error(errno, "Error accessing file '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
continue;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -128,14 +164,17 @@ void state_touch(struct snapraid_state* state)
|
|||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_error(errno, "Error closing file '%s'. %s.\n", path, strerror(errno));
|
||||
++error;
|
||||
continue;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* set the same nanosecond value in the content file */
|
||||
/* note that if the seconds value is already matching */
|
||||
/* the file won't be synced because the content file will */
|
||||
/* contain the new updated timestamp */
|
||||
/*
|
||||
* Set the same nanosecond value in the content file
|
||||
* note that if the seconds value is already matching
|
||||
* the file won't be synced because the content file will
|
||||
* contain the new updated timestamp
|
||||
*/
|
||||
file->mtime_nsec = STAT_NSEC(&st);
|
||||
|
||||
/* state changed, we need to update it */
|
||||
|
|
@ -151,5 +190,9 @@ void state_touch(struct snapraid_state* state)
|
|||
|
||||
msg_status("\n");
|
||||
msg_status("%8u touched files\n", counter);
|
||||
|
||||
if (error != 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
2789
cmdline/unix.c
2789
cmdline/unix.c
File diff suppressed because it is too large
Load diff
|
|
@ -1,73 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __UNIX_H
|
||||
#define __UNIX_H
|
||||
|
||||
#ifdef __linux__
|
||||
#define HAVE_LINUX_DEVICE 1 /**< In Linux enables special device support. */
|
||||
#define HAVE_DIRECT_IO 1 /**< Support O_DIRECT in open(). */
|
||||
#endif
|
||||
|
||||
#define O_BINARY 0 /**< Not used in Unix. */
|
||||
#define O_SEQUENTIAL 0 /**< In Unix posix_fadvise() shall be used. */
|
||||
|
||||
|
||||
#if HAVE_POSIX_FADVISE
|
||||
int posix_fadvise_wrapper(int fd, off_t offset, off_t len, int advice);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If nanoseconds are not supported, we report the special STAT_NSEC_INVALID value,
|
||||
* to mark that it's undefined.
|
||||
*/
|
||||
#define STAT_NSEC_INVALID -1
|
||||
|
||||
/* Check if we have nanoseconds support */
|
||||
#if HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
|
||||
#define STAT_NSEC(st) ((int)(st)->st_mtim.tv_nsec) /* Linux */
|
||||
#elif HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
#define STAT_NSEC(st) ((int)(st)->st_mtimensec) /* NetBSD */
|
||||
#elif HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
|
||||
#define STAT_NSEC(st) ((int)(st)->st_mtimespec.tv_nsec) /* FreeBSD, Mac OS X */
|
||||
#else
|
||||
#define STAT_NSEC(st) STAT_NSEC_INVALID
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Open a file with the O_NOATIME flag to avoid to update the access time.
|
||||
*/
|
||||
int open_noatime(const char* file, int flags);
|
||||
|
||||
/**
|
||||
* Check if the specified file is hidden.
|
||||
*/
|
||||
int dirent_hidden(struct dirent* dd);
|
||||
|
||||
/**
|
||||
* Return a description of the file type.
|
||||
*/
|
||||
const char* stat_desc(struct stat* st);
|
||||
|
||||
/**
|
||||
* Return the alignment requirement for direct IO.
|
||||
*/
|
||||
size_t direct_size(void);
|
||||
|
||||
/****************************************************************************/
|
||||
/* thread */
|
||||
|
||||
#if HAVE_PTHREAD_H
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_PTHREAD_CREATE
|
||||
#define HAVE_THREAD 1
|
||||
typedef pthread_t thread_id_t;
|
||||
typedef pthread_mutex_t thread_mutex_t;
|
||||
typedef pthread_cond_t thread_cond_t;
|
||||
typedef pthread_key_t thread_key_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
5138
cmdline/unixapp.c
Normal file
5138
cmdline/unixapp.c
Normal file
File diff suppressed because it is too large
Load diff
410
cmdline/util.c
410
cmdline/util.c
|
|
@ -1,12 +1,13 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#include "portable.h"
|
||||
#include "os/portable.h"
|
||||
|
||||
#include "support.h"
|
||||
#include "util.h"
|
||||
#include "raid/cpu.h"
|
||||
#include "raid/memory.h"
|
||||
#include "tommyds/tommyhash.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
|
@ -43,11 +44,11 @@ void* malloc_nofail_direct(size_t size, void** freeptr)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void** malloc_nofail_vector_align(int nd, int n, size_t size, void** freeptr)
|
||||
void** malloc_nofail_vector_align(int n, size_t size, void** freeptr)
|
||||
{
|
||||
void* ptr;
|
||||
|
||||
ptr = raid_malloc_vector(nd, n, size, freeptr);
|
||||
ptr = raid_malloc_vector(n, size, freeptr);
|
||||
|
||||
if (!ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -59,11 +60,11 @@ void** malloc_nofail_vector_align(int nd, int n, size_t size, void** freeptr)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void** malloc_nofail_vector_direct(int nd, int n, size_t size, void** freeptr)
|
||||
void** malloc_nofail_vector_direct(int n, size_t size, void** freeptr)
|
||||
{
|
||||
void* ptr;
|
||||
|
||||
ptr = raid_malloc_vector_align(nd, n, size, direct_size(), 0, freeptr);
|
||||
ptr = raid_malloc_vector_align(n, size, direct_size(), 0, 0, freeptr);
|
||||
|
||||
if (!ptr) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -75,50 +76,9 @@ void** malloc_nofail_vector_direct(int nd, int n, size_t size, void** freeptr)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void* malloc_nofail_test(size_t size)
|
||||
{
|
||||
void* ptr;
|
||||
|
||||
ptr = malloc_nofail(size);
|
||||
|
||||
mtest_vector(1, size, &ptr);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fast memory test.
|
||||
*
|
||||
* It's similar at raid_mtest_vector() but faster because
|
||||
* we have a lot of buffers to verify.
|
||||
*/
|
||||
static int fast_mtest_vector(int n, size_t size, void** vv)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
/* test with all the bits */
|
||||
for (i = 0; i < 8; ++i) {
|
||||
unsigned char value = 1 << i;
|
||||
|
||||
/* fill first */
|
||||
memset(vv[0], value, size);
|
||||
|
||||
/* copy to the next */
|
||||
for (j = 1; j < n; ++j)
|
||||
memcpy(vv[j], vv[j - 1], size);
|
||||
|
||||
/* compare with the previous */
|
||||
for (j = 1; j <= n; ++j)
|
||||
if (memcmp(vv[j % n], vv[j - 1], size) != 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mtest_vector(int n, size_t size, void** vv)
|
||||
{
|
||||
if (fast_mtest_vector(n, size, vv) != 0) {
|
||||
if (raid_mtest_vector(n, size, vv) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EINTERNAL, "DANGER! Your RAM memory is broken! DO NOT PROCEED UNTIL FIXED!\n");
|
||||
log_fatal(EINTERNAL, "Try running a memory test like http://www.memtest86.com/\n");
|
||||
|
|
@ -398,11 +358,91 @@ uint32_t CRC32C_3[256] = {
|
|||
0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842
|
||||
};
|
||||
|
||||
#if HAVE_SSE42
|
||||
int crc_x86;
|
||||
#ifdef CONFIG_X86_64
|
||||
uint32_t CRC32C_X86_64_SKIP[6][8][16];
|
||||
#endif
|
||||
|
||||
uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
#if CONFIG_ARM_CRC
|
||||
uint32_t CRC32C_ARM64_SKIP[6][8][16];
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_X86_64) || CONFIG_ARM_CRC
|
||||
static uint32_t crc32c_shift_table[sizeof(size_t) * 8][32];
|
||||
|
||||
static uint32_t crc32c_matrix_times(const uint32_t* matrix, uint32_t vector)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
|
||||
while (vector) {
|
||||
if (vector & 1)
|
||||
value ^= *matrix;
|
||||
vector >>= 1;
|
||||
++matrix;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static void crc32c_matrix_square(uint32_t* square, const uint32_t* matrix)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < 32; ++i)
|
||||
square[i] = crc32c_matrix_times(matrix, matrix[i]);
|
||||
}
|
||||
|
||||
static void crc32c_shift_init(void)
|
||||
{
|
||||
uint32_t matrix[32];
|
||||
uint32_t square[32];
|
||||
uint32_t row;
|
||||
unsigned i;
|
||||
|
||||
/* reflected Castagnoli polynomial, represented as one zero-bit operator. */
|
||||
matrix[0] = 0x82f63b78;
|
||||
row = 1;
|
||||
for (i = 1; i < 32; ++i) {
|
||||
matrix[i] = row;
|
||||
row <<= 1;
|
||||
}
|
||||
|
||||
/* square three times to obtain the operator for one zero byte. */
|
||||
crc32c_matrix_square(square, matrix);
|
||||
crc32c_matrix_square(matrix, square);
|
||||
crc32c_matrix_square(crc32c_shift_table[0], matrix);
|
||||
|
||||
for (i = 1; i < sizeof(size_t) * 8; ++i)
|
||||
crc32c_matrix_square(crc32c_shift_table[i], crc32c_shift_table[i - 1]);
|
||||
}
|
||||
|
||||
uint32_t crc32c_shift(uint32_t crc, size_t size)
|
||||
{
|
||||
unsigned i = 0;
|
||||
|
||||
while (size) {
|
||||
if (size & 1)
|
||||
crc = crc32c_matrix_times(crc32c_shift_table[i], crc);
|
||||
size >>= 1;
|
||||
++i;
|
||||
}
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
static void crc32c_skip_init(uint32_t table[8][16], size_t size)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned j;
|
||||
|
||||
/* collapse each fixed-size shift into eight nibble table lookups. */
|
||||
for (i = 0; i < 8; ++i) {
|
||||
for (j = 0; j < 16; ++j)
|
||||
table[i][j] = crc32c_shift((uint32_t)j << (4 * i), size);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
crc ^= CRC_IV;
|
||||
|
||||
|
|
@ -413,8 +453,9 @@ uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, unsigned size)
|
|||
return crc;
|
||||
}
|
||||
|
||||
#if HAVE_SSE42
|
||||
uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
#if CONFIG_X86
|
||||
__aligned_loops(64)
|
||||
uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
crc ^= CRC_IV;
|
||||
|
||||
|
|
@ -426,48 +467,80 @@ uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, unsigned size)
|
|||
}
|
||||
#endif
|
||||
|
||||
uint32_t (*crc32c)(uint32_t crc, const unsigned char* ptr, unsigned size);
|
||||
#if CONFIG_ARM_CRC
|
||||
__aligned_loops(64)
|
||||
uint32_t crc32c_arm64(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
crc ^= CRC_IV;
|
||||
|
||||
crc = crc32c_arm64_plain(crc, ptr, size);
|
||||
|
||||
crc ^= CRC_IV;
|
||||
|
||||
return crc;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t (*crc32c)(uint32_t crc, const unsigned char* ptr, size_t size);
|
||||
|
||||
void crc32c_init(void)
|
||||
{
|
||||
crc32c = crc32c_gen;
|
||||
#if HAVE_SSE42
|
||||
#if CONFIG_X86
|
||||
if (raid_cpu_has_crc32()) {
|
||||
crc_x86 = 1;
|
||||
#ifdef CONFIG_X86_64
|
||||
crc32c_shift_init();
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[0], CRC32C_X86_64_BLOCK0_SIZE);
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[1], CRC32C_X86_64_BLOCK1_SIZE);
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[2], CRC32C_X86_64_BLOCK2_SIZE);
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[3], CRC32C_X86_64_BLOCK3_SIZE);
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[4], CRC32C_X86_64_BLOCK4_SIZE);
|
||||
crc32c_skip_init(CRC32C_X86_64_SKIP[5], CRC32C_X86_64_BLOCK5_SIZE);
|
||||
#endif
|
||||
crc32c = crc32c_x86;
|
||||
}
|
||||
#endif
|
||||
#if CONFIG_ARM_CRC
|
||||
crc32c_shift_init();
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[0], CRC32C_ARM64_BLOCK0_SIZE);
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[1], CRC32C_ARM64_BLOCK1_SIZE);
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[2], CRC32C_ARM64_BLOCK2_SIZE);
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[3], CRC32C_ARM64_BLOCK3_SIZE);
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[4], CRC32C_ARM64_BLOCK4_SIZE);
|
||||
crc32c_skip_init(CRC32C_ARM64_SKIP[5], CRC32C_ARM64_BLOCK5_SIZE);
|
||||
crc32c = crc32c_arm64;
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* byte operations */
|
||||
|
||||
/*
|
||||
/**
|
||||
* Rotate left.
|
||||
* In x86/x64 they are optimized with a single assembler instruction.
|
||||
* In x86/x64/ARM they are optimized with a single assembler instruction.
|
||||
*/
|
||||
static inline uint32_t util_rotl32(uint32_t x, int8_t r)
|
||||
static inline uint32_t util_rotl32(uint32_t x, unsigned r)
|
||||
{
|
||||
return (x << r) | (x >> (32 - r));
|
||||
return (x << (r & 31)) | (x >> ((-r) & 31));
|
||||
}
|
||||
|
||||
static inline uint64_t util_rotl64(uint64_t x, int8_t r)
|
||||
static inline uint64_t util_rotl64(uint64_t x, unsigned r)
|
||||
{
|
||||
return (x << r) | (x >> (64 - r));
|
||||
return (x << (r & 63)) | (x >> ((-r) & 63));
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Rotate right.
|
||||
* In x86/x64 they are optimized with a single assembler instruction.
|
||||
* In x86/x64/ARM they are optimized with a single assembler instruction.
|
||||
*/
|
||||
static inline uint32_t util_rotr32(uint32_t x, int8_t r)
|
||||
static inline uint32_t util_rotr32(uint32_t x, unsigned r)
|
||||
{
|
||||
return (x >> r) | (x << (32 - r));
|
||||
return (x >> (r & 31)) | (x << ((-r) & 31));
|
||||
}
|
||||
|
||||
static inline uint64_t util_rotr64(uint64_t x, int8_t r)
|
||||
static inline uint64_t util_rotr64(uint64_t x, unsigned r)
|
||||
{
|
||||
return (x >> r) | (x << (64 - r));
|
||||
return (x >> (r & 63)) | (x << ((-r) & 63));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -502,18 +575,6 @@ static inline uint64_t util_swap64(uint64_t v)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline uint8_t util_read8(const void* void_ptr)
|
||||
{
|
||||
const uint8_t* ptr = void_ptr;
|
||||
return ptr[0];
|
||||
}
|
||||
|
||||
static inline uint16_t util_read16(const void* void_ptr)
|
||||
{
|
||||
const uint8_t* ptr = void_ptr;
|
||||
return ptr[0] + (ptr[1] << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t util_read32(const void* ptr)
|
||||
{
|
||||
uint32_t v;
|
||||
|
|
@ -550,112 +611,6 @@ static inline void util_write64(void* ptr, uint64_t v)
|
|||
memcpy(ptr, &v, sizeof(v));
|
||||
}
|
||||
|
||||
/*
|
||||
* 64*64 -> 128bit multiply function.
|
||||
*
|
||||
* @param A Address of 64-bit number.
|
||||
* @param B Address of 64-bit number.
|
||||
*
|
||||
* Calculates 128-bit C = *A * *B.
|
||||
*
|
||||
* Overwrites A contents with C's low 64 bits.
|
||||
* Overwrites B contents with C's high 64 bits.
|
||||
*/
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
/*
|
||||
* This is intentionally placed before the __SIZEOF_INT128__ implementation.
|
||||
*
|
||||
* This implementation happens to generate more efficient code.
|
||||
* While this likely depends only on the compiler, as long as it remains faster,
|
||||
* we will keep it in this order.
|
||||
*/
|
||||
static inline void util_mum(uint64_t* A, uint64_t* B)
|
||||
{
|
||||
uint64_t a = *A;
|
||||
uint64_t b = *B;
|
||||
uint64_t low, high;
|
||||
|
||||
__asm__ (
|
||||
"mulq %3"
|
||||
: "=a" (low), "=d" (high)
|
||||
: "a" (a), "rm" (b)
|
||||
: "cc"
|
||||
);
|
||||
|
||||
*A = low;
|
||||
*B = high;
|
||||
}
|
||||
#elif defined(__SIZEOF_INT128__)
|
||||
static inline void util_mum(uint64_t* A, uint64_t* B)
|
||||
{
|
||||
__uint128_t product = ((__uint128_t)*A) * ((__uint128_t)*B);
|
||||
*A = (uint64_t)product;
|
||||
*B = (uint64_t)(product >> 64);
|
||||
}
|
||||
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
/*
|
||||
* This is intentionally placed after the __SIZEOF_INT128__ implementation.
|
||||
*
|
||||
* Although the code looks correct, there is a report of this
|
||||
* implementation failing the self-test on macOS (Darwin 25.4.0, arm64)
|
||||
* with Apple clang 21.0.0 (clang-2100.0.123.102).
|
||||
*
|
||||
* See: https://github.com/amadvance/snapraid/issues/43
|
||||
*
|
||||
* Note that the implementation is the same of OpenSSL:
|
||||
*
|
||||
* #elif defined(__aarch64__) && defined(SIXTY_FOUR_BIT_LONG)
|
||||
* #if defined(__GNUC__) && __GNUC__ >= 2
|
||||
* #define BN_UMULT_HIGH(a, b) ({ \
|
||||
* register BN_ULONG ret; \
|
||||
* asm ("umulh %0,%1,%2" \
|
||||
* : "=r"(ret) \
|
||||
* : "r"(a), "r"(b)); \
|
||||
* ret; })
|
||||
* #endif
|
||||
* #endif
|
||||
*
|
||||
* See: https://github.com/openssl/openssl/blob/0463cbf185680e66a3a8960f10cd33001377d28e/crypto/bn/bn_local.h#L439
|
||||
*/
|
||||
static inline void util_mum(uint64_t* A, uint64_t* B)
|
||||
{
|
||||
uint64_t a = *A;
|
||||
uint64_t b = *B;
|
||||
uint64_t low = a * b;
|
||||
uint64_t high;
|
||||
__asm__ (
|
||||
"umulh %0, %1, %2"
|
||||
: "=r" (high)
|
||||
: "r" (a), "r" (b)
|
||||
);
|
||||
*A = low;
|
||||
*B = high;
|
||||
}
|
||||
#else
|
||||
static inline void util_mum(uint64_t* A, uint64_t* B)
|
||||
{
|
||||
uint64_t a = *A;
|
||||
uint64_t b = *B;
|
||||
|
||||
uint64_t a_lo = (uint32_t)a;
|
||||
uint64_t a_hi = a >> 32;
|
||||
uint64_t b_lo = (uint32_t)b;
|
||||
uint64_t b_hi = b >> 32;
|
||||
|
||||
uint64_t p0 = a_lo * b_lo;
|
||||
uint64_t p1 = a_lo * b_hi;
|
||||
uint64_t p2 = a_hi * b_lo;
|
||||
uint64_t p3 = a_hi * b_hi;
|
||||
|
||||
uint64_t middle = p1 + (p0 >> 32) + (uint32_t)p2;
|
||||
uint64_t low = (middle << 32) | (uint32_t)p0;
|
||||
uint64_t high = p3 + (middle >> 32) + (p2 >> 32);
|
||||
|
||||
*A = low;
|
||||
*B = high;
|
||||
}
|
||||
#endif
|
||||
|
||||
int util_selftest(void)
|
||||
{
|
||||
/* rotate left 32-bit */
|
||||
|
|
@ -664,52 +619,57 @@ int util_selftest(void)
|
|||
if (util_rotl32(0x00000001U, 31) != 0x80000000U) return -1;
|
||||
if (util_rotl32(0x12345678U, 4) != 0x23456781U) return -1;
|
||||
if (util_rotl32(0x12345678U, 0) != 0x12345678U) return -1;
|
||||
if (util_rotl32(0x12345678U, 32) != 0x12345678U) return -1; /* r % 32 == 0 */
|
||||
if (util_rotl32(0x12345678U, 32) != 0x12345678U) return -1;
|
||||
|
||||
/* rotate right 32-bit */
|
||||
if (util_rotr32(0x00000001U, 1) != 0x80000000U) return -1;
|
||||
if (util_rotr32(0x80000000U, 1) != 0x40000000U) return -1;
|
||||
if (util_rotr32(0x00000002U, 1) != 0x00000001U) return -1;
|
||||
if (util_rotr32(0x12345678U, 4) != 0x81234567U) return -1;
|
||||
if (util_rotr32(0x12345678U, 0) != 0x12345678U) return -1;
|
||||
if (util_rotr32(0x12345678U, 32) != 0x12345678U) return -1;
|
||||
|
||||
/* rotate left 64-bit */
|
||||
if (util_rotl64(1ULL, 1) != 2ULL) return -1;
|
||||
if (util_rotl64(1ULL << 63, 1) != 1ULL) return -1;
|
||||
if (util_rotl64(0x123456789ABCDEF0ULL, 8) != 0x3456789ABCDEF012ULL) return -1;
|
||||
if (util_rotl64(0x123456789ABCDEF0ULL, 0) != 0x123456789ABCDEF0ULL) return -1;
|
||||
if (util_rotl64(0x123456789ABCDEF0ULL, 64) != 0x123456789ABCDEF0ULL) return -1;
|
||||
|
||||
/* rotate right 64-bit */
|
||||
if (util_rotr64(1ULL, 1) != (1ULL << 63)) return -1;
|
||||
if (util_rotr64(2ULL, 1) != 1ULL) return -1;
|
||||
if (util_rotr64(0x123456789ABCDEF0ULL, 8) != 0xF0123456789ABCDEULL) return -1;
|
||||
if (util_rotr64(0x123456789ABCDEF0ULL, 0) != 0x123456789ABCDEF0ULL) return -1;
|
||||
if (util_rotr64(0x123456789ABCDEF0ULL, 64) != 0x123456789ABCDEF0ULL) return -1;
|
||||
|
||||
/* util_mum tests */
|
||||
/* tommy_mum tests */
|
||||
uint64_t a, b;
|
||||
|
||||
/* small values */
|
||||
a = 3; b = 4;
|
||||
util_mum(&a, &b);
|
||||
tommy_mum(&a, &b);
|
||||
if (a != 12 || b != 0) return -1;
|
||||
|
||||
/* 1 * anything */
|
||||
a = 0xFFFFFFFFFFFFFFFFULL; b = 1;
|
||||
util_mum(&a, &b);
|
||||
tommy_mum(&a, &b);
|
||||
if (a != 0xFFFFFFFFFFFFFFFFULL || b != 0) return -1;
|
||||
|
||||
/* (2^32) * (2^32) = 2^64 */
|
||||
a = 1ULL << 32; b = 1ULL << 32;
|
||||
util_mum(&a, &b);
|
||||
tommy_mum(&a, &b);
|
||||
if (a != 0 || b != 1) return -1;
|
||||
|
||||
/* max uint64 * max uint64 */
|
||||
a = 0xFFFFFFFFFFFFFFFFULL; b = 0xFFFFFFFFFFFFFFFFULL;
|
||||
util_mum(&a, &b);
|
||||
tommy_mum(&a, &b);
|
||||
if (a != 1 || b != 0xFFFFFFFFFFFFFFFEULL) return -1;
|
||||
|
||||
/* larger random-ish test */
|
||||
a = 0x0123456789ABCDEFULL;
|
||||
b = 0xFEDCBA9876543210ULL;
|
||||
util_mum(&a, &b);
|
||||
tommy_mum(&a, &b);
|
||||
if (a != 0x2236D88FE5618CF0ULL || b != 0x121FA00AD77D742ULL) return -1;
|
||||
|
||||
return 0;
|
||||
|
|
@ -723,7 +683,6 @@ const char* memhashname(unsigned kind)
|
|||
switch (kind) {
|
||||
case HASH_MURMUR3 : return "murmur3";
|
||||
case HASH_SPOOKY2 : return "spooky2";
|
||||
case HASH_METRO : return "metro";
|
||||
case HASH_MUSEAIR : return "museair";
|
||||
}
|
||||
|
||||
|
|
@ -747,7 +706,6 @@ unsigned membesthash(void)
|
|||
|
||||
#include "murmur3.c"
|
||||
#include "spooky2.c"
|
||||
#include "metro.c"
|
||||
#include "museair.c"
|
||||
|
||||
void memhash(unsigned kind, const unsigned char* seed, void* digest, const void* src, size_t size)
|
||||
|
|
@ -759,28 +717,44 @@ void memhash(unsigned kind, const unsigned char* seed, void* digest, const void*
|
|||
case HASH_SPOOKY2 :
|
||||
SpookyHash128(src, size, seed, digest);
|
||||
break;
|
||||
case HASH_METRO :
|
||||
MetroHash128(src, size, seed, digest);
|
||||
break;
|
||||
case HASH_MUSEAIR :
|
||||
MuseAirLoong(src, size, seed, digest);
|
||||
break;
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EINTERNAL, "Internal inconsistency in hash function %u\n", kind);
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
break;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
void memhash_block(unsigned kind, const unsigned char* seed, void* digest, const void* src, size_t logical_size, size_t block_size)
|
||||
{
|
||||
assert(logical_size <= block_size);
|
||||
|
||||
if (memhash_is_block(kind)) {
|
||||
/*
|
||||
* Canonical block hashes define the identity of the complete
|
||||
* canonical RAID block. The caller must have zero-padded the
|
||||
* buffer after the logical end of the file block.
|
||||
*/
|
||||
memhash(kind, seed, digest, src, block_size);
|
||||
} else {
|
||||
/*
|
||||
* Preserve the historical SnapRAID hash semantics for content
|
||||
* files using legacy hashes.
|
||||
*/
|
||||
memhash(kind, seed, digest, src, logical_size);
|
||||
}
|
||||
}
|
||||
|
||||
const char* hash_config_name(unsigned kind)
|
||||
{
|
||||
switch (kind) {
|
||||
case HASH_UNDEFINED : return "undefined";
|
||||
case HASH_MURMUR3 : return "murmur3";
|
||||
case HASH_SPOOKY2 : return "spooky2";
|
||||
case HASH_METRO : return "metro";
|
||||
case HASH_MUSEAIR : return "museair";
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -814,6 +788,34 @@ unsigned memdiff(const unsigned char* data1, const unsigned char* data2, size_t
|
|||
#if HAVE_LOCKFILE
|
||||
int lock_lock(const char* file)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
wchar_t conv_buf[PATH_MAX];
|
||||
HANDLE h;
|
||||
|
||||
if (MultiByteToWideChar(CP_UTF8, 0, file, -1, conv_buf, PATH_MAX) <= 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* open or create the lock file with zero share mode for exclusive access and delete on close */
|
||||
h = CreateFileW(conv_buf, GENERIC_READ | GENERIC_WRITE | DELETE, 0, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
/* LCOV_EXCL_START */
|
||||
DWORD err = GetLastError();
|
||||
if (err == ERROR_SHARING_VIOLATION || err == ERROR_ACCESS_DENIED || err == ERROR_DELETE_PENDING) {
|
||||
errno = EWOULDBLOCK;
|
||||
} else {
|
||||
errno = EACCES;
|
||||
}
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* Windows HANDLE values are 31-bit indices into per-process handle tables, so casting to int is safe */
|
||||
return (intptr_t)h;
|
||||
#else
|
||||
int f;
|
||||
|
||||
f = open(file, O_RDONLY | O_CREAT, 0600);
|
||||
|
|
@ -832,12 +834,21 @@ int lock_lock(const char* file)
|
|||
}
|
||||
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCKFILE
|
||||
int lock_unlock(int f)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!CloseHandle((HANDLE)(intptr_t)f)) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
/*
|
||||
* Intentionally don't remove the lock file.
|
||||
* Removing it just introduces race course with other process
|
||||
|
|
@ -850,6 +861,7 @@ int lock_unlock(int f)
|
|||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
375
cmdline/util.h
375
cmdline/util.h
|
|
@ -1,9 +1,10 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __UTIL_H
|
||||
#define __UTIL_H
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include "tommyds/tommytypes.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
|
@ -23,18 +24,13 @@ void* malloc_nofail_direct(size_t size, void** freeptr);
|
|||
* Safe aligned vector allocation.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void** malloc_nofail_vector_align(int nd, int n, size_t size, void** freeptr);
|
||||
void** malloc_nofail_vector_align(int n, size_t size, void** freeptr);
|
||||
|
||||
/**
|
||||
* Safe page vector allocation. Usable for direct io.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void** malloc_nofail_vector_direct(int nd, int n, size_t size, void** freeptr);
|
||||
|
||||
/**
|
||||
* Safe allocation with memory test.
|
||||
*/
|
||||
void* malloc_nofail_test(size_t size);
|
||||
void** malloc_nofail_vector_direct(int n, size_t size, void** freeptr);
|
||||
|
||||
/**
|
||||
* Test the memory vector for RAM problems.
|
||||
|
|
@ -42,6 +38,28 @@ void* malloc_nofail_test(size_t size);
|
|||
*/
|
||||
void mtest_vector(int n, size_t size, void** vv);
|
||||
|
||||
/**
|
||||
* Compare memory against a repeated byte value.
|
||||
*
|
||||
* Return <0 if ptr is less than value, 0 if equal, >0 if greater.
|
||||
*/
|
||||
static __always_inline int membcmp(const void* ptr, uint8_t value, size_t size)
|
||||
{
|
||||
const uint8_t* p = ptr;
|
||||
|
||||
if (size == 0)
|
||||
return 0;
|
||||
if (p[0] != value)
|
||||
return (int)p[0] - (int)value;
|
||||
|
||||
/*
|
||||
* If the buffer contains value up to index k-1, then at offset k-1
|
||||
* memcmp compares (p + 1)[k - 1] = p[k] against p[k - 1] = value.
|
||||
* The first differing adjacent pair yields the exact sign (p[k] - value).
|
||||
*/
|
||||
return memcmp(p + 1, p, size - 1);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* crc */
|
||||
|
||||
|
|
@ -59,32 +77,44 @@ extern uint32_t CRC32C_1[256];
|
|||
extern uint32_t CRC32C_2[256];
|
||||
extern uint32_t CRC32C_3[256];
|
||||
|
||||
/**
|
||||
* If the CPU support the CRC instructions.
|
||||
*/
|
||||
#if HAVE_SSE42
|
||||
extern int crc_x86;
|
||||
#define CRC32C_X86_64_BLOCK0_SIZE 5456
|
||||
#define CRC32C_X86_64_BLOCK1_SIZE 2720
|
||||
#define CRC32C_X86_64_BLOCK2_SIZE 1360
|
||||
#define CRC32C_X86_64_BLOCK3_SIZE 672
|
||||
#define CRC32C_X86_64_BLOCK4_SIZE 336
|
||||
#define CRC32C_X86_64_BLOCK5_SIZE 160
|
||||
#ifdef CONFIG_X86_64
|
||||
extern uint32_t CRC32C_X86_64_SKIP[6][8][16];
|
||||
#endif
|
||||
|
||||
#define CRC32C_ARM64_BLOCK0_SIZE 8192
|
||||
#define CRC32C_ARM64_BLOCK1_SIZE 4096
|
||||
#define CRC32C_ARM64_BLOCK2_SIZE 2048
|
||||
#define CRC32C_ARM64_BLOCK3_SIZE 1024
|
||||
#define CRC32C_ARM64_BLOCK4_SIZE 512
|
||||
#define CRC32C_ARM64_BLOCK5_SIZE 256
|
||||
#if CONFIG_ARM_CRC
|
||||
extern uint32_t CRC32C_ARM64_SKIP[6][8][16];
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Compute CRC-32 (Castagnoli) for a single byte without the IV.
|
||||
* Advance a raw CRC-32C by a number of zero bytes.
|
||||
* Used to combine independent hardware CRC lanes.
|
||||
*/
|
||||
static inline uint32_t crc32c_plain_char(uint32_t crc, unsigned char c)
|
||||
{
|
||||
#if HAVE_SSE42
|
||||
if (tommy_likely(crc_x86)) {
|
||||
asm ("crc32b %1, %0\n" : "+r" (crc) : "m" (c));
|
||||
return crc;
|
||||
}
|
||||
#if defined(CONFIG_X86_64) || CONFIG_ARM_CRC
|
||||
uint32_t crc32c_shift(uint32_t crc, size_t size);
|
||||
#endif
|
||||
return CRC32C_0[(crc ^ c) & 0xff] ^ (crc >> 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the CRC-32 (Castagnoli) without the IV.
|
||||
*/
|
||||
static inline uint32_t crc32c_gen_plain(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
static inline uint32_t crc32c_gen_plain(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC unroll 1
|
||||
#elif defined(__clang__)
|
||||
#pragma unroll 1
|
||||
#endif
|
||||
while (size >= 4) {
|
||||
crc ^= ptr[0] | (uint32_t)ptr[1] << 8 | (uint32_t)ptr[2] << 16 | (uint32_t)ptr[3] << 24;
|
||||
crc = CRC32C_3[crc & 0xff] ^ CRC32C_2[(crc >> 8) & 0xff] ^ CRC32C_1[(crc >> 16) & 0xff] ^ CRC32C_0[crc >> 24];
|
||||
|
|
@ -104,26 +134,245 @@ static inline uint32_t crc32c_gen_plain(uint32_t crc, const unsigned char* ptr,
|
|||
/**
|
||||
* Compute the CRC-32 (Castagnoli) without the IV.
|
||||
*/
|
||||
#if HAVE_SSE42
|
||||
static inline uint32_t crc32c_x86_plain(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
#if CONFIG_X86
|
||||
#ifdef CONFIG_X86_64
|
||||
static __always_inline uint32_t crc32c_x86_64_skip(uint32_t crc, const uint32_t table[8][16])
|
||||
{
|
||||
return table[0][crc & 0xf]
|
||||
^ table[1][(crc >> 4) & 0xf]
|
||||
^ table[2][(crc >> 8) & 0xf]
|
||||
^ table[3][(crc >> 12) & 0xf]
|
||||
^ table[4][(crc >> 16) & 0xf]
|
||||
^ table[5][(crc >> 20) & 0xf]
|
||||
^ table[6][(crc >> 24) & 0xf]
|
||||
^ table[7][crc >> 28];
|
||||
}
|
||||
|
||||
__aligned_loops(64)
|
||||
static __always_inline uint32_t crc32c_x86_64_3lane(uint32_t crc, const unsigned char* ptr, size_t lane_size, const uint32_t table[8][16])
|
||||
{
|
||||
const unsigned char* ptr0 = ptr;
|
||||
const unsigned char* ptr1 = ptr + lane_size;
|
||||
const unsigned char* ptr2 = ptr1 + lane_size;
|
||||
const unsigned char* end = ptr1;
|
||||
uint64_t crc0 = crc;
|
||||
uint64_t crc1 = 0;
|
||||
uint64_t crc2 = 0;
|
||||
|
||||
/*
|
||||
* Keep three dependency chains in flight to hide the CRC32 latency.
|
||||
* Lane sizes are multiples of 16 to avoid a separate tail loop.
|
||||
*/
|
||||
while (ptr0 < end) {
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc0) : "m" (*(const uint64_t*)ptr0));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc1) : "m" (*(const uint64_t*)ptr1));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc2) : "m" (*(const uint64_t*)ptr2));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc0) : "m" (*(const uint64_t*)(ptr0 + 8)));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc1) : "m" (*(const uint64_t*)(ptr1 + 8)));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc2) : "m" (*(const uint64_t*)(ptr2 + 8)));
|
||||
ptr0 += 16;
|
||||
ptr1 += 16;
|
||||
ptr2 += 16;
|
||||
}
|
||||
|
||||
crc = crc32c_x86_64_skip((uint32_t)crc0, table) ^ (uint32_t)crc1;
|
||||
|
||||
return crc32c_x86_64_skip(crc, table) ^ (uint32_t)crc2;
|
||||
}
|
||||
#endif
|
||||
|
||||
__aligned_loops(64)
|
||||
static __always_inline uint32_t crc32c_x86_plain(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
#ifdef CONFIG_X86_64
|
||||
uint64_t crc64 = crc;
|
||||
while (size >= 8) {
|
||||
asm ("crc32q %1, %0\n" : "+r" (crc64) : "m" (*(const uint64_t*)ptr));
|
||||
|
||||
if (size >= 3 * CRC32C_X86_64_BLOCK5_SIZE) {
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK0_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK0_SIZE, CRC32C_X86_64_SKIP[0]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK0_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK0_SIZE;
|
||||
}
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK1_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK1_SIZE, CRC32C_X86_64_SKIP[1]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK1_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK1_SIZE;
|
||||
}
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK2_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK2_SIZE, CRC32C_X86_64_SKIP[2]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK2_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK2_SIZE;
|
||||
}
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK3_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK3_SIZE, CRC32C_X86_64_SKIP[3]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK3_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK3_SIZE;
|
||||
}
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK4_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK4_SIZE, CRC32C_X86_64_SKIP[4]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK4_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK4_SIZE;
|
||||
}
|
||||
while (size >= 3 * CRC32C_X86_64_BLOCK5_SIZE) {
|
||||
crc64 = crc32c_x86_64_3lane((uint32_t)crc64, ptr, CRC32C_X86_64_BLOCK5_SIZE, CRC32C_X86_64_SKIP[5]);
|
||||
ptr += 3 * CRC32C_X86_64_BLOCK5_SIZE;
|
||||
size -= 3 * CRC32C_X86_64_BLOCK5_SIZE;
|
||||
}
|
||||
}
|
||||
while (size >= 16) {
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc64) : "m" (*(const uint64_t*)ptr));
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc64) : "m" (*(const uint64_t*)(ptr + 8)));
|
||||
ptr += 16;
|
||||
size -= 16;
|
||||
}
|
||||
if (size >= 8) {
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc64) : "m" (*(const uint64_t*)ptr));
|
||||
ptr += 8;
|
||||
size -= 8;
|
||||
}
|
||||
crc = crc64;
|
||||
crc = (uint32_t)crc64;
|
||||
#else
|
||||
while (size >= 4) {
|
||||
asm ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)ptr));
|
||||
while (size >= 16) {
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)ptr));
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)(ptr + 4)));
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)(ptr + 8)));
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)(ptr + 12)));
|
||||
ptr += 16;
|
||||
size -= 16;
|
||||
}
|
||||
if (size >= 8) {
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)ptr));
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)(ptr + 4)));
|
||||
ptr += 8;
|
||||
size -= 8;
|
||||
}
|
||||
#endif
|
||||
if (size >= 4) {
|
||||
asm volatile ("crc32l %1, %0\n" : "+r" (crc) : "m" (*(const uint32_t*)ptr));
|
||||
ptr += 4;
|
||||
size -= 4;
|
||||
}
|
||||
if (size >= 2) {
|
||||
asm volatile ("crc32w %1, %0\n" : "+r" (crc) : "m" (*(const uint16_t*)ptr));
|
||||
ptr += 2;
|
||||
size -= 2;
|
||||
}
|
||||
if (size) {
|
||||
asm volatile ("crc32b %1, %0\n" : "+r" (crc) : "m" (*ptr));
|
||||
}
|
||||
|
||||
return crc;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_ARM_CRC
|
||||
static __always_inline uint32_t crc32c_arm64_skip(uint32_t crc, const uint32_t table[8][16])
|
||||
{
|
||||
return table[0][crc & 0xf]
|
||||
^ table[1][(crc >> 4) & 0xf]
|
||||
^ table[2][(crc >> 8) & 0xf]
|
||||
^ table[3][(crc >> 12) & 0xf]
|
||||
^ table[4][(crc >> 16) & 0xf]
|
||||
^ table[5][(crc >> 20) & 0xf]
|
||||
^ table[6][(crc >> 24) & 0xf]
|
||||
^ table[7][crc >> 28];
|
||||
}
|
||||
|
||||
static __always_inline uint32_t crc32c_arm64_2lane(uint32_t crc, const unsigned char* ptr, size_t lane_size, const uint32_t table[8][16])
|
||||
{
|
||||
const unsigned char* ptr0 = ptr;
|
||||
const unsigned char* ptr1 = ptr + lane_size;
|
||||
const unsigned char* end = ptr1;
|
||||
uint32_t crc0 = crc;
|
||||
uint32_t crc1 = 0;
|
||||
|
||||
/*
|
||||
* Keep two dependency chains in flight to hide the CRC32 latency.
|
||||
*/
|
||||
while (ptr0 < end) {
|
||||
uint64_t val00;
|
||||
uint64_t val01;
|
||||
uint64_t val02;
|
||||
uint64_t val03;
|
||||
uint64_t val10;
|
||||
uint64_t val11;
|
||||
uint64_t val12;
|
||||
uint64_t val13;
|
||||
|
||||
__builtin_memcpy(&val00, ptr0, 8);
|
||||
__builtin_memcpy(&val10, ptr1, 8);
|
||||
__builtin_memcpy(&val01, ptr0 + 8, 8);
|
||||
__builtin_memcpy(&val11, ptr1 + 8, 8);
|
||||
__builtin_memcpy(&val02, ptr0 + 16, 8);
|
||||
__builtin_memcpy(&val12, ptr1 + 16, 8);
|
||||
__builtin_memcpy(&val03, ptr0 + 24, 8);
|
||||
__builtin_memcpy(&val13, ptr1 + 24, 8);
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc0) : "r" (val00));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc1) : "r" (val10));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc0) : "r" (val01));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc1) : "r" (val11));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc0) : "r" (val02));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc1) : "r" (val12));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc0) : "r" (val03));
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc1) : "r" (val13));
|
||||
ptr0 += 32;
|
||||
ptr1 += 32;
|
||||
}
|
||||
|
||||
return crc32c_arm64_skip(crc0, table) ^ crc1;
|
||||
}
|
||||
|
||||
static __always_inline uint32_t crc32c_arm64_plain(uint32_t crc, const unsigned char* ptr, size_t size)
|
||||
{
|
||||
if (size >= 2 * CRC32C_ARM64_BLOCK5_SIZE) {
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK0_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK0_SIZE, CRC32C_ARM64_SKIP[0]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK0_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK0_SIZE;
|
||||
}
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK1_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK1_SIZE, CRC32C_ARM64_SKIP[1]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK1_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK1_SIZE;
|
||||
}
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK2_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK2_SIZE, CRC32C_ARM64_SKIP[2]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK2_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK2_SIZE;
|
||||
}
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK3_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK3_SIZE, CRC32C_ARM64_SKIP[3]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK3_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK3_SIZE;
|
||||
}
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK4_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK4_SIZE, CRC32C_ARM64_SKIP[4]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK4_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK4_SIZE;
|
||||
}
|
||||
while (size >= 2 * CRC32C_ARM64_BLOCK5_SIZE) {
|
||||
crc = crc32c_arm64_2lane(crc, ptr, CRC32C_ARM64_BLOCK5_SIZE, CRC32C_ARM64_SKIP[5]);
|
||||
ptr += 2 * CRC32C_ARM64_BLOCK5_SIZE;
|
||||
size -= 2 * CRC32C_ARM64_BLOCK5_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
while (size >= 8) {
|
||||
uint64_t val;
|
||||
__builtin_memcpy(&val, ptr, 8);
|
||||
asm volatile ("crc32cx %w0, %w0, %x1\n" : "+r" (crc) : "r" (val));
|
||||
ptr += 8;
|
||||
size -= 8;
|
||||
}
|
||||
if (size >= 4) {
|
||||
uint32_t val;
|
||||
__builtin_memcpy(&val, ptr, 4);
|
||||
asm volatile ("crc32cw %w0, %w0, %w1\n" : "+r" (crc) : "r" (val));
|
||||
ptr += 4;
|
||||
size -= 4;
|
||||
}
|
||||
while (size) {
|
||||
asm ("crc32b %1, %0\n" : "+r" (crc) : "m" (*ptr));
|
||||
asm volatile ("crc32cb %w0, %w0, %w1\n" : "+r" (crc) : "r" (*ptr));
|
||||
++ptr;
|
||||
--size;
|
||||
}
|
||||
|
|
@ -132,29 +381,17 @@ static inline uint32_t crc32c_x86_plain(uint32_t crc, const unsigned char* ptr,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Compute CRC-32 (Castagnoli) without the IV.
|
||||
*/
|
||||
static inline uint32_t crc32c_plain(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
{
|
||||
#if HAVE_SSE42
|
||||
if (tommy_likely(crc_x86)) {
|
||||
return crc32c_x86_plain(crc, ptr, size);
|
||||
}
|
||||
#endif
|
||||
return crc32c_gen_plain(crc, ptr, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the CRC-32 (Castagnoli)
|
||||
*/
|
||||
extern uint32_t (*crc32c)(uint32_t crc, const unsigned char* ptr, unsigned size);
|
||||
extern uint32_t (*crc32c)(uint32_t crc, const unsigned char* ptr, size_t size);
|
||||
|
||||
/**
|
||||
* Internal entry points for testing.
|
||||
*/
|
||||
uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, unsigned size);
|
||||
uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, unsigned size);
|
||||
uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, size_t size);
|
||||
uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, size_t size);
|
||||
uint32_t crc32c_arm64(uint32_t crc, const unsigned char* ptr, size_t size);
|
||||
|
||||
/**
|
||||
* Initialize the CRC-32 (Castagnoli) support.
|
||||
|
|
@ -175,8 +412,7 @@ void crc32c_init(void);
|
|||
#define HASH_UNDEFINED 0
|
||||
#define HASH_MURMUR3 1
|
||||
#define HASH_SPOOKY2 2
|
||||
#define HASH_METRO 3
|
||||
#define HASH_MUSEAIR 4
|
||||
#define HASH_MUSEAIR 3
|
||||
|
||||
/**
|
||||
* Return the hash that is expected to be the fastest in this architecture
|
||||
|
|
@ -189,11 +425,44 @@ unsigned membesthash(void);
|
|||
const char* memhashname(unsigned kind);
|
||||
|
||||
/**
|
||||
* Compute the HASH of a memory block.
|
||||
* Compute the HASH of a memory buffer.
|
||||
* Seed is a 128 bit vector.
|
||||
*
|
||||
* This is the raw hash primitive. It hashes exactly size bytes and does not
|
||||
* apply SnapRAID block semantics.
|
||||
*/
|
||||
void memhash(unsigned kind, const unsigned char* seed, void* digest, const void* src, size_t size);
|
||||
|
||||
/**
|
||||
* Compute the hash of a SnapRAID data block.
|
||||
*
|
||||
* logical_size is the number of bytes logically belonging to the file.
|
||||
* block_size is the complete zero-padded RAID block size.
|
||||
*
|
||||
* Legacy hashes preserve their historical semantics and hash only
|
||||
* logical_size bytes.
|
||||
*
|
||||
* MuseAir hashes the complete canonical RAID block, including the zero
|
||||
* padding up to block_size.
|
||||
*
|
||||
* The caller must guarantee that logical_size <= block_size and, when
|
||||
* logical_size < block_size, src[logical_size .. block_size-1] == 0.
|
||||
*/
|
||||
void memhash_block(unsigned kind, const unsigned char* seed, void* digest, const void* src, size_t logical_size, size_t block_size);
|
||||
|
||||
/**
|
||||
* Return !=0 if the hash kind operates on the complete canonical RAID block.
|
||||
*
|
||||
* Legacy hashes (Murmur3, Spooky2) preserve historical semantics and hash
|
||||
* only the logical file bytes.
|
||||
* Modern hashes (MuseAir) hash the complete zero-padded RAID block up to
|
||||
* block_size.
|
||||
*/
|
||||
static inline int memhash_is_block(unsigned kind)
|
||||
{
|
||||
return kind == HASH_MUSEAIR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hash name.
|
||||
*/
|
||||
|
|
@ -232,7 +501,7 @@ typedef unsigned char bit_vect_t;
|
|||
|
||||
static inline size_t bit_vect_size(size_t max)
|
||||
{
|
||||
return (max + BIT_VECT_SIZE - 1) / BIT_VECT_SIZE;
|
||||
return (max / BIT_VECT_SIZE) + ((max % BIT_VECT_SIZE) != 0);
|
||||
}
|
||||
|
||||
static inline void bit_vect_set(bit_vect_t* bit_vect, size_t off)
|
||||
|
|
|
|||
270
configure.ac
270
configure.ac
|
|
@ -1,16 +1,21 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.65])
|
||||
AC_PREREQ([2.70])
|
||||
dnl Get version number from git
|
||||
m4_define([git_revision], m4_esyscmd_s([./autover.sh]))
|
||||
AC_INIT([SnapRAID CLI], [git_revision], [], [snapraid], [https://www.snapraid.it])
|
||||
AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
|
||||
AC_CONFIG_SRCDIR([cmdline/snapraid.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_INIT([SnapRAID CLI],[git_revision],[],[snapraid],[https://www.snapraid.it])
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
|
||||
AC_CONFIG_SRCDIR([os/os.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
dnl Enables as many system-specific extensions as reasonably possible
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
dnl Macro directory
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind],[])
|
||||
|
|
@ -19,6 +24,22 @@ AC_CHECK_PROG([SDE],[sde64],[sde64],[])
|
|||
AC_CHECK_PROG([ADVD2],[advd2],[advd2],[])
|
||||
AM_CONDITIONAL(HAVE_ADVD2, [test x"$ADVD2" != x])
|
||||
|
||||
# Compile a quick test program using a syntax unique to C99 and newer
|
||||
AC_MSG_CHECKING([if compiler supports C99 or newer features])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[]], [[
|
||||
int x = 0;
|
||||
x++;
|
||||
int y = x;
|
||||
int array[y];
|
||||
]])
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([A C99-compliant compiler or newer is required to build this package.])
|
||||
])
|
||||
|
||||
# Check if we are targeting Windows
|
||||
is_windows=no
|
||||
AS_CASE([$host_os], [mingw*|msys*|cygwin*], [is_windows=yes])
|
||||
|
|
@ -31,35 +52,53 @@ if test "x$is_windows" = "xyes"; then
|
|||
fi
|
||||
|
||||
dnl Options to improve stacktrace (some disabled as no crash reported by years)
|
||||
AC_CHECK_CC_OPT([-fno-omit-frame-pointer], CFLAGS="$CFLAGS -fno-omit-frame-pointer", [])
|
||||
# AC_CHECK_CC_OPT([-fno-inline-functions-called-once], CFLAGS="$CFLAGS -fno-inline-functions-called-once", [])
|
||||
# AC_CHECK_CC_OPT([-fno-inline-small-functions], CFLAGS="$CFLAGS -fno-inline-small-functions", [])
|
||||
# AC_CHECK_CC_OPT([-fno-optimize-sibling-calls], CFLAGS="$CFLAGS -fno-optimize-sibling-calls", [])
|
||||
AC_CHECK_CC_OPT([-rdynamic], CFLAGS="$CFLAGS -rdynamic", [])
|
||||
# This the new default for gcc 10
|
||||
AC_CHECK_CC_OPT([-fno-common], CFLAGS="$CFLAGS -fno-common", [])
|
||||
AX_CHECK_COMPILE_FLAG([-fno-omit-frame-pointer], CFLAGS="$CFLAGS -fno-omit-frame-pointer", [])
|
||||
# AX_CHECK_COMPILE_FLAG([-fno-inline-functions-called-once], CFLAGS="$CFLAGS -fno-inline-functions-called-once", [])
|
||||
# AX_CHECK_COMPILE_FLAG([-fno-inline-small-functions], CFLAGS="$CFLAGS -fno-inline-small-functions", [])
|
||||
# AX_CHECK_COMPILE_FLAG([-fno-optimize-sibling-calls], CFLAGS="$CFLAGS -fno-optimize-sibling-calls", [])
|
||||
AX_CHECK_COMPILE_FLAG([-rdynamic], CFLAGS="$CFLAGS -rdynamic", [])
|
||||
# This is the new default for gcc 10
|
||||
AX_CHECK_COMPILE_FLAG([-fno-common], CFLAGS="$CFLAGS -fno-common", [])
|
||||
|
||||
dnl Checks for system.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Checks for architecture
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_ASSERT
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h limits.h time.h sys/time.h])
|
||||
AC_CHECK_HEADERS([unistd.h getopt.h io.h inttypes.h byteswap.h])
|
||||
AC_CHECK_HEADERS([pthread.h math.h])
|
||||
AC_CHECK_HEADERS([sys/file.h sys/ioctl.h sys/sysmacros.h sys/mkdev.h sys/mount.h])
|
||||
AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h mach/mach_time.h execinfo.h])
|
||||
AC_CHECK_HEADERS([dirent.h stdint.h inttypes.h unistd.h math.h execinfo.h strings.h getopt.h syslog.h grp.h pwd.h io.h alloca.h])
|
||||
AC_CHECK_HEADERS([sys/file.h sys/sysctl.h sys/ioctl.h sys/time.h sys/types.h sys/mkdev.h sys/sysmacros.h sys/stat.h sys/prctl.h sys/sysinfo.h sys/utsname.h])
|
||||
AC_CHECK_HEADERS([linux/fs.h linux/btrfs.h linux/fiemap.h])
|
||||
|
||||
# Check for the close_range(...,CLOSE_RANGE_CLOEXEC)
|
||||
AC_CHECK_HEADERS([linux/close_range.h])
|
||||
AC_CHECK_FUNCS([close_range])
|
||||
AC_MSG_CHECKING([for CLOSE_RANGE_CLOEXEC])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_LINUX_CLOSE_RANGE_H
|
||||
#include <linux/close_range.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
]], [[
|
||||
unsigned int flags = CLOSE_RANGE_CLOEXEC;
|
||||
]])
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_CLOSE_RANGE_CLOEXEC], [1], [Define if CLOSE_RANGE_CLOEXEC is available])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_RESTRICT
|
||||
AC_C_VOLATILE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
|
|
@ -86,13 +125,11 @@ AC_CHECK_FUNCS([ftruncate fallocate access])
|
|||
AC_CHECK_FUNCS([fsync posix_fadvise sync_file_range syncfs])
|
||||
AC_CHECK_FUNCS([getc_unlocked ferror_unlocked])
|
||||
AC_CHECK_FUNCS([futimes futimens futimesat localtime_r lutimes utimensat])
|
||||
AC_CHECK_FUNCS([fstatat flock])
|
||||
AC_CHECK_FUNCS([mach_absolute_time])
|
||||
AC_CHECK_FUNCS([fstatat flock renameat statx])
|
||||
AC_CHECK_FUNCS([backtrace backtrace_symbols])
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
AC_CHECK_FUNCS([clock_gettime])
|
||||
AC_CHECK_CC_OPT([-pthread], CFLAGS="$CFLAGS -pthread", CFLAGS="$CFLAGS -D_REENTRANT")
|
||||
AC_CHECK_FUNCS([pthread_create])
|
||||
AC_CHECK_FUNCS([fexecve pipe2])
|
||||
AC_SEARCH_LIBS([exp], [m])
|
||||
AC_CHECK_FUNCS([eaccess faccessat])
|
||||
|
||||
|
|
@ -141,109 +178,43 @@ AC_CHECK_MEMBERS([struct statfs.f_fstypename], [], [], [[
|
|||
#endif
|
||||
]])
|
||||
|
||||
dnl Checks for libblkid
|
||||
AC_ARG_WITH([blkid],
|
||||
AS_HELP_STRING([--without-blkid], [Ignore presence of blkid and disable it]))
|
||||
AS_IF([test "x$with_blkid" != "xno"],
|
||||
[AC_SEARCH_LIBS([blkid_probe_all], [blkid], [have_blkid=yes], [have_blkid=no])],
|
||||
[have_blkid=no])
|
||||
AS_IF([test "x$have_blkid" = "xyes"],
|
||||
[
|
||||
AC_CHECK_HEADERS([blkid/blkid.h])
|
||||
AC_CHECK_FUNCS([blkid_devno_to_devname blkid_get_tag_value])
|
||||
],
|
||||
[AS_IF([test "x$with_blkid" = "xyes"],
|
||||
[AC_MSG_ERROR([blkid requested but not found])
|
||||
])
|
||||
dnl Checks for libraries
|
||||
AS_IF([test "x$is_windows" = "xyes"], [
|
||||
AC_MSG_NOTICE([Windows native threads support enabled])
|
||||
], [
|
||||
AC_CHECK_HEADERS([pthread.h])
|
||||
AX_PTHREAD([
|
||||
thread_model="pthreads"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if POSIX threads are available])
|
||||
AC_MSG_NOTICE([POSIX threads support enabled])
|
||||
], [
|
||||
AC_MSG_WARN([Single-threaded version])
|
||||
])
|
||||
])
|
||||
|
||||
dnl Checks for architecture
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Checks for compiler
|
||||
AC_CHECK_CC_OPT([-Wall], CFLAGS="$CFLAGS -Wall", [])
|
||||
AC_CHECK_CC_OPT([-Wextra], CFLAGS="$CFLAGS -Wextra", [])
|
||||
AC_CHECK_CC_OPT([-Wuninitialized], CFLAGS="$CFLAGS -Wuninitialized", [])
|
||||
AC_CHECK_CC_OPT([-Wshadow], CFLAGS="$CFLAGS -Wshadow", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wall], CFLAGS="$CFLAGS -Wall", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wextra], CFLAGS="$CFLAGS -Wextra", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wuninitialized], CFLAGS="$CFLAGS -Wuninitialized", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wshadow], CFLAGS="$CFLAGS -Wshadow", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], CFLAGS="$CFLAGS -Wshorten-64-to-32", [])
|
||||
|
||||
dnl Disable warning about zero-length-bounds raised by gcc 10 on linux kernel header on the fm_extents field
|
||||
AC_CHECK_CC_OPT([-Wno-zero-length-bounds], CFLAGS="$CFLAGS -Wno-zero-length-bounds", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-zero-length-bounds], CFLAGS="$CFLAGS -Wno-zero-length-bounds", [])
|
||||
|
||||
dnl Checks for asm
|
||||
AC_ARG_ENABLE([asm],
|
||||
AS_HELP_STRING([--disable-asm], [Disable inline assembly]))
|
||||
AS_IF([test "x$enable_asm" != "xno"],
|
||||
[AC_DEFINE([HAVE_ASSEMBLY], [1], [Define to 1 if inline assembly should be used.])]
|
||||
AS_IF([test "x$enable_asm" != "xno"], [
|
||||
AC_DEFINE([HAVE_ASSEMBLY], [1], [Define to 1 if inline assembly should be used.])
|
||||
])
|
||||
|
||||
dnl AS_IF(HAVE_ASSEMBLY) NOT closed here
|
||||
|
||||
dnl Checks for AS supporting the SSE2 instructions.
|
||||
AC_MSG_CHECKING([for sse2])
|
||||
asmsse2=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
void f(void)
|
||||
{
|
||||
asm volatile("pxor %xmm0,%xmm1");
|
||||
}
|
||||
#else
|
||||
#error not x86
|
||||
#endif
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_SSE2], [1], [Define to 1 if sse2 is supported by the assembler.]) asmsse2=yes])
|
||||
AC_MSG_RESULT([$asmsse2])
|
||||
|
||||
dnl Checks for AS supporting the SSSE3 instructions.
|
||||
AC_MSG_CHECKING([for ssse3])
|
||||
asmssse3=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
void f(void)
|
||||
{
|
||||
asm volatile("pshufb %xmm0,%xmm1");
|
||||
}
|
||||
#else
|
||||
#error not x86
|
||||
#endif
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_SSSE3], [1], [Define to 1 if ssse3 is supported by the assembler.]) asmssse3=yes])
|
||||
AC_MSG_RESULT([$asmssse3])
|
||||
|
||||
dnl Checks for AS supporting the SSE4.2 instructions.
|
||||
AC_MSG_CHECKING([for sse42])
|
||||
asmsse42=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
unsigned f(unsigned crc, unsigned char b)
|
||||
{
|
||||
asm volatile("crc32b %1, %0" : "+r" (crc) : "rm" (b));
|
||||
return crc;
|
||||
}
|
||||
#else
|
||||
#error not x86
|
||||
#endif
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_SSE42], [1], [Define to 1 if sse4.2 is supported by the assembler.]) asmsse42=yes])
|
||||
AC_MSG_RESULT([$asmsse42])
|
||||
|
||||
dnl Checks for AS supporting the AVX2 instructions.
|
||||
AC_MSG_CHECKING([for avx2])
|
||||
asmavx2=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
void f(void* ptr)
|
||||
{
|
||||
asm volatile("vbroadcasti128 %0, %%ymm0" : : "m" (ptr));
|
||||
}
|
||||
#else
|
||||
#error not x86
|
||||
#endif
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_AVX2], [1], [Define to 1 if avx2 is supported by the assembler.]) asmavx2=yes])
|
||||
AC_MSG_RESULT([$asmavx2])
|
||||
|
||||
dnl AS_IF(HAVE_ASSEMBLY) closed here
|
||||
)
|
||||
dnl Optional command prefix used to execute cross-compiled target binaries.
|
||||
dnl For example:
|
||||
dnl TARGET_RUNNER="qemu-arm -cpu cortex-a15 -L /usr/arm-linux-gnueabihf"
|
||||
AC_ARG_VAR([TARGET_RUNNER], [Command prefix used to execute cross-compiled target binaries])
|
||||
|
||||
dnl Checks for test environment
|
||||
AS_CASE([$host],
|
||||
|
|
@ -252,10 +223,19 @@ AS_CASE([$host],
|
|||
TESTENV="$WINE"
|
||||
FAILENV="$TESTENV"
|
||||
],
|
||||
[POSIX=1]
|
||||
[
|
||||
POSIX=1
|
||||
AS_IF([test "x$cross_compiling" = "xyes" && test -n "$TARGET_RUNNER"],
|
||||
[
|
||||
TESTENV="$TARGET_RUNNER"
|
||||
FAILENV="$TESTENV"
|
||||
AC_MSG_NOTICE([Cross-compiled target runner: $TARGET_RUNNER])
|
||||
])
|
||||
]
|
||||
)
|
||||
AM_CONDITIONAL(HAVE_POSIX, [test x"$POSIX" != x])
|
||||
AM_CONDITIONAL(HAVE_DISK_ARBITRATION, [test "$(uname)" == Darwin])
|
||||
AM_CONDITIONAL(CROSS_COMPILING, [test "x$cross_compiling" = "xyes"])
|
||||
AM_CONDITIONAL(HAVE_DISK_ARBITRATION, [test "$(uname)" = Darwin])
|
||||
|
||||
AC_ARG_ENABLE([profiler],
|
||||
[AS_HELP_STRING([--enable-profiler],[enable the use of gprof for code coverage])],
|
||||
|
|
@ -353,12 +333,14 @@ dnl p4p -> Pentium4 Prescott with SSE2
|
|||
dnl mrm -> Merom with SSSE3
|
||||
dnl nhm -> Nehalem with SSE4.2
|
||||
dnl hsw -> Haswell with AVX2
|
||||
dnl knl -> Knights Landing with AVX512
|
||||
dnl knl -> Knights Landing with AVX512F
|
||||
dnl skx -> Skylake Xeon with AVX512BW
|
||||
[
|
||||
TESTENV_SSE2="$SDE -chip-check-exe-only -p4p --"
|
||||
TESTENV_SSSE3="$SDE -chip-check-exe-only -mrm --"
|
||||
TESTENV_SSE42="$SDE -nhm --"
|
||||
TESTENV_AVX2="$SDE -hsw --"
|
||||
TESTENV_AVX512="$SDE -skx --"
|
||||
EMULATOR=1
|
||||
# Target CPU compatible with P4 Prescott
|
||||
CFLAGS="$CFLAGS -march=athlon64"
|
||||
|
|
@ -370,38 +352,65 @@ AC_ARG_ENABLE([debug],
|
|||
[AS_HELP_STRING([--enable-debug],[enable debugging])],
|
||||
[
|
||||
CFLAGS="-Og -g -pthread -Wall -Wextra"
|
||||
AC_CHECK_CC_OPT([-rdynamic], CFLAGS="$CFLAGS -rdynamic", [])
|
||||
AX_CHECK_COMPILE_FLAG([-rdynamic], CFLAGS="$CFLAGS -rdynamic", [])
|
||||
],
|
||||
[])
|
||||
|
||||
AC_ARG_ENABLE([warning-as-error],
|
||||
[AS_HELP_STRING([--enable-warning-as-error],[stop build on warnings])],
|
||||
[
|
||||
AC_CHECK_CC_OPT([-Werror], CFLAGS="$CFLAGS -Werror", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror], CFLAGS="$CFLAGS -Werror", [])
|
||||
dnl This avoid the Darwin error: clang: error: argument unused during compilation: '-pthread'
|
||||
dnl See: https://llvm.org/bugs/show_bug.cgi?id=7798
|
||||
AC_CHECK_CC_OPT([-Wno-error=unused-command-line-argument], CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-error=unused-command-line-argument], CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument", [])
|
||||
],
|
||||
[])
|
||||
|
||||
AC_ARG_ENABLE([warning],
|
||||
[AS_HELP_STRING([--enable-warning],[enable extra warning])],
|
||||
[
|
||||
AC_CHECK_CC_OPT([-Wpointer-arith], CFLAGS="$CFLAGS -Wpointer-arith", [])
|
||||
AC_CHECK_CC_OPT([-Wcast-qual], CFLAGS="$CFLAGS -Wcast-qual", [])
|
||||
AC_CHECK_CC_OPT([-Wunused], CFLAGS="$CFLAGS -Wunused", [])
|
||||
AC_CHECK_CC_OPT([-Wunreachable-code], CFLAGS="$CFLAGS -Wunreachable-code", [])
|
||||
AC_CHECK_CC_OPT([-Wpadded], CFLAGS="$CFLAGS -Wpadded", [])
|
||||
AC_CHECK_CC_OPT([-Weverything], CFLAGS="$CFLAGS -Weverything", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wpointer-arith], CFLAGS="$CFLAGS -Wpointer-arith", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wcast-qual], CFLAGS="$CFLAGS -Wcast-qual", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused], CFLAGS="$CFLAGS -Wunused", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunreachable-code], CFLAGS="$CFLAGS -Wunreachable-code", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Wpadded], CFLAGS="$CFLAGS -Wpadded", [])
|
||||
AX_CHECK_COMPILE_FLAG([-Weverything], CFLAGS="$CFLAGS -Weverything", [])
|
||||
],
|
||||
[])
|
||||
|
||||
# WITH_TOOL(NAME, BINARY, DESCRIPTION)
|
||||
# Adds --with-NAME=PATH option. Defines NAME_PATH if given.
|
||||
AC_DEFUN([WITH_TOOL], [
|
||||
AC_ARG_WITH([$1],
|
||||
[AS_HELP_STRING([--with-$1=PATH],
|
||||
[absolute path to the $2 executable ($3)])],
|
||||
[
|
||||
AS_CASE([$withval],
|
||||
[/*], [],
|
||||
[AC_MSG_ERROR([--with-$1 requires an absolute path (got '$withval')])])
|
||||
AS_IF([test ! -x "$withval"],
|
||||
[AC_MSG_WARN([$2 not found or not executable at '$withval'])])
|
||||
AC_DEFINE_UNQUOTED(m4_toupper([$1_PATH]), ["$withval"],
|
||||
[Absolute path to $2, set at configure time.])
|
||||
AC_MSG_NOTICE([$2: $withval])
|
||||
],
|
||||
[
|
||||
AC_MSG_NOTICE([$2: use runtime discovery])
|
||||
])
|
||||
])
|
||||
|
||||
WITH_TOOL([smartctl], [smartctl], [S.M.A.R.T. monitoring])
|
||||
WITH_TOOL([zfs], [zfs], [ZFS pool management])
|
||||
WITH_TOOL([zpool], [zpool], [ZFS pool status])
|
||||
WITH_TOOL([bcachefs], [bcachefs], [Bcachefs management])
|
||||
|
||||
AC_ARG_VAR([TESTENV], [Test environment])
|
||||
AC_ARG_VAR([FAILENV], [Test environment for failing tests])
|
||||
AC_ARG_VAR([TESTENV_SSE2], [Test environment for SSE2])
|
||||
AC_ARG_VAR([TESTENV_SSSE3], [Test environment for SSSE3])
|
||||
AC_ARG_VAR([TESTENV_SSE42], [Test environment for SSE42])
|
||||
AC_ARG_VAR([TESTENV_AVX2], [Test environment for AVX2])
|
||||
AC_ARG_VAR([TESTENV_AVX512], [Test environment for AVX512])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([pkg/snapraid.info pkg/control pkg/snapraid.spec pkg/.PKGINFO pkg/PKGBUILD pkg/.SRCINFO])
|
||||
|
|
@ -413,4 +422,7 @@ AC_CONFIG_FILES([makerpm.sh], [chmod a+x makerpm.sh])
|
|||
AC_CONFIG_FILES([makearch.sh], [chmod a+x makearch.sh])
|
||||
AC_CONFIG_FILES([makearchdist.sh], [chmod a+x makearchdist.sh])
|
||||
|
||||
# Ensure object subdirectories exist for out-of-tree builds without depcomp
|
||||
AC_CONFIG_COMMANDS([mkdir-obj], [$MKDIR_P cmdline raid os tommyds])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
|||
3
configure.analyzer
Executable file
3
configure.analyzer
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
DIR=$(dirname "$0")
|
||||
"$DIR/configure" CC=/usr/libexec/ccc-analyzer
|
||||
|
||||
|
|
@ -1,3 +1,2 @@
|
|||
./configure --host=x86_64-w64-mingw32.static --build=`./config.guess` $@
|
||||
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
"$DIR/configure" --host=x86_64-w64-mingw32.static --build=$("$DIR/config.guess") "$@"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
./configure --host=i686-w64-mingw32.static --build=`./config.guess` $@
|
||||
DIR=$(dirname "$0")
|
||||
"$DIR/configure" --host=i686-w64-mingw32.static --build=$("$DIR/config.guess") "$@"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ snapraid [\-c, \-\-conf CONFIG]
|
|||
snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PD 0
|
||||
.PD
|
||||
.SH DESCRIPTION
|
||||
.SH BESCHREIBUNG (DESCRIPTION)
|
||||
SnapRAID ist ein Sicherungsprogramm, das für Festplatten\-Arrays
|
||||
entwickelt wurde und Paritätsinformationen zur Datenwiederherstellung
|
||||
bei Ausfall von bis zu sechs Festplatten speichert.
|
||||
|
|
@ -107,7 +107,7 @@ SnapRAID sperrt Ihre Daten nicht ein; Sie können die Verwendung
|
|||
jederzeit beenden, ohne neu formatieren oder Daten verschieben zu müssen.
|
||||
.IP \(bu
|
||||
Um auf eine Datei zuzugreifen, muss nur eine einzige Festplatte
|
||||
drehen (spinnen), was Strom spart und Geräusche reduziert.
|
||||
anlaufen (drehen), was Strom spart und Geräusche reduziert.
|
||||
.PD
|
||||
.PP
|
||||
Für weitere Informationen besuchen Sie bitte die offizielle SnapRAID\-Website:
|
||||
|
|
@ -117,26 +117,35 @@ https://www.snapraid.it/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH LIMITATIONS
|
||||
SnapRAID ist ein Hybrid aus einem RAID\- und einem Sicherungsprogramm,
|
||||
das darauf abzielt, die besten Vorteile beider zu kombinieren.
|
||||
Es hat jedoch einige Einschränkungen, die Sie vor der Verwendung
|
||||
berücksichtigen sollten.
|
||||
.SH EINSCHRäNKUNGEN (LIMITATIONS)
|
||||
SnapRAID ist ein Hybrid aus RAID und einem Backup\-Programm mit dem Ziel, die
|
||||
besten Vorteile von beiden zu kombinieren. Es hat jedoch einige Einschränkungen, die Sie
|
||||
vor der Verwendung berücksichtigen sollten.
|
||||
.PP
|
||||
Die Haupteinschränkung besteht darin, dass wenn eine Festplatte
|
||||
ausfällt und Sie in letzter Zeit keine Synchronisierung durchgeführt haben,
|
||||
Sie möglicherweise nicht vollständig wiederherstellen können.
|
||||
Genauer gesagt können Sie möglicherweise nicht bis zur Größe der
|
||||
geänderten oder gelöschten Dateien seit der letzten \`sync\`\-Operation
|
||||
wiederherstellen. Dies tritt auch dann auf, wenn die geänderten oder
|
||||
gelöschten Dateien sich nicht auf der ausgefallenen Festplatte befinden.
|
||||
Aus diesem Grund ist SnapRAID besser für Daten geeignet, die sich
|
||||
selten ändern.
|
||||
Die Haupteinschränkung besteht darin, dass Sie bei einem Festplattenausfall Daten nur bis zum
|
||||
Zustand des letzten \`sync\`\-Vorgangs wiederherstellen können. Alle Daten, die seit dem
|
||||
letzten Sync hinzugefügt oder geändert wurden und sich auf der ausgefallenen Festplatte befinden, gehen verloren.
|
||||
.PP
|
||||
Andererseits verhindern neu hinzugefügte Dateien die Wiederherstellung
|
||||
von bereits vorhandenen Dateien nicht. Sie verlieren nur die
|
||||
kürzlich hinzugefügten Dateien, wenn diese sich auf der ausgefallenen
|
||||
Festplatte befinden.
|
||||
Daher eignet sich SnapRAID in erster Linie für Daten, die sich selten ändern.
|
||||
.PP
|
||||
Für Daten, die beim letzten Sync bereits existierten, hängt die Wiederherstellungszuverlässigkeit
|
||||
davon ab, ob die Option \`snapshot\` verwendet wird:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Mit Snapshot\-Unterstützung (verfügbar auf Btrfs, ZFS, Bcachefs und NTFS)
|
||||
kann SnapRAID automatisch eine unabhängige eingefrorene Referenz
|
||||
jedes unterstützten Daten\-Dateisystems beibehalten.
|
||||
Dies stellt sicher, dass der Wiederherstellungsprozess konsistent und zuverlässig bleibt,
|
||||
selbst wenn Sie während oder nach einem Sync Dateien auf Ihrem Live\-Dateisystem ändern oder löschen.
|
||||
.PD
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Ohne Snapshot\-Unterstützung kann das Löschen oder Ändern von Dateien nach einem \`sync\`
|
||||
die vollständige Wiederherstellung anderer ausgefallener Festplatten verhindern. Dies geschieht,
|
||||
weil die Parität nicht mehr mit den geänderten Dateien übereinstimmt, selbst wenn
|
||||
sich diese Dateien nicht auf der ausgefallenen Festplatte befinden. Neu hinzugefügte
|
||||
Dateien verhindern dagegen die Wiederherstellung bereits vorhandener Dateien nicht.
|
||||
.PD
|
||||
.PP
|
||||
Weitere Einschränkungen von SnapRAID sind:
|
||||
.PD 0
|
||||
|
|
@ -144,7 +153,7 @@ Weitere Einschränkungen von SnapRAID sind:
|
|||
Mit SnapRAID haben Sie immer noch separate Dateisysteme für jede
|
||||
Festplatte. Mit RAID erhalten Sie ein einziges großes Dateisystem.
|
||||
.IP \(bu
|
||||
SnapRAID streift (stripes) keine Daten.
|
||||
SnapRAID verwendet kein Data\-Striping (Verteilen von Datenblöcken).
|
||||
Mit RAID erhalten Sie einen Geschwindigkeitsvorteil durch Striping.
|
||||
.IP \(bu
|
||||
SnapRAID unterstützt keine Echtzeit\-Wiederherstellung.
|
||||
|
|
@ -152,20 +161,20 @@ Mit RAID müssen Sie die Arbeit nicht unterbrechen, wenn eine
|
|||
Festplatte ausfällt.
|
||||
.IP \(bu
|
||||
SnapRAID kann Daten nur von einer begrenzten Anzahl von Festplattenausfällen
|
||||
wiederherstellen. Mit einer Sicherung können Sie von einem
|
||||
wiederherstellen. Mit einer Sicherung können Sie Daten nach einem
|
||||
vollständigen Ausfall des gesamten Festplatten\-Arrays wiederherstellen.
|
||||
.IP \(bu
|
||||
Nur Dateinamen, Zeitstempel, symbolische Links (symlinks) und
|
||||
Hardlinks werden gespeichert. Berechtigungen, Eigentümerschaft
|
||||
und erweiterte Attribute werden nicht gespeichert.
|
||||
.PD
|
||||
.SH GETTING STARTED
|
||||
.SH ERSTE SCHRITTE (GETTING STARTED)
|
||||
Um SnapRAID zu verwenden, müssen Sie zuerst eine Festplatte in Ihrem
|
||||
Festplatten\-Array auswählen, die für \`parity\`\-Informationen
|
||||
reserviert wird. Mit einer Festplatte für Parität können Sie von
|
||||
einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5.
|
||||
reserviert wird. Mit einer Festplatte für Parität können Sie Daten
|
||||
nach einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5.
|
||||
.PP
|
||||
Wenn Sie von mehr Festplattenausfällen wiederherstellen möchten,
|
||||
Wenn Sie mehr Festplattenausfälle ausgleichen möchten,
|
||||
ähnlich wie bei RAID6, müssen Sie zusätzliche Festplatten für Parität
|
||||
reservieren. Jede zusätzliche Paritätsfestplatte ermöglicht die
|
||||
Wiederherstellung von einem weiteren Festplattenausfall.
|
||||
|
|
@ -309,7 +318,7 @@ Wenn dieser Befehl abgeschlossen ist, sind Ihre Daten SICHER.
|
|||
.PP
|
||||
Jetzt können Sie Ihr Array nach Belieben verwenden und die Paritätsinformationen
|
||||
regelmäßig durch Ausführen des \`sync\`\-Befehls aktualisieren.
|
||||
.SS Scrubbing
|
||||
.SS Scrubben (Scrubbing)
|
||||
Um die Daten und die Parität regelmäßig auf Fehler zu überprüfen,
|
||||
können Sie den Befehl \`scrub\` ausführen.
|
||||
.PP
|
||||
|
|
@ -373,10 +382,10 @@ kann Fehler melden, die durch entfernte oder geänderte Dateien
|
|||
verursacht wurden. Diese Fehler werden in der \`scrub\`\-Ausgabe
|
||||
gemeldet, aber die zugehörigen Blöcke werden nicht als fehlerhaft
|
||||
markiert.
|
||||
.SS Pooling
|
||||
.SS Zusammenführen (Pooling)
|
||||
Hinweis: Die unten beschriebene Pooling\-Funktion wurde durch das
|
||||
Tool mergerfs ersetzt, das jetzt die empfohlene Option für Linux\-Benutzer
|
||||
in der SnapRAID\-Community ist. Mergefs bietet eine flexiblere
|
||||
in der SnapRAID\-Community ist. Mergerfs bietet eine flexiblere
|
||||
und effizientere Möglichkeit, mehrere Laufwerke zu einem einzigen,
|
||||
vereinheitlichten Einhängepunkt (Mount Point) zusammenzufassen,
|
||||
was einen nahtlosen Zugriff auf Dateien über Ihr gesamtes Array
|
||||
|
|
@ -530,7 +539,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Undeleting
|
||||
.SS Wiederherstellen (Undeleting)
|
||||
SnapRAID funktioniert eher wie ein Sicherungsprogramm als ein RAID\-System
|
||||
und kann verwendet werden, um Dateien in ihren vorherigen Zustand
|
||||
wiederherzustellen oder das Löschen rückgängig zu machen, indem die
|
||||
|
|
@ -568,14 +577,16 @@ snapraid fix \-m
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Recovering
|
||||
.SS Wiederherstellung (Recovering)
|
||||
Das Schlimmste ist passiert, und Sie haben eine oder mehrere Festplatten
|
||||
verloren!
|
||||
.PP
|
||||
KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen!
|
||||
.PP
|
||||
Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem
|
||||
Festplatten\-Array zu vermeiden. Deaktivieren Sie alle Remote\-Verbindungen
|
||||
Bevor Sie irgendetwas anderes tun, vermeiden Sie jegliche Änderungen an Ihrem
|
||||
Festplatten\-Array, da das Ändern oder Löschen von Daten auf den verbleibenden
|
||||
Festplatten eine Wiederherstellung unmöglich machen kann.
|
||||
Deaktivieren Sie alle Remote\-Verbindungen
|
||||
dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID\-nächtlicher
|
||||
\`sync\`\- oder \`scrub\`\-Läufe.
|
||||
.PP
|
||||
|
|
@ -683,19 +694,19 @@ snapraid sync
|
|||
.RE
|
||||
.PP
|
||||
Wenn alles wiederhergestellt ist, ist dieser Befehl sofort.
|
||||
.SH COMMANDS
|
||||
SnapRAID bietet einige einfache Befehle, mit denen Sie:
|
||||
.SH BEFEHLE (COMMANDS)
|
||||
SnapRAID bietet ein paar einfache Befehle, mit denen Sie folgende Aktionen ausführen können:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Den Status des Arrays ausgeben \-> \`status\`
|
||||
.IP \(bu
|
||||
Die Festplatten steuern \-> \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
.IP \(bu
|
||||
Eine Sicherung/einen Snapshot erstellen \-> \`sync\`
|
||||
Einen Backup\-/Wiederherstellungspunkt erstellen \-> \`sync\`
|
||||
.IP \(bu
|
||||
Daten regelmäßig überprüfen \-> \`scrub\`
|
||||
.IP \(bu
|
||||
Die letzte Sicherung/den letzten Snapshot wiederherstellen \-> \`fix\`.
|
||||
Den letzten Backup\-/Wiederherstellungspunkt wiederherstellen \-> \`fix\`.
|
||||
.PD
|
||||
.PP
|
||||
Befehle müssen in Kleinbuchstaben geschrieben werden.
|
||||
|
|
@ -715,7 +726,7 @@ aufgelistet. Um sie zu beheben, können Sie den Befehl \`fix \-e\`
|
|||
verwenden.
|
||||
.PP
|
||||
Es zeigt auch ein Diagramm an, das den letzten Zeitpunkt darstellt,
|
||||
zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbed
|
||||
zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbte
|
||||
Blöcke werden mit \`*\`, Blöcke, die synchronisiert, aber noch nicht
|
||||
gescrubbed wurden, mit \`o\` angezeigt.
|
||||
.PP
|
||||
|
|
@ -724,7 +735,7 @@ Es wird nichts geändert.
|
|||
Gibt einen SMART\-Bericht aller Festplatten im System aus.
|
||||
.PP
|
||||
Es enthält eine Schätzung der Ausfallwahrscheinlichkeit im nächsten
|
||||
Jahr, sodass Sie die Wartungsersetzung von Festplatten planen können,
|
||||
Jahr, sodass Sie den vorsorglichen Austausch von Festplatten planen können,
|
||||
die verdächtige Attribute aufweisen.
|
||||
.PP
|
||||
Diese Wahrscheinlichkeitsschätzung wird durch Korrelation der SMART\-Attribute
|
||||
|
|
@ -835,10 +846,11 @@ Dateien mit einer anderen Größe oder einem anderen
|
|||
Zeitstempel, was bedeutet, dass sie geändert wurden.
|
||||
.HP 4
|
||||
.I moved
|
||||
Auf derselben Festplatte in ein anderes Verzeichnis
|
||||
verschobene Dateien. Sie werden durch denselben Namen,
|
||||
dieselbe Größe, denselben Zeitstempel und dieselbe Inode,
|
||||
aber ein anderes Verzeichnis identifiziert.
|
||||
Dateien, die auf derselben Festplatte verschoben oder
|
||||
umbenannt wurden, wobei dieselbe Inode beibehalten wird.
|
||||
Sie werden durch dieselbe Inode, dieselbe Größe und denselben
|
||||
Zeitstempel, aber einen anderen Pfad identifiziert. Der
|
||||
Dateiname kann auch unterschiedlich sein.
|
||||
.HP 4
|
||||
.I copied
|
||||
Dateien, die auf dieselbe oder eine andere Festplatte
|
||||
|
|
@ -850,14 +862,13 @@ Pfad übereinstimmen, um identifiziert zu werden, nicht nur
|
|||
der Name.
|
||||
.HP 4
|
||||
.I relocated
|
||||
Dateien, die auf dieselbe oder eine andere Festplatte
|
||||
verschoben wurden, wobei das Original verschwunden ist.
|
||||
Sie werden dadurch identifiziert, dass sie denselben Namen,
|
||||
dieselbe Größe und denselben Zeitstempel haben.
|
||||
Wenn der Subsekunden\-Zeitstempel Null ist, muss der vollständige
|
||||
Pfad übereinstimmen, um identifiziert zu werden.
|
||||
Im Gegensatz zu \'moved\' Dateien auf derselben Festplatte haben
|
||||
verschobene Dateien einen anderen Inode.
|
||||
Dateien, die in ein anderes Verzeichnis oder auf eine andere
|
||||
Festplatte verschoben wurden, wobei die Originaldatei verschwunden ist
|
||||
und die Inode nicht beibehalten wird. Sie werden dadurch identifiziert,
|
||||
dass sie denselben Namen, dieselbe Größe und denselben Zeitstempel haben.
|
||||
Wenn der Subsekunden\-Zeitstempel Null ist, muss der vollständige Pfad
|
||||
übereinstimmen, um identifiziert zu werden. Im Gegensatz zu \'moved\'
|
||||
Dateien erfordern umgesiedelte Dateien, dass der Dateiname gleich bleibt.
|
||||
.HP 4
|
||||
.I restored
|
||||
Dateien mit einem anderen Inode, aber passendem
|
||||
|
|
@ -959,14 +970,14 @@ Blöcke zu markieren.
|
|||
Die \`parity\`\-Dateien werden NICHT geändert.
|
||||
Die Dateien im Array werden NICHT geändert.
|
||||
.SS fix
|
||||
Behebt alle Dateien und die Paritätsdaten.
|
||||
Repariert alle Dateien und die Paritätsdaten.
|
||||
.PP
|
||||
Alle Dateien und Paritätsdaten werden mit dem Snapshot\-Zustand
|
||||
verglichen, der beim letzten \`sync\` gespeichert wurde.
|
||||
Wenn eine Abweichung gefunden wird, wird sie auf den gespeicherten
|
||||
Snapshot zurückgesetzt.
|
||||
Alle Dateien und Paritätsdaten werden mit dem im letzten \`sync\`
|
||||
gespeicherten Zustand verglichen. Wenn ein Unterschied gefunden
|
||||
wird, wird er auf den gespeicherten Zustand zurückgesetzt.
|
||||
.PP
|
||||
WARNUNG! Der Befehl \`fix\` unterscheidet nicht zwischen Fehlern und
|
||||
WARNUNG!
|
||||
Der Befehl \`fix\` unterscheidet nicht zwischen Fehlern und
|
||||
beabsichtigten Änderungen. Er setzt den Dateizustand bedingungslos
|
||||
auf den letzten \`sync\` zurück.
|
||||
.PP
|
||||
|
|
@ -1103,7 +1114,7 @@ Wenn Sie diese Dateien neu zuweisen möchten, können Sie die Option
|
|||
\-W, \-\-force\-realloc\-tail verwenden.
|
||||
Beachten Sie, dass solche Dateien während des Neuzuweisungsprozesses
|
||||
nicht durch die Parität geschützt sind.
|
||||
.SH OPTIONS
|
||||
.SH OPTIONEN (OPTIONS)
|
||||
SnapRAID bietet die folgenden Optionen:
|
||||
.TP
|
||||
.B \-c, \-\-conf CONFIG
|
||||
|
|
@ -1219,9 +1230,9 @@ Befehlsfehler sicher gestoppt werden.
|
|||
.B \-w, \-\-bw\-limit RATE
|
||||
Wendet eine globale Bandbreitenbegrenzung für alle Festplatten
|
||||
an. RATE ist die Anzahl der Bytes pro Sekunde. Sie können
|
||||
einen Multiplikator wie K, M oder G angeben (z.B. \-\-bw\-limit 1G).
|
||||
einen Multiplikator wie K, M, G oder T angeben (z.B. \-\-bw\-limit 1G).
|
||||
.TP
|
||||
.B \-t, \-\-tail GRÖSSE
|
||||
.B \-t, \-\-tail SIZE
|
||||
Beschränkt die Dateiliste auf diejenigen, die nicht mehr als die
|
||||
angegebene Tail\-Größe der Paritätsfestplatten belegen.
|
||||
Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. \-\-tail 1G).
|
||||
|
|
@ -1251,7 +1262,7 @@ Erzwingt den unsicheren Vorgang der Synchronisierung einer Datei
|
|||
mit Nullgröße, die zuvor nicht Null war. Wenn SnapRAID eine
|
||||
solche Bedingung erkennt, stoppt es den Vorgang, es sei denn,
|
||||
Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu
|
||||
erkennen, wann nach einem Systemabsturz einige zugegriffene Dateien
|
||||
erkennen, wann nach einem Systemabsturz einige Dateien, auf die zugegriffen wurde,
|
||||
abgeschnitten (truncated) wurden. Dies ist eine mögliche Bedingung
|
||||
unter Linux mit den ext3/ext4\-Dateisystemen.
|
||||
Diese Option kann nur mit \`sync\` verwendet werden.
|
||||
|
|
@ -1286,7 +1297,7 @@ Festplatten oder mit Festplatten auf demselben physischen Gerät.
|
|||
Wenn Sie beispielsweise zwei Datenfestplatten verloren haben und
|
||||
eine Ersatzfestplatte haben, um nur die erste wiederherzustellen,
|
||||
können Sie die zweite unzugängliche Festplatte ignorieren.
|
||||
Oder wenn Sie eine Festplatte in dem auf einer bereits
|
||||
Oder wenn Sie eine Festplatte auf dem auf einer bereits
|
||||
verwendeten Festplatte verbleibenden freien Speicherplatz
|
||||
wiederherstellen möchten, wobei sie dasselbe physische Gerät
|
||||
gemeinsam nutzen.
|
||||
|
|
@ -1330,9 +1341,9 @@ WARNUNG! Diese Option ist nur für Experten gedacht, und es wird
|
|||
dringend empfohlen, sie nicht zu verwenden.
|
||||
Sie haben während der \`sync\`\-Operation KEINEN Datenschutz.
|
||||
.TP
|
||||
.B \-W, \-\-force\-realloc\-tail GRÖSSE
|
||||
.B \-W, \-\-force\-realloc\-tail SIZE
|
||||
Funktioniert wie \-R, \-\-force\-realloc, ist jedoch auf den angegebenen
|
||||
Endbereich (die letzten GRÖSSE Bytes) jeder Paritätsdatei beschränkt.
|
||||
Endbereich (die letzten SIZE Bytes) jeder Paritätsdatei beschränkt.
|
||||
Erzwingt die Neuzuweisung (Verschiebung) aller Dateifragmente/\-blöcke, die
|
||||
derzeit in diesem Endabschnitt gespeichert sind, sodass sie an beliebiger Stelle
|
||||
in den Paritätsdateien platziert werden können, wo freier Speicherplatz
|
||||
|
|
@ -1385,15 +1396,17 @@ Startet die Verarbeitung ab der angegebenen Blocknummer.
|
|||
Dies kann nützlich sein, um die Überprüfung oder Behebung
|
||||
spezifischer Blöcke im Falle einer beschädigten Festplatte
|
||||
zu wiederholen. Diese Option ist hauptsächlich für die erweiterte
|
||||
manuelle Wiederherstellung gedacht.
|
||||
manuelle Wiederherstellung gedacht und wird nur von \`check\`
|
||||
und \`fix\` unterstützt.
|
||||
.TP
|
||||
.B \-B, \-\-count BLKCOUNT
|
||||
Verarbeitet nur die angegebene Anzahl von Blöcken.
|
||||
Diese Option ist hauptsächlich für die erweiterte manuelle
|
||||
Wiederherstellung gedacht.
|
||||
Wiederherstellung gedacht und wird nur von \`check\` und \`fix\`
|
||||
unterstützt.
|
||||
.TP
|
||||
.B \-C, \-\-gen\-conf CONTENT
|
||||
Generiert eine Dummy\-Konfigurationsdatei aus einer vorhandenen
|
||||
Generiert eine Dummy\-Konfigurationsdatei aus einer bestehenden
|
||||
Content\-Datei. Die Konfigurationsdatei wird in die Standardausgabe
|
||||
geschrieben und überschreibt keine vorhandene.
|
||||
Diese Konfigurationsdatei enthält auch die Informationen,
|
||||
|
|
@ -1419,7 +1432,7 @@ Gibt eine kurze Hilfeanzeige aus.
|
|||
.TP
|
||||
.B \-V, \-\-version
|
||||
Gibt die Programmversion aus.
|
||||
.SH CONFIGURATION
|
||||
.SH KONFIGURATION (CONFIGURATION)
|
||||
SnapRAID benötigt eine Konfigurationsdatei, um zu wissen, wo sich
|
||||
Ihr Festplatten\-Array befindet und wo die Paritätsinformationen
|
||||
gespeichert werden sollen.
|
||||
|
|
@ -1432,9 +1445,8 @@ Verzeichnis wie \`snapraid.exe\` verwendet.
|
|||
Sie muss die folgenden Optionen (Groß\- und Kleinschreibung beachten)
|
||||
enthalten:
|
||||
.SS parity FILE [,FILE] ...
|
||||
Definiert die Dateien, die zum Speichern der Paritätsinformationen
|
||||
verwendet werden sollen. Die Parität ermöglicht den Schutz
|
||||
vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5.
|
||||
Definiert die Dateien, die zum Speichern der Paritätsinformationen verwendet werden.
|
||||
Die Parität ermöglicht den Schutz vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5.
|
||||
.PP
|
||||
Sie können mehrere Dateien angeben, die sich auf unterschiedlichen
|
||||
Festplatten befinden müssen. Wenn eine Datei nicht mehr wachsen
|
||||
|
|
@ -1453,8 +1465,7 @@ um die Warnung vor vollen Festplatten zu vermeiden.
|
|||
.PP
|
||||
Diese Option ist obligatorisch und kann nur einmal verwendet werden.
|
||||
.SS (2,3,4,5,6)\-parity FILE [,FILE] ...
|
||||
Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen
|
||||
verwendet werden sollen.
|
||||
Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen verwendet werden.
|
||||
.PP
|
||||
Für jede angegebene Paritätsstufe wird eine zusätzliche Schutzstufe
|
||||
aktiviert:
|
||||
|
|
@ -1496,8 +1507,8 @@ Es ist möglich, von einem Format in ein anderes zu konvertieren,
|
|||
indem die Konfigurationsdatei mit der gewünschten z\-parity\- oder
|
||||
3\-parity\-Datei angepasst und \`fix\` zur Neuerstellung verwendet wird.
|
||||
.SS content FILE
|
||||
Definiert die Datei, die zum Speichern der Liste und Prüfsummen
|
||||
aller im Festplatten\-Array vorhandenen Dateien verwendet werden soll.
|
||||
Definiert die Datei, die zum Speichern der Liste und der Prüfsummen aller
|
||||
im Festplatten\-Array vorhandenen Dateien verwendet wird.
|
||||
.PP
|
||||
Sie kann auf einer für Daten, Parität oder einer anderen
|
||||
verfügbaren Festplatte platziert werden.
|
||||
|
|
@ -1510,14 +1521,19 @@ um mehrere Kopien derselben Datei zu speichern.
|
|||
Sie müssen mindestens eine Kopie für jede verwendete Paritätsfestplatte
|
||||
plus eine speichern. Die Verwendung zusätzlicher Kopien schadet nicht.
|
||||
.SS data NAME DIR
|
||||
Definiert den Namen und den Einhängepunkt (Mount Point) der
|
||||
Datenfestplatten im Array. NAME wird zur Identifizierung der
|
||||
Festplatte verwendet und muss eindeutig sein. DIR ist der
|
||||
Einhängepunkt der Festplatte im Dateisystem.
|
||||
Definiert den Namen und Einhängepunkt der Datenfestplatten im Array. NAME
|
||||
wird zur Identifizierung der Festplatte verwendet und muss eindeutig sein.
|
||||
DIR ist der Einhängepunkt der Festplatte im Dateisystem.
|
||||
.PP
|
||||
Sie können den Einhängepunkt nach Bedarf ändern, solange Sie
|
||||
den NAME unverändert lassen.
|
||||
.PP
|
||||
Der konfigurierte Pfad muss jedoch durchgehend auf dieselben
|
||||
zugrunde liegenden Daten verweisen. Wenn der Pfad symbolische Links
|
||||
enthält, müssen deren Ziele stabil bleiben. Das Ändern solcher Symlinks,
|
||||
um das Datenverzeichnis im laufenden Betrieb zu wechseln, wird nicht
|
||||
unterstützt.
|
||||
.PP
|
||||
Sie sollten eine Option für jede Datenfestplatte im Array verwenden.
|
||||
.PP
|
||||
Sie können eine Festplatte später umbenennen, indem Sie den NAME
|
||||
|
|
@ -1534,6 +1550,30 @@ z. B. die Boot\-Festplatte.
|
|||
.PP
|
||||
Beachten Sie, dass solche Festplatten nicht von den Befehlen \`up\` und \`down\`
|
||||
betroffen sind, da von ihnen erwartet wird, dass sie sich immer drehen.
|
||||
.SS snapshot
|
||||
Aktiviert die Verwendung von Dateisystem\-Snapshots für die Befehle \`sync\`, \`scrub\`,
|
||||
\`check\` und \`fix\`.
|
||||
.PP
|
||||
Wenn aktiviert, erstellt SnapRAID zu Beginn eines \'sync\' einen schreibgeschützten
|
||||
Snapshot jedes unterstützten Daten\-Dateisystems. Dies bietet eine stabile Ansicht
|
||||
jedes Dateisystems und verhindert, dass spätere Änderungen die für die Paritätsberechnung
|
||||
verwendeten Daten verändern.
|
||||
.PP
|
||||
Dies verbessert die Wiederherstellung erheblich: Wenn eine Datei aus dem
|
||||
Live\-Dateisystem gelöscht wird, bleibt sie im Snapshot erhalten. Dies verhindert,
|
||||
dass die Parität für diesen Block \[dq]beschädigt\[dq] wird, sodass Sie Daten immer noch
|
||||
erfolgreich wiederherstellen können, wenn eine andere Festplatte ausfällt.
|
||||
.PP
|
||||
Diese Option gilt ausschließlich für Datenträger, die mit den Dateisystemen
|
||||
Btrfs, Bcachefs oder ZFS unter Linux und NTFS unter Windows formatiert sind.
|
||||
Paritätsfestplatten oder Datenträger mit anderen Dateisystemen verwenden immer
|
||||
die Live\-Version des Dateisystems.
|
||||
.PP
|
||||
Das Erstellen und Löschen von Snapshots erfordert Administratorrechte.
|
||||
Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo)
|
||||
ausgeführt wird, wenn diese Option aktiviert ist.
|
||||
.PP
|
||||
Eine detaillierte Erklärung des Snapshot\-Lebenszyklus finden Sie im Abschnitt SNAPSHOTS.
|
||||
.SS nohidden
|
||||
Schließt alle versteckten Dateien und Verzeichnisse aus.
|
||||
Unter Unix sind versteckte Dateien solche, die mit \`.\` beginnen.
|
||||
|
|
@ -1550,6 +1590,12 @@ wird die Datei ausgeschlossen, wenn das zuletzt angegebene Muster
|
|||
ein \`include\` ist, oder eingeschlossen, wenn das zuletzt angegebene
|
||||
Muster ein \`exclude\` ist.
|
||||
.PP
|
||||
Beachten Sie, dass die Filterung hierarchisch beim Durchlaufen der
|
||||
Verzeichnisse erfolgt. Wenn ein Verzeichnis mit einer \`exclude\`\-Regel
|
||||
übereinstimmt, wird das gesamte Verzeichnis übersprungen (verworfen),
|
||||
und alle \`include\`\-Regeln für darin enthaltene Dateien oder
|
||||
Unterverzeichnisse werden nicht ausgewertet.
|
||||
.PP
|
||||
Weitere Details zu Musterspezifikationen finden Sie im Abschnitt
|
||||
PATTERN.
|
||||
.PP
|
||||
|
|
@ -1731,6 +1777,9 @@ In den angegebenen OPTIONS wird die Zeichenfolge \`%s\` durch den
|
|||
Gerätenamen ersetzt. Bei RAID\-Controllern ist das Gerät
|
||||
wahrscheinlich fest, und Sie müssen \`%s\` möglicherweise nicht verwenden.
|
||||
.PP
|
||||
Sie können auch eine benutzerdefinierte Info\-Optionszeichenfolge mit dem
|
||||
Tag \`[info: ...]\` angeben, um die Standardoption \`\-a\` zu ersetzen.
|
||||
.PP
|
||||
Weitere mögliche Optionen finden Sie in der smartmontools\-Dokumentation:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1746,6 +1795,10 @@ https://www.smartmontools.org/wiki/Supported_USB\-Devices
|
|||
Zum Beispiel:
|
||||
.PP
|
||||
.RS 4
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl parity \-d sat %s
|
||||
.PD 0
|
||||
.PD
|
||||
|
|
@ -1762,23 +1815,33 @@ ist. PARITY ist einer der Paritätsnamen: \`parity\`, \`2\-parity\`,
|
|||
Der Sonderwert * kann verwendet werden, um das Attribut auf allen
|
||||
Festplatten zu ignorieren.
|
||||
.PP
|
||||
Um beispielsweise das Attribut \`Current Pending Sector Count\` auf allen
|
||||
Festplatten zu ignorieren:
|
||||
Es können mehrere Attribute durch Leerzeichen getrennt angegeben werden.
|
||||
Jedes Attribut kann als Nummer von 1 bis 255 oder als Name ohne
|
||||
Berücksichtigung der Groß\-/Kleinschreibung (z. B. \`Current_Pending_Sector\`)
|
||||
angegeben werden.
|
||||
.PP
|
||||
Um beispielsweise das Attribut \`Current Pending Sector Count\` und
|
||||
\`Reallocated Sectors Count\` auf allen Festplatten über ihre Nummer
|
||||
oder ihren Namen zu ignorieren:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore * 197
|
||||
smartignore * 197 5
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Um es nur auf der ersten Paritätsfestplatte zu ignorieren:
|
||||
Um sie nur auf der ersten Paritätsfestplatte zu ignorieren:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Examples
|
||||
.SS Beispiele (Examples)
|
||||
Ein Beispiel für eine typische Konfiguration für Unix ist:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1814,7 +1877,7 @@ exclude /tmp/
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1886,7 +1949,166 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH PATTERN
|
||||
.SH SNAPSHOTS
|
||||
Wenn die Snapshot\-Option in der Konfiguration aktiviert ist, verwendet SnapRAID
|
||||
Dateisystem\-Snapshots, um die während einer Operation gelesenen Daten stabil zu halten,
|
||||
selbst wenn Dateien auf den Live\-Dateisystemen nachträglich geändert oder gelöscht werden.
|
||||
.PP
|
||||
Die Verwaltung von Snapshots erfolgt vollständig automatisch und transparent.
|
||||
Sie können SnapRAID genau wie bisher verwenden, wobei der zusätzliche Schutz
|
||||
durch Snapshots vollständig im Hintergrund abgewickelt wird.
|
||||
.PP
|
||||
Dies bietet zwei wesentliche Vorteile:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I Konsistenz
|
||||
Dateien, die während eines lang laufenden Syncs oder Scrubs auf dem Live\-Dateisystem
|
||||
geändert werden, verursachen keine Paritätskonflikte oder abgebrochenen Operationen,
|
||||
weil jedes Dateisystem mit Snapshot für die Dauer der Operation unverändert bleibt.
|
||||
.HP 4
|
||||
.I Wiederherstellung
|
||||
Wenn eine Datei im Live\-Dateisystem aktualisiert oder gelöscht wird,
|
||||
bleibt sie im Snapshot erhalten. Wenn ein Festplattenausfall auftritt,
|
||||
bevor der nächste Sync ausgeführt wird, verwendet SnapRAID die im Snapshot konservierten Daten,
|
||||
um die ausgefallene Festplatte zu rekonstruieren.
|
||||
.PD
|
||||
.PP
|
||||
.RS 4
|
||||
.PD 0
|
||||
Im Falle eines Festplattenausfalls während eines aktiven Sync\-Vorgangs
|
||||
ist SnapRAID auch in der Lage, automatisch sowohl aus dem Snapshot
|
||||
der vorherigen Paritätsberechnung als auch aus der aktuellen zu lesen.
|
||||
Dies maximiert die Wahrscheinlichkeit einer vollständigen Wiederherstellung, indem
|
||||
Zugriff auf die genauen Datenblöcke gewährt wird, die zur Lösung der Paritätsgleichungen
|
||||
erforderlich sind, selbst wenn diese Blöcke zwischen den Syncs geändert oder gelöscht wurden.
|
||||
.PD
|
||||
.PP
|
||||
.PD 0
|
||||
Ohne Snapshots führt eine aktualisierte oder gelöschte Datei auf einer gesunden
|
||||
Festplatte zu fehlenden Datenblöcken, die möglicherweise zur Reparatur
|
||||
anderer ausgefallener Festplatten benötigt werden.
|
||||
.PD
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
Snapshots werden nur für Datenträger erstellt und nur dann, wenn das zugrunde liegende
|
||||
Dateisystem diese Funktionalität unterstützt. Paritätsfestplatten verwenden immer
|
||||
das Live\-Dateisystem.
|
||||
.PP
|
||||
Derzeit wird dies auf Btrfs, Bcachefs und ZFS unter Linux
|
||||
und auf NTFS unter Windows unterstützt.
|
||||
.PP
|
||||
Sie können Datenträger mit unterschiedlichen Dateisystemen mischen. Nur diejenigen, die
|
||||
Snapshots unterstützen, werden diese nutzen, während andere Festplatten weiterhin
|
||||
direkt auf dem Live\-Dateisystem arbeiten.
|
||||
.PP
|
||||
Das Erstellen und Löschen von Snapshots erfordert Administratorrechte.
|
||||
Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo)
|
||||
ausgeführt wird, wenn Snapshots aktiviert sind.
|
||||
.SS Befehlsverhalten mit Snapshots (Command Behavior with Snapshots)
|
||||
Die Befehle \`sync\` und \`scrub\` verwenden Snapshots für Datenträger, deren
|
||||
Dateisysteme diese unterstützen. Auf einer Festplatte mit Snapshot sieht der Befehl
|
||||
ein stabiles Dateisystemabbild, das von gleichzeitigen Änderungen am Live\-Dateisystem
|
||||
unbeeinflusst bleibt.
|
||||
Während eines \`sync\` wird unabhängig für jedes unterstützte Daten\-Dateisystem ein
|
||||
neuer Snapshot erstellt. Diese Snapshots liefern gemeinsam die für die Paritätsberechnung
|
||||
verwendeten Daten.
|
||||
Im Gegensatz dazu verwendet der Befehl \`scrub\` den letzten Snapshot, also den, der
|
||||
während des letzten erfolgreichen Syncs erstellt wurde, um einen zuverlässigen Referenzpunkt
|
||||
beizubehalten, der mit der vorhandenen Parität übereinstimmt.
|
||||
.PP
|
||||
Bei den Befehlen \`check\` und \`fix\` hängt die Verwendung des letzten Snapshots
|
||||
davon ab, ob bestimmte Festplatten mit der Option \-d, \-\-filter\-disk ausgewählt wurden.
|
||||
.PP
|
||||
Eine explizit über \-d ausgewählte Festplatte (das „Ziel“ der Operation)
|
||||
verwendet immer das Live\-Dateisystem. Für \`fix\` ermöglicht dies das Wiederherstellen
|
||||
von Daten auf dem aktiven Festplattenersatz. Für \`check\` ermöglicht es die Simulation
|
||||
des \`fix\`\-Vorgangs unter denselben Bedingungen.
|
||||
.PP
|
||||
Auf alle anderen Datenträger (die „Referenz“\-Festplatten) wird über ihre Snapshots zugegriffen.
|
||||
Dies stellt sicher, dass SnapRAID selbst dann, wenn Sie während einer laufenden Wiederherstellung
|
||||
Dateien auf Ihren gesunden Festplatten ändern, eine stabile, eingefrorene Referenz hat,
|
||||
um die Paritätsgleichungen zu lösen.
|
||||
.PP
|
||||
Wenn keine Option \-d angegeben ist, nimmt SnapRAID an, dass die Operation für das gesamte Array gilt.
|
||||
In diesem Fall verwenden \`check\` und \`fix\` ausschließlich die Live\-Dateisysteme.
|
||||
.PP
|
||||
Alle anderen Befehle arbeiten ausschließlich auf dem Live\-Dateisystem.
|
||||
.SH LEBENSZYKLUS VON SNAPSHOTS (SNAPSHOTS LIFECYCLE)
|
||||
SnapRAID verwaltet drei spezifische Snapshots, \`stable\`, \`pending\` und \`scan\`,
|
||||
in einem versteckten Verzeichnis im Stammverzeichnis jedes Daten\-Subvolumes.
|
||||
Unter Btrfs, Bcachefs und NTFS wird das Verzeichnis \`.snapraid/\` verwendet,
|
||||
unter ZFS das Standardverzeichnis \`.zfs/snapshot/\`.
|
||||
.PP
|
||||
Der \`stable\`\-Snapshot repräsentiert den Zustand des letzten
|
||||
erfolgreich abgeschlossenen \`sync\` und enthält die genauen Daten, die zur
|
||||
Berechnung der aktuellen Parität verwendet wurden. Er dient als primäre Datenquelle
|
||||
für die Befehle \`scrub\`, \`check\` und \`fix\`.
|
||||
.PP
|
||||
Der \`scan\`\-Snapshot ist ein temporäres Abbild, das zu Beginn eines \`sync\`
|
||||
erstellt wird, um einen eingefrorenen Zustand für das Scannen und die Paritätsberechnung bereitzustellen.
|
||||
Nach dem Scannen und Speichern des neuen Inhaltszustands ersetzt er den vorherigen
|
||||
\`pending\`\-Snapshot.
|
||||
.PP
|
||||
Der \`pending\`\-Snapshot ist das Abbild, das von einem unterbrochenen \`sync\` verwendet wird.
|
||||
Nach erfolgreichem Abschluss des Vorgangs wird der vorherige \`stable\`\-Snapshot gelöscht
|
||||
und der \`pending\`\-Snapshot wird heraufgestuft, um seinen Platz als neue stabile Referenz einzunehmen.
|
||||
.PP
|
||||
Wenn ein \`sync\` unterbrochen wird, bleibt der \`pending\`\-Snapshot erhalten.
|
||||
Nachfolgende \`scrub\`\-, \`check\`\- und \`fix\`\-Befehle verwenden diesen ausstehenden Snapshot,
|
||||
da er mit dem in der .content\-Datei aufgezeichneten Dateisystemzustand übereinstimmt,
|
||||
selbst wenn die Parität nur teilweise synchronisiert ist.
|
||||
.PP
|
||||
Im Falle einer \`sync\`\-Unterbrechung lesen die Befehle \`check\` und \`fix\`
|
||||
auch aus dem \`stable\`\-Snapshot, um Datenblöcke von Dateien abzurufen,
|
||||
die während des Syncs aktualisiert oder gelöscht wurden.
|
||||
Dies ist möglich, da die .content\-Datei Metadaten für alle geänderten oder
|
||||
gelöschten Dateien während des gesamten Sync\-Prozesses aufbewahrt.
|
||||
Diese historischen Informationen werden erst gelöscht, wenn ein Sync erfolgreich abgeschlossen
|
||||
und die endgültige Version der .content\-Datei gespeichert wurde.
|
||||
.PP
|
||||
Wenn ein \`sync\` nach einer Unterbrechung neu gestartet wird, wird der vorhandene
|
||||
ausstehende (pending) Snapshot gelöscht und ein neuer erstellt, um den
|
||||
aktuellen Zustand des Live\-Dateisystems zu erfassen.
|
||||
Wenn ein \`sync\` jedoch unterbrochen wird, vermeiden Sie es, Dateien zu
|
||||
ändern, zu löschen, zu ersetzen oder zu verschieben, bis ein nachfolgender
|
||||
\`sync\` erfolgreich abgeschlossen ist. Die Parität kann noch Blöcke enthalten,
|
||||
die aus dem vom unterbrochenen Sync verwendeten Snapshot berechnet wurden.
|
||||
Ein späterer Sync könnte diesen Snapshot ersetzen, wodurch Zwischenversionen
|
||||
von Dateien für die Wiederherstellung nicht mehr verfügbar sind.
|
||||
.SS Externe Sicherungen mit Dateisystem\-Snapshots (External backups with filesystem snapshots)
|
||||
Wenn Dateisystem\-Snapshots aktiviert sind, greift SnapRAID auf Snapshots
|
||||
an der Wurzel jedes Daten\-Subvolumes, Volumes oder Datasets zu oder erstellt
|
||||
diese dort.
|
||||
.PP
|
||||
Ein einfacher Weg, um jegliche Beeinträchtigung durch externe Tools zu
|
||||
vermeiden, besteht darin, die \`data\`\-Konfiguration auf ein reguläres
|
||||
Unterverzeichnis innerhalb des Subvolumes oder Volumes verweisen zu lassen
|
||||
(beispielsweise \`/mnt/subvol/data\` statt \`/mnt/subvol\`). SnapRAID erstellt
|
||||
das Snapshot\-Verzeichnis immer an der Wurzel des Subvolumes (beispielsweise
|
||||
\`/mnt/subvol/.snapraid/\`), wodurch das Datenunterverzeichnis sauber bleibt
|
||||
und Snapshots außerhalb und unsichtbar für Sicherungswerkzeuge bleiben, die
|
||||
darin arbeiten.
|
||||
.PP
|
||||
Wenn das konfigurierte \`data\`\-Verzeichnis hingegen selbst die Wurzel des
|
||||
Subvolumes oder Volumes ist, erstellt SnapRAID ein \`.snapraid/\`\-Verzeichnis
|
||||
direkt darin (auf Btrfs, Bcachefs und NTFS). Während SnapRAID dieses
|
||||
Verzeichnis bei seinen eigenen Scans automatisch ausschließt, werden
|
||||
externe Sicherungs\- oder Synchronisationswerkzeuge darauf stoßen. Wenn es
|
||||
nicht ausgeschlossen wird, könnten sie in die Snapshots oder Verknüpfungen
|
||||
eindringen und den gesamten eingefrorenen Datenbaum kopieren, was Daten
|
||||
dupliziert und den Sicherungsspeicherplatz erschöpfen kann. Konfigurieren
|
||||
Sie externe Sicherungswerkzeuge immer so, dass sie das Verzeichnis
|
||||
\`.snapraid/\` ausschließen.
|
||||
.PP
|
||||
Bei ZFS werden Snapshots über das standardmäßige virtuelle Verzeichnis
|
||||
\`.zfs/snapshot/\` anstelle von \`.snapraid/\` bereitgestellt. Standardmäßig
|
||||
(\`snapdir=hidden\`) blendet ZFS dieses Verzeichnis in Verzeichnislisten aus,
|
||||
sodass externe Sicherungswerkzeuge es nicht durchlaufen. Wenn Sie
|
||||
\`snapdir=visible\` aktiviert haben, stellen Sie sicher, dass Ihre
|
||||
Sicherungswerkzeuge das Verzeichnis \`.zfs/\` ausschließen.
|
||||
.SH MUSTER (PATTERN)
|
||||
Muster bieten eine flexible Möglichkeit, Dateien für die Einbeziehung oder
|
||||
den Ausschluss zu filtern. Durch die Verwendung von Globbing\-Zeichen können Sie Regeln definieren,
|
||||
die mit bestimmten Dateinamen oder ganzen Verzeichnisstrukturen übereinstimmen, ohne
|
||||
|
|
@ -1902,18 +2124,19 @@ Schrägstrich, was ihn für den Abgleich innerhalb einer einzelnen Pfadkomponent
|
|||
geeignet macht. Dies ist das Standardverhalten von Wildcards, das vom Shell\-
|
||||
Globbing bekannt ist.
|
||||
.PP
|
||||
Der Doppelstern \`**\` ist mächtiger; er entspricht jeder Folge von
|
||||
Zeichen einschließlich Verzeichnistrennzeichen. Dies ermöglicht es Mustern, über
|
||||
mehrere Verzeichnisebenen hinweg übereinzustimmen. Wenn \`**\` direkt in
|
||||
ein Muster eingebettet ist, kann es null oder mehr Zeichen einschließlich Schrägstrichen zwischen
|
||||
dem umgebenden wörtlichen Text entsprechen.
|
||||
Der Doppelstern\-Platzhalter \`**\` entspricht nur dann über Verzeichnistrennzeichen
|
||||
hinweg, wenn er an ein Verzeichnistrennzeichen angrenzt (einem Schrägstrich
|
||||
vorangestellt oder nachgestellt). In dieser Form entspricht er null oder mehr
|
||||
Zeichen über Verzeichnisebenen hinweg. Zum Beispiel entspricht \`foo/**/bar\` den
|
||||
Pfaden \`foo/bar\`, \`foo/a/bar\` und \`foo/a/b/bar\`; \`**/build\` entspricht \`build\`
|
||||
und \`foo/bar/build\`; und \`src/**.js\` entspricht \`src/main.js\` und
|
||||
\`src/ui/components/main.js\`.
|
||||
Die alleinstehende Form \`/**/\` wird nicht als vollständiges Muster akzeptiert.
|
||||
.PP
|
||||
Die wichtigste Verwendung von \`**\` ist in der speziellen Form \`/**/\`. Dies entspricht
|
||||
null oder mehr vollständigen Verzeichnisebenen, was es möglich macht, Dateien
|
||||
in jeder Tiefe eines Verzeichnisbaums abzugleichen, ohne die genaue Pfadstruktur zu kennen.
|
||||
Zum Beispiel entspricht das Muster \`src/**/main.js\` dem Pfad \`src/main.js\` (Überspringen
|
||||
von null Verzeichnissen), \`src/ui/main.js\` (Überspringen eines Verzeichnisses) und
|
||||
\`src/ui/components/main.js\` (Überspringen von zwei Verzeichnissen).
|
||||
Wenn \`**\` nicht an einen Schrägstrich angrenzt, verhält er sich wie \`*\` und
|
||||
entspricht keinen Verzeichnistrennzeichen. Zum Beispiel entspricht \`**.jpg\`
|
||||
der Datei \`photo.jpg\` im aktuellen Verzeichnis, nicht jedoch \`dir/photo.jpg\`.
|
||||
Verwenden Sie für diesen Zweck \`**/*.jpg\`.
|
||||
.PP
|
||||
Zeichenklassen mit eckigen Klammern \`[]\` entsprechen einem einzelnen Zeichen aus einer
|
||||
bestimmten Menge oder einem Bereich. Wie die anderen Einzelzeichenmuster
|
||||
|
|
@ -1922,8 +2145,8 @@ ein Ausrufezeichen.
|
|||
.PP
|
||||
Der grundlegende Unterschied, den man sich merken sollte, ist, dass \`*\`, \`?\` und Zeichenklassen
|
||||
alle Verzeichnisgrenzen respektieren und nur innerhalb einer einzelnen Pfadkomponente
|
||||
übereinstimmen, während \`**\` das einzige Muster ist, das über Verzeichnistrennzeichen
|
||||
hinweg übereinstimmen kann.
|
||||
übereinstimmen, während \`**\` nur dann über Verzeichnistrennzeichen hinweg übereinstimmen kann,
|
||||
wenn es an einen Schrägstrich angrenzt.
|
||||
.PP
|
||||
Es gibt vier verschiedene Arten von Mustern:
|
||||
.TP
|
||||
|
|
@ -2054,6 +2277,49 @@ include /pictures/
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Beachten Sie, dass das Ausschließen eines Verzeichnisses (mit DIR/
|
||||
oder /PFAD/DIR/) verhindert, dass SnapRAID dieses Verzeichnis betritt
|
||||
und durchsucht. Daher ist es nicht möglich, eine Datei oder ein
|
||||
Unterverzeichnis innerhalb eines ausgeschlossenen übergeordneten
|
||||
Verzeichnisses wieder einzuschließen, da der Scanner dieses niemals
|
||||
durchläuft.
|
||||
.PP
|
||||
Beispielsweise wird bei folgender Konfiguration \`file.dat\` NICHT
|
||||
eingeschlossen, da \`/keep/\` verworfen wird, bevor \`file.dat\` gesehen
|
||||
werden kann:
|
||||
.PP
|
||||
.RS 4
|
||||
# Funktioniert NICHT: /keep/ wird vollständig übersprungen
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Um Dateien innerhalb eines Verzeichnisses auszuschließen und bestimmte
|
||||
Dateien beizubehalten, schließen Sie die Dateien im Verzeichnis aus,
|
||||
anstatt das Verzeichnis selbst auszuschließen:
|
||||
.PP
|
||||
.RS 4
|
||||
# Funktioniert: /keep/ wird durchlaufen, aber andere Dateien darin werden ausgeschlossen
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/*
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
In der Befehlszeile können Sie mit der Option \-f nur \`include\`\-Muster
|
||||
verwenden. Zum Beispiel:
|
||||
.PP
|
||||
|
|
@ -2073,7 +2339,7 @@ snapraid \-f \[dq]*.mp3\[dq] check
|
|||
.PP
|
||||
Unter Unix müssen Sie Globbing\-Zeichen in der Befehlszeile in
|
||||
Anführungszeichen setzen, um zu verhindern, dass die Shell sie erweitert.
|
||||
.SH DATEIEN IGNORIEREN
|
||||
.SH DATEIEN IGNORIEREN (IGNORE FILE)
|
||||
Zusätzlich zu den globalen Regeln in der Konfigurationsdatei können Sie
|
||||
\`.snapraidignore\`\-Dateien in jedem Verzeichnis innerhalb des Arrays platzieren,
|
||||
um dezentrale Ausschlussregeln zu definieren.
|
||||
|
|
@ -2133,7 +2399,7 @@ build/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH CONTENT
|
||||
.SH INHALT (CONTENT)
|
||||
SnapRAID speichert die Liste und Prüfsummen Ihrer Dateien in der
|
||||
Content\-Datei.
|
||||
.PP
|
||||
|
|
@ -2141,9 +2407,12 @@ Es ist eine Binärdatei, die alle im Festplatten\-Array vorhandenen
|
|||
Dateien auflistet, zusammen mit allen Prüfsummen zur Überprüfung
|
||||
ihrer Integrität.
|
||||
.PP
|
||||
Diese Datei wird von den Befehlen \`sync\` und \`scrub\` gelesen und
|
||||
geschrieben und von den Befehlen \`fix\`, \`check\` und \`status\` gelesen.
|
||||
.SH PARITY
|
||||
Die Content\-Datei wird von den Befehlen \`sync\`, \`scrub\`, \`touch\` und
|
||||
\`rehash\` gelesen und geschrieben. Sie wird von den Befehlen \`status\`,
|
||||
\`diff\`, \`check\`, \`fix\`, \`list\`, \`dup\`, \`locate\` und \`pool\` gelesen und
|
||||
von den Befehlen \`smart\`, \`probe\`, \`up\`, \`down\` und \`devices\` vollständig
|
||||
ignoriert.
|
||||
.SH PARITäT (PARITY)
|
||||
SnapRAID speichert die Paritätsinformationen Ihres Arrays in den
|
||||
Paritätsdateien.
|
||||
.PP
|
||||
|
|
@ -2152,7 +2421,7 @@ Dies sind Binärdateien, die die berechnete Parität aller in der
|
|||
.PP
|
||||
Diese Dateien werden von den Befehlen \`sync\` und \`fix\` gelesen
|
||||
und geschrieben und nur von den Befehlen \`scrub\` und \`check\` gelesen.
|
||||
.SH ENCODING
|
||||
.SH KODIERUNG (ENCODING)
|
||||
SnapRAID ignoriert unter Unix jede Kodierung. Es liest und speichert
|
||||
die Dateinamen mit derselben Kodierung, die vom Dateisystem
|
||||
verwendet wird.
|
||||
|
|
@ -2166,7 +2435,212 @@ eine TrueType\-Schriftart wie \`Lucida Console\` als Konsolenschriftart
|
|||
verwenden. Dies betrifft nur die gedruckten Dateinamen; wenn Sie
|
||||
die Konsolenausgabe in eine Datei umleiten, ist die resultierende
|
||||
Datei immer im UTF\-8\-Format.
|
||||
.SH EXIT\-CODE (EXIT CODE)
|
||||
SnapRAID endet mit den folgenden Fehlercodes:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 0
|
||||
Alles OK.
|
||||
.HP 4
|
||||
.I 1
|
||||
Der Befehl ist auf Fehler gestoßen.
|
||||
.HP 4
|
||||
.I 2
|
||||
Der Befehl \`diff\` hat festgestellt, dass alles OK ist, aber ein \`sync\` erforderlich ist.
|
||||
.HP 4
|
||||
.I 3
|
||||
Ein Festplattenbefehl (\`probe\`, \`smart\`, \`devices\`, \`up\`, \`down\`) wurde
|
||||
abgeschlossen, aber mindestens ein Dateisystem läuft im degradierten
|
||||
Modus mit fehlenden Geräten.
|
||||
.PD
|
||||
.RE
|
||||
.SH BEKANNTE PROBLEME (KNOWN ISSUES)
|
||||
.SS Dateisystemgrenzen
|
||||
SnapRAID überschreitet beim Scannen einer Datenfestplatte keine Dateisystem\-,
|
||||
Mount\- oder Subvolume\-Grenzen. Wenn eine solche Grenze erkannt wird, gibt
|
||||
SnapRAID eine WARNUNG aus und scannt nicht darüber hinaus.
|
||||
.PP
|
||||
Dateien, die sich jenseits solcher Grenzen befinden, sind nicht in der
|
||||
Datenfestplatte enthalten und müssen separat konfiguriert werden, wenn sie
|
||||
geschützt werden sollen.
|
||||
.SS Mount\-Punkte mit Dateisystem\-Snapshots
|
||||
Wenn Dateisystem\-Snapshots aktiviert sind, werden verschachtelte Mount\-Punkte
|
||||
und Bind\-Mounts innerhalb einer Datenfestplatte nicht unterstützt.
|
||||
.PP
|
||||
Mount\-Punkte sind Teil des Mount\-Namespace des laufenden Systems und werden
|
||||
in Dateisystem\-Snapshots nicht beibehalten. Folglich kann beim Scannen eines
|
||||
Snapshots ein Verzeichnis sichtbar werden, das im Live\-Dateisystem durch
|
||||
einen Mount\-Punkt verdeckt war.
|
||||
.PP
|
||||
Platzieren Sie keine verschachtelten Mount\-Punkte oder Bind\-Mounts innerhalb
|
||||
von Datenfestplatten, wenn Dateisystem\-Snapshots aktiviert sind.
|
||||
.SS Mehrere Konfigurationen mit Dateisystem\-Snapshots
|
||||
Die Snapshot\-Unterstützung kann nicht sicher von mehreren unabhängigen
|
||||
SnapRAID\-Konfigurationen gemeinsam genutzt werden, die denselben
|
||||
Dateisystem\-Snapshot\-Namespace verwenden.
|
||||
.PP
|
||||
Unter Btrfs und Bcachefs darf nur eine SnapRAID\-Konfiguration mit aktivierter
|
||||
Snapshot\-Unterstützung Datenverzeichnisse innerhalb desselben Subvolumes
|
||||
verwenden. Unter ZFS gilt dieselbe Einschränkung für ein Dataset und unter
|
||||
NTFS für ein Volume.
|
||||
.PP
|
||||
Mehrere Konfigurationen, die denselben Snapshot\-Namespace teilen, verwenden
|
||||
dieselben Snapshots \`stable\`, \`pending\` und \`scan\`. Das Ausführen einer
|
||||
Konfiguration kann daher Wiederherstellungs\-Snapshots ersetzen oder löschen,
|
||||
die von einer anderen benötigt werden.
|
||||
.SS In\-Place\-Dateimodifikationen ohne Zeitstempeländerungen
|
||||
SnapRAID erkennt Dateimodifikationen durch den Vergleich von Dateigrößen
|
||||
und Änderungszeitstempeln (mtime).
|
||||
.PP
|
||||
Wenn eine Anwendung eine Datei in\-place ändert, ohne deren Größe zu verändern
|
||||
oder ihren Änderungszeitstempel zu aktualisieren, erkennen \[dq]diff\[dq] und \[dq]sync\[dq]
|
||||
nicht, dass sich die Datei geändert hat, und ihre Parität wird nicht
|
||||
aktualisiert.
|
||||
.PP
|
||||
Um sicherzustellen, dass SnapRAID solche Änderungen erkennt, aktualisieren
|
||||
Sie den Änderungszeitstempel der Datei (z. B. mit dem Dienstprogramm \[dq]touch\[dq]).
|
||||
Andernfalls wird der Unterschied erst bei einem nachfolgenden \[dq]scrub\[dq] oder
|
||||
\[dq]check\[dq] als Hash\-Fehlübereinstimmung erkannt.
|
||||
.SS Nicht\-ASCII\-Groß\-/Kleinschreibung unter Windows
|
||||
SnapRAID verwendet auf allen Plattformen eine standardmäßige, vorhersehbare
|
||||
UTF\-8\-Kodierung und beschränkt den Vergleich ohne Berücksichtigung der
|
||||
Groß\-/Kleinschreibung auf ASCII\-Zeichen.
|
||||
.PP
|
||||
Windows\-Dateisysteme leiden unter dem veralteten Konzept, die Unempfindlichkeit
|
||||
gegenüber der Groß\-/Kleinschreibung bei Unicode\-Dateinamen über willkürliche,
|
||||
systemabhängige Folding\-Tabellen zu erzwingen. Infolgedessen verschleiert Windows
|
||||
die Realität des Dateisystems, indem es völlig unterschiedliche
|
||||
Unicode\-Bytesequenzen so behandelt, als wären sie dieselbe Datei.
|
||||
.PP
|
||||
Beispielsweise sind \`À.txt\` und \`à.txt\` unterschiedliche Unicode\-Namen, dennoch
|
||||
behandelt Windows sie unlogischerweise als identisch, während SnapRAID ihre
|
||||
tatsächliche Unterscheidung beibehält.
|
||||
.PP
|
||||
Diese Einschränkung wird durch den inkonsistenten Umgang von Windows mit
|
||||
Unicode\-Dateinamen und das Beharren auf einer Groß\-/Kleinschreibungs\-Aliasing
|
||||
verursacht. Um Abweichungen durch das Case\-Folding von Windows zu vermeiden,
|
||||
geben Sie für alle Nicht\-ASCII\-Zeichen in Konfigurationspfaden und Filtern
|
||||
stets die exakte Groß\-/Kleinschreibung an.
|
||||
.SS Wiederherstellung mit partiellem Fix
|
||||
Wenn \`fix\` mit \`\-S, \-\-start\` oder \`\-B, \-\-count\` eingeschränkt wird,
|
||||
arbeitet SnapRAID nur auf den ausgewählten Blöcken und führt weder eine
|
||||
Finalisierung auf Dateiebene noch eine Quarantäne durch.
|
||||
.PP
|
||||
Wenn die Wiederherstellung Best\-Effort\-Daten erzeugt, bei denen nicht
|
||||
nachgewiesen werden kann, dass sie den aktuellen Inhalt darstellen, können
|
||||
solche Blöcke dennoch unter dem normalen Dateinamen geschrieben werden. Die mit
|
||||
diesen wiederhergestellten Blöcken verbundene Ungewissheit bleibt nach Beendigung
|
||||
des Befehls nicht erhalten.
|
||||
.PP
|
||||
Infolgedessen behandelt ein späterer \`fix\` diese lesbaren Blöcke als gültige
|
||||
Dateidaten und versucht nicht, sie erneut wiederherzustellen. Dies kann dazu
|
||||
führen, dass eine spätere Wiederherstellung Erfolg meldet, während die Datei
|
||||
weiterhin unvollständige oder veraltete Daten enthält.
|
||||
.PP
|
||||
Die Optionen \`\-S\` und \`\-B\` sind nur für die fortgeschrittene manuelle
|
||||
Wiederherstellung gedacht, typischerweise nachdem ein normaler \`fix\`
|
||||
fehlgeschlagen ist. Wenn ein partieller \`fix\` nicht wiederherstellbare Daten
|
||||
meldet, entfernen oder benennen Sie die betroffenen Dateien um, bevor Sie eine
|
||||
weitere Wiederherstellung versuchen, oder überprüfen Sie deren Inhalt manuell.
|
||||
.SS NTFS\-Hardlinks und ausgeschlossene Pfade
|
||||
Unter NTFS speichern Verzeichniseinträge Dateigröße und Zeitstempel
|
||||
unabhängig für jeden Hardlink zwischen. Wenn eine Datei über einen Link
|
||||
geändert wird, können die Verzeichniseinträge anderer Links, die auf
|
||||
dieselbe Datei verweisen, veraltete Metadaten behalten, bis auf sie
|
||||
zugegriffen wird.
|
||||
.PP
|
||||
SnapRAID erkennt und normalisiert diesen Zustand automatisch, sobald
|
||||
während eines Scans mindestens zwei Hardlinks zu derselben Datei gefunden
|
||||
werden. Wenn jedoch nur ein Hardlink gescannt wird, während die anderen
|
||||
durch Filter ausgeschlossen sind oder außerhalb des Datenfestplattenpfads
|
||||
liegen, kann SnapRAID die Inode\-Kollision nicht erkennen und verlässt sich
|
||||
auf die zwischengespeicherten Metadaten des einzigen sichtbaren Links.
|
||||
.PP
|
||||
Infolgedessen können Änderungen, die über einen ausgeschlossenen oder
|
||||
externen Hardlink vorgenommen wurden, von SnapRAID unbemerkt bleiben,
|
||||
bis die Metadaten des einbezogenen Links durch das Betriebssystem
|
||||
aktualisiert werden (z. B. wenn über diesen Pfad auf die Datei
|
||||
zugegriffen oder sie geöffnet wird).
|
||||
.PP
|
||||
Um diese Einschränkung zu vermeiden, sollten geschützte Dateien nicht über
|
||||
Hardlinks geändert werden, die von SnapRAID ausgeschlossen sind, oder es
|
||||
sollte sichergestellt werden, dass alle Hardlinks zu einer Datei im Scan
|
||||
enthalten sind, damit SnapRAID sie normalisieren kann.
|
||||
.SS Wiederherstellung nach einem unterbrochenen Multi\-Paritäts\-Sync
|
||||
In einem Array mit mehreren Paritätsfestplatten kann ein unterbrochener
|
||||
\`sync\` dazu führen, dass sich verschiedene Paritätsstufen vorübergehend
|
||||
in unterschiedlichen Aktualisierungszuständen befinden. Beispielsweise
|
||||
kann Parität 1 bereits neu aktualisierte Daten enthalten, während
|
||||
Parität 2 noch die alten Daten enthält.
|
||||
.PP
|
||||
Während \`check\` oder \`fix\` testet SnapRAID verschiedene
|
||||
Paritätskombinationen und validiert die rekonstruierten Daten anhand
|
||||
der bekannten Block\-Hashes (die den gesamten Block abdecken, typischerweise
|
||||
256 KiB).
|
||||
.PP
|
||||
Wenn SnapRAID eine Rekonstruktion mit einer inkonsistenten Mischung aus
|
||||
alter und neuer Parität versucht, erzeugen die linearen RAID\-Gleichungen
|
||||
fehlerhafte Daten. Damit eine solche ungültige Kombination fälschlicherweise
|
||||
akzeptiert wird, müssten die Gleichungen rein zufällig mindestens einen
|
||||
vollständigen 256\-KiB\-Block so perfekt rekonstruieren, dass sein Hash
|
||||
übereinstimmt, während andere nicht synchronisierte Blöcke desselben
|
||||
Stripes mit fehlerhaften Daten rekonstruiert werden.
|
||||
.PP
|
||||
Dieses Szenario beruht nicht auf einer Hash\-Kollision; vielmehr müssten
|
||||
die gemischten Paritätsgleichungen selbst zufällig genau den ursprünglichen
|
||||
256\-KiB\-Blockinhalt erzeugen. Dies ist zwar bei speziell konstruierten oder
|
||||
stark repetitiven Daten mathematisch denkbar, bei realen Daten jedoch
|
||||
praktisch unmöglich.
|
||||
.PP
|
||||
Wenn alle Festplatten fehlerfrei sind, beseitigt der Abschluss des
|
||||
unterbrochenen \`sync\` vor weiteren Änderungen diese Unklarheit. Wenn eine
|
||||
Festplatte ausgefallen ist und eine Wiederherstellung erforderlich ist,
|
||||
sollten vor dem Ausführen von \`check\` oder \`fix\` keine Änderungen an den
|
||||
Datenfestplatten vorgenommen werden.
|
||||
.SS Reservierte Datei\- und Verzeichnisnamen
|
||||
SnapRAID reserviert einige Datei\-, Verzeichnis\- und Snapshot\-Namen für seine
|
||||
internen Operationen. Verwenden Sie diese Namen nicht für Benutzerdaten:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I .snapraidignore
|
||||
Lokale Ausschlussregeldatei.
|
||||
.HP 4
|
||||
.I .snapraid
|
||||
Snapshot\-Container\-Verzeichnis.
|
||||
.HP 4
|
||||
.I snapraid\-*
|
||||
Von SnapRAID verwaltete ZFS\-Snapshot\-Namen.
|
||||
.HP 4
|
||||
.I *.unrecoverable
|
||||
Beschädigte Dateien, die während der Wiederherstellung
|
||||
unter Quarantäne gestellt wurden.
|
||||
.HP 4
|
||||
.I CONTENT.tmp
|
||||
Temporäre Datei für Content\-Aktualisierungen.
|
||||
.HP 4
|
||||
.I CONTENT.lock
|
||||
Content\-Sperrdatei.
|
||||
.HP 4
|
||||
.I PARITY.spaceholder
|
||||
Temporäre Platzhalterdatei während der
|
||||
Paritätszuweisung unter Windows.
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Die Verwendung dieser Namen für nicht zugehörige Daten kann dazu führen,
|
||||
dass Dateien oder Snapshots ignoriert, als Metadaten fehlinterpretiert,
|
||||
überschrieben, umbenannt oder gelöscht werden.
|
||||
.PP
|
||||
Unter Windows sind alle Varianten der Groß\- und Kleinschreibung ebenfalls
|
||||
reserviert, selbst in NTFS\-Verzeichnissen, die für die Unterscheidung von
|
||||
Groß\- und Kleinschreibung konfiguriert sind (z. B. .SNAPRAIDIGNORE,
|
||||
.SnapRaid, CONTENT.TMP und CONTENT.Lock).
|
||||
.SH ÜBERSETZUNG (TRANSLATION)
|
||||
Dieses Dokument ist eine automatische Übersetzung des englischen Handbuchs.
|
||||
Die maßgebliche Version finden Sie im englischen Handbuch.
|
||||
.SH COPYRIGHT
|
||||
Diese Datei ist Copyright (C) 2025 Andrea Mazzoleni
|
||||
.SH SEE ALSO
|
||||
snapraid_log(1), snapraidd(1)
|
||||
Diese Datei ist Copyright (C) 2026 Andrea Mazzoleni
|
||||
.SH SIEHE AUCH (SEE ALSO)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Synopsis
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
Beschreibung (Description)
|
||||
SnapRAID ist ein Sicherungsprogramm, das für Festplatten-Arrays
|
||||
entwickelt wurde und Paritätsinformationen zur Datenwiederherstellung
|
||||
bei Ausfall von bis zu sechs Festplatten speichert.
|
||||
|
|
@ -45,56 +45,61 @@ Description
|
|||
* SnapRAID sperrt Ihre Daten nicht ein; Sie können die Verwendung
|
||||
jederzeit beenden, ohne neu formatieren oder Daten verschieben zu müssen.
|
||||
* Um auf eine Datei zuzugreifen, muss nur eine einzige Festplatte
|
||||
drehen (spinnen), was Strom spart und Geräusche reduziert.
|
||||
anlaufen (drehen), was Strom spart und Geräusche reduziert.
|
||||
|
||||
Für weitere Informationen besuchen Sie bitte die offizielle SnapRAID-Website:
|
||||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitations
|
||||
SnapRAID ist ein Hybrid aus einem RAID- und einem Sicherungsprogramm,
|
||||
das darauf abzielt, die besten Vorteile beider zu kombinieren.
|
||||
Es hat jedoch einige Einschränkungen, die Sie vor der Verwendung
|
||||
berücksichtigen sollten.
|
||||
Einschränkungen (Limitations)
|
||||
SnapRAID ist ein Hybrid aus RAID und einem Backup-Programm mit dem Ziel, die
|
||||
besten Vorteile von beiden zu kombinieren. Es hat jedoch einige Einschränkungen, die Sie
|
||||
vor der Verwendung berücksichtigen sollten.
|
||||
|
||||
Die Haupteinschränkung besteht darin, dass wenn eine Festplatte
|
||||
ausfällt und Sie in letzter Zeit keine Synchronisierung durchgeführt haben,
|
||||
Sie möglicherweise nicht vollständig wiederherstellen können.
|
||||
Genauer gesagt können Sie möglicherweise nicht bis zur Größe der
|
||||
geänderten oder gelöschten Dateien seit der letzten `sync`-Operation
|
||||
wiederherstellen. Dies tritt auch dann auf, wenn die geänderten oder
|
||||
gelöschten Dateien sich nicht auf der ausgefallenen Festplatte befinden.
|
||||
Aus diesem Grund ist SnapRAID besser für Daten geeignet, die sich
|
||||
selten ändern.
|
||||
Die Haupteinschränkung besteht darin, dass Sie bei einem Festplattenausfall Daten nur bis zum
|
||||
Zustand des letzten `sync`-Vorgangs wiederherstellen können. Alle Daten, die seit dem
|
||||
letzten Sync hinzugefügt oder geändert wurden und sich auf der ausgefallenen Festplatte befinden, gehen verloren.
|
||||
|
||||
Andererseits verhindern neu hinzugefügte Dateien die Wiederherstellung
|
||||
von bereits vorhandenen Dateien nicht. Sie verlieren nur die
|
||||
kürzlich hinzugefügten Dateien, wenn diese sich auf der ausgefallenen
|
||||
Festplatte befinden.
|
||||
Daher eignet sich SnapRAID in erster Linie für Daten, die sich selten ändern.
|
||||
|
||||
Für Daten, die beim letzten Sync bereits existierten, hängt die Wiederherstellungszuverlässigkeit
|
||||
davon ab, ob die Option `snapshot` verwendet wird:
|
||||
|
||||
* Mit Snapshot-Unterstützung (verfügbar auf Btrfs, ZFS, Bcachefs und NTFS)
|
||||
kann SnapRAID automatisch eine unabhängige eingefrorene Referenz
|
||||
jedes unterstützten Daten-Dateisystems beibehalten.
|
||||
Dies stellt sicher, dass der Wiederherstellungsprozess konsistent und zuverlässig bleibt,
|
||||
selbst wenn Sie während oder nach einem Sync Dateien auf Ihrem Live-Dateisystem ändern oder löschen.
|
||||
|
||||
* Ohne Snapshot-Unterstützung kann das Löschen oder Ändern von Dateien nach einem `sync`
|
||||
die vollständige Wiederherstellung anderer ausgefallener Festplatten verhindern. Dies geschieht,
|
||||
weil die Parität nicht mehr mit den geänderten Dateien übereinstimmt, selbst wenn
|
||||
sich diese Dateien nicht auf der ausgefallenen Festplatte befinden. Neu hinzugefügte
|
||||
Dateien verhindern dagegen die Wiederherstellung bereits vorhandener Dateien nicht.
|
||||
|
||||
Weitere Einschränkungen von SnapRAID sind:
|
||||
|
||||
* Mit SnapRAID haben Sie immer noch separate Dateisysteme für jede
|
||||
Festplatte. Mit RAID erhalten Sie ein einziges großes Dateisystem.
|
||||
* SnapRAID streift (stripes) keine Daten.
|
||||
* SnapRAID verwendet kein Data-Striping (Verteilen von Datenblöcken).
|
||||
Mit RAID erhalten Sie einen Geschwindigkeitsvorteil durch Striping.
|
||||
* SnapRAID unterstützt keine Echtzeit-Wiederherstellung.
|
||||
Mit RAID müssen Sie die Arbeit nicht unterbrechen, wenn eine
|
||||
Festplatte ausfällt.
|
||||
* SnapRAID kann Daten nur von einer begrenzten Anzahl von Festplattenausfällen
|
||||
wiederherstellen. Mit einer Sicherung können Sie von einem
|
||||
wiederherstellen. Mit einer Sicherung können Sie Daten nach einem
|
||||
vollständigen Ausfall des gesamten Festplatten-Arrays wiederherstellen.
|
||||
* Nur Dateinamen, Zeitstempel, symbolische Links (symlinks) und
|
||||
Hardlinks werden gespeichert. Berechtigungen, Eigentümerschaft
|
||||
und erweiterte Attribute werden nicht gespeichert.
|
||||
|
||||
Getting Started
|
||||
Erste Schritte (Getting Started)
|
||||
Um SnapRAID zu verwenden, müssen Sie zuerst eine Festplatte in Ihrem
|
||||
Festplatten-Array auswählen, die für `parity`-Informationen
|
||||
reserviert wird. Mit einer Festplatte für Parität können Sie von
|
||||
einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5.
|
||||
reserviert wird. Mit einer Festplatte für Parität können Sie Daten
|
||||
nach einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5.
|
||||
|
||||
Wenn Sie von mehr Festplattenausfällen wiederherstellen möchten,
|
||||
Wenn Sie mehr Festplattenausfälle ausgleichen möchten,
|
||||
ähnlich wie bei RAID6, müssen Sie zusätzliche Festplatten für Parität
|
||||
reservieren. Jede zusätzliche Paritätsfestplatte ermöglicht die
|
||||
Wiederherstellung von einem weiteren Festplattenausfall.
|
||||
|
|
@ -174,7 +179,7 @@ Getting Started
|
|||
Jetzt können Sie Ihr Array nach Belieben verwenden und die Paritätsinformationen
|
||||
regelmäßig durch Ausführen des `sync`-Befehls aktualisieren.
|
||||
|
||||
Scrubbing
|
||||
Scrubben (Scrubbing)
|
||||
Um die Daten und die Parität regelmäßig auf Fehler zu überprüfen,
|
||||
können Sie den Befehl `scrub` ausführen.
|
||||
|
||||
|
|
@ -219,10 +224,10 @@ Getting Started
|
|||
gemeldet, aber die zugehörigen Blöcke werden nicht als fehlerhaft
|
||||
markiert.
|
||||
|
||||
Pooling
|
||||
Zusammenführen (Pooling)
|
||||
Hinweis: Die unten beschriebene Pooling-Funktion wurde durch das
|
||||
Tool mergerfs ersetzt, das jetzt die empfohlene Option für Linux-Benutzer
|
||||
in der SnapRAID-Community ist. Mergefs bietet eine flexiblere
|
||||
in der SnapRAID-Community ist. Mergerfs bietet eine flexiblere
|
||||
und effizientere Möglichkeit, mehrere Laufwerke zu einem einzigen,
|
||||
vereinheitlichten Einhängepunkt (Mount Point) zusammenzufassen,
|
||||
was einen nahtlosen Zugriff auf Dateien über Ihr gesamtes Array
|
||||
|
|
@ -300,7 +305,7 @@ Getting Started
|
|||
|
||||
:fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
Undeleting
|
||||
Wiederherstellen (Undeleting)
|
||||
SnapRAID funktioniert eher wie ein Sicherungsprogramm als ein RAID-System
|
||||
und kann verwendet werden, um Dateien in ihren vorherigen Zustand
|
||||
wiederherzustellen oder das Löschen rückgängig zu machen, indem die
|
||||
|
|
@ -323,14 +328,16 @@ Getting Started
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recovering
|
||||
Wiederherstellung (Recovering)
|
||||
Das Schlimmste ist passiert, und Sie haben eine oder mehrere Festplatten
|
||||
verloren!
|
||||
|
||||
KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen!
|
||||
|
||||
Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem
|
||||
Festplatten-Array zu vermeiden. Deaktivieren Sie alle Remote-Verbindungen
|
||||
Bevor Sie irgendetwas anderes tun, vermeiden Sie jegliche Änderungen an Ihrem
|
||||
Festplatten-Array, da das Ändern oder Löschen von Daten auf den verbleibenden
|
||||
Festplatten eine Wiederherstellung unmöglich machen kann.
|
||||
Deaktivieren Sie alle Remote-Verbindungen
|
||||
dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID-nächtlicher
|
||||
`sync`- oder `scrub`-Läufe.
|
||||
|
||||
|
|
@ -423,14 +430,14 @@ Getting Started
|
|||
|
||||
Wenn alles wiederhergestellt ist, ist dieser Befehl sofort.
|
||||
|
||||
Commands
|
||||
SnapRAID bietet einige einfache Befehle, mit denen Sie:
|
||||
Befehle (Commands)
|
||||
SnapRAID bietet ein paar einfache Befehle, mit denen Sie folgende Aktionen ausführen können:
|
||||
|
||||
* Den Status des Arrays ausgeben -> `status`
|
||||
* Die Festplatten steuern -> `smart`, `probe`, `up`, `down`
|
||||
* Eine Sicherung/einen Snapshot erstellen -> `sync`
|
||||
* Einen Backup-/Wiederherstellungspunkt erstellen -> `sync`
|
||||
* Daten regelmäßig überprüfen -> `scrub`
|
||||
* Die letzte Sicherung/den letzten Snapshot wiederherstellen -> `fix`.
|
||||
* Den letzten Backup-/Wiederherstellungspunkt wiederherstellen -> `fix`.
|
||||
|
||||
Befehle müssen in Kleinbuchstaben geschrieben werden.
|
||||
|
||||
|
|
@ -450,7 +457,7 @@ Commands
|
|||
verwenden.
|
||||
|
||||
Es zeigt auch ein Diagramm an, das den letzten Zeitpunkt darstellt,
|
||||
zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbed
|
||||
zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbte
|
||||
Blöcke werden mit `*`, Blöcke, die synchronisiert, aber noch nicht
|
||||
gescrubbed wurden, mit `o` angezeigt.
|
||||
|
||||
|
|
@ -460,7 +467,7 @@ Commands
|
|||
Gibt einen SMART-Bericht aller Festplatten im System aus.
|
||||
|
||||
Es enthält eine Schätzung der Ausfallwahrscheinlichkeit im nächsten
|
||||
Jahr, sodass Sie die Wartungsersetzung von Festplatten planen können,
|
||||
Jahr, sodass Sie den vorsorglichen Austausch von Festplatten planen können,
|
||||
die verdächtige Attribute aufweisen.
|
||||
|
||||
Diese Wahrscheinlichkeitsschätzung wird durch Korrelation der SMART-Attribute
|
||||
|
|
@ -549,10 +556,11 @@ Commands
|
|||
removed - Entfernte Dateien.
|
||||
updated - Dateien mit einer anderen Größe oder einem anderen
|
||||
Zeitstempel, was bedeutet, dass sie geändert wurden.
|
||||
moved - Auf derselben Festplatte in ein anderes Verzeichnis
|
||||
verschobene Dateien. Sie werden durch denselben Namen,
|
||||
dieselbe Größe, denselben Zeitstempel und dieselbe Inode,
|
||||
aber ein anderes Verzeichnis identifiziert.
|
||||
moved - Dateien, die auf derselben Festplatte verschoben oder
|
||||
umbenannt wurden, wobei dieselbe Inode beibehalten wird.
|
||||
Sie werden durch dieselbe Inode, dieselbe Größe und denselben
|
||||
Zeitstempel, aber einen anderen Pfad identifiziert. Der
|
||||
Dateiname kann auch unterschiedlich sein.
|
||||
copied - Dateien, die auf dieselbe oder eine andere Festplatte
|
||||
kopiert wurden, wobei die Originaldatei noch vorhanden ist.
|
||||
Sie werden dadurch identifiziert, dass sie denselben Namen,
|
||||
|
|
@ -560,14 +568,13 @@ Commands
|
|||
Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige
|
||||
Pfad übereinstimmen, um identifiziert zu werden, nicht nur
|
||||
der Name.
|
||||
relocated - Dateien, die auf dieselbe oder eine andere Festplatte
|
||||
verschoben wurden, wobei das Original verschwunden ist.
|
||||
Sie werden dadurch identifiziert, dass sie denselben Namen,
|
||||
dieselbe Größe und denselben Zeitstempel haben.
|
||||
Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige
|
||||
Pfad übereinstimmen, um identifiziert zu werden.
|
||||
Im Gegensatz zu 'moved' Dateien auf derselben Festplatte haben
|
||||
verschobene Dateien einen anderen Inode.
|
||||
relocated - Dateien, die in ein anderes Verzeichnis oder auf eine andere
|
||||
Festplatte verschoben wurden, wobei die Originaldatei verschwunden ist
|
||||
und die Inode nicht beibehalten wird. Sie werden dadurch identifiziert,
|
||||
dass sie denselben Namen, dieselbe Größe und denselben Zeitstempel haben.
|
||||
Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige Pfad
|
||||
übereinstimmen, um identifiziert zu werden. Im Gegensatz zu 'moved'
|
||||
Dateien erfordern umgesiedelte Dateien, dass der Dateiname gleich bleibt.
|
||||
restored - Dateien mit einem anderen Inode, aber passendem
|
||||
Verzeichnis, Namen, Größe und Zeitstempel.
|
||||
Dies sind in der Regel Dateien, die nach dem Löschen
|
||||
|
|
@ -657,14 +664,14 @@ Commands
|
|||
Die Dateien im Array werden NICHT geändert.
|
||||
|
||||
fix
|
||||
Behebt alle Dateien und die Paritätsdaten.
|
||||
Repariert alle Dateien und die Paritätsdaten.
|
||||
|
||||
Alle Dateien und Paritätsdaten werden mit dem Snapshot-Zustand
|
||||
verglichen, der beim letzten `sync` gespeichert wurde.
|
||||
Wenn eine Abweichung gefunden wird, wird sie auf den gespeicherten
|
||||
Snapshot zurückgesetzt.
|
||||
Alle Dateien und Paritätsdaten werden mit dem im letzten `sync`
|
||||
gespeicherten Zustand verglichen. Wenn ein Unterschied gefunden
|
||||
wird, wird er auf den gespeicherten Zustand zurückgesetzt.
|
||||
|
||||
WARNUNG! Der Befehl `fix` unterscheidet nicht zwischen Fehlern und
|
||||
WARNUNG!
|
||||
Der Befehl `fix` unterscheidet nicht zwischen Fehlern und
|
||||
beabsichtigten Änderungen. Er setzt den Dateizustand bedingungslos
|
||||
auf den letzten `sync` zurück.
|
||||
|
||||
|
|
@ -810,7 +817,7 @@ Commands
|
|||
Beachten Sie, dass solche Dateien während des Neuzuweisungsprozesses
|
||||
nicht durch die Parität geschützt sind.
|
||||
|
||||
Options
|
||||
Optionen (Options)
|
||||
SnapRAID bietet die folgenden Optionen:
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -926,9 +933,9 @@ Options
|
|||
-w, --bw-limit RATE
|
||||
Wendet eine globale Bandbreitenbegrenzung für alle Festplatten
|
||||
an. RATE ist die Anzahl der Bytes pro Sekunde. Sie können
|
||||
einen Multiplikator wie K, M oder G angeben (z.B. --bw-limit 1G).
|
||||
einen Multiplikator wie K, M, G oder T angeben (z.B. --bw-limit 1G).
|
||||
|
||||
-t, --tail GRÖSSE
|
||||
-t, --tail SIZE
|
||||
Beschränkt die Dateiliste auf diejenigen, die nicht mehr als die
|
||||
angegebene Tail-Größe der Paritätsfestplatten belegen.
|
||||
Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. --tail 1G).
|
||||
|
|
@ -958,7 +965,7 @@ Options
|
|||
mit Nullgröße, die zuvor nicht Null war. Wenn SnapRAID eine
|
||||
solche Bedingung erkennt, stoppt es den Vorgang, es sei denn,
|
||||
Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu
|
||||
erkennen, wann nach einem Systemabsturz einige zugegriffene Dateien
|
||||
erkennen, wann nach einem Systemabsturz einige Dateien, auf die zugegriffen wurde,
|
||||
abgeschnitten (truncated) wurden. Dies ist eine mögliche Bedingung
|
||||
unter Linux mit den ext3/ext4-Dateisystemen.
|
||||
Diese Option kann nur mit `sync` verwendet werden.
|
||||
|
|
@ -993,7 +1000,7 @@ Options
|
|||
Wenn Sie beispielsweise zwei Datenfestplatten verloren haben und
|
||||
eine Ersatzfestplatte haben, um nur die erste wiederherzustellen,
|
||||
können Sie die zweite unzugängliche Festplatte ignorieren.
|
||||
Oder wenn Sie eine Festplatte in dem auf einer bereits
|
||||
Oder wenn Sie eine Festplatte auf dem auf einer bereits
|
||||
verwendeten Festplatte verbleibenden freien Speicherplatz
|
||||
wiederherstellen möchten, wobei sie dasselbe physische Gerät
|
||||
gemeinsam nutzen.
|
||||
|
|
@ -1037,9 +1044,9 @@ Options
|
|||
dringend empfohlen, sie nicht zu verwenden.
|
||||
Sie haben während der `sync`-Operation KEINEN Datenschutz.
|
||||
|
||||
-W, --force-realloc-tail GRÖSSE
|
||||
-W, --force-realloc-tail SIZE
|
||||
Funktioniert wie -R, --force-realloc, ist jedoch auf den angegebenen
|
||||
Endbereich (die letzten GRÖSSE Bytes) jeder Paritätsdatei beschränkt.
|
||||
Endbereich (die letzten SIZE Bytes) jeder Paritätsdatei beschränkt.
|
||||
Erzwingt die Neuzuweisung (Verschiebung) aller Dateifragmente/-blöcke, die
|
||||
derzeit in diesem Endabschnitt gespeichert sind, sodass sie an beliebiger Stelle
|
||||
in den Paritätsdateien platziert werden können, wo freier Speicherplatz
|
||||
|
|
@ -1092,15 +1099,17 @@ Options
|
|||
Dies kann nützlich sein, um die Überprüfung oder Behebung
|
||||
spezifischer Blöcke im Falle einer beschädigten Festplatte
|
||||
zu wiederholen. Diese Option ist hauptsächlich für die erweiterte
|
||||
manuelle Wiederherstellung gedacht.
|
||||
manuelle Wiederherstellung gedacht und wird nur von `check`
|
||||
und `fix` unterstützt.
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
Verarbeitet nur die angegebene Anzahl von Blöcken.
|
||||
Diese Option ist hauptsächlich für die erweiterte manuelle
|
||||
Wiederherstellung gedacht.
|
||||
Wiederherstellung gedacht und wird nur von `check` und `fix`
|
||||
unterstützt.
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
Generiert eine Dummy-Konfigurationsdatei aus einer vorhandenen
|
||||
Generiert eine Dummy-Konfigurationsdatei aus einer bestehenden
|
||||
Content-Datei. Die Konfigurationsdatei wird in die Standardausgabe
|
||||
geschrieben und überschreibt keine vorhandene.
|
||||
Diese Konfigurationsdatei enthält auch die Informationen,
|
||||
|
|
@ -1127,7 +1136,7 @@ Options
|
|||
-V, --version
|
||||
Gibt die Programmversion aus.
|
||||
|
||||
Configuration
|
||||
Konfiguration (Configuration)
|
||||
SnapRAID benötigt eine Konfigurationsdatei, um zu wissen, wo sich
|
||||
Ihr Festplatten-Array befindet und wo die Paritätsinformationen
|
||||
gespeichert werden sollen.
|
||||
|
|
@ -1141,9 +1150,8 @@ Configuration
|
|||
enthalten:
|
||||
|
||||
parity FILE [,FILE] ...
|
||||
Definiert die Dateien, die zum Speichern der Paritätsinformationen
|
||||
verwendet werden sollen. Die Parität ermöglicht den Schutz
|
||||
vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5.
|
||||
Definiert die Dateien, die zum Speichern der Paritätsinformationen verwendet werden.
|
||||
Die Parität ermöglicht den Schutz vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5.
|
||||
|
||||
Sie können mehrere Dateien angeben, die sich auf unterschiedlichen
|
||||
Festplatten befinden müssen. Wenn eine Datei nicht mehr wachsen
|
||||
|
|
@ -1163,8 +1171,7 @@ Configuration
|
|||
Diese Option ist obligatorisch und kann nur einmal verwendet werden.
|
||||
|
||||
(2,3,4,5,6)-parity FILE [,FILE] ...
|
||||
Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen
|
||||
verwendet werden sollen.
|
||||
Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen verwendet werden.
|
||||
|
||||
Für jede angegebene Paritätsstufe wird eine zusätzliche Schutzstufe
|
||||
aktiviert:
|
||||
|
|
@ -1202,8 +1209,8 @@ Configuration
|
|||
3-parity-Datei angepasst und `fix` zur Neuerstellung verwendet wird.
|
||||
|
||||
content FILE
|
||||
Definiert die Datei, die zum Speichern der Liste und Prüfsummen
|
||||
aller im Festplatten-Array vorhandenen Dateien verwendet werden soll.
|
||||
Definiert die Datei, die zum Speichern der Liste und der Prüfsummen aller
|
||||
im Festplatten-Array vorhandenen Dateien verwendet wird.
|
||||
|
||||
Sie kann auf einer für Daten, Parität oder einer anderen
|
||||
verfügbaren Festplatte platziert werden.
|
||||
|
|
@ -1217,14 +1224,19 @@ Configuration
|
|||
plus eine speichern. Die Verwendung zusätzlicher Kopien schadet nicht.
|
||||
|
||||
data NAME DIR
|
||||
Definiert den Namen und den Einhängepunkt (Mount Point) der
|
||||
Datenfestplatten im Array. NAME wird zur Identifizierung der
|
||||
Festplatte verwendet und muss eindeutig sein. DIR ist der
|
||||
Einhängepunkt der Festplatte im Dateisystem.
|
||||
Definiert den Namen und Einhängepunkt der Datenfestplatten im Array. NAME
|
||||
wird zur Identifizierung der Festplatte verwendet und muss eindeutig sein.
|
||||
DIR ist der Einhängepunkt der Festplatte im Dateisystem.
|
||||
|
||||
Sie können den Einhängepunkt nach Bedarf ändern, solange Sie
|
||||
den NAME unverändert lassen.
|
||||
|
||||
Der konfigurierte Pfad muss jedoch durchgehend auf dieselben
|
||||
zugrunde liegenden Daten verweisen. Wenn der Pfad symbolische Links
|
||||
enthält, müssen deren Ziele stabil bleiben. Das Ändern solcher Symlinks,
|
||||
um das Datenverzeichnis im laufenden Betrieb zu wechseln, wird nicht
|
||||
unterstützt.
|
||||
|
||||
Sie sollten eine Option für jede Datenfestplatte im Array verwenden.
|
||||
|
||||
Sie können eine Festplatte später umbenennen, indem Sie den NAME
|
||||
|
|
@ -1243,6 +1255,31 @@ Configuration
|
|||
Beachten Sie, dass solche Festplatten nicht von den Befehlen `up` und `down`
|
||||
betroffen sind, da von ihnen erwartet wird, dass sie sich immer drehen.
|
||||
|
||||
snapshot
|
||||
Aktiviert die Verwendung von Dateisystem-Snapshots für die Befehle `sync`, `scrub`,
|
||||
`check` und `fix`.
|
||||
|
||||
Wenn aktiviert, erstellt SnapRAID zu Beginn eines 'sync' einen schreibgeschützten
|
||||
Snapshot jedes unterstützten Daten-Dateisystems. Dies bietet eine stabile Ansicht
|
||||
jedes Dateisystems und verhindert, dass spätere Änderungen die für die Paritätsberechnung
|
||||
verwendeten Daten verändern.
|
||||
|
||||
Dies verbessert die Wiederherstellung erheblich: Wenn eine Datei aus dem
|
||||
Live-Dateisystem gelöscht wird, bleibt sie im Snapshot erhalten. Dies verhindert,
|
||||
dass die Parität für diesen Block "beschädigt" wird, sodass Sie Daten immer noch
|
||||
erfolgreich wiederherstellen können, wenn eine andere Festplatte ausfällt.
|
||||
|
||||
Diese Option gilt ausschließlich für Datenträger, die mit den Dateisystemen
|
||||
Btrfs, Bcachefs oder ZFS unter Linux und NTFS unter Windows formatiert sind.
|
||||
Paritätsfestplatten oder Datenträger mit anderen Dateisystemen verwenden immer
|
||||
die Live-Version des Dateisystems.
|
||||
|
||||
Das Erstellen und Löschen von Snapshots erfordert Administratorrechte.
|
||||
Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo)
|
||||
ausgeführt wird, wenn diese Option aktiviert ist.
|
||||
|
||||
Eine detaillierte Erklärung des Snapshot-Lebenszyklus finden Sie im Abschnitt SNAPSHOTS.
|
||||
|
||||
nohidden
|
||||
Schließt alle versteckten Dateien und Verzeichnisse aus.
|
||||
Unter Unix sind versteckte Dateien solche, die mit `.` beginnen.
|
||||
|
|
@ -1260,6 +1297,12 @@ Configuration
|
|||
ein `include` ist, oder eingeschlossen, wenn das zuletzt angegebene
|
||||
Muster ein `exclude` ist.
|
||||
|
||||
Beachten Sie, dass die Filterung hierarchisch beim Durchlaufen der
|
||||
Verzeichnisse erfolgt. Wenn ein Verzeichnis mit einer `exclude`-Regel
|
||||
übereinstimmt, wird das gesamte Verzeichnis übersprungen (verworfen),
|
||||
und alle `include`-Regeln für darin enthaltene Dateien oder
|
||||
Unterverzeichnisse werden nicht ausgewertet.
|
||||
|
||||
Weitere Details zu Musterspezifikationen finden Sie im Abschnitt
|
||||
PATTERN.
|
||||
|
||||
|
|
@ -1437,6 +1480,9 @@ Configuration
|
|||
Gerätenamen ersetzt. Bei RAID-Controllern ist das Gerät
|
||||
wahrscheinlich fest, und Sie müssen `%s` möglicherweise nicht verwenden.
|
||||
|
||||
Sie können auch eine benutzerdefinierte Info-Optionszeichenfolge mit dem
|
||||
Tag `[info: ...]` angeben, um die Standardoption `-a` zu ersetzen.
|
||||
|
||||
Weitere mögliche Optionen finden Sie in der smartmontools-Dokumentation:
|
||||
|
||||
:https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1444,6 +1490,7 @@ Configuration
|
|||
|
||||
Zum Beispiel:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1458,16 +1505,23 @@ Configuration
|
|||
Der Sonderwert * kann verwendet werden, um das Attribut auf allen
|
||||
Festplatten zu ignorieren.
|
||||
|
||||
Um beispielsweise das Attribut `Current Pending Sector Count` auf allen
|
||||
Festplatten zu ignorieren:
|
||||
Es können mehrere Attribute durch Leerzeichen getrennt angegeben werden.
|
||||
Jedes Attribut kann als Nummer von 1 bis 255 oder als Name ohne
|
||||
Berücksichtigung der Groß-/Kleinschreibung (z. B. `Current_Pending_Sector`)
|
||||
angegeben werden.
|
||||
|
||||
:smartignore * 197
|
||||
Um beispielsweise das Attribut `Current Pending Sector Count` und
|
||||
`Reallocated Sectors Count` auf allen Festplatten über ihre Nummer
|
||||
oder ihren Namen zu ignorieren:
|
||||
|
||||
Um es nur auf der ersten Paritätsfestplatte zu ignorieren:
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
:smartignore parity 197
|
||||
Um sie nur auf der ersten Paritätsfestplatte zu ignorieren:
|
||||
|
||||
Examples
|
||||
:smartignore parity 197 5
|
||||
|
||||
Beispiele (Examples)
|
||||
Ein Beispiel für eine typische Konfiguration für Unix ist:
|
||||
|
||||
:parity /mnt/diskp/snapraid.parity
|
||||
|
|
@ -1478,7 +1532,7 @@ Configuration
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1499,7 +1553,157 @@ Configuration
|
|||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Pattern
|
||||
Snapshots
|
||||
Wenn die Snapshot-Option in der Konfiguration aktiviert ist, verwendet SnapRAID
|
||||
Dateisystem-Snapshots, um die während einer Operation gelesenen Daten stabil zu halten,
|
||||
selbst wenn Dateien auf den Live-Dateisystemen nachträglich geändert oder gelöscht werden.
|
||||
|
||||
Die Verwaltung von Snapshots erfolgt vollständig automatisch und transparent.
|
||||
Sie können SnapRAID genau wie bisher verwenden, wobei der zusätzliche Schutz
|
||||
durch Snapshots vollständig im Hintergrund abgewickelt wird.
|
||||
|
||||
Dies bietet zwei wesentliche Vorteile:
|
||||
|
||||
Konsistenz - Dateien, die während eines lang laufenden Syncs oder Scrubs auf dem Live-Dateisystem
|
||||
geändert werden, verursachen keine Paritätskonflikte oder abgebrochenen Operationen,
|
||||
weil jedes Dateisystem mit Snapshot für die Dauer der Operation unverändert bleibt.
|
||||
Wiederherstellung - Wenn eine Datei im Live-Dateisystem aktualisiert oder gelöscht wird,
|
||||
bleibt sie im Snapshot erhalten. Wenn ein Festplattenausfall auftritt,
|
||||
bevor der nächste Sync ausgeführt wird, verwendet SnapRAID die im Snapshot konservierten Daten,
|
||||
um die ausgefallene Festplatte zu rekonstruieren.
|
||||
|
||||
Im Falle eines Festplattenausfalls während eines aktiven Sync-Vorgangs
|
||||
ist SnapRAID auch in der Lage, automatisch sowohl aus dem Snapshot
|
||||
der vorherigen Paritätsberechnung als auch aus der aktuellen zu lesen.
|
||||
Dies maximiert die Wahrscheinlichkeit einer vollständigen Wiederherstellung, indem
|
||||
Zugriff auf die genauen Datenblöcke gewährt wird, die zur Lösung der Paritätsgleichungen
|
||||
erforderlich sind, selbst wenn diese Blöcke zwischen den Syncs geändert oder gelöscht wurden.
|
||||
|
||||
Ohne Snapshots führt eine aktualisierte oder gelöschte Datei auf einer gesunden
|
||||
Festplatte zu fehlenden Datenblöcken, die möglicherweise zur Reparatur
|
||||
anderer ausgefallener Festplatten benötigt werden.
|
||||
|
||||
Snapshots werden nur für Datenträger erstellt und nur dann, wenn das zugrunde liegende
|
||||
Dateisystem diese Funktionalität unterstützt. Paritätsfestplatten verwenden immer
|
||||
das Live-Dateisystem.
|
||||
|
||||
Derzeit wird dies auf Btrfs, Bcachefs und ZFS unter Linux
|
||||
und auf NTFS unter Windows unterstützt.
|
||||
|
||||
Sie können Datenträger mit unterschiedlichen Dateisystemen mischen. Nur diejenigen, die
|
||||
Snapshots unterstützen, werden diese nutzen, während andere Festplatten weiterhin
|
||||
direkt auf dem Live-Dateisystem arbeiten.
|
||||
|
||||
Das Erstellen und Löschen von Snapshots erfordert Administratorrechte.
|
||||
Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo)
|
||||
ausgeführt wird, wenn Snapshots aktiviert sind.
|
||||
|
||||
Befehlsverhalten mit Snapshots (Command Behavior with Snapshots)
|
||||
Die Befehle `sync` und `scrub` verwenden Snapshots für Datenträger, deren
|
||||
Dateisysteme diese unterstützen. Auf einer Festplatte mit Snapshot sieht der Befehl
|
||||
ein stabiles Dateisystemabbild, das von gleichzeitigen Änderungen am Live-Dateisystem
|
||||
unbeeinflusst bleibt.
|
||||
Während eines `sync` wird unabhängig für jedes unterstützte Daten-Dateisystem ein
|
||||
neuer Snapshot erstellt. Diese Snapshots liefern gemeinsam die für die Paritätsberechnung
|
||||
verwendeten Daten.
|
||||
Im Gegensatz dazu verwendet der Befehl `scrub` den letzten Snapshot, also den, der
|
||||
während des letzten erfolgreichen Syncs erstellt wurde, um einen zuverlässigen Referenzpunkt
|
||||
beizubehalten, der mit der vorhandenen Parität übereinstimmt.
|
||||
|
||||
Bei den Befehlen `check` und `fix` hängt die Verwendung des letzten Snapshots
|
||||
davon ab, ob bestimmte Festplatten mit der Option -d, --filter-disk ausgewählt wurden.
|
||||
|
||||
Eine explizit über -d ausgewählte Festplatte (das „Ziel“ der Operation)
|
||||
verwendet immer das Live-Dateisystem. Für `fix` ermöglicht dies das Wiederherstellen
|
||||
von Daten auf dem aktiven Festplattenersatz. Für `check` ermöglicht es die Simulation
|
||||
des `fix`-Vorgangs unter denselben Bedingungen.
|
||||
|
||||
Auf alle anderen Datenträger (die „Referenz“-Festplatten) wird über ihre Snapshots zugegriffen.
|
||||
Dies stellt sicher, dass SnapRAID selbst dann, wenn Sie während einer laufenden Wiederherstellung
|
||||
Dateien auf Ihren gesunden Festplatten ändern, eine stabile, eingefrorene Referenz hat,
|
||||
um die Paritätsgleichungen zu lösen.
|
||||
|
||||
Wenn keine Option -d angegeben ist, nimmt SnapRAID an, dass die Operation für das gesamte Array gilt.
|
||||
In diesem Fall verwenden `check` und `fix` ausschließlich die Live-Dateisysteme.
|
||||
|
||||
Alle anderen Befehle arbeiten ausschließlich auf dem Live-Dateisystem.
|
||||
|
||||
Lebenszyklus von Snapshots (Snapshots Lifecycle)
|
||||
SnapRAID verwaltet drei spezifische Snapshots, `stable`, `pending` und `scan`,
|
||||
in einem versteckten Verzeichnis im Stammverzeichnis jedes Daten-Subvolumes.
|
||||
Unter Btrfs, Bcachefs und NTFS wird das Verzeichnis `.snapraid/` verwendet,
|
||||
unter ZFS das Standardverzeichnis `.zfs/snapshot/`.
|
||||
|
||||
Der `stable`-Snapshot repräsentiert den Zustand des letzten
|
||||
erfolgreich abgeschlossenen `sync` und enthält die genauen Daten, die zur
|
||||
Berechnung der aktuellen Parität verwendet wurden. Er dient als primäre Datenquelle
|
||||
für die Befehle `scrub`, `check` und `fix`.
|
||||
|
||||
Der `scan`-Snapshot ist ein temporäres Abbild, das zu Beginn eines `sync`
|
||||
erstellt wird, um einen eingefrorenen Zustand für das Scannen und die Paritätsberechnung bereitzustellen.
|
||||
Nach dem Scannen und Speichern des neuen Inhaltszustands ersetzt er den vorherigen
|
||||
`pending`-Snapshot.
|
||||
|
||||
Der `pending`-Snapshot ist das Abbild, das von einem unterbrochenen `sync` verwendet wird.
|
||||
Nach erfolgreichem Abschluss des Vorgangs wird der vorherige `stable`-Snapshot gelöscht
|
||||
und der `pending`-Snapshot wird heraufgestuft, um seinen Platz als neue stabile Referenz einzunehmen.
|
||||
|
||||
Wenn ein `sync` unterbrochen wird, bleibt der `pending`-Snapshot erhalten.
|
||||
Nachfolgende `scrub`-, `check`- und `fix`-Befehle verwenden diesen ausstehenden Snapshot,
|
||||
da er mit dem in der .content-Datei aufgezeichneten Dateisystemzustand übereinstimmt,
|
||||
selbst wenn die Parität nur teilweise synchronisiert ist.
|
||||
|
||||
Im Falle einer `sync`-Unterbrechung lesen die Befehle `check` und `fix`
|
||||
auch aus dem `stable`-Snapshot, um Datenblöcke von Dateien abzurufen,
|
||||
die während des Syncs aktualisiert oder gelöscht wurden.
|
||||
Dies ist möglich, da die .content-Datei Metadaten für alle geänderten oder
|
||||
gelöschten Dateien während des gesamten Sync-Prozesses aufbewahrt.
|
||||
Diese historischen Informationen werden erst gelöscht, wenn ein Sync erfolgreich abgeschlossen
|
||||
und die endgültige Version der .content-Datei gespeichert wurde.
|
||||
|
||||
Wenn ein `sync` nach einer Unterbrechung neu gestartet wird, wird der vorhandene
|
||||
ausstehende (pending) Snapshot gelöscht und ein neuer erstellt, um den
|
||||
aktuellen Zustand des Live-Dateisystems zu erfassen.
|
||||
Wenn ein `sync` jedoch unterbrochen wird, vermeiden Sie es, Dateien zu
|
||||
ändern, zu löschen, zu ersetzen oder zu verschieben, bis ein nachfolgender
|
||||
`sync` erfolgreich abgeschlossen ist. Die Parität kann noch Blöcke enthalten,
|
||||
die aus dem vom unterbrochenen Sync verwendeten Snapshot berechnet wurden.
|
||||
Ein späterer Sync könnte diesen Snapshot ersetzen, wodurch Zwischenversionen
|
||||
von Dateien für die Wiederherstellung nicht mehr verfügbar sind.
|
||||
|
||||
Externe Sicherungen mit Dateisystem-Snapshots (External backups with filesystem snapshots)
|
||||
Wenn Dateisystem-Snapshots aktiviert sind, greift SnapRAID auf Snapshots
|
||||
an der Wurzel jedes Daten-Subvolumes, Volumes oder Datasets zu oder erstellt
|
||||
diese dort.
|
||||
|
||||
Ein einfacher Weg, um jegliche Beeinträchtigung durch externe Tools zu
|
||||
vermeiden, besteht darin, die `data`-Konfiguration auf ein reguläres
|
||||
Unterverzeichnis innerhalb des Subvolumes oder Volumes verweisen zu lassen
|
||||
(beispielsweise `/mnt/subvol/data` statt `/mnt/subvol`). SnapRAID erstellt
|
||||
das Snapshot-Verzeichnis immer an der Wurzel des Subvolumes (beispielsweise
|
||||
`/mnt/subvol/.snapraid/`), wodurch das Datenunterverzeichnis sauber bleibt
|
||||
und Snapshots außerhalb und unsichtbar für Sicherungswerkzeuge bleiben, die
|
||||
darin arbeiten.
|
||||
|
||||
Wenn das konfigurierte `data`-Verzeichnis hingegen selbst die Wurzel des
|
||||
Subvolumes oder Volumes ist, erstellt SnapRAID ein `.snapraid/`-Verzeichnis
|
||||
direkt darin (auf Btrfs, Bcachefs und NTFS). Während SnapRAID dieses
|
||||
Verzeichnis bei seinen eigenen Scans automatisch ausschließt, werden
|
||||
externe Sicherungs- oder Synchronisationswerkzeuge darauf stoßen. Wenn es
|
||||
nicht ausgeschlossen wird, könnten sie in die Snapshots oder Verknüpfungen
|
||||
eindringen und den gesamten eingefrorenen Datenbaum kopieren, was Daten
|
||||
dupliziert und den Sicherungsspeicherplatz erschöpfen kann. Konfigurieren
|
||||
Sie externe Sicherungswerkzeuge immer so, dass sie das Verzeichnis
|
||||
`.snapraid/` ausschließen.
|
||||
|
||||
Bei ZFS werden Snapshots über das standardmäßige virtuelle Verzeichnis
|
||||
`.zfs/snapshot/` anstelle von `.snapraid/` bereitgestellt. Standardmäßig
|
||||
(`snapdir=hidden`) blendet ZFS dieses Verzeichnis in Verzeichnislisten aus,
|
||||
sodass externe Sicherungswerkzeuge es nicht durchlaufen. Wenn Sie
|
||||
`snapdir=visible` aktiviert haben, stellen Sie sicher, dass Ihre
|
||||
Sicherungswerkzeuge das Verzeichnis `.zfs/` ausschließen.
|
||||
|
||||
Muster (Pattern)
|
||||
Muster bieten eine flexible Möglichkeit, Dateien für die Einbeziehung oder
|
||||
den Ausschluss zu filtern. Durch die Verwendung von Globbing-Zeichen können Sie Regeln definieren,
|
||||
die mit bestimmten Dateinamen oder ganzen Verzeichnisstrukturen übereinstimmen, ohne
|
||||
|
|
@ -1515,18 +1719,19 @@ Pattern
|
|||
geeignet macht. Dies ist das Standardverhalten von Wildcards, das vom Shell-
|
||||
Globbing bekannt ist.
|
||||
|
||||
Der Doppelstern `**` ist mächtiger; er entspricht jeder Folge von
|
||||
Zeichen einschließlich Verzeichnistrennzeichen. Dies ermöglicht es Mustern, über
|
||||
mehrere Verzeichnisebenen hinweg übereinzustimmen. Wenn `**` direkt in
|
||||
ein Muster eingebettet ist, kann es null oder mehr Zeichen einschließlich Schrägstrichen zwischen
|
||||
dem umgebenden wörtlichen Text entsprechen.
|
||||
Der Doppelstern-Platzhalter `**` entspricht nur dann über Verzeichnistrennzeichen
|
||||
hinweg, wenn er an ein Verzeichnistrennzeichen angrenzt (einem Schrägstrich
|
||||
vorangestellt oder nachgestellt). In dieser Form entspricht er null oder mehr
|
||||
Zeichen über Verzeichnisebenen hinweg. Zum Beispiel entspricht `foo/**/bar` den
|
||||
Pfaden `foo/bar`, `foo/a/bar` und `foo/a/b/bar`; `**/build` entspricht `build`
|
||||
und `foo/bar/build`; und `src/**.js` entspricht `src/main.js` und
|
||||
`src/ui/components/main.js`.
|
||||
Die alleinstehende Form `/**/` wird nicht als vollständiges Muster akzeptiert.
|
||||
|
||||
Die wichtigste Verwendung von `**` ist in der speziellen Form `/**/`. Dies entspricht
|
||||
null oder mehr vollständigen Verzeichnisebenen, was es möglich macht, Dateien
|
||||
in jeder Tiefe eines Verzeichnisbaums abzugleichen, ohne die genaue Pfadstruktur zu kennen.
|
||||
Zum Beispiel entspricht das Muster `src/**/main.js` dem Pfad `src/main.js` (Überspringen
|
||||
von null Verzeichnissen), `src/ui/main.js` (Überspringen eines Verzeichnisses) und
|
||||
`src/ui/components/main.js` (Überspringen von zwei Verzeichnissen).
|
||||
Wenn `**` nicht an einen Schrägstrich angrenzt, verhält er sich wie `*` und
|
||||
entspricht keinen Verzeichnistrennzeichen. Zum Beispiel entspricht `**.jpg`
|
||||
der Datei `photo.jpg` im aktuellen Verzeichnis, nicht jedoch `dir/photo.jpg`.
|
||||
Verwenden Sie für diesen Zweck `**/*.jpg`.
|
||||
|
||||
Zeichenklassen mit eckigen Klammern `[]` entsprechen einem einzelnen Zeichen aus einer
|
||||
bestimmten Menge oder einem Bereich. Wie die anderen Einzelzeichenmuster
|
||||
|
|
@ -1535,8 +1740,8 @@ Pattern
|
|||
|
||||
Der grundlegende Unterschied, den man sich merken sollte, ist, dass `*`, `?` und Zeichenklassen
|
||||
alle Verzeichnisgrenzen respektieren und nur innerhalb einer einzelnen Pfadkomponente
|
||||
übereinstimmen, während `**` das einzige Muster ist, das über Verzeichnistrennzeichen
|
||||
hinweg übereinstimmen kann.
|
||||
übereinstimmen, während `**` nur dann über Verzeichnistrennzeichen hinweg übereinstimmen kann,
|
||||
wenn es an einen Schrägstrich angrenzt.
|
||||
|
||||
Es gibt vier verschiedene Arten von Mustern:
|
||||
|
||||
|
|
@ -1610,6 +1815,29 @@ Pattern
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
Beachten Sie, dass das Ausschließen eines Verzeichnisses (mit DIR/
|
||||
oder /PFAD/DIR/) verhindert, dass SnapRAID dieses Verzeichnis betritt
|
||||
und durchsucht. Daher ist es nicht möglich, eine Datei oder ein
|
||||
Unterverzeichnis innerhalb eines ausgeschlossenen übergeordneten
|
||||
Verzeichnisses wieder einzuschließen, da der Scanner dieses niemals
|
||||
durchläuft.
|
||||
|
||||
Beispielsweise wird bei folgender Konfiguration `file.dat` NICHT
|
||||
eingeschlossen, da `/keep/` verworfen wird, bevor `file.dat` gesehen
|
||||
werden kann:
|
||||
|
||||
:# Funktioniert NICHT: /keep/ wird vollständig übersprungen
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
Um Dateien innerhalb eines Verzeichnisses auszuschließen und bestimmte
|
||||
Dateien beizubehalten, schließen Sie die Dateien im Verzeichnis aus,
|
||||
anstatt das Verzeichnis selbst auszuschließen:
|
||||
|
||||
:# Funktioniert: /keep/ wird durchlaufen, aber andere Dateien darin werden ausgeschlossen
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
In der Befehlszeile können Sie mit der Option -f nur `include`-Muster
|
||||
verwenden. Zum Beispiel:
|
||||
|
||||
|
|
@ -1620,7 +1848,7 @@ Pattern
|
|||
Unter Unix müssen Sie Globbing-Zeichen in der Befehlszeile in
|
||||
Anführungszeichen setzen, um zu verhindern, dass die Shell sie erweitert.
|
||||
|
||||
Dateien Ignorieren
|
||||
Dateien Ignorieren (Ignore File)
|
||||
Zusätzlich zu den globalen Regeln in der Konfigurationsdatei können Sie
|
||||
`.snapraidignore`-Dateien in jedem Verzeichnis innerhalb des Arrays platzieren,
|
||||
um dezentrale Ausschlussregeln zu definieren.
|
||||
|
|
@ -1662,7 +1890,7 @@ Dateien Ignorieren
|
|||
:# Schließt jede .tmp-Datei innerhalb von projects/ oder deren Unterordnern aus
|
||||
:*.tmp
|
||||
|
||||
Content
|
||||
Inhalt (Content)
|
||||
SnapRAID speichert die Liste und Prüfsummen Ihrer Dateien in der
|
||||
Content-Datei.
|
||||
|
||||
|
|
@ -1670,10 +1898,13 @@ Content
|
|||
Dateien auflistet, zusammen mit allen Prüfsummen zur Überprüfung
|
||||
ihrer Integrität.
|
||||
|
||||
Diese Datei wird von den Befehlen `sync` und `scrub` gelesen und
|
||||
geschrieben und von den Befehlen `fix`, `check` und `status` gelesen.
|
||||
Die Content-Datei wird von den Befehlen `sync`, `scrub`, `touch` und
|
||||
`rehash` gelesen und geschrieben. Sie wird von den Befehlen `status`,
|
||||
`diff`, `check`, `fix`, `list`, `dup`, `locate` und `pool` gelesen und
|
||||
von den Befehlen `smart`, `probe`, `up`, `down` und `devices` vollständig
|
||||
ignoriert.
|
||||
|
||||
Parity
|
||||
Parität (Parity)
|
||||
SnapRAID speichert die Paritätsinformationen Ihres Arrays in den
|
||||
Paritätsdateien.
|
||||
|
||||
|
|
@ -1683,7 +1914,7 @@ Parity
|
|||
Diese Dateien werden von den Befehlen `sync` und `fix` gelesen
|
||||
und geschrieben und nur von den Befehlen `scrub` und `check` gelesen.
|
||||
|
||||
Encoding
|
||||
Kodierung (Encoding)
|
||||
SnapRAID ignoriert unter Unix jede Kodierung. Es liest und speichert
|
||||
die Dateinamen mit derselben Kodierung, die vom Dateisystem
|
||||
verwendet wird.
|
||||
|
|
@ -1698,8 +1929,196 @@ Encoding
|
|||
die Konsolenausgabe in eine Datei umleiten, ist die resultierende
|
||||
Datei immer im UTF-8-Format.
|
||||
|
||||
Copyright
|
||||
Diese Datei ist Copyright (C) 2025 Andrea Mazzoleni
|
||||
Exit-Code (Exit Code)
|
||||
SnapRAID endet mit den folgenden Fehlercodes:
|
||||
|
||||
See Also
|
||||
snapraid_log(1), snapraidd(1)
|
||||
0 - Alles OK.
|
||||
1 - Der Befehl ist auf Fehler gestoßen.
|
||||
2 - Der Befehl `diff` hat festgestellt, dass alles OK ist, aber ein `sync` erforderlich ist.
|
||||
3 - Ein Festplattenbefehl (`probe`, `smart`, `devices`, `up`, `down`) wurde
|
||||
abgeschlossen, aber mindestens ein Dateisystem läuft im degradierten
|
||||
Modus mit fehlenden Geräten.
|
||||
|
||||
Bekannte Probleme (Known Issues)
|
||||
Dateisystemgrenzen
|
||||
SnapRAID überschreitet beim Scannen einer Datenfestplatte keine Dateisystem-,
|
||||
Mount- oder Subvolume-Grenzen. Wenn eine solche Grenze erkannt wird, gibt
|
||||
SnapRAID eine WARNUNG aus und scannt nicht darüber hinaus.
|
||||
|
||||
Dateien, die sich jenseits solcher Grenzen befinden, sind nicht in der
|
||||
Datenfestplatte enthalten und müssen separat konfiguriert werden, wenn sie
|
||||
geschützt werden sollen.
|
||||
|
||||
Mount-Punkte mit Dateisystem-Snapshots
|
||||
Wenn Dateisystem-Snapshots aktiviert sind, werden verschachtelte Mount-Punkte
|
||||
und Bind-Mounts innerhalb einer Datenfestplatte nicht unterstützt.
|
||||
|
||||
Mount-Punkte sind Teil des Mount-Namespace des laufenden Systems und werden
|
||||
in Dateisystem-Snapshots nicht beibehalten. Folglich kann beim Scannen eines
|
||||
Snapshots ein Verzeichnis sichtbar werden, das im Live-Dateisystem durch
|
||||
einen Mount-Punkt verdeckt war.
|
||||
|
||||
Platzieren Sie keine verschachtelten Mount-Punkte oder Bind-Mounts innerhalb
|
||||
von Datenfestplatten, wenn Dateisystem-Snapshots aktiviert sind.
|
||||
|
||||
Mehrere Konfigurationen mit Dateisystem-Snapshots
|
||||
Die Snapshot-Unterstützung kann nicht sicher von mehreren unabhängigen
|
||||
SnapRAID-Konfigurationen gemeinsam genutzt werden, die denselben
|
||||
Dateisystem-Snapshot-Namespace verwenden.
|
||||
|
||||
Unter Btrfs und Bcachefs darf nur eine SnapRAID-Konfiguration mit aktivierter
|
||||
Snapshot-Unterstützung Datenverzeichnisse innerhalb desselben Subvolumes
|
||||
verwenden. Unter ZFS gilt dieselbe Einschränkung für ein Dataset und unter
|
||||
NTFS für ein Volume.
|
||||
|
||||
Mehrere Konfigurationen, die denselben Snapshot-Namespace teilen, verwenden
|
||||
dieselben Snapshots `stable`, `pending` und `scan`. Das Ausführen einer
|
||||
Konfiguration kann daher Wiederherstellungs-Snapshots ersetzen oder löschen,
|
||||
die von einer anderen benötigt werden.
|
||||
|
||||
In-Place-Dateimodifikationen ohne Zeitstempeländerungen
|
||||
SnapRAID erkennt Dateimodifikationen durch den Vergleich von Dateigrößen
|
||||
und Änderungszeitstempeln (mtime).
|
||||
|
||||
Wenn eine Anwendung eine Datei in-place ändert, ohne deren Größe zu verändern
|
||||
oder ihren Änderungszeitstempel zu aktualisieren, erkennen "diff" und "sync"
|
||||
nicht, dass sich die Datei geändert hat, und ihre Parität wird nicht
|
||||
aktualisiert.
|
||||
|
||||
Um sicherzustellen, dass SnapRAID solche Änderungen erkennt, aktualisieren
|
||||
Sie den Änderungszeitstempel der Datei (z. B. mit dem Dienstprogramm "touch").
|
||||
Andernfalls wird der Unterschied erst bei einem nachfolgenden "scrub" oder
|
||||
"check" als Hash-Fehlübereinstimmung erkannt.
|
||||
|
||||
Nicht-ASCII-Groß-/Kleinschreibung unter Windows
|
||||
SnapRAID verwendet auf allen Plattformen eine standardmäßige, vorhersehbare
|
||||
UTF-8-Kodierung und beschränkt den Vergleich ohne Berücksichtigung der
|
||||
Groß-/Kleinschreibung auf ASCII-Zeichen.
|
||||
|
||||
Windows-Dateisysteme leiden unter dem veralteten Konzept, die Unempfindlichkeit
|
||||
gegenüber der Groß-/Kleinschreibung bei Unicode-Dateinamen über willkürliche,
|
||||
systemabhängige Folding-Tabellen zu erzwingen. Infolgedessen verschleiert Windows
|
||||
die Realität des Dateisystems, indem es völlig unterschiedliche
|
||||
Unicode-Bytesequenzen so behandelt, als wären sie dieselbe Datei.
|
||||
|
||||
Beispielsweise sind `À.txt` und `à.txt` unterschiedliche Unicode-Namen, dennoch
|
||||
behandelt Windows sie unlogischerweise als identisch, während SnapRAID ihre
|
||||
tatsächliche Unterscheidung beibehält.
|
||||
|
||||
Diese Einschränkung wird durch den inkonsistenten Umgang von Windows mit
|
||||
Unicode-Dateinamen und das Beharren auf einer Groß-/Kleinschreibungs-Aliasing
|
||||
verursacht. Um Abweichungen durch das Case-Folding von Windows zu vermeiden,
|
||||
geben Sie für alle Nicht-ASCII-Zeichen in Konfigurationspfaden und Filtern
|
||||
stets die exakte Groß-/Kleinschreibung an.
|
||||
|
||||
Wiederherstellung mit partiellem Fix
|
||||
Wenn `fix` mit `-S, --start` oder `-B, --count` eingeschränkt wird,
|
||||
arbeitet SnapRAID nur auf den ausgewählten Blöcken und führt weder eine
|
||||
Finalisierung auf Dateiebene noch eine Quarantäne durch.
|
||||
|
||||
Wenn die Wiederherstellung Best-Effort-Daten erzeugt, bei denen nicht
|
||||
nachgewiesen werden kann, dass sie den aktuellen Inhalt darstellen, können
|
||||
solche Blöcke dennoch unter dem normalen Dateinamen geschrieben werden. Die mit
|
||||
diesen wiederhergestellten Blöcken verbundene Ungewissheit bleibt nach Beendigung
|
||||
des Befehls nicht erhalten.
|
||||
|
||||
Infolgedessen behandelt ein späterer `fix` diese lesbaren Blöcke als gültige
|
||||
Dateidaten und versucht nicht, sie erneut wiederherzustellen. Dies kann dazu
|
||||
führen, dass eine spätere Wiederherstellung Erfolg meldet, während die Datei
|
||||
weiterhin unvollständige oder veraltete Daten enthält.
|
||||
|
||||
Die Optionen `-S` und `-B` sind nur für die fortgeschrittene manuelle
|
||||
Wiederherstellung gedacht, typischerweise nachdem ein normaler `fix`
|
||||
fehlgeschlagen ist. Wenn ein partieller `fix` nicht wiederherstellbare Daten
|
||||
meldet, entfernen oder benennen Sie die betroffenen Dateien um, bevor Sie eine
|
||||
weitere Wiederherstellung versuchen, oder überprüfen Sie deren Inhalt manuell.
|
||||
|
||||
NTFS-Hardlinks und ausgeschlossene Pfade
|
||||
Unter NTFS speichern Verzeichniseinträge Dateigröße und Zeitstempel
|
||||
unabhängig für jeden Hardlink zwischen. Wenn eine Datei über einen Link
|
||||
geändert wird, können die Verzeichniseinträge anderer Links, die auf
|
||||
dieselbe Datei verweisen, veraltete Metadaten behalten, bis auf sie
|
||||
zugegriffen wird.
|
||||
|
||||
SnapRAID erkennt und normalisiert diesen Zustand automatisch, sobald
|
||||
während eines Scans mindestens zwei Hardlinks zu derselben Datei gefunden
|
||||
werden. Wenn jedoch nur ein Hardlink gescannt wird, während die anderen
|
||||
durch Filter ausgeschlossen sind oder außerhalb des Datenfestplattenpfads
|
||||
liegen, kann SnapRAID die Inode-Kollision nicht erkennen und verlässt sich
|
||||
auf die zwischengespeicherten Metadaten des einzigen sichtbaren Links.
|
||||
|
||||
Infolgedessen können Änderungen, die über einen ausgeschlossenen oder
|
||||
externen Hardlink vorgenommen wurden, von SnapRAID unbemerkt bleiben,
|
||||
bis die Metadaten des einbezogenen Links durch das Betriebssystem
|
||||
aktualisiert werden (z. B. wenn über diesen Pfad auf die Datei
|
||||
zugegriffen oder sie geöffnet wird).
|
||||
|
||||
Um diese Einschränkung zu vermeiden, sollten geschützte Dateien nicht über
|
||||
Hardlinks geändert werden, die von SnapRAID ausgeschlossen sind, oder es
|
||||
sollte sichergestellt werden, dass alle Hardlinks zu einer Datei im Scan
|
||||
enthalten sind, damit SnapRAID sie normalisieren kann.
|
||||
|
||||
Wiederherstellung nach einem unterbrochenen Multi-Paritäts-Sync
|
||||
In einem Array mit mehreren Paritätsfestplatten kann ein unterbrochener
|
||||
`sync` dazu führen, dass sich verschiedene Paritätsstufen vorübergehend
|
||||
in unterschiedlichen Aktualisierungszuständen befinden. Beispielsweise
|
||||
kann Parität 1 bereits neu aktualisierte Daten enthalten, während
|
||||
Parität 2 noch die alten Daten enthält.
|
||||
|
||||
Während `check` oder `fix` testet SnapRAID verschiedene
|
||||
Paritätskombinationen und validiert die rekonstruierten Daten anhand
|
||||
der bekannten Block-Hashes (die den gesamten Block abdecken, typischerweise
|
||||
256 KiB).
|
||||
|
||||
Wenn SnapRAID eine Rekonstruktion mit einer inkonsistenten Mischung aus
|
||||
alter und neuer Parität versucht, erzeugen die linearen RAID-Gleichungen
|
||||
fehlerhafte Daten. Damit eine solche ungültige Kombination fälschlicherweise
|
||||
akzeptiert wird, müssten die Gleichungen rein zufällig mindestens einen
|
||||
vollständigen 256-KiB-Block so perfekt rekonstruieren, dass sein Hash
|
||||
übereinstimmt, während andere nicht synchronisierte Blöcke desselben
|
||||
Stripes mit fehlerhaften Daten rekonstruiert werden.
|
||||
|
||||
Dieses Szenario beruht nicht auf einer Hash-Kollision; vielmehr müssten
|
||||
die gemischten Paritätsgleichungen selbst zufällig genau den ursprünglichen
|
||||
256-KiB-Blockinhalt erzeugen. Dies ist zwar bei speziell konstruierten oder
|
||||
stark repetitiven Daten mathematisch denkbar, bei realen Daten jedoch
|
||||
praktisch unmöglich.
|
||||
|
||||
Wenn alle Festplatten fehlerfrei sind, beseitigt der Abschluss des
|
||||
unterbrochenen `sync` vor weiteren Änderungen diese Unklarheit. Wenn eine
|
||||
Festplatte ausgefallen ist und eine Wiederherstellung erforderlich ist,
|
||||
sollten vor dem Ausführen von `check` oder `fix` keine Änderungen an den
|
||||
Datenfestplatten vorgenommen werden.
|
||||
|
||||
Reservierte Datei- und Verzeichnisnamen
|
||||
SnapRAID reserviert einige Datei-, Verzeichnis- und Snapshot-Namen für seine
|
||||
internen Operationen. Verwenden Sie diese Namen nicht für Benutzerdaten:
|
||||
|
||||
.snapraidignore - Lokale Ausschlussregeldatei.
|
||||
.snapraid - Snapshot-Container-Verzeichnis.
|
||||
snapraid-* - Von SnapRAID verwaltete ZFS-Snapshot-Namen.
|
||||
*.unrecoverable - Beschädigte Dateien, die während der Wiederherstellung
|
||||
unter Quarantäne gestellt wurden.
|
||||
CONTENT.tmp - Temporäre Datei für Content-Aktualisierungen.
|
||||
CONTENT.lock - Content-Sperrdatei.
|
||||
PARITY.spaceholder - Temporäre Platzhalterdatei während der
|
||||
Paritätszuweisung unter Windows.
|
||||
|
||||
Die Verwendung dieser Namen für nicht zugehörige Daten kann dazu führen,
|
||||
dass Dateien oder Snapshots ignoriert, als Metadaten fehlinterpretiert,
|
||||
überschrieben, umbenannt oder gelöscht werden.
|
||||
|
||||
Unter Windows sind alle Varianten der Groß- und Kleinschreibung ebenfalls
|
||||
reserviert, selbst in NTFS-Verzeichnissen, die für die Unterscheidung von
|
||||
Groß- und Kleinschreibung konfiguriert sind (z. B. .SNAPRAIDIGNORE,
|
||||
.SnapRaid, CONTENT.TMP und CONTENT.Lock).
|
||||
|
||||
Übersetzung (Translation)
|
||||
Dieses Dokument ist eine automatische Übersetzung des englischen Handbuchs.
|
||||
Die maßgebliche Version finden Sie im englischen Handbuch.
|
||||
|
||||
Copyright
|
||||
Diese Datei ist Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
Siehe auch (See Also)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
Name{number}
|
||||
snapraid - SnapRAID Backup para Arrays de Discos
|
||||
|
||||
Synopsis
|
||||
Sinopsis (Synopsis)
|
||||
:snapraid [-c, --conf CONFIG]
|
||||
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
: [-m, --filter-missing] [-e, --filter-error]
|
||||
|
|
@ -23,7 +23,7 @@ Synopsis
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
Descripción (Description)
|
||||
SnapRAID es un programa de copia de seguridad diseñado para arrays
|
||||
de discos, que almacena información de paridad para la recuperación
|
||||
de datos en caso de hasta seis fallos de disco.
|
||||
|
|
@ -34,7 +34,7 @@ Description
|
|||
|
||||
* Puede utilizar discos ya llenos de archivos sin la necesidad de
|
||||
reformatearlos, accediendo a ellos como de costumbre.
|
||||
* Todos sus datos son hasheados para asegurar la integridad de los datos
|
||||
* Todos sus datos son procesados con hash para asegurar la integridad de los datos
|
||||
y prevenir la corrupción silenciosa.
|
||||
* Cuando el número de discos fallidos excede el recuento de paridad,
|
||||
la pérdida de datos se limita a los discos afectados; los datos en
|
||||
|
|
@ -52,23 +52,31 @@ Description
|
|||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitations
|
||||
SnapRAID es un híbrido entre un programa RAID y un programa de copia
|
||||
de seguridad, con el objetivo de combinar los mejores beneficios de
|
||||
ambos. Sin embargo, tiene algunas limitaciones que debe considerar
|
||||
antes de usarlo.
|
||||
Limitaciones (Limitations)
|
||||
SnapRAID es un híbrido entre un RAID y un programa de copia de seguridad, con el objetivo de combinar
|
||||
los mejores beneficios de ambos. Sin embargo, tiene algunas limitaciones que debería
|
||||
considerar antes de usarlo.
|
||||
|
||||
La principal limitación es que si un disco falla y no ha sincronizado
|
||||
recientemente, es posible que no pueda recuperarse por completo.
|
||||
Más específicamente, es posible que no pueda recuperar hasta el tamaño
|
||||
de los archivos cambiados o eliminados desde la última operación de
|
||||
sincronización. Esto ocurre incluso si los archivos cambiados o
|
||||
eliminados no están en el disco fallido. Esta es la razón por la que
|
||||
SnapRAID es más adecuado para datos que rara vez cambian.
|
||||
La principal limitación es que si un disco falla, solo puede recuperar datos hasta el
|
||||
estado de la última operación de sincronización (`sync`). Cualquier dato añadido o modificación realizada
|
||||
desde la última sincronización que se encuentre en el disco dañado se perderá.
|
||||
|
||||
Por otro lado, los archivos recién agregados no impiden la recuperación
|
||||
de los archivos ya existentes. Solo perderá los archivos recién
|
||||
agregados si están en el disco fallido.
|
||||
Por lo tanto, SnapRAID es adecuado principalmente para datos que cambian raramente.
|
||||
|
||||
Para los datos que ya existían en la última sincronización, la fiabilidad de la recuperación depende
|
||||
de si se utiliza la opción de instantánea (`snapshot`):
|
||||
|
||||
* Con soporte para instantáneas (disponible en Btrfs, ZFS, Bcachefs y NTFS),
|
||||
SnapRAID puede mantener automáticamente una referencia congelada
|
||||
independiente de cada sistema de archivos de datos compatible.
|
||||
Esto garantiza que incluso si modifica o elimina archivos en su sistema de archivos activo
|
||||
durante o después de un sync, el proceso de recuperación se mantenga consistente y confiable.
|
||||
|
||||
* Sin soporte para instantáneas, eliminar o cambiar archivos después de un `sync`
|
||||
puede impedir la recuperación completa de otros discos fallidos. Esto ocurre
|
||||
porque la paridad ya no coincide con los archivos modificados, incluso si
|
||||
esos archivos no están en el disco fallido. Por otro lado, los archivos recién añadidos
|
||||
no impiden la recuperación de los archivos ya existentes.
|
||||
|
||||
Otras limitaciones de SnapRAID son:
|
||||
|
||||
|
|
@ -82,10 +90,10 @@ Limitations
|
|||
Con una copia de seguridad, puede recuperarse de un fallo completo
|
||||
de todo el array de discos.
|
||||
* Solo se guardan nombres de archivo, marcas de tiempo, enlaces simbólicos
|
||||
y enlaces duros. Los permisos, la propiedad y los atributos
|
||||
y enlaces físicos. Los permisos, la propiedad y los atributos
|
||||
extendidos no se guardan.
|
||||
|
||||
Getting Started
|
||||
Primeros pasos (Getting Started)
|
||||
Para usar SnapRAID, primero debe seleccionar un disco en su array de
|
||||
discos para dedicarlo a la información de `parity` (paridad). Con un
|
||||
disco para paridad, podrá recuperarse de un solo fallo de disco,
|
||||
|
|
@ -168,9 +176,9 @@ Getting Started
|
|||
Ahora puede comenzar a usar su array como desee y periódicamente
|
||||
actualizar la información de paridad ejecutando el comando `sync`.
|
||||
|
||||
Scrubbing
|
||||
Limpieza (Scrubbing)
|
||||
Para verificar periódicamente los datos y la paridad en busca de
|
||||
errores, puede ejecutar el comando `scrub` (fregar/limpiar).
|
||||
errores, puede ejecutar el comando `scrub` (depurar/limpiar).
|
||||
|
||||
:snapraid scrub
|
||||
|
||||
|
|
@ -178,7 +186,7 @@ Getting Started
|
|||
durante el comando `sync` para verificar la integridad.
|
||||
|
||||
Cada ejecución del comando verifica aproximadamente el 8% del array,
|
||||
excluyendo los datos ya fregados en los 10 días anteriores.
|
||||
excluyendo los datos ya depurados en los 10 días anteriores.
|
||||
Puede usar la opción -p, --plan para especificar una cantidad
|
||||
diferente y la opción -o, --older-than para especificar una edad
|
||||
diferente en días. Por ejemplo, para verificar el 5% del array en
|
||||
|
|
@ -197,9 +205,9 @@ Getting Started
|
|||
|
||||
:snapraid -e fix
|
||||
|
||||
En el siguiente `scrub`, los errores desaparecerán del informe de
|
||||
En la siguiente depuración (`scrub`), los errores desaparecerán del informe de
|
||||
`status` si realmente se han corregido. Para hacerlo más rápido,
|
||||
puede usar -p bad para fregar solo los bloques marcados como defectuosos.
|
||||
puede usar -p bad para depurar solo los bloques marcados como defectuosos.
|
||||
|
||||
:snapraid -p bad scrub
|
||||
|
||||
|
|
@ -208,11 +216,11 @@ Getting Started
|
|||
informan en la salida de `scrub`, pero los bloques relacionados no
|
||||
se marcan como defectuosos.
|
||||
|
||||
Pooling
|
||||
Agrupación (Pooling)
|
||||
Nota: La función de pooling descrita a continuación ha sido
|
||||
sustituida por la herramienta mergerfs, que ahora es la opción
|
||||
recomendada para los usuarios de Linux en la comunidad SnapRAID.
|
||||
Mergefs proporciona una forma más flexible y eficiente de agrupar
|
||||
Mergerfs proporciona una forma más flexible y eficiente de agrupar
|
||||
múltiples unidades en un único punto de montaje unificado,
|
||||
permitiendo un acceso sin problemas a los archivos en todo su array
|
||||
sin depender de enlaces simbólicos. Se integra bien con SnapRAID
|
||||
|
|
@ -286,7 +294,7 @@ Getting Started
|
|||
|
||||
:fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
Undeleting
|
||||
Restauración (Undeleting)
|
||||
SnapRAID funciona más como un programa de copia de seguridad que como
|
||||
un sistema RAID, y se puede usar para restaurar o recuperar archivos
|
||||
a su estado anterior usando la opción -f, --filter:
|
||||
|
|
@ -308,15 +316,17 @@ Getting Started
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recovering
|
||||
Recuperación (Recovering)
|
||||
Ha sucedido lo peor, ¡y ha perdido uno o más discos!
|
||||
|
||||
¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos!
|
||||
|
||||
Lo primero que debe hacer es evitar más cambios en su array de discos.
|
||||
Antes de hacer cualquier otra cosa, evite realizar cualquier cambio en su
|
||||
array de discos, ya que modificar o eliminar datos en los discos restantes
|
||||
puede hacer imposible la recuperación.
|
||||
Deshabilite cualquier conexión remota a él y cualquier proceso
|
||||
programado, incluida cualquier sincronización o fregado nocturno
|
||||
programado de SnapRAID.
|
||||
programado, incluida cualquier sincronización o depuración nocturna
|
||||
programada de SnapRAID.
|
||||
|
||||
Luego, proceda con los siguientes pasos.
|
||||
|
||||
|
|
@ -400,14 +410,14 @@ Getting Started
|
|||
|
||||
Si todo se recupera, este comando es inmediato.
|
||||
|
||||
Commands
|
||||
SnapRAID proporciona algunos comandos simples que le permiten:
|
||||
Comandos (Commands)
|
||||
SnapRAID proporciona unos pocos comandos simples que le permiten:
|
||||
|
||||
* Imprimir el estado del array -> `status`
|
||||
* Mostrar el estado del array -> `status`
|
||||
* Controlar los discos -> `smart`, `probe`, `up`, `down`
|
||||
* Hacer una copia de seguridad/instantánea -> `sync`
|
||||
* Crear un punto de copia de seguridad/recuperación -> `sync`
|
||||
* Comprobar periódicamente los datos -> `scrub`
|
||||
* Restaurar la última copia de seguridad/instantánea -> `fix`.
|
||||
* Restaurar el último punto de copia de seguridad/recuperación -> `fix`.
|
||||
|
||||
Los comandos deben escribirse en minúsculas.
|
||||
|
||||
|
|
@ -416,7 +426,7 @@ Commands
|
|||
|
||||
Incluye información sobre la fragmentación de la paridad, la antigüedad
|
||||
de los bloques sin verificar y todos los errores silenciosos
|
||||
registrados encontrados durante el fregado.
|
||||
registrados encontrados durante la depuración.
|
||||
|
||||
La información presentada se refiere a la última vez que ejecutó
|
||||
`sync`. Las modificaciones posteriores no se tienen en cuenta.
|
||||
|
|
@ -425,8 +435,8 @@ Commands
|
|||
Para corregirlos, puede usar el comando `fix -e`.
|
||||
|
||||
También muestra un gráfico que representa la última vez que cada
|
||||
bloque fue fregado o sincronizado. Los bloques fregados se muestran
|
||||
con `*`, los bloques sincronizados pero aún no fregados con `o`.
|
||||
bloque fue depurado o sincronizado. Los bloques depurados se muestran
|
||||
con `*`, los bloques sincronizados pero aún no depurados con `o`.
|
||||
|
||||
Nada se modifica.
|
||||
|
||||
|
|
@ -521,23 +531,23 @@ Commands
|
|||
removed - Archivos eliminados.
|
||||
updated - Archivos con un tamaño o marca de tiempo diferente,
|
||||
lo que significa que fueron modificados.
|
||||
moved - Archivos movidos a un directorio diferente en el mismo
|
||||
disco. Se identifican por tener el mismo nombre, tamaño,
|
||||
marca de tiempo e inodo, pero un directorio diferente.
|
||||
moved - Archivos movidos o renombrados en el mismo disco manteniendo
|
||||
el mismo inodo. Se identifican por tener el mismo inodo,
|
||||
tamaño y marca de tiempo, pero una ruta diferente. El nombre
|
||||
del archivo también puede ser diferente.
|
||||
copied - Archivos copiados en el mismo disco o en uno diferente
|
||||
donde el archivo original todavía existe.
|
||||
Se identifican por tener el mismo nombre, tamaño y
|
||||
marca de tiempo.
|
||||
Si la marca de tiempo de subsegundo es cero, la ruta
|
||||
completa debe coincidir para ser identificado, no solo el nombre.
|
||||
relocated - Archivos movidos en el mismo disco o en uno
|
||||
diferente donde el original ha desaparecido.
|
||||
Se identifican por tener el mismo nombre, tamaño y
|
||||
marca de tiempo.
|
||||
Si la marca de tiempo de subsegundo es cero, la ruta
|
||||
completa debe coincidir para ser identificado.
|
||||
A diferencia de los archivos `moved` en el mismo disco,
|
||||
los archivos reubicados tienen un inodo diferente.
|
||||
relocated - Archivos movidos a un directorio o disco diferente donde
|
||||
el archivo original ha desaparecido y el inodo no se conserva.
|
||||
Se identifican por tener el mismo nombre, tamaño y marca de tiempo.
|
||||
Si la marca de tiempo de subsegundo es cero, la ruta completa
|
||||
debe coincidir para ser identificado. A diferencia de los archivos
|
||||
'moved', los archivos reubicados requieren que el nombre del
|
||||
archivo siga siendo el mismo.
|
||||
restored - Archivos con un inodo diferente pero con directorio,
|
||||
nombre, tamaño y marca de tiempo coincidentes.
|
||||
Estos son usualmente archivos restaurados después de
|
||||
|
|
@ -575,38 +585,38 @@ Commands
|
|||
Los archivos en el array NO se modifican.
|
||||
|
||||
scrub
|
||||
Frota (scrubs) el array, buscando errores silenciosos o de
|
||||
Depura (scrubs) el array, buscando errores silenciosos o de
|
||||
entrada/salida en los discos de datos y paridad.
|
||||
|
||||
Cada invocación verifica aproximadamente el 8% del array, excluyendo
|
||||
los datos ya fregados en los últimos 10 días.
|
||||
Esto significa que fregar una vez a la semana asegura que cada bit de
|
||||
los datos ya depurados en los últimos 10 días.
|
||||
Esto significa que depurar una vez a la semana asegura que cada bit de
|
||||
datos se verifique al menos una vez cada tres meses.
|
||||
|
||||
Puede definir un plan de fregado o una cantidad diferente utilizando
|
||||
Puede definir un plan de depuración o una cantidad diferente utilizando
|
||||
la opción -p, --plan, que acepta:
|
||||
bad - Fregar bloques marcados como defectuosos.
|
||||
new - Fregar bloques recién sincronizados que aún no han sido fregados.
|
||||
full - Fregar todo.
|
||||
0-100 - Fregar el porcentaje especificado de bloques.
|
||||
bad - Depurar bloques marcados como defectuosos.
|
||||
new - Depurar bloques recién sincronizados que aún no han sido depurados.
|
||||
full - Depurar todo.
|
||||
0-100 - Depurar el porcentaje especificado de bloques.
|
||||
|
||||
Si especifica un valor de porcentaje, también puede usar la opción -o,
|
||||
--older-than para definir la antigüedad del bloque.
|
||||
Los bloques más antiguos se friegan primero, asegurando una verificación
|
||||
Los bloques más antiguos se depuran primero, asegurando una verificación
|
||||
óptima.
|
||||
Si desea fregar solo los bloques recién sincronizados que aún no han
|
||||
sido fregados, use la opción `-p new`.
|
||||
Si desea depurar solo los bloques recién sincronizados que aún no han
|
||||
sido depurados, use la opción `-p new`.
|
||||
|
||||
Para obtener detalles del estado del fregado, use el comando `status`.
|
||||
Para obtener detalles del estado de la depuración, use el comando `status`.
|
||||
|
||||
Para cualquier error silencioso o de entrada/salida encontrado, los
|
||||
bloques correspondientes se marcan como defectuosos en el archivo
|
||||
`content`.
|
||||
Estos bloques defectuosos se enumeran en `status` y se pueden
|
||||
corregir con `fix -e`.
|
||||
Después de la corrección, en el siguiente fregado, se volverán a
|
||||
Después de la corrección, en la siguiente depuración, se volverán a
|
||||
verificar y, si se encuentran corregidos, se eliminará la marca de defectuoso.
|
||||
Para fregar solo los bloques defectuosos, puede usar el comando
|
||||
Para depurar solo los bloques defectuosos, puede usar el comando
|
||||
`scrub -p bad`.
|
||||
|
||||
Se recomienda ejecutar `scrub` solo en un array sincronizado para evitar
|
||||
|
|
@ -621,15 +631,14 @@ Commands
|
|||
Los archivos en el array NO se modifican.
|
||||
|
||||
fix
|
||||
Corrige todos los archivos y la información de paridad.
|
||||
Repara todos los archivos y los datos de paridad.
|
||||
|
||||
Todos los archivos y la información de paridad se comparan con el
|
||||
estado de instantánea guardado en el último `sync`.
|
||||
Si se encuentra una diferencia, se revierte a la instantánea almacenada.
|
||||
Todos los archivos y datos de paridad si comparan con el estado guardado en
|
||||
el último `sync`. Si se encuentra una diferencia, se revierte al estado almacenado.
|
||||
|
||||
¡ADVERTENCIA! El comando `fix` no diferencia entre errores y
|
||||
modificaciones intencionales. Revierte incondicionalmente el estado
|
||||
del archivo al último `sync`.
|
||||
¡ADVERTENCIA!
|
||||
El comando `fix` no diferencia entre errores y modificaciones intencionadas.
|
||||
Revierte incondicionalmente el estado del archivo al del último `sync`.
|
||||
|
||||
Si no se especifica otra opción, se procesa todo el array.
|
||||
Utilice las opciones de filtro para seleccionar un subconjunto de
|
||||
|
|
@ -769,7 +778,7 @@ Commands
|
|||
Tenga en cuenta que dichos archivos no estarán protegidos por la paridad durante
|
||||
el proceso de reasignación.
|
||||
|
||||
Options
|
||||
Opciones (Options)
|
||||
SnapRAID proporciona las siguientes opciones:
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -826,19 +835,19 @@ Options
|
|||
Esta opción solo se puede usar con `check` y `fix`.
|
||||
|
||||
-p, --plan PERC|bad|new|full
|
||||
Selecciona el plan de fregado (scrub). Si PERC es un valor
|
||||
Selecciona el plan de depuración (scrub). Si PERC es un valor
|
||||
numérico de 0 a 100, se interpreta como el porcentaje de
|
||||
bloques a fregar.
|
||||
bloques a depurar.
|
||||
En lugar de un porcentaje, puede especificar un plan:
|
||||
`bad` friega bloques defectuosos, `new` friega bloques aún
|
||||
no fregados, y `full` friega todo.
|
||||
`bad` depura bloques defectuosos, `new` depura bloques aún
|
||||
no depurados, y `full` depura todo.
|
||||
Esta opción solo se puede usar con `scrub`.
|
||||
|
||||
-o, --older-than DAYS
|
||||
Selecciona la parte más antigua del array para procesar en `scrub`.
|
||||
DAYS es la edad mínima en días para que un bloque sea fregado;
|
||||
DAYS es la edad mínima en días para que un bloque sea depurado;
|
||||
el valor predeterminado es 10.
|
||||
Los bloques marcados como defectuosos siempre se friegan
|
||||
Los bloques marcados como defectuosos siempre se depuran
|
||||
independientemente de esta opción.
|
||||
Esta opción solo se puede usar con `scrub`.
|
||||
|
||||
|
|
@ -894,7 +903,7 @@ Options
|
|||
RATE es el número de bytes por segundo. Puede especificar un
|
||||
multiplicador como K, M o G (por ejemplo, --bw-limit 1G).
|
||||
|
||||
-t, --tail TAMAÑO
|
||||
-t, --tail SIZE
|
||||
Limita la lista de archivos a aquellos que no usan más del
|
||||
tamaño de cola especificado de los discos de paridad.
|
||||
Puede usar multiplicadores como K, M, G o T (por ejemplo, --tail 1G).
|
||||
|
|
@ -1002,9 +1011,9 @@ Options
|
|||
recomienda encarecidamente no usarla.
|
||||
NO tiene protección de datos durante la operación `sync`.
|
||||
|
||||
-W, --force-realloc-tail TAMAÑO
|
||||
-W, --force-realloc-tail SIZE
|
||||
Funciona como -R, --force-realloc, pero limitado a la porción final
|
||||
especificada (últimos TAMAÑO bytes) de cada archivo de paridad.
|
||||
especificada (últimos SIZE bytes) de cada archivo de paridad.
|
||||
Fuerza la reasignación (movimiento) de cualquier fragmento/bloque de archivo
|
||||
actualmente almacenado en esa sección final, permitiendo que se coloquen
|
||||
en cualquier lugar de los archivos de paridad donde haya espacio libre
|
||||
|
|
@ -1056,11 +1065,13 @@ Options
|
|||
Comienza a procesar desde el número de bloque especificado.
|
||||
Esto puede ser útil para reintentar verificar o corregir
|
||||
bloques específicos en caso de un disco dañado.
|
||||
Esta opción es principalmente para recuperación manual avanzada.
|
||||
Esta opción es principalmente para recuperación manual avanzada
|
||||
y solo es compatible con `check` y `fix`.
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
Procesa solo el número de bloques especificado.
|
||||
Esta opción es principalmente para recuperación manual avanzada.
|
||||
Esta opción es principalmente para recuperación manual avanzada
|
||||
y solo es compatible con `check` y `fix`.
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
Genera un archivo de configuración ficticio a partir de un
|
||||
|
|
@ -1091,7 +1102,7 @@ Options
|
|||
-V, --version
|
||||
Imprime la versión del programa.
|
||||
|
||||
Configuration
|
||||
Configuración (Configuration)
|
||||
SnapRAID requiere un archivo de configuración para saber dónde se
|
||||
encuentra su array de discos y dónde almacenar la información de paridad.
|
||||
|
||||
|
|
@ -1185,6 +1196,11 @@ Configuration
|
|||
Puede cambiar el punto de montaje según sea necesario, siempre que
|
||||
mantenga el NAME fijo.
|
||||
|
||||
Sin embargo, la ruta configurada debe apuntar consistentemente a los
|
||||
mismos datos subyacentes. Si la ruta contiene enlaces simbólicos,
|
||||
sus destinos deben permanecer estables. No se admite cambiar el destino
|
||||
de dichos symlinks para cambiar el directorio de datos sobre la marcha.
|
||||
|
||||
Debe usar una opción para cada disco de datos en el array.
|
||||
|
||||
Puede cambiar el nombre de un disco más tarde cambiando el NAME
|
||||
|
|
@ -1196,13 +1212,39 @@ Configuration
|
|||
Define el nombre y el punto de montaje de discos adicionales para monitorear
|
||||
con los comandos `smart` y `probe`.
|
||||
|
||||
Esto es útil para monitorear discos que no forman parte de la
|
||||
matriz pero que son necesarios para que el sistema funcione, como
|
||||
Esto es útil para monitorear discos que no forman parte del
|
||||
array pero que son necesarios para que el sistema funcione, como
|
||||
el disco de arranque.
|
||||
|
||||
Tenga en cuenta que dichos discos no se ven afectados por los comandos `up` y `down`
|
||||
porque se espera que estén siempre girando.
|
||||
|
||||
snapshot
|
||||
Habilita el uso de instantáneas del sistema de archivos para los comandos `sync`, `scrub`,
|
||||
`check` y `fix`.
|
||||
|
||||
Cuando está habilitado, SnapRAID crea una instantánea de solo lectura de cada
|
||||
sistema de archivos de datos compatible al comienzo de un 'sync'. Esto proporciona una
|
||||
vista estable de cada sistema de archivos, evitando que modificaciones posteriores cambien
|
||||
los datos utilizados para el cómputo de paridad.
|
||||
|
||||
Esto mejora significativamente la recuperación: si un archivo se elimina del sistema de archivos activo,
|
||||
permanece preservado en la instantánea. Esto evita que la paridad se "rompa"
|
||||
para ese bloque, asegurando que aún pueda recuperar los datos con éxito
|
||||
si falla otro disco.
|
||||
|
||||
Esta opción se aplica exclusivamente a discos de datos formateados con los sistemas de
|
||||
archivos Btrfs, Bcachefs o ZFS en Linux y NTFS en Windows.
|
||||
Los discos de paridad, o los discos de datos que usen otros sistemas de archivos, siempre usarán
|
||||
la versión activa del sistema de archivos.
|
||||
|
||||
La creación y eliminación de instantáneas requieren privilegios administrativos.
|
||||
Asegúrese de que SnapRAID se ejecute con los permisos necesarios (por ejemplo, sudo) cuando
|
||||
esta opción esté habilitada.
|
||||
|
||||
Consulte la sección SNAPSHOTS para obtener una explicación detallada del ciclo de vida
|
||||
de las instantáneas.
|
||||
|
||||
nohidden
|
||||
Excluye todos los archivos y directorios ocultos.
|
||||
En Unix, los archivos ocultos son los que comienzan con `.`.
|
||||
|
|
@ -1219,6 +1261,11 @@ Configuration
|
|||
patrón especificado es un `include`, o se incluye si el último
|
||||
patrón especificado es un `exclude`.
|
||||
|
||||
Tenga en cuenta que el filtrado se produce jerárquicamente durante
|
||||
el recorrido de los directorios. Si un directorio coincide con una
|
||||
regla `exclude`, se omite (poda) todo el directorio y no se evaluará
|
||||
ninguna regla `include` para los archivos o subdirectorios que contenga.
|
||||
|
||||
Consulte la sección PATTERN para obtener más detalles sobre
|
||||
las especificaciones de patrones.
|
||||
|
||||
|
|
@ -1314,7 +1361,7 @@ Configuration
|
|||
:RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
|
||||
|
||||
autosave SIZE_IN_GIGABYTES
|
||||
Guarda automáticamente el estado al sincronizar o fregar después de
|
||||
Guarda automáticamente el estado al sincronizar o depurar después de
|
||||
la cantidad especificada de GB procesados.
|
||||
Esta opción es útil para evitar reiniciar comandos `sync` largos
|
||||
desde cero si son interrumpidos por un fallo de la máquina o
|
||||
|
|
@ -1397,6 +1444,10 @@ Configuration
|
|||
el nombre del dispositivo. Para los controladores RAID, el dispositivo
|
||||
es probable que sea fijo y es posible que no necesite usar `%s`.
|
||||
|
||||
También puede especificar una cadena de opciones de información
|
||||
personalizada mediante la etiqueta `[info: ...]` para sustituir
|
||||
la opción `-a` predeterminada.
|
||||
|
||||
Consulte la documentación de smartmontools para conocer las posibles
|
||||
opciones:
|
||||
|
||||
|
|
@ -1405,6 +1456,7 @@ Configuration
|
|||
|
||||
Por ejemplo:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1418,14 +1470,19 @@ Configuration
|
|||
El valor especial * se puede usar para ignorar el atributo en todos
|
||||
los discos.
|
||||
|
||||
Por ejemplo, para ignorar el atributo `Current Pending Sector Count`
|
||||
en todos los discos:
|
||||
Se pueden especificar múltiples atributos separados por espacios.
|
||||
Cada atributo se puede especificar como un número del 1 al 255, o como un
|
||||
nombre que no distingue entre mayúsculas y minúsculas (p. ej., `Current_Pending_Sector`).
|
||||
|
||||
:smartignore * 197
|
||||
Por ejemplo, para ignorar los atributos `Current Pending Sector Count` y
|
||||
`Reallocated Sectors Count` en todos los discos por su número o nombre:
|
||||
|
||||
Para ignorarlo solo en el primer disco de paridad:
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
:smartignore parity 197
|
||||
Para ignorarlos solo en el primer disco de paridad:
|
||||
|
||||
:smartignore parity 197 5
|
||||
|
||||
Examples
|
||||
Un ejemplo de una configuración típica para Unix es:
|
||||
|
|
@ -1438,7 +1495,7 @@ Configuration
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1454,12 +1511,168 @@ Configuration
|
|||
:exclude Thumbs.db
|
||||
:exclude \$RECYCLE.BIN
|
||||
:exclude \System Volume Information
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Pattern
|
||||
Instantáneas (Snapshots)
|
||||
Si la opción de instantánea está habilitada en la configuración, SnapRAID
|
||||
utiliza instantáneas del sistema de archivos para mantener estables los datos leídos
|
||||
durante una operación, incluso cuando los archivos en los sistemas de archivos activos
|
||||
se modifican o eliminan posteriormente.
|
||||
|
||||
La gestión de las instantáneas es completamente automática y transparente.
|
||||
Puede continuar usando SnapRAID exactamente como antes, con la
|
||||
protección adicional proporcionada por las instantáneas gestionadas completamente en
|
||||
segundo plano.
|
||||
|
||||
Esto proporciona dos beneficios primordiales:
|
||||
|
||||
Consistencia - Los archivos modificados en el sistema de archivos activo durante un sync o scrub de
|
||||
larga duración no causarán desajustes de paridad ni operaciones abortadas,
|
||||
porque cada sistema de archivos con instantánea permanece sin cambios durante
|
||||
toda la operación.
|
||||
Recuperación - Si un archivo se actualiza o elimina del sistema de archivos activo,
|
||||
permanece preservado en la instantánea. Si ocurre un fallo de disco
|
||||
antes de que se ejecute el siguiente sync, SnapRAID utiliza los datos preservados
|
||||
en la instantánea para reconstruir el disco fallido.
|
||||
|
||||
En caso de fallo de un disco durante un proceso de sync activo,
|
||||
SnapRAID también es capaz de leer automáticamente tanto de la instantánea
|
||||
del cómputo de paridad anterior como del actual.
|
||||
Esto maximiza la probabilidad de una recuperación completa al
|
||||
proporcionar acceso a los bloques de datos exactos requeridos para resolver
|
||||
las ecuaciones de paridad, incluso si esos bloques fueron modificados
|
||||
o eliminados entre syncs.
|
||||
|
||||
Sin instantáneas, un archivo actualizado o eliminado en un disco sano
|
||||
da como resultado la pérdida de bloques de datos que pueden ser necesarios para
|
||||
reparar otros discos fallidos.
|
||||
|
||||
Las instantáneas se crean solo para discos de datos y solo si el sistema de archivos
|
||||
subyacente admite esta funcionalidad. Los discos de paridad siempre usan
|
||||
el sistema de archivos activo.
|
||||
|
||||
Actualmente, esto es compatible con Btrfs, Bcachefs y ZFS en Linux
|
||||
y con NTFS en Windows.
|
||||
|
||||
Puede mezclar discos de datos con diferentes sistemas de archivos. Solo aquellos que
|
||||
admitan instantáneas las utilizarán, mientras que los demás discos continuarán
|
||||
operando directamente en el sistema de archivos activo.
|
||||
|
||||
La creación y eliminación de instantáneas requieren privilegios administrativos.
|
||||
Asegúrese de que SnapRAID se ejecute con los permisos necesarios (por ejemplo, sudo)
|
||||
cuando las instantáneas estén habilitadas.
|
||||
|
||||
Comportamiento de comandos con instantáneas
|
||||
Los comandos `sync` y `scrub` utilizan instantáneas para los discos de datos cuyos
|
||||
sistemas de archivos las admiten. En un disco con instantánea, el comando ve
|
||||
una imagen estable del sistema de archivos no afectada por cambios concurrentes en
|
||||
el sistema de archivos activo.
|
||||
Durante un `sync`, se crea una nueva instantánea de forma independiente para cada
|
||||
sistema de archivos de datos compatible. Estas instantáneas proporcionan colectivamente
|
||||
los datos utilizados para el cómputo de paridad.
|
||||
Por el contrario, el comando `scrub` utiliza la última instantánea, la
|
||||
creada durante el sync más reciente, para mantener un punto de referencia confiable
|
||||
que coincida con la paridad existente.
|
||||
|
||||
Para los comandos `check` y `fix`, el uso de la última instantánea
|
||||
depende de si se seleccionan discos específicos mediante la opción
|
||||
-d, --filter-disk.
|
||||
|
||||
Un disco seleccionado explícitamente mediante -d (el "objetivo" de la operación)
|
||||
siempre utiliza el sistema de archivos activo. Para `fix`, esto permite restaurar
|
||||
datos en el reemplazo de disco activo. Para `check`, permite simular
|
||||
la operación `fix` bajo las mismas condiciones.
|
||||
|
||||
Todos los demás discos de datos (los discos de "referencia") se accederán a través de
|
||||
sus instantáneas. Esto garantiza que incluso si está modificando archivos
|
||||
en sus discos sanos mientras se realiza una recuperación, SnapRAID
|
||||
tenga una referencia estable y congelada para resolver las ecuaciones de paridad.
|
||||
|
||||
Si no se proporciona la opción -d, SnapRAID asume que la operación se aplica
|
||||
a todo el array, en cuyo caso, `check` y `fix` usarán los sistemas
|
||||
de archivos activos exclusivamente.
|
||||
|
||||
Todos los demás comandos funcionan exclusivamente en el sistema de archivos activo.
|
||||
|
||||
Ciclo de vida de las instantáneas (Snapshots Lifecycle)
|
||||
SnapRAID gestiona tres instantáneas específicas, `stable`, `pending` y `scan`,
|
||||
dentro de un directorio oculto en la raíz de cada subvolumen de datos.
|
||||
En Btrfs, Bcachefs y NTFS se utiliza el directorio `.snapraid/`,
|
||||
en ZFS el estándar `.zfs/snapshot/`.
|
||||
|
||||
La instantánea `stable` representa el estado del último
|
||||
`sync` completado con éxito, que contiene los datos exactos utilizados para
|
||||
calcular la paridad actual. Sirve como fuente de datos principal
|
||||
para los comandos `scrub`, `check` y `fix`.
|
||||
|
||||
La instantánea `scan` es una imagen temporal creada al inicio
|
||||
de un `sync` para proporcionar un estado congelado para el escaneo y el cómputo de paridad.
|
||||
Después de escanear y guardar el nuevo estado de contenido, reemplaza la instantánea
|
||||
`pending` anterior.
|
||||
|
||||
La instantánea `pending` es la imagen utilizada por un `sync` interrumpido.
|
||||
Una vez completada con éxito la operación, la instantánea `stable` anterior
|
||||
se elimina y la instantánea `pending` se promueve para
|
||||
tomar su lugar como la nueva referencia estable.
|
||||
|
||||
Si un `sync` se interrumpe, la instantánea `pending` se conserva.
|
||||
Los comandos posteriores `scrub`, `check` y `fix` utilizarán esta
|
||||
instantánea pendiente, ya que coincide con el estado del sistema de archivos registrado en
|
||||
el archivo .content, incluso si la paridad solo está parcialmente sincronizada.
|
||||
|
||||
En caso de interrupción de un `sync`, los comandos `check` y `fix`
|
||||
también leen de la instantánea `stable` para recuperar bloques de datos
|
||||
de archivos que se actualizaron o eliminaron durante el sync.
|
||||
Esto es posible porque el archivo .content conserva los metadatos de
|
||||
todos los archivos modificados o eliminados durante todo el proceso de sync.
|
||||
Esta información histórica solo se borra una vez que el sync finaliza
|
||||
con éxito y se guarda la versión final del archivo .content.
|
||||
|
||||
Si un `sync` se reinicia después de una interrupción, la instantánea pending existente
|
||||
se elimina y se crea una nueva para
|
||||
capturar el estado actual del sistema de archivos activo.
|
||||
Sin embargo, si un `sync` se interrumpe, evite modificar, eliminar,
|
||||
reemplazar o mover archivos hasta que un `sync` posterior se complete
|
||||
con éxito. La paridad aún puede contener bloques calculados a partir de
|
||||
la instantánea utilizada por el sync interrumpido. Un sync posterior puede
|
||||
reemplazar esa instantánea, haciendo que las versiones intermedias de los
|
||||
archivos no estén disponibles para la recuperación.
|
||||
|
||||
Copias de seguridad externas con instantáneas del sistema de archivos (External backups with filesystem snapshots)
|
||||
Cuando las instantáneas del sistema de archivos están habilitadas, SnapRAID
|
||||
accede o crea instantáneas en la raíz de cada subvolumen, volumen o conjunto
|
||||
de datos (dataset).
|
||||
|
||||
Una forma sencilla de evitar interferencias con herramientas externas es
|
||||
apuntar la configuración `data` a un subdirectorio normal dentro del
|
||||
subvolumen o volumen (por ejemplo, `/mnt/subvol/data` en lugar de
|
||||
`/mnt/subvol`). SnapRAID siempre crea el directorio de instantáneas en la
|
||||
raíz del subvolumen (por ejemplo, `/mnt/subvol/.snapraid/`), dejando limpio
|
||||
el subdirectorio de datos para que las instantáneas permanezcan fuera e
|
||||
invisibles para las herramientas de copia de seguridad que operan dentro
|
||||
de él.
|
||||
|
||||
De lo contrario, si el directorio `data` configurado es en sí mismo la raíz
|
||||
del subvolumen o volumen, SnapRAID crea un directorio `.snapraid/`
|
||||
directamente dentro de él (en Btrfs, Bcachefs y NTFS). Aunque SnapRAID
|
||||
excluye automáticamente este directorio de su propio escaneo, las
|
||||
herramientas externas de copia de seguridad o sincronización de archivos lo
|
||||
encontrarán. Si no se excluye, pueden acceder a las instantáneas o enlaces
|
||||
de directorio y copiar todo el árbol de datos congelado, duplicando datos y
|
||||
agotando el almacenamiento de respaldo. Configure siempre las herramientas
|
||||
de copia de seguridad externas para excluir el directorio `.snapraid/`.
|
||||
|
||||
En ZFS, las instantáneas se exponen a través del directorio virtual estándar
|
||||
`.zfs/snapshot/` en lugar de `.snapraid/`. De forma predeterminada
|
||||
(`snapdir=hidden`), ZFS oculta este directorio de los listados, por lo que
|
||||
las herramientas externas de copia de seguridad no lo recorrerán. Si ha
|
||||
habilitado `snapdir=visible`, asegúrese de que sus herramientas de copia
|
||||
de seguridad excluyan el directorio `.zfs/`.
|
||||
|
||||
Patrones (Pattern)
|
||||
Los patrones proporcionan una forma flexible de filtrar archivos para su inclusión o
|
||||
exclusión. Al usar caracteres de globbing, puede definir reglas que coincidan con
|
||||
nombres de archivos específicos o estructuras de directorios completas sin
|
||||
|
|
@ -1475,18 +1688,19 @@ Pattern
|
|||
componente de ruta. Este es el comportamiento estándar de los comodines familiar
|
||||
del globbing de la shell.
|
||||
|
||||
el doble asterisco `**` es más potente, coincide con cualquier secuencia de
|
||||
caracteres, incluidos los separadores de directorios. Esto permite que los patrones coincidan
|
||||
a través de múltiples niveles de directorio. Cuando `**` aparece incrustado directamente en
|
||||
un patrón, puede coincidir con cero o más caracteres, incluidas las barras diagonales entre
|
||||
el texto literal circundante.
|
||||
El comodín de doble asterisco `**` coincide a través de los separadores de
|
||||
directorios solo cuando es adyacente a un separador de directorios (precedido
|
||||
o seguido por una barra diagonal). En esta forma, coincide con cero o más
|
||||
caracteres a través de niveles de directorio. Por ejemplo, `foo/**/bar`
|
||||
coincide con `foo/bar`, `foo/a/bar` y `foo/a/b/bar`; `**/build` coincide con
|
||||
`build` y `foo/bar/build`; y `src/**.js` coincide con `src/main.js` y
|
||||
`src/ui/components/main.js`.
|
||||
La forma independiente `/**/` no se acepta como un patrón completo.
|
||||
|
||||
El uso más importante de `**` es en la forma especial `/**/`. Esta coincide con
|
||||
cero o más niveles de directorio completos, lo que permite que los archivos coincidan
|
||||
a cualquier profundidad en un árbol de directorios sin conocer la estructura exacta de la ruta.
|
||||
Por ejemplo, el patrón `src/**/main.js` coincide con `src/main.js` (saltando
|
||||
cero directorios), `src/ui/main.js` (saltando un directorio) y
|
||||
`src/ui/components/main.js` (saltando dos directorios).
|
||||
Cuando `**` no es adyacente a una barra diagonal, se comporta como `*` y no
|
||||
coincide con los separadores de directorios. Por ejemplo, `**.jpg` coincide
|
||||
con `photo.jpg` en el directorio actual, pero no coincide con `dir/photo.jpg`.
|
||||
Use `**/*.jpg` para ese propósito.
|
||||
|
||||
Las clases de caracteres que utilizan corchetes `[]` coinciden con un solo carácter de un
|
||||
conjunto o rango especificado. Al igual que los otros patrones de un solo carácter,
|
||||
|
|
@ -1495,8 +1709,8 @@ Pattern
|
|||
|
||||
La distinción fundamental que debe recordar es que `*`, `?` y las clases de caracteres
|
||||
respetan los límites de los directorios y solo coinciden dentro de un único
|
||||
componente de ruta, mientras que `**` es el único patrón que puede coincidir a través de
|
||||
los separadores de directorios.
|
||||
componente de ruta, mientras que `**` solo puede coincidir a través de los separadores
|
||||
de directorios cuando es adyacente a una barra diagonal.
|
||||
|
||||
Hay cuatro tipos diferentes de patrones:
|
||||
|
||||
|
|
@ -1569,6 +1783,27 @@ Pattern
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
Tenga en cuenta que excluir un directorio (usando DIR/ o /RUTA/DIR/)
|
||||
impide que SnapRAID entre y examine ese directorio. En consecuencia,
|
||||
no es posible volver a incluir un archivo o subdirectorio ubicado
|
||||
dentro de un directorio principal excluido, ya que el escáner nunca lo
|
||||
recorre.
|
||||
|
||||
Por ejemplo, la siguiente configuración NO incluirá `file.dat`
|
||||
porque `/keep/` se poda antes de que `file.dat` pueda ser evaluado:
|
||||
|
||||
:# NO funciona: /keep/ se omite por completo
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
Para excluir archivos dentro de un directorio conservando algunos
|
||||
específicos, excluya el patrón de archivos dentro del directorio en
|
||||
lugar de excluir el directorio en sí:
|
||||
|
||||
:# Funciona: /keep/ se recorre, pero los demás archivos dentro se excluyen
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
En la línea de comandos, usando la opción -f, solo puede usar
|
||||
patrones `include`. Por ejemplo:
|
||||
|
||||
|
|
@ -1579,7 +1814,7 @@ Pattern
|
|||
En Unix, al usar caracteres globbing en la línea de comandos, debe
|
||||
ponerlos entre comillas para evitar que el shell los expanda.
|
||||
|
||||
Ignorar Archivos
|
||||
Ignorar Archivos (Ignore File)
|
||||
Además de las reglas globales en el archivo de configuración, puedes
|
||||
colocar archivos `.snapraidignore` en cualquier directorio dentro del array
|
||||
para definir reglas de exclusión descentralizadas.
|
||||
|
|
@ -1621,7 +1856,7 @@ Ignorar Archivos
|
|||
:# Excluye cualquier archivo .tmp dentro de projects/ o sus subcarpetas
|
||||
:*.tmp
|
||||
|
||||
Content
|
||||
Contenido (Content)
|
||||
SnapRAID almacena la lista y las sumas de comprobación de sus
|
||||
archivos en el archivo de contenido.
|
||||
|
||||
|
|
@ -1629,10 +1864,12 @@ Content
|
|||
su array de discos, junto con todas las sumas de comprobación para
|
||||
verificar su integridad.
|
||||
|
||||
Este archivo es leído y escrito por los comandos `sync` y `scrub`
|
||||
y leído por los comandos `fix`, `check` y `status`.
|
||||
El archivo de contenido es leído y escrito por los comandos `sync`,
|
||||
`scrub`, `touch` y `rehash`. Es leído por los comandos `status`, `diff`,
|
||||
`check`, `fix`, `list`, `dup`, `locate` y `pool`, y es completamente
|
||||
ignorado por los comandos `smart`, `probe`, `up`, `down` y `devices`.
|
||||
|
||||
Parity
|
||||
Paridad (Parity)
|
||||
SnapRAID almacena la información de paridad de su array en los
|
||||
archivos de paridad.
|
||||
|
||||
|
|
@ -1642,7 +1879,7 @@ Parity
|
|||
Estos archivos son leídos y escritos por los comandos `sync` y `fix`
|
||||
y solo leídos por los comandos `scrub` y `check`.
|
||||
|
||||
Encoding
|
||||
Codificación (Encoding)
|
||||
SnapRAID en Unix ignora cualquier codificación. Lee y almacena los
|
||||
nombres de archivo con la misma codificación utilizada por el sistema
|
||||
de archivos.
|
||||
|
|
@ -1657,8 +1894,191 @@ Encoding
|
|||
archivo impresos; si redirige la salida de la consola a un archivo,
|
||||
el archivo resultante siempre está en formato UTF-8.
|
||||
|
||||
Copyright
|
||||
Este archivo es Copyright (C) 2025 Andrea Mazzoleni
|
||||
Código de salida (Exit Code)
|
||||
SnapRAID termina con los siguientes códigos de error:
|
||||
|
||||
See Also
|
||||
snapraid_log(1), snapraidd(1)
|
||||
0 - Todo bien.
|
||||
1 - El comando encontró algunos errores.
|
||||
2 - El comando `diff` determinó que todo está bien, pero se necesita un `sync`.
|
||||
3 - Un comando de dispositivo de disco (`probe`, `smart`, `devices`, `up`,
|
||||
`down`) se completó, pero al menos un sistema de archivos está funcionando
|
||||
en modo degradado con dispositivos faltantes.
|
||||
|
||||
Problemas conocidos (Known Issues)
|
||||
Límites del sistema de archivos
|
||||
SnapRAID no cruza los límites del sistema de archivos, puntos de montaje o
|
||||
subvolúmenes al escanear un disco de datos. Cuando se detecta dicho límite,
|
||||
SnapRAID emite una ADVERTENCIA y no escanea más allá de él.
|
||||
|
||||
Los archivos ubicados más allá de dichos límites no se incluyen en el disco
|
||||
de datos y deben configurarse por separado si se desea protegerlos.
|
||||
|
||||
Puntos de montaje con instantáneas del sistema de archivos
|
||||
Cuando las instantáneas del sistema de archivos están habilitadas, no se
|
||||
admiten puntos de montaje anidados ni montajes bind dentro de un disco de
|
||||
datos.
|
||||
|
||||
Los puntos de montaje forman parte del espacio de nombres de montaje del
|
||||
sistema en vivo y no se conservan en las instantáneas del sistema de
|
||||
archivos. En consecuencia, al escanear una instantánea, un directorio
|
||||
oculto por un punto de montaje en el sistema de archivos en vivo puede
|
||||
hacerse visible.
|
||||
|
||||
No coloque puntos de montaje anidados ni montajes bind dentro de los discos
|
||||
de datos cuando las instantáneas del sistema de archivos estén habilitadas.
|
||||
|
||||
Múltiples configuraciones con instantáneas del sistema de archivos
|
||||
El soporte para instantáneas no se puede compartir de forma segura entre
|
||||
múltiples configuraciones independientes de SnapRAID que utilicen el mismo
|
||||
espacio de nombres de instantáneas del sistema de archivos.
|
||||
|
||||
En Btrfs y Bcachefs, solo una configuración de SnapRAID con soporte de
|
||||
instantáneas habilitado puede usar directorios de datos dentro del mismo
|
||||
subvolumen. En ZFS, la misma restricción se aplica a un dataset, y en NTFS
|
||||
a un volumen.
|
||||
|
||||
Las múltiples configuraciones que comparten el mismo espacio de nombres de
|
||||
instantáneas utilizan las mismas instantáneas `stable`, `pending` y `scan`.
|
||||
Por lo tanto, ejecutar una configuración puede reemplazar o eliminar las
|
||||
instantáneas de recuperación requeridas por otra.
|
||||
|
||||
Modificaciones de archivos in situ sin cambios de marca de tiempo
|
||||
SnapRAID detecta modificaciones de archivos comparando tamaños de archivo y
|
||||
marcas de tiempo de modificación (mtime).
|
||||
|
||||
Si una aplicación modifica un archivo in situ sin alterar su tamaño ni
|
||||
actualizar su marca de tiempo de modificación, "diff" y "sync" no detectarán
|
||||
que el archivo ha cambiado y su paridad no se actualizará.
|
||||
|
||||
Para asegurarse de que SnapRAID reconozca dichos cambios, actualice la marca
|
||||
de tiempo de modificación del archivo (por ejemplo, con la utilidad "touch").
|
||||
De lo contrario, la diferencia solo se detectará como una falta de
|
||||
coincidencia de hash durante un "scrub" o "check" posterior.
|
||||
|
||||
Coincidencia de mayúsculas y minúsculas no ASCII en Windows
|
||||
SnapRAID utiliza una codificación UTF-8 estándar y predecible en todas las
|
||||
plataformas, limitando la coincidencia insensible a mayúsculas y minúsculas
|
||||
a los caracteres ASCII.
|
||||
|
||||
Los sistemas de archivos de Windows adolecen del diseño heredado de imponer
|
||||
la insensibilidad a mayúsculas y minúsculas en nombres de archivo Unicode a
|
||||
través de tablas de plegado arbitrarias y dependientes del sistema. En
|
||||
consecuencia, Windows distorsiona la realidad del sistema de archivos al
|
||||
tratar secuencias de bytes Unicode completamente diferentes como si fueran el
|
||||
mismo archivo.
|
||||
|
||||
Por ejemplo, `À.txt` y `à.txt` son nombres Unicode distintos; sin embargo,
|
||||
Windows los trata ilógicamente como idénticos, mientras que SnapRAID conserva
|
||||
su verdadera distinción.
|
||||
|
||||
Esta limitación se debe al manejo inconsistente de los nombres de archivo
|
||||
Unicode por parte de Windows y a su insistencia en aplicar alias que ignoran
|
||||
mayúsculas y minúsculas. Para evitar discrepancias derivadas del plegado de
|
||||
mayúsculas y minúsculas de Windows, especifique siempre la grafía exacta de
|
||||
los caracteres no ASCII en las rutas de configuración y filtros.
|
||||
|
||||
Recuperación con fix parcial
|
||||
Cuando `fix` se restringe mediante `-S, --start` o `-B, --count`,
|
||||
SnapRAID opera únicamente sobre los bloques seleccionados y no realiza
|
||||
la finalización a nivel de archivo ni la cuarentena.
|
||||
|
||||
Si la recuperación produce datos de mejor esfuerzo que no pueden demostrarse
|
||||
como representativos del contenido actual, dichos bloques aún pueden escribirse
|
||||
con el nombre de archivo normal. La incertidumbre asociada con estos bloques
|
||||
recuperados no se conserva una vez finalizado el comando.
|
||||
|
||||
Como consecuencia, un `fix` posterior tratará estos bloques legibles como
|
||||
datos de archivo válidos y no intentará recuperarlos nuevamente. Esto puede
|
||||
hacer que una recuperación posterior informe éxito dejando datos incompletos
|
||||
o desactualizados en el archivo.
|
||||
|
||||
Las opciones `-S` y `-B` están destinadas únicamente a la recuperación manual
|
||||
avanzada, típicamente después de que un `fix` normal haya fallado. Si un `fix`
|
||||
parcial informa de datos no recuperables, elimine o renombre los archivos
|
||||
afectados antes de intentar otra recuperación, o verifique su contenido manualmente.
|
||||
|
||||
Enlaces duros en NTFS y rutas excluidas
|
||||
En NTFS, las entradas de directorio almacenan en caché el tamaño del
|
||||
archivo y las marcas de tiempo de forma independiente para cada enlace
|
||||
duro. Cuando un archivo se modifica a través de un enlace, las entradas
|
||||
de directorio de otros enlaces que apuntan al mismo archivo pueden
|
||||
conservar metadatos obsoletos hasta que se accede a ellos.
|
||||
|
||||
SnapRAID detecta y normaliza automáticamente esta condición siempre que
|
||||
se encuentran al menos dos enlaces duros al mismo archivo durante un
|
||||
escaneo. Sin embargo, si solo se escanea un enlace duro mientras los
|
||||
demás están excluidos por filtros o se encuentran fuera de la ruta del
|
||||
disco de datos, SnapRAID no puede detectar la colisión de inodos y confía
|
||||
en los metadatos almacenados en caché del único enlace visible.
|
||||
|
||||
En consecuencia, las modificaciones realizadas a través de un enlace duro
|
||||
excluido o externo pueden pasar desapercibidas para SnapRAID hasta que el
|
||||
sistema operativo actualice los metadatos del enlace incluido (como cuando
|
||||
se accede al archivo o se abre a través de esa ruta).
|
||||
|
||||
Para evitar esta limitación, evite modificar archivos protegidos a través
|
||||
de enlaces duros que estén excluidos de SnapRAID, o asegúrese de que
|
||||
todos los enlaces duros a un archivo se incluyan en el escaneo para que
|
||||
SnapRAID pueda normalizarlos.
|
||||
|
||||
Recuperación tras una sincronización de multiparidad interrumpida
|
||||
En una matriz con múltiples discos de paridad, un `sync` interrumpido
|
||||
puede dejar los niveles de paridad temporalmente desincronizados entre sí.
|
||||
Por ejemplo, la paridad 1 podría contener datos recién actualizados,
|
||||
mientras que la paridad 2 todavía contiene los datos antiguos.
|
||||
|
||||
Durante `check` o `fix`, SnapRAID prueba diferentes combinaciones de
|
||||
paridad y valida los datos reconstruidos con respecto a los hashes de
|
||||
bloque conocidos (que cubren el bloque completo, normalmente 256 KiB).
|
||||
|
||||
Si SnapRAID intenta una reconstrucción utilizando una combinación
|
||||
inconsistente de paridad antigua y nueva, las ecuaciones lineales de RAID
|
||||
producirán datos incorrectos. Para que esta combinación no válida se
|
||||
acepte por error, las ecuaciones tendrían que reconstruir accidentalmente
|
||||
al menos un bloque completo de 256 KiB de manera tan perfecta que su hash
|
||||
coincida, mientras que otros bloques no sincronizados en la misma banda
|
||||
se reconstruyen con datos incorrectos.
|
||||
|
||||
Este escenario no depende de una colisión de hashes; más bien, las propias
|
||||
ecuaciones de paridad mixta tendrían que generar de forma casual el
|
||||
contenido exacto del bloque de 256 KiB original. Si bien es matemáticamente
|
||||
concebible con datos especialmente preparados o muy repetitivos, es
|
||||
prácticamente imposible con datos reales.
|
||||
|
||||
Si todos los discos están sanos, completar el `sync` interrumpido antes
|
||||
de realizar más cambios elimina esta ambigüedad. Si un disco ha fallado
|
||||
y se requiere recuperación, evite modificar los discos de datos antes
|
||||
de ejecutar `check` o `fix`.
|
||||
|
||||
Nombres de archivos y directorios reservados
|
||||
SnapRAID reserva algunos nombres de archivos, directorios e instantáneas para
|
||||
sus operaciones internas. No use estos nombres para datos de usuario:
|
||||
|
||||
.snapraidignore - Archivo local de reglas de exclusión.
|
||||
.snapraid - Directorio contenedor de instantáneas.
|
||||
snapraid-* - Nombres de instantáneas ZFS gestionadas por SnapRAID.
|
||||
*.unrecoverable - Archivos dañados puestos en cuarentena durante la
|
||||
recuperación.
|
||||
CONTENT.tmp - Archivo temporal para actualizaciones de content.
|
||||
CONTENT.lock - Archivo de bloqueo de content.
|
||||
PARITY.spaceholder - Archivo temporal de reserva de espacio durante la
|
||||
asignación de paridad en Windows.
|
||||
|
||||
El uso de estos nombres para datos no relacionados puede hacer que los archivos
|
||||
o instantáneas sean ignorados, interpretados erróneamente como metadatos,
|
||||
sobrescritos, renombrados o eliminados.
|
||||
|
||||
En Windows, todas las variantes de mayúsculas y minúsculas también están
|
||||
reservadas, incluso en directorios NTFS configurados para distinguir entre
|
||||
mayúsculas y minúsculas (por ejemplo, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP
|
||||
y CONTENT.Lock).
|
||||
|
||||
Traducción (Translation)
|
||||
Este documento es una traducción automática del manual en inglés.
|
||||
Consulte el manual en inglés para obtener la versión oficial.
|
||||
|
||||
Copyright
|
||||
Este archivo es Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
Véase también (See Also)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
.TH "Disk Array用 SnapRAID バックアップ" 1
|
||||
.SH NAME
|
||||
snapraid \- Disk Array用 SnapRAID バックアップ
|
||||
.SH SYNOPSIS
|
||||
.SH 概要 (SYNOPSIS)
|
||||
snapraid [\-c, \-\-conf CONFIG]
|
||||
.PD 0
|
||||
.PP
|
||||
|
|
@ -77,7 +77,7 @@ snapraid [\-c, \-\-conf CONFIG]
|
|||
snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PD 0
|
||||
.PD
|
||||
.SH DESCRIPTION
|
||||
.SH 説明 (DESCRIPTION)
|
||||
SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の
|
||||
データ復旧のためにパリティ情報を保存します。
|
||||
.PP
|
||||
|
|
@ -113,19 +113,34 @@ https://www.snapraid.it/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH LIMITATIONS
|
||||
.SH 制限事項 (LIMITATIONS)
|
||||
SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限事項があります。
|
||||
.PP
|
||||
主な制限は、ディスクが故障し、最近 \`sync\` を実行していない場合、完全に復旧できない
|
||||
可能性があることです。
|
||||
より具体的には、最後の \`sync\` 操作以降に変更または削除されたファイルのサイズまでのデータが
|
||||
復旧できない可能性があります。
|
||||
これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。
|
||||
このため、SnapRAIDは**めったに変更されない**データに適しています。
|
||||
主な制限事項は、ディスクが故障した場合、最後の \`sync\`(同期)処理の状態までしか
|
||||
データを復元できないことです。最後の同期以降に追加されたデータや、故障したディスク上で行われた
|
||||
変更はすべて失われます。
|
||||
.PP
|
||||
一方で、新しく追加されたファイルは、既に存在するファイルの復旧を妨げません。
|
||||
新しく追加されたファイルが故障したディスク上にある場合にのみ、それらのファイルが失われます。
|
||||
そのため、SnapRAIDは主にデータの変更がほとんどない環境に適しています。
|
||||
.PP
|
||||
最後の同期時にすでに存在していたデータについて、復元の信頼性は \`snapshot\`(スナップショット)
|
||||
オプションが使用されているかどうかによって異なります。
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
スナップショットサポートがある場合(Btrfs、ZFS、Bcachefs、およびNTFSで利用可能):
|
||||
SnapRAIDはサポートされている各データファイルシステムの独立した凍結されたリファレンスを
|
||||
自動的に維持できます。
|
||||
これにより、同期中または同期後にライブファイルシステム上のファイルを変更または削除した場合でも、
|
||||
復元プロセスの整合性と信頼性が保たれます。
|
||||
.PD
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
スナップショットサポートがない場合:
|
||||
\`sync\` 後にファイルを削除または変更すると、他の故障したディスクの完全な復元が妨げられる
|
||||
可能性があります。これは、変更されたファイルが故障したディスク上にない場合でも、
|
||||
パリティが変更後のファイルと一致しなくなるために発生します。一方で、新しく追加されたファイルが
|
||||
すでに存在するファイルの復元を妨げることはありません。
|
||||
.PD
|
||||
.PP
|
||||
その他のSnapRAIDの制限は次のとおりです。
|
||||
.PD 0
|
||||
|
|
@ -145,7 +160,7 @@ SnapRAIDは**限られた数のディスク障害**からのみデータを復
|
|||
**ファイル名、タイムスタンプ、シンボリックリンク、およびハードリンク**のみが保存されます。
|
||||
アクセス許可、所有権、および拡張属性は保存されません。
|
||||
.PD
|
||||
.SH GETTING STARTED
|
||||
.SH はじめに (GETTING STARTED)
|
||||
SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを \`parity\` 情報専用に
|
||||
選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から
|
||||
復旧できます。
|
||||
|
|
@ -283,7 +298,7 @@ Ctrl+Cを押すことでいつでも停止でき、次回の実行時には中
|
|||
.PP
|
||||
これで、アレイを自由に使い始め、定期的に \`sync\` コマンドを実行してパリティ情報を
|
||||
更新できます。
|
||||
.SS Scrubbing
|
||||
.SS スクラブ (Scrubbing)
|
||||
データとパリティのエラーを定期的にチェックするには、\`scrub\` コマンドを
|
||||
実行できます。
|
||||
.PP
|
||||
|
|
@ -341,10 +356,10 @@ snapraid \-p bad scrub
|
|||
未同期のアレイで \`scrub\` を実行すると、削除または変更されたファイルによって
|
||||
引き起こされたエラーが報告される場合があります。これらのエラーは \`scrub\` の
|
||||
出力で報告されますが、関連するブロックは不良としてマークされません。
|
||||
.SS Pooling
|
||||
.SS プーリング (Pooling)
|
||||
注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。
|
||||
mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。
|
||||
Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
Mergerfs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の
|
||||
ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと
|
||||
うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで
|
||||
|
|
@ -489,7 +504,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Undeleting
|
||||
.SS 削除取り消し (Undeleting)
|
||||
SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、
|
||||
\-f, \-\-filter オプションを使用してファイルを以前の状態に復元または削除解除するために
|
||||
使用できます。
|
||||
|
|
@ -525,12 +540,13 @@ snapraid fix \-m
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Recovering
|
||||
.SS 回復 (Recovering)
|
||||
最悪の事態が発生し、1台以上のディスクを失いました!
|
||||
.PP
|
||||
**パニックにならないでください!** 復旧できます!
|
||||
.PP
|
||||
最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。
|
||||
何よりもまず、ディスクアレイへの**変更を一切行わないでください**。
|
||||
残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。
|
||||
リモート接続、およびスケジュールされたSnapRAIDの夜間 \`sync\` や \`scrub\` を含む、
|
||||
すべてのスケジュールされたプロセスを無効にしてください。
|
||||
.PP
|
||||
|
|
@ -623,22 +639,22 @@ snapraid sync
|
|||
.RE
|
||||
.PP
|
||||
すべてが復旧されていれば、このコマンドは即座に完了します。
|
||||
.SH COMMANDS
|
||||
SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。
|
||||
.SH コマンド (COMMANDS)
|
||||
SnapRAIDは、以下の操作を行ういくつかのシンプルなコマンドを提供します。
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
アレイの状態の概要を出力 \-> \`status\`
|
||||
アレイの状態を表示する \-> \`status\`
|
||||
.IP \(bu
|
||||
ディスクの制御 \-> \`smart\`、\`probe\`、\`up\`、\`down\`
|
||||
ディスクを制御する \-> \`smart\`、\`probe\`、\`up\`、\`down\`
|
||||
.IP \(bu
|
||||
バックアップ/スナップショットの作成 \-> \`sync\`
|
||||
バックアップ/復元ポイントを作成する \-> \`sync\`
|
||||
.IP \(bu
|
||||
データの定期的なチェック \-> \`scrub\`
|
||||
データを定期的にチェックする \-> \`scrub\`
|
||||
.IP \(bu
|
||||
最後のバックアップ/スナップショットの復元 \-> \`fix\`。
|
||||
最後のバックアップ/復元ポイントを復元する \-> \`fix\`
|
||||
.PD
|
||||
.PP
|
||||
コマンドは**小文字**で記述する必要があります。
|
||||
コマンドは小文字で入力する必要があります。
|
||||
.SS status
|
||||
ディスクアレイの状態の概要を出力します。
|
||||
.PP
|
||||
|
|
@ -761,9 +777,10 @@ SMARTがディスクが故障していると報告した場合、そのディス
|
|||
変更されたことを意味します。
|
||||
.HP 4
|
||||
.I moved
|
||||
同じディスク上の異なるディレクトリに移動されたファイル。
|
||||
同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが
|
||||
異なることで識別されます。
|
||||
同じinodeを保持したまま、同じディスク上で移動または
|
||||
名前変更されたファイル。同じinode、サイズ、およびタイムスタンプを
|
||||
持ちますが、パスが異なることで識別されます。ファイル名が異なって
|
||||
いても構いません。
|
||||
.HP 4
|
||||
.I copied
|
||||
元のファイルがまだ存在する、同じディスクまたは別の
|
||||
|
|
@ -774,14 +791,12 @@ SMARTがディスクが故障していると報告した場合、そのディス
|
|||
が一致する必要があります。
|
||||
.HP 4
|
||||
.I relocated
|
||||
オリジナルが消失した、同じディスクまたは別のディ
|
||||
スクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つこと
|
||||
によって識別されます。
|
||||
サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが
|
||||
一致する必要があります。
|
||||
同じディスク上の \'moved\' ファイルとは異なり、再配置された
|
||||
ファイルは異なる inode を持ちます。
|
||||
元のファイルが消失し、inodeが保持されていない、
|
||||
別のディレクトリまたはディスクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つことに
|
||||
よって識別されます。サブ秒のタイムスタンプがゼロの場合、
|
||||
識別するにはフルパスが一致する必要があります。\'moved\' ファイルとは
|
||||
異なり、再配置されたファイルはファイル名が同一である必要があります。
|
||||
.HP 4
|
||||
.I restored
|
||||
inode は異なるが、ディレクトリ、名前、サイズ、お
|
||||
|
|
@ -858,14 +873,14 @@ full \- すべてをスクラブします。
|
|||
\`parity\` ファイルは**変更されません**。
|
||||
アレイ内のファイルは**変更されません**。
|
||||
.SS fix
|
||||
すべてのファイルとパリティデータを修正します。
|
||||
すべてのファイルとパリティデータを修復(復元)します。
|
||||
.PP
|
||||
すべてのファイルとパリティデータは、最後の \`sync\` で保存されたスナップショット状態と
|
||||
比較されます。
|
||||
違いが見つかった場合、保存されたスナップショットに**元に戻されます**。
|
||||
すべてのファイルとパリティデータが、最後の \`sync\` で保存された状態と比較されます。
|
||||
差異が見つかった場合、保存されていた状態に巻き戻されます。
|
||||
.PP
|
||||
**警告!** \`fix\` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの_状態を_最後の \`sync\` に**無条件に元に戻します**。
|
||||
警告!
|
||||
\`fix\` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの変更状態を無条件で最後の \`sync\` の状態に戻します。
|
||||
.PP
|
||||
他のオプションが指定されていない場合、アレイ全体が処理されます。
|
||||
フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを
|
||||
|
|
@ -984,7 +999,7 @@ SnapRAIDが移動およびコピーされたファイルを認識する能力が
|
|||
使用できます。
|
||||
再配置プロセス中、これらのファイルはパリティによって保護されないことに
|
||||
注意してください。
|
||||
.SH OPTIONS
|
||||
.SH オプション (OPTIONS)
|
||||
SnapRAIDには、次のオプションがあります。
|
||||
.TP
|
||||
.B \-c, \-\-conf CONFIG
|
||||
|
|
@ -1087,7 +1102,7 @@ DAYS は、ブロックがスクラブされるための最小経過日数であ
|
|||
1秒あたりのバイト数です。K、M、Gなどの乗数を指定できます
|
||||
(例:\-\-bw\-limit 1G)。
|
||||
.TP
|
||||
.B \-t, \-\-tail サイズ
|
||||
.B \-t, \-\-tail SIZE
|
||||
ファイルリストを、パリティディスクの指定された末尾サイズ以下を
|
||||
使用しているものに制限します。
|
||||
K、M、G、T などの倍数を使用できます(例:\-\-tail 1G)。
|
||||
|
|
@ -1172,7 +1187,7 @@ SnapRAIDが一部のディスクがUUIDを変更したことを検出した場
|
|||
お勧めします。
|
||||
\`sync\` 操作中にデータ保護はありません。
|
||||
.TP
|
||||
.B \-W, \-\-force\-realloc\-tail サイズ
|
||||
.B \-W, \-\-force\-realloc\-tail SIZE
|
||||
\-R, \-\-force\-realloc と同様に動作しますが、各パリティファイルの
|
||||
指定された末尾部分(最後の「サイズ」バイト)に制限されます。
|
||||
現在その末尾セクションに保存されているファイルフラグメント/ブロックの
|
||||
|
|
@ -1220,11 +1235,13 @@ locate \-t, \-\-tail を使用して、影響を受けるファイルを事前
|
|||
指定されたブロック番号から処理を開始します。
|
||||
これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに
|
||||
役立ちます。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、\`check\` と \`fix\` でのみ
|
||||
サポートされています。
|
||||
.TP
|
||||
.B \-B, \-\-count BLKCOUNT
|
||||
指定された数のブロックのみを処理します。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、\`check\` と \`fix\` でのみ
|
||||
サポートされています。
|
||||
.TP
|
||||
.B \-C, \-\-gen\-conf CONTENT
|
||||
既存のコンテンツファイルからダミーの構成ファイルを生成します。
|
||||
|
|
@ -1249,7 +1266,7 @@ locate \-t, \-\-tail を使用して、影響を受けるファイルを事前
|
|||
.TP
|
||||
.B \-V, \-\-version
|
||||
プログラムのバージョンを出力します。
|
||||
.SH CONFIGURATION
|
||||
.SH 設定 (CONFIGURATION)
|
||||
SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを
|
||||
必要とします。
|
||||
.PP
|
||||
|
|
@ -1334,6 +1351,11 @@ DIR はファイルシステム内のディスクの**マウントポイント**
|
|||
.PP
|
||||
NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。
|
||||
.PP
|
||||
ただし、設定されたパスは常に同じ基礎データに解決される必要があります。
|
||||
パスにシンボリックリンクが含まれている場合、そのリンク先は固定されている
|
||||
必要があります。シンボリックリンクの参照先を変更して実行時にデータ
|
||||
ディレクトリを切り替えることはサポートされていません。
|
||||
.PP
|
||||
アレイ内のデータディスクごとに1つのオプションを使用する必要があります。
|
||||
.PP
|
||||
構成ファイルで直接 NAME を変更してから \`sync\` コマンドを実行することで、
|
||||
|
|
@ -1348,6 +1370,27 @@ NAME を固定したままにしておけば、必要に応じてマウントポ
|
|||
.PP
|
||||
これらのディスクは常に回転していることが期待されるため、\`up\` およ
|
||||
び \`down\` コマンドの影響を受けないことに注意してください。
|
||||
.SS snapshot
|
||||
\`sync\`、\`scrub\`、\`check\`、および \`fix\` コマンドでファイルシステムスナップショットの
|
||||
使用を有効にします。
|
||||
.PP
|
||||
有効にすると、SnapRAIDは \`sync\` の開始時にサポートされている各データファイルシステムの
|
||||
読み取り専用スナップショットを作成します。これにより各ファイルシステムの安定したビューが
|
||||
提供され、後からの変更によってパリティ計算に使用されるデータが変わるのを防ぎます。
|
||||
.PP
|
||||
これにより復元が大幅に向上します。ライブファイルシステムからファイルが削除されても、
|
||||
スナップショット内に保存され続けます。これにより、そのブロックのパリティが「破損」するのを防ぎ、
|
||||
別のディスクが故障した場合でもデータを正常に復元できるようになります。
|
||||
.PP
|
||||
このオプションは、LinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでフォーマットされた
|
||||
データディスクにのみ適用されます。
|
||||
パリティディスク、または他のファイルシステムを使用しているデータディスクは、常にファイルシステムの
|
||||
ライブバージョンを使用します。
|
||||
.PP
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
このオプションが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
.PP
|
||||
スナップショットのライフサイクルの詳細な説明については、SNAPSHOTSのセクションを参照してください。
|
||||
.SS nohidden
|
||||
すべての隠しファイルとディレクトリを除外します。
|
||||
Unixでは、隠しファイルは \`.\` で始まるファイルです。
|
||||
|
|
@ -1361,6 +1404,10 @@ syncプロセスで除外または含めるファイルまたはディレクト
|
|||
パターンが一致しない場合、最後に指定されたパターンが \`include\` の場合はファイルは除外され、
|
||||
\`exclude\` の場合は含まれます。
|
||||
.PP
|
||||
フィルタリングはディレクトリの走査時に階層的に実行されることに注意してください。
|
||||
ディレクトリが \`exclude\` ルールに一致した場合、そのディレクトリ全体がスキップ(プルーニング)され、
|
||||
その内部にあるファイルやサブディレクトリに対する \`include\` ルールは評価されません。
|
||||
.PP
|
||||
パターン仕様の詳細については、PATTERNセクションを参照してください。
|
||||
.PP
|
||||
このオプションは複数回使用できます。
|
||||
|
|
@ -1421,31 +1468,31 @@ mkfs.ext4 \-m 0 \-T largefile4 DEVICE
|
|||
経験則として、SnapRAIDは通常、アレイ内のデータ16 TBごとに1 GiBのRAMを必要とします。
|
||||
.PP
|
||||
具体的には、データのハッシュを保存するために、SnapRAIDは
|
||||
約 $TS \\cdot (1 + HS) / BS$ バイトのRAMを必要とします。
|
||||
約 TS*(1+HS)/BS バイトのRAMを必要とします。
|
||||
ここで、TSはディスクアレイの合計サイズ(バイト)、BSはブロックサイズ(バイト)、HSはハッシュサイズ(バイト)です。
|
||||
.PP
|
||||
たとえば、4 TBのディスク8台、ブロックサイズ256 KiB(1 KiB = 1024バイト)、
|
||||
ハッシュサイズ16の場合:
|
||||
.PP
|
||||
RAM = $(8 \\cdot 4 \\cdot 10^{12}) \\cdot (1 + 16) / (256 \\cdot 2^{10}) = 1.93 \\text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
|
||||
.PD 0
|
||||
.PD
|
||||
.PP
|
||||
ハッシュサイズを8に切り替えると:
|
||||
.PP
|
||||
RAM = $(8 \\cdot 4 \\cdot 10^{12}) \\cdot (1 + 8) / (256 \\cdot 2^{10}) = 1.02 \\text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
|
||||
.PD 0
|
||||
.PD
|
||||
.PP
|
||||
ブロックサイズを512に切り替えると:
|
||||
.PP
|
||||
RAM = $(8 \\cdot 4 \\cdot 10^{12}) \\cdot (1 + 16) / (512 \\cdot 2^{10}) = 0.96 \\text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
|
||||
.PD 0
|
||||
.PD
|
||||
.PP
|
||||
ハッシュサイズを8、ブロックサイズを512の両方に切り替えると:
|
||||
.PP
|
||||
RAM = $(8 \\cdot 4 \\cdot 10^{12}) \\cdot (1 + 8) / (512 \\cdot 2^{10}) = 0.51 \\text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
|
||||
.PD 0
|
||||
.PD
|
||||
.SS autosave SIZE_IN_GIGABYTES
|
||||
|
|
@ -1511,6 +1558,9 @@ PARITY はパリティ名のいずれかです:\`parity\`、\`2\-parity\`、\`
|
|||
RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、
|
||||
\`%s\` を使用する必要はないかもしれません。
|
||||
.PP
|
||||
デフォルトの \`\-a\` オプションを置き換えるために、\`[info: ...]\` タグを使用して
|
||||
カスタム情報オプション文字列を指定することもできます。
|
||||
.PP
|
||||
使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1526,6 +1576,10 @@ https://www.smartmontools.org/wiki/Supported_USB\-Devices
|
|||
例:
|
||||
.PP
|
||||
.RS 4
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl parity \-d sat %s
|
||||
.PD 0
|
||||
.PD
|
||||
|
|
@ -1540,10 +1594,19 @@ PARITY はパリティ名のいずれかです:\`parity\`、\`2\-parity\`、\`
|
|||
\`4\-parity\`、\`5\-parity\`、\`6\-parity\`、または \`z\-parity\`。
|
||||
特殊な値 \`*\` は、すべてのディスクで属性を無視するために使用できます。
|
||||
.PP
|
||||
例として、すべてのディスクで \`Current Pending Sector Count\` 属性を無視するには:
|
||||
複数の属性をスペースで区切って指定できます。
|
||||
各属性は1から255までの数値、または大文字と小文字を区别しない名前
|
||||
(例: \`Current_Pending_Sector\`)として指定できます。
|
||||
.PP
|
||||
例として、すべてのディスクで \`Current Pending Sector Count\` と
|
||||
\`Reallocated Sectors Count\` 属性を番号または名前で無視するには:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore * 197
|
||||
smartignore * 197 5
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
|
|
@ -1551,11 +1614,11 @@ smartignore * 197
|
|||
最初のパリティディスクでのみ無視するには:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Examples
|
||||
.SS 例 (Examples)
|
||||
Unixの一般的な構成の例は次のとおりです。
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1591,7 +1654,7 @@ exclude /tmp/
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1647,7 +1710,7 @@ exclude \\System Volume Information
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1663,7 +1726,140 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH PATTERN
|
||||
.SH スナップショット (SNAPSHOTS)
|
||||
設定でスナップショットオプションが有効になっている場合、SnapRAIDは
|
||||
ファイルシステムのスナップショットを使用して、操作中に読み取られるデータを安定に保ちます。
|
||||
これは、ライブファイルシステム上のファイルが後から変更または削除された場合でも同様です。
|
||||
.PP
|
||||
スナップショットの管理は完全に自動かつ透過的です。
|
||||
バックグラウンドで完全に処理されるスナップショットによる追加の保護を受けながら、
|
||||
これまでとまったく同じようにSnapRAIDを使用し続けることができます。
|
||||
.PP
|
||||
これには主に2つのメリットがあります。
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 整合性
|
||||
長時間かかるsyncやscrubの実行中にライブファイルシステム上でファイルが変更されても、
|
||||
スナップショットされた各ファイルシステムは操作中変更されないため、
|
||||
パリティの不一致や処理の中断は発生しません。
|
||||
.HP 4
|
||||
.I 復元
|
||||
ライブファイルシステムからファイルが更新または削除されても、スナップショット内に保存され続けます。
|
||||
次のsyncが実行される前にディスク故障が発生した場合、SnapRAIDはスナップショットに保存されている
|
||||
データを使用して、故障したディスクを再構築します。
|
||||
.PD
|
||||
.PP
|
||||
.RS 4
|
||||
.PD 0
|
||||
アクティブなsync処理中にディスクが故障した場合、SnapRAIDは前のパリティ計算の
|
||||
スナップショットと現在のスナップショットの両方から自動的に読み取ることも可能です。
|
||||
これにより、同期の間にブロックが変更または削除されていた場合でも、パリティ方程式を解くために
|
||||
必要な正確なデータブロックへのアクセスが提供され、完全な復元の可能性が最大化されます。
|
||||
.PD
|
||||
.PP
|
||||
.PD 0
|
||||
スナップショットがない場合、正常なディスク上の更新または削除されたファイルはデータブロックの欠損を
|
||||
招き、他の故障したディスクを修復するために必要となるブロックが失われる可能性があります。
|
||||
.PD
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
スナップショットはデータディスクに対してのみ、かつ基礎となるファイルシステムがその機能をサポートして
|
||||
いる場合にのみ作成されます。パリティディスクは常にライブファイルシステムを使用します。
|
||||
.PP
|
||||
現在、これはLinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでサポートされています。
|
||||
.PP
|
||||
異なるファイルシステムを持つデータディスクを混在させることができます。スナップショットをサポートして
|
||||
いるディスクのみがそれを利用し、他のディスクはライブファイルシステム上で直接動作し続けます。
|
||||
.PP
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
スナップショットが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
.SS スナップショット使用時のコマンドの挙動 (Command Behavior with Snapshots)
|
||||
\`sync\` および \`scrub\` コマンドは、ファイルシステムがサポートしているデータディスクに対して
|
||||
スナップショットを使用します。スナップショットされたディスクでは、コマンドはライブファイルシステムへの
|
||||
同時変更の影響を受けない安定したファイルシステムイメージを参照します。
|
||||
\`sync\` の実行中、サポートされている各データファイルシステムに対して独立して新しいスナップショットが
|
||||
作成されます。これらのスナップショットは全体としてパリティ計算に使用されるデータを提供します。
|
||||
対照的に、\`scrub\` コマンドは、既存のパリティと一致する信頼できる参照ポイントを維持するために、
|
||||
最も直近の同期中に作成された最後のスナップショットを利用します。
|
||||
.PP
|
||||
\`check\` および \`fix\` コマンドの場合、最後のスナップショットの使用は、
|
||||
\-d, \-\-filter\-disk オプションを使用して特定のディスクがターゲットに指定されているかどうかによって異なります。
|
||||
.TP
|
||||
.B \-d を介して明示的に選択されたディスク(操作の「ターゲット」)は、常にライブファイルシステムを使用します。
|
||||
\`fix\` の場合、これによりアクティブな交換ディスクにデータを復元できます。
|
||||
\`check\` の場合、同じ条件下で \`fix\` 操作をシミュレートできます。
|
||||
.PP
|
||||
他のすべてのデータディスク(「参照」ディスク)は、それぞれのスナップショットを介してアクセスされます。
|
||||
これにより、復旧の進行中に正常なディスク上のファイルを変更している場合でも、SnapRAIDは
|
||||
パリティ方程式を解くための安定した凍結された参照を持つことができます。
|
||||
.TP
|
||||
.B \-d オプションが指定されていない場合、SnapRAIDは操作がアレイ全体に適用されると想定します。
|
||||
この場合、\`check\` と \`fix\` はライブファイルシステムのみを排他的に使用します。
|
||||
.PP
|
||||
他のすべてのコマンドは、ライブファイルシステム上でのみ動作します。
|
||||
.SH スナップショットのライフサイクル (SNAPSHOTS LIFECYCLE)
|
||||
SnapRAIDは、各データサブボリュームのルートにある隠しディレクトリ内で、
|
||||
\`stable\`(安定)、\`pending\`(保留)、および \`scan\`(スキャン)という3つの特定のスナップショットを管理します。
|
||||
Btrfs、Bcachefs、およびNTFSでは \`.snapraid/\` ディレクトリが使用され、
|
||||
ZFSでは標準の \`.zfs/snapshot/\` が使用されます。
|
||||
.PP
|
||||
\`stable\` スナップショットは、最後に正常に完了した \`sync\` の状態を表し、
|
||||
現在のパリティの計算に使用された正確なデータを含んでいます。これは、
|
||||
\`scrub\`、\`check\`、および \`fix\` コマンドの主要なデータソースとして機能します。
|
||||
.PP
|
||||
\`scan\` スナップショットは、スキャンとパリティ計算のための凍結された状態を提供するために、
|
||||
\`sync\` の開始時に作成される一時的なイメージです。
|
||||
スキャンを実行し、新しいコンテンツ状態を保存した後、以前の \`pending\` スナップショットを置き換えます。
|
||||
.PP
|
||||
\`pending\` スナップショットは、中断された \`sync\` によって使用されるイメージです。
|
||||
操作が正常に完了すると、以前の \`stable\` スナップショットが削除され、
|
||||
\`pending\` スナップショットが新しい安定した参照として昇格します。
|
||||
.PP
|
||||
\`sync\` が中断された場合、\`pending\` スナップショットは保持されます。
|
||||
パリティが部分的にしか同期されていない場合でも、.content ファイルに記録されたファイルシステム状態と
|
||||
一致するため、その後の \`scrub\`、\`check\`、および \`fix\` コマンドはこの保留中のスナップショットを使用します。
|
||||
.PP
|
||||
\`sync\` が中断された場合、\`check\` および \`fix\` コマンドは \`stable\` スナップショットからも
|
||||
読み取りを行い、同期中に更新または削除されたファイルからデータブロックを取得します。
|
||||
これは、.content ファイルが同期プロセス全体を通じて、変更または削除されたすべてのファイルの
|
||||
メタデータを保持しているために可能です。
|
||||
この履歴情報は、syncが正常に終了し、.content ファイルの最終バージョンが保存されたときにのみクリアされます。
|
||||
.PP
|
||||
中断後に \`sync\` が再開されると、既存の保留中(pending)のスナップショットは削除され、
|
||||
ライブファイルシステムの現在の状態をキャプチャするために新しいスナップショットが作成されます。
|
||||
ただし、\`sync\` が中断された場合は、その後の \`sync\` が正常に完了するまで、
|
||||
ファイルの変更、削除、置換、または移動を行わないでください。
|
||||
パリティには、中断された sync で使用されたスナップショットから計算されたブロックが
|
||||
まだ含まれている可能性があります。その後の sync によりそのスナップショットが
|
||||
置き換えられ、中間バージョンのファイルが復元できなくなる可能性があります。
|
||||
.SS ファイルシステムスナップショットと外部バックアップ (External backups with filesystem snapshots)
|
||||
ファイルシステムスナップショットが有効な場合、SnapRAIDは各データサブボリューム、
|
||||
ボリューム、またはデータセットのルートにあるスナップショットにアクセスまたは作成します。
|
||||
.PP
|
||||
外部ツールとの干渉を避ける簡単な方法は、\`data\` 設定をサブボリュームまたは
|
||||
ボリューム内の通常のサブディレクトリ(例えば \`/mnt/subvol\` の代わりに
|
||||
\`/mnt/subvol/data\`)に指定することです。SnapRAIDは常にサブボリュームのルートに
|
||||
スナップショットディレクトリを作成するため(例えば \`/mnt/subvol/.snapraid/\`)、
|
||||
データサブディレクトリがクリーンに保たれ、スナップショットはそのディレクトリ内で
|
||||
動作するバックアップツールから見えない状態のままになります。
|
||||
.PP
|
||||
一方、設定された \`data\` ディレクトリ自体がサブボリュームまたはボリュームの
|
||||
ルートである場合、SnapRAIDはその直下に \`.snapraid/\` ディレクトリを作成します(Btrfs、
|
||||
Bcachefs、およびNTFS)。SnapRAID自身のスキャンからは自動的に除外されますが、
|
||||
外部のバックアップツールやファイル同期ツールはそのディレクトリを検出します。
|
||||
除外設定を行わない場合、スナップショットやディレクトリリンク内を走査して凍結された
|
||||
データツリー全体をコピーしてしまい、データが重複してバックアップストレージを使い果たす
|
||||
可能性があります。外部バックアップツールでは、必ず \`.snapraid/\` ディレクトリを
|
||||
除外するように設定してください。
|
||||
.PP
|
||||
ZFSでは、スナップショットは \`.snapraid/\` ではなく標準の仮想ディレクトリ
|
||||
\`.zfs/snapshot/\` 経由で公開されます。デフォルト(\`snapdir=hidden\`)では、ZFSはこの
|
||||
ディレクトリを一覧表示から隠すため、外部バックアップツールが走査することはありません。
|
||||
\`snapdir=visible\` を有効にしている場合は、バックアップツールが \`.zfs/\` ディレクトリを
|
||||
除外するように設定してください。
|
||||
.SH パターン (PATTERN)
|
||||
パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を
|
||||
提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、
|
||||
特定のファイル名やディレクトリ構造全体に一致するルールを定義できます。
|
||||
|
|
@ -1677,17 +1873,18 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
単一のパスコンポーネント内での一致に適しています。これは、シェルの
|
||||
グロブでおなじみの標準的なワイルドカードの動作です。
|
||||
.PP
|
||||
ダブルアスタリスク \`**\` はより強力で、ディレクトリ区切り文字を含む
|
||||
任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを
|
||||
またいで一致できるようになります。\`**\` がパターン内に直接埋め込まれている場合、
|
||||
周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。
|
||||
ダブルアスタリスクのワイルドカード \`**\` は、ディレクトリ区切り文字に隣接
|
||||
している場合(スラッシュの前または後にある場合)にのみ、ディレクトリ区切り
|
||||
文字をまたいで一致します。この形式では、複数のディレクトリレベルにわたって
|
||||
0個以上の文字に一致します。例えば、\`foo/**/bar\` は \`foo/bar\`、\`foo/a/bar\`、
|
||||
および \`foo/a/b/bar\` に一致し、\`**/build\` は \`build\` および \`foo/bar/build\` に
|
||||
一致し、\`src/**.js\` は \`src/main.js\` および \`src/ui/components/main.js\` に一致します。
|
||||
単独の形式 \`/**/\` は完全なパターンとして受け入れられません。
|
||||
.PP
|
||||
\`**\` の最も重要な使い方は、特別な形式である \`/**/\` です。これは
|
||||
0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、
|
||||
ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。
|
||||
例えば、パターン \`src/**/main.js\` は \`src/main.js\`(ディレクトリを0個スキップ)、
|
||||
\`src/ui/main.js\`(1個スキップ)、\`src/ui/components/main.js\`(2個スキップ)
|
||||
に一致します。
|
||||
\`**\` がスラッシュに隣接していない場合、\`*\` と同様に動作し、ディレクトリ区切り
|
||||
文字には一致しません。例えば、\`**.jpg\` はカレントディレクトリ内の \`photo.jpg\` に
|
||||
一致しますが、\`dir/photo.jpg\` には一致しません。その目的には \`**/*.jpg\` を
|
||||
使用してください。
|
||||
.PP
|
||||
角括弧 \`[]\` を使用した文字クラスは、指定されたセットまたは範囲の
|
||||
任意の1文字に一致します。他の単一文字パターンと同様に、
|
||||
|
|
@ -1696,7 +1893,8 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PP
|
||||
覚えておくべき根本的な違いは、\`*\`、\`?\`、および文字クラスはすべて
|
||||
ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、
|
||||
\`**\` はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。
|
||||
\`**\` はスラッシュに隣接している場合にのみディレクトリ区切り文字を
|
||||
またいで一致できるということです。
|
||||
.PP
|
||||
4つの異なる種類のパターンがあります。
|
||||
.TP
|
||||
|
|
@ -1820,6 +2018,44 @@ include /pictures/
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
ディレクトリを除外すると(DIR/ または /PATH/DIR/ を使用)、SnapRAID がそのディレクトリに入って
|
||||
スキャンすることが防止されることに注意してください。したがって、除外された親ディレクトリ内に
|
||||
存在するファイルやサブディレクトリを \`include\` ルールで再度含めることはできません(スキャナが
|
||||
そのディレクトリ内を走査しないため)。
|
||||
.PP
|
||||
例えば、以下の設定では \`/keep/\` がプルーニングされるため、\`file.dat\` は含まれません:
|
||||
.PP
|
||||
.RS 4
|
||||
# 意図通りに動作しません: /keep/ は完全にスキップされます
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
特定のファイルを残しつつディレクトリ内のファイルを一括除外するには、ディレクトリ自体を除外するのではなく、
|
||||
ディレクトリ内のファイルパターンを除外してください:
|
||||
.PP
|
||||
.RS 4
|
||||
# 意図通りに動作します: /keep/ は走査され、内部の他のファイルのみが除外されます
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/*
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
コマンドラインで \-f オプションを使用する場合、\`include\` パターンのみを
|
||||
使用できます。例:
|
||||
.PP
|
||||
|
|
@ -1839,9 +2075,9 @@ snapraid \-f \[dq]*.mp3\[dq] check
|
|||
.PP
|
||||
Unixでは、コマンドラインでグロブ文字を使用する場合、シェルがそれらを展開するのを
|
||||
防ぐために引用符で囲む必要があります。
|
||||
.SH IGNORE FILE
|
||||
.SH 除外ファイル (IGNORE FILE)
|
||||
設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに
|
||||
.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
\`.snapraidignore\` ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
.PP
|
||||
\`.snapraidignore\` で定義されたルールは、設定ファイルのルールの後に
|
||||
適用されます。これは、それらがより高い優先度を持ち、グローバル設定で
|
||||
|
|
@ -1898,15 +2134,18 @@ build/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH CONTENT
|
||||
.SH コンテンツ (CONTENT)
|
||||
SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。
|
||||
.PP
|
||||
これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、
|
||||
それらの整合性を検証するためのすべてのチェックサムを一覧表示します。
|
||||
.PP
|
||||
このファイルは \`sync\` および \`scrub\` コマンドによって読み書きされ、
|
||||
\`fix\`、\`check\`、および \`status\` コマンドによって読み取られます。
|
||||
.SH PARITY
|
||||
コンテンツファイルは \`sync\`、\`scrub\`、\`touch\`、および \`rehash\`
|
||||
コマンドによって読み書きされます。\`status\`、\`diff\`、\`check\`、
|
||||
\`fix\`、\`list\`、\`dup\`、\`locate\`、および \`pool\` コマンドによって読み取られ、
|
||||
\`smart\`、\`probe\`、\`up\`、\`down\`、および \`devices\` コマンドによって
|
||||
完全に無視されます。
|
||||
.SH パリティ (PARITY)
|
||||
SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。
|
||||
.PP
|
||||
これらはバイナリファイルであり、\`content\` ファイルで定義されたすべてのブロックの
|
||||
|
|
@ -1914,7 +2153,7 @@ SnapRAIDは、アレイのパリティ情報をパリティファイルに保存
|
|||
.PP
|
||||
これらのファイルは \`sync\` および \`fix\` コマンドによって読み書きされ、
|
||||
\`scrub\` および \`check\` コマンドによって**読み取られるだけ**です。
|
||||
.SH ENCODING
|
||||
.SH エンコーディング (ENCODING)
|
||||
UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている
|
||||
のと同じエンコーディングでファイル名を読み取り、保存します。
|
||||
.PP
|
||||
|
|
@ -1922,10 +2161,196 @@ Windowsでは、ファイルシステムから読み取られたすべての名
|
|||
処理されます。
|
||||
.PP
|
||||
ファイル名を正しく出力するには、\`chcp 65001\` コマンドでWindowsコンソールをUTF\-8モードに設定し、
|
||||
コンソールフォントとして \`Lucida Console\` などのTrueTypeフォントを**使用する**必要があります。
|
||||
コンソールフォントとして \`Lucida Console\` などのTrueTypeフォントを使用する必要があります。
|
||||
これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、
|
||||
結果のファイルは常にUTF\-8形式になります。
|
||||
.SH COPYRIGHT
|
||||
This file is Copyright (C) 2025 Andrea Mazzoleni
|
||||
.SH SEE ALSO
|
||||
snapraid_log(1), snapraidd(1)
|
||||
.SH 終了コード (EXIT CODE)
|
||||
SnapRAIDは以下のエラーコードで終了します:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 0
|
||||
すべて正常。
|
||||
.HP 4
|
||||
.I 1
|
||||
コマンドでエラーが発生しました。
|
||||
.HP 4
|
||||
.I 2
|
||||
\`diff\` コマンドはすべて正常であると判定しましたが、 \`sync\` が必要です。
|
||||
.HP 4
|
||||
.I 3
|
||||
ディスクデバイスコマンド(\`probe\`、\`smart\`、\`devices\`、\`up\`、\`down\`)は完了しましたが、
|
||||
少なくとも1つのファイルシステムがデバイス不足のためデグレード(縮退)モードで動作しています。
|
||||
.PD
|
||||
.RE
|
||||
.SH 既知の問題 (KNOWN ISSUES)
|
||||
.SS ファイルシステムの境界
|
||||
SnapRAIDは、データディスクのスキャン中にファイルシステム、マウントポイント、
|
||||
またはサブボリュームの境界を越えません。そのような境界が検出された場合、
|
||||
SnapRAIDは警告(WARNING)を報告し、その先をスキャンしません。
|
||||
.PP
|
||||
そのような境界の先にあるファイルはデータディスクに含まれないため、保護する
|
||||
必要がある場合は個別に設定する必要があります。
|
||||
.SS ファイルシステムスナップショット使用時のマウントポイント
|
||||
ファイルシステムスナップショットが有効になっている場合、データディスク内の
|
||||
ネストされたマウントポイントおよびバインドマウントはサポートされません。
|
||||
.PP
|
||||
マウントポイントは稼働中システムのマウント名前空間の一部であり、ファイルシステムの
|
||||
スナップショットには保持されません。その結果、スナップショットをスキャンする際、
|
||||
稼働中ファイルシステムでマウントポイントによって隠されていたディレクトリが
|
||||
見えるようになる場合があります。
|
||||
.PP
|
||||
ファイルシステムスナップショットが有効な場合は、データディスク内にネストされた
|
||||
マウントポイントやバインドマウントを配置しないでください。
|
||||
.SS ファイルシステムスナップショット使用時の複数設定
|
||||
同じファイルシステムのスナップショット名前空間を使用する複数の独立した
|
||||
SnapRAID設定で、スナップショットサポートを安全に共有することはできません。
|
||||
.PP
|
||||
BtrfsおよびBcachefsでは、スナップショットサポートが有効なSnapRAID設定は、
|
||||
同一サブボリューム内のデータディレクトリを1つしか使用できません。ZFSでは
|
||||
同じ制限がデータセットに、NTFSではボリュームに適用されます。
|
||||
.PP
|
||||
同じスナップショット名前空間を共有する複数の設定は、同一の \`stable\`、
|
||||
\`pending\`、および \`scan\` スナップショットを使用します。そのため、一方の設定を
|
||||
実行すると、もう一方の設定で必要なリカバリスナップショットが置換または
|
||||
削除される可能性があります。
|
||||
.SS タイムスタンプの変更を伴わないインプレースファイル変更
|
||||
SnapRAIDは、ファイルサイズと変更タイムスタンプ(mtime)を比較することによって
|
||||
ファイルの変更を検出します。
|
||||
.PP
|
||||
アプリケーションがファイルサイズを変更せず、変更タイムスタンプも更新せずに
|
||||
インプレースでファイルを変更した場合、\[dq]diff\[dq] および \[dq]sync\[dq] はファイルが
|
||||
変更されたことを検出できず、そのパリティは更新されません。
|
||||
.PP
|
||||
SnapRAIDにそのような変更を確実に認識させるには、ファイルの変更タイムスタンプ
|
||||
を更新してください(たとえば、\[dq]touch\[dq] ユーティリティなどを使用)。そうしない
|
||||
場合、その差分は後続の \[dq]scrub\[dq] または \[dq]check\[dq] 中のハッシュ不一致としてのみ
|
||||
検出されます。
|
||||
.SS Windowsにおける非ASCII文字の大文字・小文字の一致
|
||||
SnapRAIDはすべてのプラットフォームで標準的で予測可能なUTF\-8エンコーディング
|
||||
を使用し、大文字・小文字を区別しないマッチングをASCII文字に限定しています。
|
||||
.PP
|
||||
Windowsファイルシステムは、任意のシステム依存のフォールディングテーブルを介して
|
||||
Unicodeファイル名全体で大文字・小文字の不区別を強制するというレガシーな設計の
|
||||
影響を受けています。その結果、Windowsは全く異なるUnicodeバイトシーケンスをあたかも
|
||||
同じファイルであるかのように扱い、ファイルシステムの実態を覆い隠してしまいます。
|
||||
.PP
|
||||
たとえば、\`À.txt\` と \`à.txt\` は明確に異なるUnicode名ですが、Windowsは非論理的にも
|
||||
これらを同一として扱い、SnapRAIDはそれらの本来の区別を維持します。
|
||||
.PP
|
||||
この制限は、WindowsによるUnicodeファイル名の非一貫な処理と、大文字・小文字を区別
|
||||
しないエイリアスへの固執によって引き起こされます。Windowsの大文字・小文字フォール
|
||||
ディングに起因する不一致を防ぐため、設定パスおよびフィルター内の非ASCII文字には
|
||||
常に正確な大文字・小文字を指定してください。
|
||||
.SS 部分的な fix による回復
|
||||
\`fix\` を \`\-S, \-\-start\` または \`\-B, \-\-count\` で制限した場合、
|
||||
SnapRAID は選択されたブロックのみを処理し、ファイルレベルの完了処理や
|
||||
隔離を行いません。
|
||||
.PP
|
||||
回復によって現在の内容を表していると証明できないベストエフォートのデータが
|
||||
生成された場合でも、それらのブロックは通常のファイル名で書き込まれる
|
||||
可能性があります。これらの回復されたブロックに関連する不確実性は、コマンドの
|
||||
終了後には保持されません。
|
||||
.PP
|
||||
その結果、後続の \`fix\` はこれらの読み取り可能なブロックを有効なファイルデータ
|
||||
として扱い、再度の回復を試みません。これにより、ファイル内に不完全または
|
||||
古いデータが残っているにもかかわらず、後続の回復が成功と報告される場合が
|
||||
あります。
|
||||
.PP
|
||||
\`\-S\` および \`\-B\` オプションは、通常の \`fix\` が失敗した後の高度な手動回復
|
||||
のみを目的としています。部分的な \`fix\` で回復不能なデータが報告された場合は、
|
||||
別の回復を試みる前に対象のファイルを削除または名前変更するか、その内容を手動で
|
||||
確認してください。
|
||||
.SS NTFS ハードリンクと除外されたパス
|
||||
NTFS では、ディレクトリエントリが各ハードリンクのファイルサイズとタイム
|
||||
スタンプを個別にキャッシュします。ファイルがいずれか1つのリンクを通じて
|
||||
変更された場合、同じファイルを参照している他のリンクのディレクトリエントリ
|
||||
は、それらにアクセスされるまで古いメタデータを保持し続けることがあります。
|
||||
.PP
|
||||
SnapRAID は、スキャン中に同じファイルへのハードリンクが2つ以上見つかった
|
||||
場合、この状態を自動的に検出して正規化します。しかし、他のリンクがフィルタ
|
||||
によって除外されているか、またはデータディスクのパスの外部にあるために
|
||||
1つのハードリンクのみがスキャンされた場合、SnapRAID は inode の衝突を検出
|
||||
できず、単一の見えているリンクのキャッシュされたメタデータに依存します。
|
||||
.PP
|
||||
その結果、除外されたリンクや外部のハードリンクを通じて加えられた変更は、
|
||||
対象のファイルがアクセスされたりそのパスを通じて開かれたりして OS により
|
||||
含まれるリンクのメタデータが更新されるまで、SnapRAID に気付かれない可能性
|
||||
があります。
|
||||
.PP
|
||||
この制限を回避するには、SnapRAID から除外されているハードリンクを通じて
|
||||
保護対象のファイルを変更しないようにするか、SnapRAID が正常に正規化
|
||||
できるように、ファイルへのすべてのハードリンクがスキャンに含まれるように
|
||||
してください。
|
||||
.SS 中断されたマルチパリティ sync 後の回復
|
||||
複数のパリティディスクを持つアレイにおいて、\`sync\` が中断されると、
|
||||
異なるパリティレベル間で更新状態が一時的に不一致になることがあります。
|
||||
たとえば、パリティ 1 にはすでに新しく更新されたデータが含まれている一方、
|
||||
パリティ 2 にはまだ古いデータが残っているといった状況です。
|
||||
.PP
|
||||
\`check\` または \`fix\` の実行中、SnapRAID はさまざまなパリティの組み合わせを
|
||||
試し、既知のブロックハッシュ(ブロック全体、通常 256 KiB をカバー)に
|
||||
対して再構築されたデータを検証します。
|
||||
.PP
|
||||
SnapRAID が新旧のパリティが混在する不整合な組み合わせを使用して再構築を
|
||||
試みた場合、線形 RAID 方程式は誤ったデータを生成します。このような無効な
|
||||
組み合わせが誤って受け入れられるには、同じストライプ内の他の非同期ブロックが
|
||||
不正なデータで再構築されているにもかかわらず、方程式が偶然にも少なくとも
|
||||
1つの完全な 256 KiB ブロックを完璧に再構築してハッシュを一致させる必要が
|
||||
あります。
|
||||
.PP
|
||||
この事態はハッシュの衝突によるものではありません。むしろ、混在した
|
||||
パリティ方程式自体が偶然にも元の正確な 256 KiB ブロック内容を生成する
|
||||
必要があります。これは特別に作成されたデータや極めて反復的なデータでは
|
||||
数学的に考えられますが、実際のデータでは事実上不可能です。
|
||||
.PP
|
||||
すべてのディスクが正常な場合は、それ以上の変更を加える前に中断された \`sync\`
|
||||
を完了させることで、この不確実性を排除できます。ディスクに障害が発生して
|
||||
回復が必要な場合は、\`check\` または \`fix\` を実行する前にデータディスクを
|
||||
変更しないようにしてください。
|
||||
.SS 予約済みのファイル名およびディレクトリ名
|
||||
SnapRAID は内部処理のために一部のファイル名、ディレクトリ名、
|
||||
スナップショット名を予約しています。これらの名前をユーザーデータに
|
||||
使用しないでください:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I .snapraidignore
|
||||
ローカル除外ルールファイル。
|
||||
.HP 4
|
||||
.I .snapraid
|
||||
スナップショットコンテナディレクトリ。
|
||||
.HP 4
|
||||
.I snapraid\-*
|
||||
SnapRAID が管理する ZFS スナップショット名。
|
||||
.HP 4
|
||||
.I *.unrecoverable
|
||||
回復中に隔離された破損ファイル。
|
||||
.HP 4
|
||||
.I CONTENT.tmp
|
||||
content 更新用の一時ファイル。
|
||||
.HP 4
|
||||
.I CONTENT.lock
|
||||
content ロックファイル。
|
||||
.HP 4
|
||||
.I PARITY.spaceholder
|
||||
Windows でのパリティ割り当て時の一時的な
|
||||
プレースホルダーファイル。
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
これらの名前を無関係なデータに使用すると、ファイルやスナップショットが
|
||||
無視されたり、メタデータとして誤認されたり、上書き、名前変更、または
|
||||
削除されたりする可能性があります。
|
||||
.PP
|
||||
Windows では、大文字と小文字を区別するように構成された NTFS
|
||||
ディレクトリであっても、すべての大文字・小文字のバリエーションが
|
||||
同様に予約されます(例: .SNAPRAIDIGNORE、.SnapRaid、CONTENT.TMP、
|
||||
CONTENT.Lock)。
|
||||
.SH 翻訳 (TRANSLATION)
|
||||
この文書は英語版マニュアルの自動翻訳です。
|
||||
正確な記述については英語版マニュアルを参照してください。
|
||||
.SH 著作権 (COPYRIGHT)
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
.SH 関連項目 (SEE ALSO)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Name{number}
|
||||
snapraid - Disk Array用 SnapRAID バックアップ
|
||||
|
||||
Synopsis
|
||||
概要 (Synopsis)
|
||||
:snapraid [-c, --conf CONFIG]
|
||||
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
: [-m, --filter-missing] [-e, --filter-error]
|
||||
|
|
@ -23,7 +23,7 @@ Synopsis
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
説明 (Description)
|
||||
SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の
|
||||
データ復旧のためにパリティ情報を保存します。
|
||||
|
||||
|
|
@ -47,19 +47,30 @@ Description
|
|||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitations
|
||||
制限事項 (Limitations)
|
||||
SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限事項があります。
|
||||
|
||||
主な制限は、ディスクが故障し、最近 `sync` を実行していない場合、完全に復旧できない
|
||||
可能性があることです。
|
||||
より具体的には、最後の `sync` 操作以降に変更または削除されたファイルのサイズまでのデータが
|
||||
復旧できない可能性があります。
|
||||
これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。
|
||||
このため、SnapRAIDは**めったに変更されない**データに適しています。
|
||||
主な制限事項は、ディスクが故障した場合、最後の `sync`(同期)処理の状態までしか
|
||||
データを復元できないことです。最後の同期以降に追加されたデータや、故障したディスク上で行われた
|
||||
変更はすべて失われます。
|
||||
|
||||
一方で、新しく追加されたファイルは、既に存在するファイルの復旧を妨げません。
|
||||
新しく追加されたファイルが故障したディスク上にある場合にのみ、それらのファイルが失われます。
|
||||
そのため、SnapRAIDは主にデータの変更がほとんどない環境に適しています。
|
||||
|
||||
最後の同期時にすでに存在していたデータについて、復元の信頼性は `snapshot`(スナップショット)
|
||||
オプションが使用されているかどうかによって異なります。
|
||||
|
||||
* スナップショットサポートがある場合(Btrfs、ZFS、Bcachefs、およびNTFSで利用可能):
|
||||
SnapRAIDはサポートされている各データファイルシステムの独立した凍結されたリファレンスを
|
||||
自動的に維持できます。
|
||||
これにより、同期中または同期後にライブファイルシステム上のファイルを変更または削除した場合でも、
|
||||
復元プロセスの整合性と信頼性が保たれます。
|
||||
|
||||
* スナップショットサポートがない場合:
|
||||
`sync` 後にファイルを削除または変更すると、他の故障したディスクの完全な復元が妨げられる
|
||||
可能性があります。これは、変更されたファイルが故障したディスク上にない場合でも、
|
||||
パリティが変更後のファイルと一致しなくなるために発生します。一方で、新しく追加されたファイルが
|
||||
すでに存在するファイルの復元を妨げることはありません。
|
||||
|
||||
その他のSnapRAIDの制限は次のとおりです。
|
||||
|
||||
|
|
@ -74,7 +85,7 @@ Limitations
|
|||
* **ファイル名、タイムスタンプ、シンボリックリンク、およびハードリンク**のみが保存されます。
|
||||
アクセス許可、所有権、および拡張属性は保存されません。
|
||||
|
||||
Getting Started
|
||||
はじめに (Getting Started)
|
||||
SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを `parity` 情報専用に
|
||||
選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から
|
||||
復旧できます。
|
||||
|
|
@ -148,7 +159,7 @@ Getting Started
|
|||
これで、アレイを自由に使い始め、定期的に `sync` コマンドを実行してパリティ情報を
|
||||
更新できます。
|
||||
|
||||
Scrubbing
|
||||
スクラブ (Scrubbing)
|
||||
データとパリティのエラーを定期的にチェックするには、`scrub` コマンドを
|
||||
実行できます。
|
||||
|
||||
|
|
@ -187,10 +198,10 @@ Getting Started
|
|||
引き起こされたエラーが報告される場合があります。これらのエラーは `scrub` の
|
||||
出力で報告されますが、関連するブロックは不良としてマークされません。
|
||||
|
||||
Pooling
|
||||
プーリング (Pooling)
|
||||
注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。
|
||||
mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。
|
||||
Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
Mergerfs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の
|
||||
ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと
|
||||
うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで
|
||||
|
|
@ -259,7 +270,7 @@ Getting Started
|
|||
|
||||
:fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
Undeleting
|
||||
削除取り消し (Undeleting)
|
||||
SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、
|
||||
-f, --filter オプションを使用してファイルを以前の状態に復元または削除解除するために
|
||||
使用できます。
|
||||
|
|
@ -280,12 +291,13 @@ Getting Started
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recovering
|
||||
回復 (Recovering)
|
||||
最悪の事態が発生し、1台以上のディスクを失いました!
|
||||
|
||||
**パニックにならないでください!** 復旧できます!
|
||||
|
||||
最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。
|
||||
何よりもまず、ディスクアレイへの**変更を一切行わないでください**。
|
||||
残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。
|
||||
リモート接続、およびスケジュールされたSnapRAIDの夜間 `sync` や `scrub` を含む、
|
||||
すべてのスケジュールされたプロセスを無効にしてください。
|
||||
|
||||
|
|
@ -363,16 +375,16 @@ Getting Started
|
|||
|
||||
すべてが復旧されていれば、このコマンドは即座に完了します。
|
||||
|
||||
Commands
|
||||
SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。
|
||||
コマンド (Commands)
|
||||
SnapRAIDは、以下の操作を行ういくつかのシンプルなコマンドを提供します。
|
||||
|
||||
* アレイの状態の概要を出力 -> `status`
|
||||
* ディスクの制御 -> `smart`、`probe`、`up`、`down`
|
||||
* バックアップ/スナップショットの作成 -> `sync`
|
||||
* データの定期的なチェック -> `scrub`
|
||||
* 最後のバックアップ/スナップショットの復元 -> `fix`。
|
||||
* アレイの状態を表示する -> `status`
|
||||
* ディスクを制御する -> `smart`、`probe`、`up`、`down`
|
||||
* バックアップ/復元ポイントを作成する -> `sync`
|
||||
* データを定期的にチェックする -> `scrub`
|
||||
* 最後のバックアップ/復元ポイントを復元する -> `fix`
|
||||
|
||||
コマンドは**小文字**で記述する必要があります。
|
||||
コマンドは小文字で入力する必要があります。
|
||||
|
||||
status
|
||||
ディスクアレイの状態の概要を出力します。
|
||||
|
|
@ -475,23 +487,22 @@ Commands
|
|||
removed - 削除されたファイル。
|
||||
updated - サイズまたはタイムスタンプが異なるファイル。これは、
|
||||
変更されたことを意味します。
|
||||
moved - 同じディスク上の異なるディレクトリに移動されたファイル。
|
||||
同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが
|
||||
異なることで識別されます。
|
||||
moved - 同じinodeを保持したまま、同じディスク上で移動または
|
||||
名前変更されたファイル。同じinode、サイズ、およびタイムスタンプを
|
||||
持ちますが、パスが異なることで識別されます。ファイル名が異なって
|
||||
いても構いません。
|
||||
copied - 元のファイルがまだ存在する、同じディスクまたは別の
|
||||
ディスクにコピーされたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つこと
|
||||
によって識別されます。
|
||||
サブ秒のタイムスタンプがゼロの場合、名前だけでなくフルパス
|
||||
が一致する必要があります。
|
||||
relocated - オリジナルが消失した、同じディスクまたは別のディ
|
||||
スクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つこと
|
||||
によって識別されます。
|
||||
サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが
|
||||
一致する必要があります。
|
||||
同じディスク上の 'moved' ファイルとは異なり、再配置された
|
||||
ファイルは異なる inode を持ちます。
|
||||
relocated - 元のファイルが消失し、inodeが保持されていない、
|
||||
別のディレクトリまたはディスクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つことに
|
||||
よって識別されます。サブ秒のタイムスタンプがゼロの場合、
|
||||
識別するにはフルパスが一致する必要があります。'moved' ファイルとは
|
||||
異なり、再配置されたファイルはファイル名が同一である必要があります。
|
||||
restored - inode は異なるが、ディレクトリ、名前、サイズ、お
|
||||
よびタイムスタンプが一致するファイル。
|
||||
これらは通常、削除された後に復元されたファイルです。
|
||||
|
|
@ -567,14 +578,14 @@ Commands
|
|||
アレイ内のファイルは**変更されません**。
|
||||
|
||||
fix
|
||||
すべてのファイルとパリティデータを修正します。
|
||||
すべてのファイルとパリティデータを修復(復元)します。
|
||||
|
||||
すべてのファイルとパリティデータは、最後の `sync` で保存されたスナップショット状態と
|
||||
比較されます。
|
||||
違いが見つかった場合、保存されたスナップショットに**元に戻されます**。
|
||||
すべてのファイルとパリティデータが、最後の `sync` で保存された状態と比較されます。
|
||||
差異が見つかった場合、保存されていた状態に巻き戻されます。
|
||||
|
||||
**警告!** `fix` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの_状態を_最後の `sync` に**無条件に元に戻します**。
|
||||
警告!
|
||||
`fix` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの変更状態を無条件で最後の `sync` の状態に戻します。
|
||||
|
||||
他のオプションが指定されていない場合、アレイ全体が処理されます。
|
||||
フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを
|
||||
|
|
@ -702,7 +713,7 @@ Commands
|
|||
再配置プロセス中、これらのファイルはパリティによって保護されないことに
|
||||
注意してください。
|
||||
|
||||
Options
|
||||
オプション (Options)
|
||||
SnapRAIDには、次のオプションがあります。
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -805,7 +816,7 @@ Options
|
|||
1秒あたりのバイト数です。K、M、Gなどの乗数を指定できます
|
||||
(例:--bw-limit 1G)。
|
||||
|
||||
-t, --tail サイズ
|
||||
-t, --tail SIZE
|
||||
ファイルリストを、パリティディスクの指定された末尾サイズ以下を
|
||||
使用しているものに制限します。
|
||||
K、M、G、T などの倍数を使用できます(例:--tail 1G)。
|
||||
|
|
@ -890,7 +901,7 @@ Options
|
|||
お勧めします。
|
||||
`sync` 操作中にデータ保護はありません。
|
||||
|
||||
-W, --force-realloc-tail サイズ
|
||||
-W, --force-realloc-tail SIZE
|
||||
-R, --force-realloc と同様に動作しますが、各パリティファイルの
|
||||
指定された末尾部分(最後の「サイズ」バイト)に制限されます。
|
||||
現在その末尾セクションに保存されているファイルフラグメント/ブロックの
|
||||
|
|
@ -938,11 +949,13 @@ Options
|
|||
指定されたブロック番号から処理を開始します。
|
||||
これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに
|
||||
役立ちます。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、`check` と `fix` でのみ
|
||||
サポートされています。
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
指定された数のブロックのみを処理します。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、`check` と `fix` でのみ
|
||||
サポートされています。
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
既存のコンテンツファイルからダミーの構成ファイルを生成します。
|
||||
|
|
@ -968,7 +981,7 @@ Options
|
|||
-V, --version
|
||||
プログラムのバージョンを出力します。
|
||||
|
||||
Configuration
|
||||
設定 (Configuration)
|
||||
SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを
|
||||
必要とします。
|
||||
|
||||
|
|
@ -1052,6 +1065,11 @@ Configuration
|
|||
|
||||
NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。
|
||||
|
||||
ただし、設定されたパスは常に同じ基礎データに解決される必要があります。
|
||||
パスにシンボリックリンクが含まれている場合、そのリンク先は固定されている
|
||||
必要があります。シンボリックリンクの参照先を変更して実行時にデータ
|
||||
ディレクトリを切り替えることはサポートされていません。
|
||||
|
||||
アレイ内のデータディスクごとに1つのオプションを使用する必要があります。
|
||||
|
||||
構成ファイルで直接 NAME を変更してから `sync` コマンドを実行することで、
|
||||
|
|
@ -1068,6 +1086,28 @@ Configuration
|
|||
これらのディスクは常に回転していることが期待されるため、`up` およ
|
||||
び `down` コマンドの影響を受けないことに注意してください。
|
||||
|
||||
snapshot
|
||||
`sync`、`scrub`、`check`、および `fix` コマンドでファイルシステムスナップショットの
|
||||
使用を有効にします。
|
||||
|
||||
有効にすると、SnapRAIDは `sync` の開始時にサポートされている各データファイルシステムの
|
||||
読み取り専用スナップショットを作成します。これにより各ファイルシステムの安定したビューが
|
||||
提供され、後からの変更によってパリティ計算に使用されるデータが変わるのを防ぎます。
|
||||
|
||||
これにより復元が大幅に向上します。ライブファイルシステムからファイルが削除されても、
|
||||
スナップショット内に保存され続けます。これにより、そのブロックのパリティが「破損」するのを防ぎ、
|
||||
別のディスクが故障した場合でもデータを正常に復元できるようになります。
|
||||
|
||||
このオプションは、LinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでフォーマットされた
|
||||
データディスクにのみ適用されます。
|
||||
パリティディスク、または他のファイルシステムを使用しているデータディスクは、常にファイルシステムの
|
||||
ライブバージョンを使用します。
|
||||
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
このオプションが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
|
||||
スナップショットのライフサイクルの詳細な説明については、SNAPSHOTSのセクションを参照してください。
|
||||
|
||||
nohidden
|
||||
すべての隠しファイルとディレクトリを除外します。
|
||||
Unixでは、隠しファイルは `.` で始まるファイルです。
|
||||
|
|
@ -1082,6 +1122,10 @@ Configuration
|
|||
パターンが一致しない場合、最後に指定されたパターンが `include` の場合はファイルは除外され、
|
||||
`exclude` の場合は含まれます。
|
||||
|
||||
フィルタリングはディレクトリの走査時に階層的に実行されることに注意してください。
|
||||
ディレクトリが `exclude` ルールに一致した場合、そのディレクトリ全体がスキップ(プルーニング)され、
|
||||
その内部にあるファイルやサブディレクトリに対する `include` ルールは評価されません。
|
||||
|
||||
パターン仕様の詳細については、PATTERNセクションを参照してください。
|
||||
|
||||
このオプションは複数回使用できます。
|
||||
|
|
@ -1140,25 +1184,25 @@ Configuration
|
|||
経験則として、SnapRAIDは通常、アレイ内のデータ16 TBごとに1 GiBのRAMを必要とします。
|
||||
|
||||
具体的には、データのハッシュを保存するために、SnapRAIDは
|
||||
約 $TS \cdot (1 + HS) / BS$ バイトのRAMを必要とします。
|
||||
約 TS*(1+HS)/BS バイトのRAMを必要とします。
|
||||
ここで、TSはディスクアレイの合計サイズ(バイト)、BSはブロックサイズ(バイト)、HSはハッシュサイズ(バイト)です。
|
||||
|
||||
たとえば、4 TBのディスク8台、ブロックサイズ256 KiB(1 KiB = 1024バイト)、
|
||||
ハッシュサイズ16の場合:
|
||||
|
||||
:RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (256 \cdot 2^{10}) = 1.93 \text{ GiB}$
|
||||
:RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
|
||||
|
||||
ハッシュサイズを8に切り替えると:
|
||||
|
||||
:RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (256 \cdot 2^{10}) = 1.02 \text{ GiB}$
|
||||
:RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
|
||||
|
||||
ブロックサイズを512に切り替えると:
|
||||
|
||||
:RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (512 \cdot 2^{10}) = 0.96 \text{ GiB}$
|
||||
:RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
|
||||
|
||||
ハッシュサイズを8、ブロックサイズを512の両方に切り替えると:
|
||||
|
||||
:RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (512 \cdot 2^{10}) = 0.51 \text{ GiB}$
|
||||
:RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
|
||||
|
||||
autosave SIZE_IN_GIGABYTES
|
||||
処理された指定されたGB量後に、同期またはスクラビング時に状態を自動的に保存します。
|
||||
|
|
@ -1228,6 +1272,9 @@ Configuration
|
|||
RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、
|
||||
`%s` を使用する必要はないかもしれません。
|
||||
|
||||
デフォルトの `-a` オプションを置き換えるために、`[info: ...]` タグを使用して
|
||||
カスタム情報オプション文字列を指定することもできます。
|
||||
|
||||
使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。
|
||||
|
||||
:https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1235,6 +1282,7 @@ Configuration
|
|||
|
||||
例:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1247,15 +1295,21 @@ Configuration
|
|||
`4-parity`、`5-parity`、`6-parity`、または `z-parity`。
|
||||
特殊な値 `*` は、すべてのディスクで属性を無視するために使用できます。
|
||||
|
||||
例として、すべてのディスクで `Current Pending Sector Count` 属性を無視するには:
|
||||
複数の属性をスペースで区切って指定できます。
|
||||
各属性は1から255までの数値、または大文字と小文字を区别しない名前
|
||||
(例: `Current_Pending_Sector`)として指定できます。
|
||||
|
||||
:smartignore * 197
|
||||
例として、すべてのディスクで `Current Pending Sector Count` と
|
||||
`Reallocated Sectors Count` 属性を番号または名前で無視するには:
|
||||
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
最初のパリティディスクでのみ無視するには:
|
||||
|
||||
:smartignore parity 197
|
||||
:smartignore parity 197 5
|
||||
|
||||
Examples
|
||||
例 (Examples)
|
||||
Unixの一般的な構成の例は次のとおりです。
|
||||
|
||||
:parity /mnt/diskp/snapraid.parity
|
||||
|
|
@ -1266,7 +1320,7 @@ Configuration
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1282,12 +1336,136 @@ Configuration
|
|||
:exclude Thumbs.db
|
||||
:exclude \$RECYCLE.BIN
|
||||
:exclude \System Volume Information
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Pattern
|
||||
スナップショット (Snapshots)
|
||||
設定でスナップショットオプションが有効になっている場合、SnapRAIDは
|
||||
ファイルシステムのスナップショットを使用して、操作中に読み取られるデータを安定に保ちます。
|
||||
これは、ライブファイルシステム上のファイルが後から変更または削除された場合でも同様です。
|
||||
|
||||
スナップショットの管理は完全に自動かつ透過的です。
|
||||
バックグラウンドで完全に処理されるスナップショットによる追加の保護を受けながら、
|
||||
これまでとまったく同じようにSnapRAIDを使用し続けることができます。
|
||||
|
||||
これには主に2つのメリットがあります。
|
||||
|
||||
整合性 - 長時間かかるsyncやscrubの実行中にライブファイルシステム上でファイルが変更されても、
|
||||
スナップショットされた各ファイルシステムは操作中変更されないため、
|
||||
パリティの不一致や処理の中断は発生しません。
|
||||
復元 - ライブファイルシステムからファイルが更新または削除されても、スナップショット内に保存され続けます。
|
||||
次のsyncが実行される前にディスク故障が発生した場合、SnapRAIDはスナップショットに保存されている
|
||||
データを使用して、故障したディスクを再構築します。
|
||||
|
||||
アクティブなsync処理中にディスクが故障した場合、SnapRAIDは前のパリティ計算の
|
||||
スナップショットと現在のスナップショットの両方から自動的に読み取ることも可能です。
|
||||
これにより、同期の間にブロックが変更または削除されていた場合でも、パリティ方程式を解くために
|
||||
必要な正確なデータブロックへのアクセスが提供され、完全な復元の可能性が最大化されます。
|
||||
|
||||
スナップショットがない場合、正常なディスク上の更新または削除されたファイルはデータブロックの欠損を
|
||||
招き、他の故障したディスクを修復するために必要となるブロックが失われる可能性があります。
|
||||
|
||||
スナップショットはデータディスクに対してのみ、かつ基礎となるファイルシステムがその機能をサポートして
|
||||
いる場合にのみ作成されます。パリティディスクは常にライブファイルシステムを使用します。
|
||||
|
||||
現在、これはLinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでサポートされています。
|
||||
|
||||
異なるファイルシステムを持つデータディスクを混在させることができます。スナップショットをサポートして
|
||||
いるディスクのみがそれを利用し、他のディスクはライブファイルシステム上で直接動作し続けます。
|
||||
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
スナップショットが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
|
||||
スナップショット使用時のコマンドの挙動 (Command Behavior with Snapshots)
|
||||
`sync` および `scrub` コマンドは、ファイルシステムがサポートしているデータディスクに対して
|
||||
スナップショットを使用します。スナップショットされたディスクでは、コマンドはライブファイルシステムへの
|
||||
同時変更の影響を受けない安定したファイルシステムイメージを参照します。
|
||||
`sync` の実行中、サポートされている各データファイルシステムに対して独立して新しいスナップショットが
|
||||
作成されます。これらのスナップショットは全体としてパリティ計算に使用されるデータを提供します。
|
||||
対照的に、`scrub` コマンドは、既存のパリティと一致する信頼できる参照ポイントを維持するために、
|
||||
最も直近の同期中に作成された最後のスナップショットを利用します。
|
||||
|
||||
`check` および `fix` コマンドの場合、最後のスナップショットの使用は、
|
||||
-d, --filter-disk オプションを使用して特定のディスクがターゲットに指定されているかどうかによって異なります。
|
||||
|
||||
-d を介して明示的に選択されたディスク(操作の「ターゲット」)は、常にライブファイルシステムを使用します。
|
||||
`fix` の場合、これによりアクティブな交換ディスクにデータを復元できます。
|
||||
`check` の場合、同じ条件下で `fix` 操作をシミュレートできます。
|
||||
|
||||
他のすべてのデータディスク(「参照」ディスク)は、それぞれのスナップショットを介してアクセスされます。
|
||||
これにより、復旧の進行中に正常なディスク上のファイルを変更している場合でも、SnapRAIDは
|
||||
パリティ方程式を解くための安定した凍結された参照を持つことができます。
|
||||
|
||||
-d オプションが指定されていない場合、SnapRAIDは操作がアレイ全体に適用されると想定します。
|
||||
この場合、`check` と `fix` はライブファイルシステムのみを排他的に使用します。
|
||||
|
||||
他のすべてのコマンドは、ライブファイルシステム上でのみ動作します。
|
||||
|
||||
スナップショットのライフサイクル (Snapshots Lifecycle)
|
||||
SnapRAIDは、各データサブボリュームのルートにある隠しディレクトリ内で、
|
||||
`stable`(安定)、`pending`(保留)、および `scan`(スキャン)という3つの特定のスナップショットを管理します。
|
||||
Btrfs、Bcachefs、およびNTFSでは `.snapraid/` ディレクトリが使用され、
|
||||
ZFSでは標準の `.zfs/snapshot/` が使用されます。
|
||||
|
||||
`stable` スナップショットは、最後に正常に完了した `sync` の状態を表し、
|
||||
現在のパリティの計算に使用された正確なデータを含んでいます。これは、
|
||||
`scrub`、`check`、および `fix` コマンドの主要なデータソースとして機能します。
|
||||
|
||||
`scan` スナップショットは、スキャンとパリティ計算のための凍結された状態を提供するために、
|
||||
`sync` の開始時に作成される一時的なイメージです。
|
||||
スキャンを実行し、新しいコンテンツ状態を保存した後、以前の `pending` スナップショットを置き換えます。
|
||||
|
||||
`pending` スナップショットは、中断された `sync` によって使用されるイメージです。
|
||||
操作が正常に完了すると、以前の `stable` スナップショットが削除され、
|
||||
`pending` スナップショットが新しい安定した参照として昇格します。
|
||||
|
||||
`sync` が中断された場合、`pending` スナップショットは保持されます。
|
||||
パリティが部分的にしか同期されていない場合でも、.content ファイルに記録されたファイルシステム状態と
|
||||
一致するため、その後の `scrub`、`check`、および `fix` コマンドはこの保留中のスナップショットを使用します。
|
||||
|
||||
`sync` が中断された場合、`check` および `fix` コマンドは `stable` スナップショットからも
|
||||
読み取りを行い、同期中に更新または削除されたファイルからデータブロックを取得します。
|
||||
これは、.content ファイルが同期プロセス全体を通じて、変更または削除されたすべてのファイルの
|
||||
メタデータを保持しているために可能です。
|
||||
この履歴情報は、syncが正常に終了し、.content ファイルの最終バージョンが保存されたときにのみクリアされます。
|
||||
|
||||
中断後に `sync` が再開されると、既存の保留中(pending)のスナップショットは削除され、
|
||||
ライブファイルシステムの現在の状態をキャプチャするために新しいスナップショットが作成されます。
|
||||
ただし、`sync` が中断された場合は、その後の `sync` が正常に完了するまで、
|
||||
ファイルの変更、削除、置換、または移動を行わないでください。
|
||||
パリティには、中断された sync で使用されたスナップショットから計算されたブロックが
|
||||
まだ含まれている可能性があります。その後の sync によりそのスナップショットが
|
||||
置き換えられ、中間バージョンのファイルが復元できなくなる可能性があります。
|
||||
|
||||
ファイルシステムスナップショットと外部バックアップ (External backups with filesystem snapshots)
|
||||
ファイルシステムスナップショットが有効な場合、SnapRAIDは各データサブボリューム、
|
||||
ボリューム、またはデータセットのルートにあるスナップショットにアクセスまたは作成します。
|
||||
|
||||
外部ツールとの干渉を避ける簡単な方法は、`data` 設定をサブボリュームまたは
|
||||
ボリューム内の通常のサブディレクトリ(例えば `/mnt/subvol` の代わりに
|
||||
`/mnt/subvol/data`)に指定することです。SnapRAIDは常にサブボリュームのルートに
|
||||
スナップショットディレクトリを作成するため(例えば `/mnt/subvol/.snapraid/`)、
|
||||
データサブディレクトリがクリーンに保たれ、スナップショットはそのディレクトリ内で
|
||||
動作するバックアップツールから見えない状態のままになります。
|
||||
|
||||
一方、設定された `data` ディレクトリ自体がサブボリュームまたはボリュームの
|
||||
ルートである場合、SnapRAIDはその直下に `.snapraid/` ディレクトリを作成します(Btrfs、
|
||||
Bcachefs、およびNTFS)。SnapRAID自身のスキャンからは自動的に除外されますが、
|
||||
外部のバックアップツールやファイル同期ツールはそのディレクトリを検出します。
|
||||
除外設定を行わない場合、スナップショットやディレクトリリンク内を走査して凍結された
|
||||
データツリー全体をコピーしてしまい、データが重複してバックアップストレージを使い果たす
|
||||
可能性があります。外部バックアップツールでは、必ず `.snapraid/` ディレクトリを
|
||||
除外するように設定してください。
|
||||
|
||||
ZFSでは、スナップショットは `.snapraid/` ではなく標準の仮想ディレクトリ
|
||||
`.zfs/snapshot/` 経由で公開されます。デフォルト(`snapdir=hidden`)では、ZFSはこの
|
||||
ディレクトリを一覧表示から隠すため、外部バックアップツールが走査することはありません。
|
||||
`snapdir=visible` を有効にしている場合は、バックアップツールが `.zfs/` ディレクトリを
|
||||
除外するように設定してください。
|
||||
|
||||
パターン (Pattern)
|
||||
パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を
|
||||
提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、
|
||||
特定のファイル名やディレクトリ構造全体に一致するルールを定義できます。
|
||||
|
|
@ -1301,17 +1479,18 @@ Pattern
|
|||
単一のパスコンポーネント内での一致に適しています。これは、シェルの
|
||||
グロブでおなじみの標準的なワイルドカードの動作です。
|
||||
|
||||
ダブルアスタリスク `**` はより強力で、ディレクトリ区切り文字を含む
|
||||
任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを
|
||||
またいで一致できるようになります。`**` がパターン内に直接埋め込まれている場合、
|
||||
周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。
|
||||
ダブルアスタリスクのワイルドカード `**` は、ディレクトリ区切り文字に隣接
|
||||
している場合(スラッシュの前または後にある場合)にのみ、ディレクトリ区切り
|
||||
文字をまたいで一致します。この形式では、複数のディレクトリレベルにわたって
|
||||
0個以上の文字に一致します。例えば、`foo/**/bar` は `foo/bar`、`foo/a/bar`、
|
||||
および `foo/a/b/bar` に一致し、`**/build` は `build` および `foo/bar/build` に
|
||||
一致し、`src/**.js` は `src/main.js` および `src/ui/components/main.js` に一致します。
|
||||
単独の形式 `/**/` は完全なパターンとして受け入れられません。
|
||||
|
||||
`**` の最も重要な使い方は、特別な形式である `/**/` です。これは
|
||||
0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、
|
||||
ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。
|
||||
例えば、パターン `src/**/main.js` は `src/main.js`(ディレクトリを0個スキップ)、
|
||||
`src/ui/main.js`(1個スキップ)、`src/ui/components/main.js`(2個スキップ)
|
||||
に一致します。
|
||||
`**` がスラッシュに隣接していない場合、`*` と同様に動作し、ディレクトリ区切り
|
||||
文字には一致しません。例えば、`**.jpg` はカレントディレクトリ内の `photo.jpg` に
|
||||
一致しますが、`dir/photo.jpg` には一致しません。その目的には `**/*.jpg` を
|
||||
使用してください。
|
||||
|
||||
角括弧 `[]` を使用した文字クラスは、指定されたセットまたは範囲の
|
||||
任意の1文字に一致します。他の単一文字パターンと同様に、
|
||||
|
|
@ -1320,7 +1499,8 @@ Pattern
|
|||
|
||||
覚えておくべき根本的な違いは、`*`、`?`、および文字クラスはすべて
|
||||
ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、
|
||||
`**` はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。
|
||||
`**` はスラッシュに隣接している場合にのみディレクトリ区切り文字を
|
||||
またいで一致できるということです。
|
||||
|
||||
4つの異なる種類のパターンがあります。
|
||||
|
||||
|
|
@ -1387,6 +1567,24 @@ Pattern
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
ディレクトリを除外すると(DIR/ または /PATH/DIR/ を使用)、SnapRAID がそのディレクトリに入って
|
||||
スキャンすることが防止されることに注意してください。したがって、除外された親ディレクトリ内に
|
||||
存在するファイルやサブディレクトリを `include` ルールで再度含めることはできません(スキャナが
|
||||
そのディレクトリ内を走査しないため)。
|
||||
|
||||
例えば、以下の設定では `/keep/` がプルーニングされるため、`file.dat` は含まれません:
|
||||
|
||||
:# 意図通りに動作しません: /keep/ は完全にスキップされます
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
特定のファイルを残しつつディレクトリ内のファイルを一括除外するには、ディレクトリ自体を除外するのではなく、
|
||||
ディレクトリ内のファイルパターンを除外してください:
|
||||
|
||||
:# 意図通りに動作します: /keep/ は走査され、内部の他のファイルのみが除外されます
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
コマンドラインで -f オプションを使用する場合、`include` パターンのみを
|
||||
使用できます。例:
|
||||
|
||||
|
|
@ -1397,9 +1595,9 @@ Pattern
|
|||
Unixでは、コマンドラインでグロブ文字を使用する場合、シェルがそれらを展開するのを
|
||||
防ぐために引用符で囲む必要があります。
|
||||
|
||||
Ignore File
|
||||
除外ファイル (Ignore File)
|
||||
設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに
|
||||
.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
`.snapraidignore` ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
|
||||
`.snapraidignore` で定義されたルールは、設定ファイルのルールの後に
|
||||
適用されます。これは、それらがより高い優先度を持ち、グローバル設定で
|
||||
|
|
@ -1438,16 +1636,19 @@ Ignore File
|
|||
:# projects/ またはそのサブフォルダ内のすべての .tmp ファイルを除外
|
||||
:*.tmp
|
||||
|
||||
Content
|
||||
コンテンツ (Content)
|
||||
SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。
|
||||
|
||||
これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、
|
||||
それらの整合性を検証するためのすべてのチェックサムを一覧表示します。
|
||||
|
||||
このファイルは `sync` および `scrub` コマンドによって読み書きされ、
|
||||
`fix`、`check`、および `status` コマンドによって読み取られます。
|
||||
コンテンツファイルは `sync`、`scrub`、`touch`、および `rehash`
|
||||
コマンドによって読み書きされます。`status`、`diff`、`check`、
|
||||
`fix`、`list`、`dup`、`locate`、および `pool` コマンドによって読み取られ、
|
||||
`smart`、`probe`、`up`、`down`、および `devices` コマンドによって
|
||||
完全に無視されます。
|
||||
|
||||
Parity
|
||||
パリティ (Parity)
|
||||
SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。
|
||||
|
||||
これらはバイナリファイルであり、`content` ファイルで定義されたすべてのブロックの
|
||||
|
|
@ -1456,7 +1657,7 @@ Parity
|
|||
これらのファイルは `sync` および `fix` コマンドによって読み書きされ、
|
||||
`scrub` および `check` コマンドによって**読み取られるだけ**です。
|
||||
|
||||
Encoding
|
||||
エンコーディング (Encoding)
|
||||
UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている
|
||||
のと同じエンコーディングでファイル名を読み取り、保存します。
|
||||
|
||||
|
|
@ -1464,12 +1665,181 @@ Encoding
|
|||
処理されます。
|
||||
|
||||
ファイル名を正しく出力するには、`chcp 65001` コマンドでWindowsコンソールをUTF-8モードに設定し、
|
||||
コンソールフォントとして `Lucida Console` などのTrueTypeフォントを**使用する**必要があります。
|
||||
コンソールフォントとして `Lucida Console` などのTrueTypeフォントを使用する必要があります。
|
||||
これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、
|
||||
結果のファイルは常にUTF-8形式になります。
|
||||
|
||||
Copyright
|
||||
This file is Copyright (C) 2025 Andrea Mazzoleni
|
||||
終了コード (Exit Code)
|
||||
SnapRAIDは以下のエラーコードで終了します:
|
||||
|
||||
See Also
|
||||
snapraid_log(1), snapraidd(1)
|
||||
0 - すべて正常。
|
||||
1 - コマンドでエラーが発生しました。
|
||||
2 - `diff` コマンドはすべて正常であると判定しましたが、 `sync` が必要です。
|
||||
3 - ディスクデバイスコマンド(`probe`、`smart`、`devices`、`up`、`down`)は完了しましたが、
|
||||
少なくとも1つのファイルシステムがデバイス不足のためデグレード(縮退)モードで動作しています。
|
||||
|
||||
既知の問題 (Known Issues)
|
||||
ファイルシステムの境界
|
||||
SnapRAIDは、データディスクのスキャン中にファイルシステム、マウントポイント、
|
||||
またはサブボリュームの境界を越えません。そのような境界が検出された場合、
|
||||
SnapRAIDは警告(WARNING)を報告し、その先をスキャンしません。
|
||||
|
||||
そのような境界の先にあるファイルはデータディスクに含まれないため、保護する
|
||||
必要がある場合は個別に設定する必要があります。
|
||||
|
||||
ファイルシステムスナップショット使用時のマウントポイント
|
||||
ファイルシステムスナップショットが有効になっている場合、データディスク内の
|
||||
ネストされたマウントポイントおよびバインドマウントはサポートされません。
|
||||
|
||||
マウントポイントは稼働中システムのマウント名前空間の一部であり、ファイルシステムの
|
||||
スナップショットには保持されません。その結果、スナップショットをスキャンする際、
|
||||
稼働中ファイルシステムでマウントポイントによって隠されていたディレクトリが
|
||||
見えるようになる場合があります。
|
||||
|
||||
ファイルシステムスナップショットが有効な場合は、データディスク内にネストされた
|
||||
マウントポイントやバインドマウントを配置しないでください。
|
||||
|
||||
ファイルシステムスナップショット使用時の複数設定
|
||||
同じファイルシステムのスナップショット名前空間を使用する複数の独立した
|
||||
SnapRAID設定で、スナップショットサポートを安全に共有することはできません。
|
||||
|
||||
BtrfsおよびBcachefsでは、スナップショットサポートが有効なSnapRAID設定は、
|
||||
同一サブボリューム内のデータディレクトリを1つしか使用できません。ZFSでは
|
||||
同じ制限がデータセットに、NTFSではボリュームに適用されます。
|
||||
|
||||
同じスナップショット名前空間を共有する複数の設定は、同一の `stable`、
|
||||
`pending`、および `scan` スナップショットを使用します。そのため、一方の設定を
|
||||
実行すると、もう一方の設定で必要なリカバリスナップショットが置換または
|
||||
削除される可能性があります。
|
||||
|
||||
タイムスタンプの変更を伴わないインプレースファイル変更
|
||||
SnapRAIDは、ファイルサイズと変更タイムスタンプ(mtime)を比較することによって
|
||||
ファイルの変更を検出します。
|
||||
|
||||
アプリケーションがファイルサイズを変更せず、変更タイムスタンプも更新せずに
|
||||
インプレースでファイルを変更した場合、"diff" および "sync" はファイルが
|
||||
変更されたことを検出できず、そのパリティは更新されません。
|
||||
|
||||
SnapRAIDにそのような変更を確実に認識させるには、ファイルの変更タイムスタンプ
|
||||
を更新してください(たとえば、"touch" ユーティリティなどを使用)。そうしない
|
||||
場合、その差分は後続の "scrub" または "check" 中のハッシュ不一致としてのみ
|
||||
検出されます。
|
||||
|
||||
Windowsにおける非ASCII文字の大文字・小文字の一致
|
||||
SnapRAIDはすべてのプラットフォームで標準的で予測可能なUTF-8エンコーディング
|
||||
を使用し、大文字・小文字を区別しないマッチングをASCII文字に限定しています。
|
||||
|
||||
Windowsファイルシステムは、任意のシステム依存のフォールディングテーブルを介して
|
||||
Unicodeファイル名全体で大文字・小文字の不区別を強制するというレガシーな設計の
|
||||
影響を受けています。その結果、Windowsは全く異なるUnicodeバイトシーケンスをあたかも
|
||||
同じファイルであるかのように扱い、ファイルシステムの実態を覆い隠してしまいます。
|
||||
|
||||
たとえば、`À.txt` と `à.txt` は明確に異なるUnicode名ですが、Windowsは非論理的にも
|
||||
これらを同一として扱い、SnapRAIDはそれらの本来の区別を維持します。
|
||||
|
||||
この制限は、WindowsによるUnicodeファイル名の非一貫な処理と、大文字・小文字を区別
|
||||
しないエイリアスへの固執によって引き起こされます。Windowsの大文字・小文字フォール
|
||||
ディングに起因する不一致を防ぐため、設定パスおよびフィルター内の非ASCII文字には
|
||||
常に正確な大文字・小文字を指定してください。
|
||||
|
||||
部分的な fix による回復
|
||||
`fix` を `-S, --start` または `-B, --count` で制限した場合、
|
||||
SnapRAID は選択されたブロックのみを処理し、ファイルレベルの完了処理や
|
||||
隔離を行いません。
|
||||
|
||||
回復によって現在の内容を表していると証明できないベストエフォートのデータが
|
||||
生成された場合でも、それらのブロックは通常のファイル名で書き込まれる
|
||||
可能性があります。これらの回復されたブロックに関連する不確実性は、コマンドの
|
||||
終了後には保持されません。
|
||||
|
||||
その結果、後続の `fix` はこれらの読み取り可能なブロックを有効なファイルデータ
|
||||
として扱い、再度の回復を試みません。これにより、ファイル内に不完全または
|
||||
古いデータが残っているにもかかわらず、後続の回復が成功と報告される場合が
|
||||
あります。
|
||||
|
||||
`-S` および `-B` オプションは、通常の `fix` が失敗した後の高度な手動回復
|
||||
のみを目的としています。部分的な `fix` で回復不能なデータが報告された場合は、
|
||||
別の回復を試みる前に対象のファイルを削除または名前変更するか、その内容を手動で
|
||||
確認してください。
|
||||
|
||||
NTFS ハードリンクと除外されたパス
|
||||
NTFS では、ディレクトリエントリが各ハードリンクのファイルサイズとタイム
|
||||
スタンプを個別にキャッシュします。ファイルがいずれか1つのリンクを通じて
|
||||
変更された場合、同じファイルを参照している他のリンクのディレクトリエントリ
|
||||
は、それらにアクセスされるまで古いメタデータを保持し続けることがあります。
|
||||
|
||||
SnapRAID は、スキャン中に同じファイルへのハードリンクが2つ以上見つかった
|
||||
場合、この状態を自動的に検出して正規化します。しかし、他のリンクがフィルタ
|
||||
によって除外されているか、またはデータディスクのパスの外部にあるために
|
||||
1つのハードリンクのみがスキャンされた場合、SnapRAID は inode の衝突を検出
|
||||
できず、単一の見えているリンクのキャッシュされたメタデータに依存します。
|
||||
|
||||
その結果、除外されたリンクや外部のハードリンクを通じて加えられた変更は、
|
||||
対象のファイルがアクセスされたりそのパスを通じて開かれたりして OS により
|
||||
含まれるリンクのメタデータが更新されるまで、SnapRAID に気付かれない可能性
|
||||
があります。
|
||||
|
||||
この制限を回避するには、SnapRAID から除外されているハードリンクを通じて
|
||||
保護対象のファイルを変更しないようにするか、SnapRAID が正常に正規化
|
||||
できるように、ファイルへのすべてのハードリンクがスキャンに含まれるように
|
||||
してください。
|
||||
|
||||
中断されたマルチパリティ sync 後の回復
|
||||
複数のパリティディスクを持つアレイにおいて、`sync` が中断されると、
|
||||
異なるパリティレベル間で更新状態が一時的に不一致になることがあります。
|
||||
たとえば、パリティ 1 にはすでに新しく更新されたデータが含まれている一方、
|
||||
パリティ 2 にはまだ古いデータが残っているといった状況です。
|
||||
|
||||
`check` または `fix` の実行中、SnapRAID はさまざまなパリティの組み合わせを
|
||||
試し、既知のブロックハッシュ(ブロック全体、通常 256 KiB をカバー)に
|
||||
対して再構築されたデータを検証します。
|
||||
|
||||
SnapRAID が新旧のパリティが混在する不整合な組み合わせを使用して再構築を
|
||||
試みた場合、線形 RAID 方程式は誤ったデータを生成します。このような無効な
|
||||
組み合わせが誤って受け入れられるには、同じストライプ内の他の非同期ブロックが
|
||||
不正なデータで再構築されているにもかかわらず、方程式が偶然にも少なくとも
|
||||
1つの完全な 256 KiB ブロックを完璧に再構築してハッシュを一致させる必要が
|
||||
あります。
|
||||
|
||||
この事態はハッシュの衝突によるものではありません。むしろ、混在した
|
||||
パリティ方程式自体が偶然にも元の正確な 256 KiB ブロック内容を生成する
|
||||
必要があります。これは特別に作成されたデータや極めて反復的なデータでは
|
||||
数学的に考えられますが、実際のデータでは事実上不可能です。
|
||||
|
||||
すべてのディスクが正常な場合は、それ以上の変更を加える前に中断された `sync`
|
||||
を完了させることで、この不確実性を排除できます。ディスクに障害が発生して
|
||||
回復が必要な場合は、`check` または `fix` を実行する前にデータディスクを
|
||||
変更しないようにしてください。
|
||||
|
||||
予約済みのファイル名およびディレクトリ名
|
||||
SnapRAID は内部処理のために一部のファイル名、ディレクトリ名、
|
||||
スナップショット名を予約しています。これらの名前をユーザーデータに
|
||||
使用しないでください:
|
||||
|
||||
.snapraidignore - ローカル除外ルールファイル。
|
||||
.snapraid - スナップショットコンテナディレクトリ。
|
||||
snapraid-* - SnapRAID が管理する ZFS スナップショット名。
|
||||
*.unrecoverable - 回復中に隔離された破損ファイル。
|
||||
CONTENT.tmp - content 更新用の一時ファイル。
|
||||
CONTENT.lock - content ロックファイル。
|
||||
PARITY.spaceholder - Windows でのパリティ割り当て時の一時的な
|
||||
プレースホルダーファイル。
|
||||
|
||||
これらの名前を無関係なデータに使用すると、ファイルやスナップショットが
|
||||
無視されたり、メタデータとして誤認されたり、上書き、名前変更、または
|
||||
削除されたりする可能性があります。
|
||||
|
||||
Windows では、大文字と小文字を区別するように構成された NTFS
|
||||
ディレクトリであっても、すべての大文字・小文字のバリエーションが
|
||||
同様に予約されます(例: .SNAPRAIDIGNORE、.SnapRaid、CONTENT.TMP、
|
||||
CONTENT.Lock)。
|
||||
|
||||
翻訳 (Translation)
|
||||
この文書は英語版マニュアルの自動翻訳です。
|
||||
正確な記述については英語版マニュアルを参照してください。
|
||||
|
||||
著作権 (Copyright)
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
関連項目 (See Also)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
===========================
|
||||
|
||||
|
||||
1 SYNOPSIS
|
||||
==========
|
||||
1 概要 (SYNOPSIS)
|
||||
===============
|
||||
|
||||
snapraid [-c, --conf CONFIG]
|
||||
[-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
|
|
@ -28,8 +28,8 @@ snapraid [-c, --conf CONFIG]
|
|||
snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
|
||||
2 DESCRIPTION
|
||||
=============
|
||||
2 説明 (DESCRIPTION)
|
||||
==================
|
||||
|
||||
SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の
|
||||
データ復旧のためにパリティ情報を保存します。
|
||||
|
|
@ -55,21 +55,32 @@ SnapRAIDにはいくつかの機能があります。
|
|||
https://www.snapraid.it/
|
||||
|
||||
|
||||
3 LIMITATIONS
|
||||
=============
|
||||
3 制限事項 (LIMITATIONS)
|
||||
====================
|
||||
|
||||
SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。
|
||||
目指しています。ただし、使用する前に考慮すべきいくつかの制限事項があります。
|
||||
|
||||
主な制限は、ディスクが故障し、最近 `sync` を実行していない場合、完全に復旧できない
|
||||
可能性があることです。
|
||||
より具体的には、最後の `sync` 操作以降に変更または削除されたファイルのサイズまでのデータが
|
||||
復旧できない可能性があります。
|
||||
これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。
|
||||
このため、SnapRAIDは**めったに変更されない**データに適しています。
|
||||
主な制限事項は、ディスクが故障した場合、最後の `sync`(同期)処理の状態までしか
|
||||
データを復元できないことです。最後の同期以降に追加されたデータや、故障したディスク上で行われた
|
||||
変更はすべて失われます。
|
||||
|
||||
一方で、新しく追加されたファイルは、既に存在するファイルの復旧を妨げません。
|
||||
新しく追加されたファイルが故障したディスク上にある場合にのみ、それらのファイルが失われます。
|
||||
そのため、SnapRAIDは主にデータの変更がほとんどない環境に適しています。
|
||||
|
||||
最後の同期時にすでに存在していたデータについて、復元の信頼性は `snapshot`(スナップショット)
|
||||
オプションが使用されているかどうかによって異なります。
|
||||
|
||||
* スナップショットサポートがある場合(Btrfs、ZFS、Bcachefs、およびNTFSで利用可能):
|
||||
SnapRAIDはサポートされている各データファイルシステムの独立した凍結されたリファレンスを
|
||||
自動的に維持できます。
|
||||
これにより、同期中または同期後にライブファイルシステム上のファイルを変更または削除した場合でも、
|
||||
復元プロセスの整合性と信頼性が保たれます。
|
||||
|
||||
* スナップショットサポートがない場合:
|
||||
`sync` 後にファイルを削除または変更すると、他の故障したディスクの完全な復元が妨げられる
|
||||
可能性があります。これは、変更されたファイルが故障したディスク上にない場合でも、
|
||||
パリティが変更後のファイルと一致しなくなるために発生します。一方で、新しく追加されたファイルが
|
||||
すでに存在するファイルの復元を妨げることはありません。
|
||||
|
||||
その他のSnapRAIDの制限は次のとおりです。
|
||||
|
||||
|
|
@ -85,8 +96,8 @@ SnapRAIDはRAIDとバックアッププログラムのハイブリッドであ
|
|||
アクセス許可、所有権、および拡張属性は保存されません。
|
||||
|
||||
|
||||
4 GETTING STARTED
|
||||
=================
|
||||
4 はじめに (GETTING STARTED)
|
||||
========================
|
||||
|
||||
SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを `parity` 情報専用に
|
||||
選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から
|
||||
|
|
@ -161,8 +172,8 @@ Ctrl+Cを押すことでいつでも停止でき、次回の実行時には中
|
|||
これで、アレイを自由に使い始め、定期的に `sync` コマンドを実行してパリティ情報を
|
||||
更新できます。
|
||||
|
||||
4.1 Scrubbing
|
||||
-------------
|
||||
4.1 スクラブ (Scrubbing)
|
||||
--------------------
|
||||
|
||||
データとパリティのエラーを定期的にチェックするには、`scrub` コマンドを
|
||||
実行できます。
|
||||
|
|
@ -202,12 +213,12 @@ Ctrl+Cを押すことでいつでも停止でき、次回の実行時には中
|
|||
引き起こされたエラーが報告される場合があります。これらのエラーは `scrub` の
|
||||
出力で報告されますが、関連するブロックは不良としてマークされません。
|
||||
|
||||
4.2 Pooling
|
||||
-----------
|
||||
4.2 プーリング (Pooling)
|
||||
-------------------
|
||||
|
||||
注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。
|
||||
mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。
|
||||
Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
Mergerfs は、複数のドライブを単一の統合されたマウントポイントにプールするための、
|
||||
より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の
|
||||
ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと
|
||||
うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで
|
||||
|
|
@ -276,8 +287,8 @@ Windowsでは、ネットワーク経由でシンボリックリンクを共有
|
|||
|
||||
fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
4.3 Undeleting
|
||||
--------------
|
||||
4.3 削除取り消し (Undeleting)
|
||||
-----------------------
|
||||
|
||||
SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、
|
||||
-f, --filter オプションを使用してファイルを以前の状態に復元または削除解除するために
|
||||
|
|
@ -299,14 +310,15 @@ SnapRAIDはRAIDシステムよりもバックアッププログラムのよう
|
|||
|
||||
snapraid fix -m
|
||||
|
||||
4.4 Recovering
|
||||
--------------
|
||||
4.4 回復 (Recovering)
|
||||
-------------------
|
||||
|
||||
最悪の事態が発生し、1台以上のディスクを失いました!
|
||||
|
||||
**パニックにならないでください!** 復旧できます!
|
||||
|
||||
最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。
|
||||
何よりもまず、ディスクアレイへの**変更を一切行わないでください**。
|
||||
残りのディスク上のデータを変更または削除すると、復旧が不可能になる可能性があります。
|
||||
リモート接続、およびスケジュールされたSnapRAIDの夜間 `sync` や `scrub` を含む、
|
||||
すべてのスケジュールされたプロセスを無効にしてください。
|
||||
|
||||
|
|
@ -385,18 +397,18 @@ SnapRAIDの構成ファイルを変更して、故障したディスクの `data
|
|||
すべてが復旧されていれば、このコマンドは即座に完了します。
|
||||
|
||||
|
||||
5 COMMANDS
|
||||
==========
|
||||
5 コマンド (COMMANDS)
|
||||
=================
|
||||
|
||||
SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。
|
||||
SnapRAIDは、以下の操作を行ういくつかのシンプルなコマンドを提供します。
|
||||
|
||||
* アレイの状態の概要を出力 -> `status`
|
||||
* ディスクの制御 -> `smart`、`probe`、`up`、`down`
|
||||
* バックアップ/スナップショットの作成 -> `sync`
|
||||
* データの定期的なチェック -> `scrub`
|
||||
* 最後のバックアップ/スナップショットの復元 -> `fix`。
|
||||
* アレイの状態を表示する -> `status`
|
||||
* ディスクを制御する -> `smart`、`probe`、`up`、`down`
|
||||
* バックアップ/復元ポイントを作成する -> `sync`
|
||||
* データを定期的にチェックする -> `scrub`
|
||||
* 最後のバックアップ/復元ポイントを復元する -> `fix`
|
||||
|
||||
コマンドは**小文字**で記述する必要があります。
|
||||
コマンドは小文字で入力する必要があります。
|
||||
|
||||
5.1 status
|
||||
----------
|
||||
|
|
@ -511,23 +523,22 @@ SMARTがディスクが故障していると報告した場合、そのディス
|
|||
removed - 削除されたファイル。
|
||||
updated - サイズまたはタイムスタンプが異なるファイル。これは、
|
||||
変更されたことを意味します。
|
||||
moved - 同じディスク上の異なるディレクトリに移動されたファイル。
|
||||
同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが
|
||||
異なることで識別されます。
|
||||
moved - 同じinodeを保持したまま、同じディスク上で移動または
|
||||
名前変更されたファイル。同じinode、サイズ、およびタイムスタンプを
|
||||
持ちますが、パスが異なることで識別されます。ファイル名が異なって
|
||||
いても構いません。
|
||||
copied - 元のファイルがまだ存在する、同じディスクまたは別の
|
||||
ディスクにコピーされたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つこと
|
||||
によって識別されます。
|
||||
サブ秒のタイムスタンプがゼロの場合、名前だけでなくフルパス
|
||||
が一致する必要があります。
|
||||
relocated - オリジナルが消失した、同じディスクまたは別のディ
|
||||
スクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つこと
|
||||
によって識別されます。
|
||||
サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが
|
||||
一致する必要があります。
|
||||
同じディスク上の 'moved' ファイルとは異なり、再配置された
|
||||
ファイルは異なる inode を持ちます。
|
||||
relocated - 元のファイルが消失し、inodeが保持されていない、
|
||||
別のディレクトリまたはディスクに移動されたファイル。
|
||||
これらは、同じ名前、サイズ、およびタイムスタンプを持つことに
|
||||
よって識別されます。サブ秒のタイムスタンプがゼロの場合、
|
||||
識別するにはフルパスが一致する必要があります。'moved' ファイルとは
|
||||
異なり、再配置されたファイルはファイル名が同一である必要があります。
|
||||
restored - inode は異なるが、ディレクトリ、名前、サイズ、お
|
||||
よびタイムスタンプが一致するファイル。
|
||||
これらは通常、削除された後に復元されたファイルです。
|
||||
|
|
@ -609,14 +620,14 @@ full - すべてをスクラブします。
|
|||
5.9 fix
|
||||
-------
|
||||
|
||||
すべてのファイルとパリティデータを修正します。
|
||||
すべてのファイルとパリティデータを修復(復元)します。
|
||||
|
||||
すべてのファイルとパリティデータは、最後の `sync` で保存されたスナップショット状態と
|
||||
比較されます。
|
||||
違いが見つかった場合、保存されたスナップショットに**元に戻されます**。
|
||||
すべてのファイルとパリティデータが、最後の `sync` で保存された状態と比較されます。
|
||||
差異が見つかった場合、保存されていた状態に巻き戻されます。
|
||||
|
||||
**警告!** `fix` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの_状態を_最後の `sync` に**無条件に元に戻します**。
|
||||
警告!
|
||||
`fix` コマンドは、エラーと意図的な変更を区別しません。
|
||||
ファイルの変更状態を無条件で最後の `sync` の状態に戻します。
|
||||
|
||||
他のオプションが指定されていない場合、アレイ全体が処理されます。
|
||||
フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを
|
||||
|
|
@ -761,8 +772,8 @@ SnapRAIDが移動およびコピーされたファイルを認識する能力が
|
|||
注意してください。
|
||||
|
||||
|
||||
6 OPTIONS
|
||||
=========
|
||||
6 オプション (OPTIONS)
|
||||
=================
|
||||
|
||||
SnapRAIDには、次のオプションがあります。
|
||||
|
||||
|
|
@ -866,7 +877,7 @@ SnapRAIDには、次のオプションがあります。
|
|||
1秒あたりのバイト数です。K、M、Gなどの乗数を指定できます
|
||||
(例:--bw-limit 1G)。
|
||||
|
||||
-t, --tail サイズ
|
||||
-t, --tail SIZE
|
||||
ファイルリストを、パリティディスクの指定された末尾サイズ以下を
|
||||
使用しているものに制限します。
|
||||
K、M、G、T などの倍数を使用できます(例:--tail 1G)。
|
||||
|
|
@ -951,7 +962,7 @@ SnapRAIDには、次のオプションがあります。
|
|||
お勧めします。
|
||||
`sync` 操作中にデータ保護はありません。
|
||||
|
||||
-W, --force-realloc-tail サイズ
|
||||
-W, --force-realloc-tail SIZE
|
||||
-R, --force-realloc と同様に動作しますが、各パリティファイルの
|
||||
指定された末尾部分(最後の「サイズ」バイト)に制限されます。
|
||||
現在その末尾セクションに保存されているファイルフラグメント/ブロックの
|
||||
|
|
@ -999,11 +1010,13 @@ SnapRAIDには、次のオプションがあります。
|
|||
指定されたブロック番号から処理を開始します。
|
||||
これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに
|
||||
役立ちます。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、`check` と `fix` でのみ
|
||||
サポートされています。
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
指定された数のブロックのみを処理します。
|
||||
このオプションは、主に高度な手動復旧を目的としています。
|
||||
このオプションは、主に高度な手動復旧を目的としており、`check` と `fix` でのみ
|
||||
サポートされています。
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
既存のコンテンツファイルからダミーの構成ファイルを生成します。
|
||||
|
|
@ -1030,8 +1043,8 @@ SnapRAIDには、次のオプションがあります。
|
|||
プログラムのバージョンを出力します。
|
||||
|
||||
|
||||
7 CONFIGURATION
|
||||
===============
|
||||
7 設定 (CONFIGURATION)
|
||||
====================
|
||||
|
||||
SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを
|
||||
必要とします。
|
||||
|
|
@ -1126,6 +1139,11 @@ DIR はファイルシステム内のディスクの**マウントポイント**
|
|||
|
||||
NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。
|
||||
|
||||
ただし、設定されたパスは常に同じ基礎データに解決される必要があります。
|
||||
パスにシンボリックリンクが含まれている場合、そのリンク先は固定されている
|
||||
必要があります。シンボリックリンクの参照先を変更して実行時にデータ
|
||||
ディレクトリを切り替えることはサポートされていません。
|
||||
|
||||
アレイ内のデータディスクごとに1つのオプションを使用する必要があります。
|
||||
|
||||
構成ファイルで直接 NAME を変更してから `sync` コマンドを実行することで、
|
||||
|
|
@ -1144,14 +1162,38 @@ NAME を固定したままにしておけば、必要に応じてマウントポ
|
|||
これらのディスクは常に回転していることが期待されるため、`up` およ
|
||||
び `down` コマンドの影響を受けないことに注意してください。
|
||||
|
||||
7.7 nohidden
|
||||
7.7 snapshot
|
||||
------------
|
||||
|
||||
`sync`、`scrub`、`check`、および `fix` コマンドでファイルシステムスナップショットの
|
||||
使用を有効にします。
|
||||
|
||||
有効にすると、SnapRAIDは `sync` の開始時にサポートされている各データファイルシステムの
|
||||
読み取り専用スナップショットを作成します。これにより各ファイルシステムの安定したビューが
|
||||
提供され、後からの変更によってパリティ計算に使用されるデータが変わるのを防ぎます。
|
||||
|
||||
これにより復元が大幅に向上します。ライブファイルシステムからファイルが削除されても、
|
||||
スナップショット内に保存され続けます。これにより、そのブロックのパリティが「破損」するのを防ぎ、
|
||||
別のディスクが故障した場合でもデータを正常に復元できるようになります。
|
||||
|
||||
このオプションは、LinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでフォーマットされた
|
||||
データディスクにのみ適用されます。
|
||||
パリティディスク、または他のファイルシステムを使用しているデータディスクは、常にファイルシステムの
|
||||
ライブバージョンを使用します。
|
||||
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
このオプションが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
|
||||
スナップショットのライフサイクルの詳細な説明については、SNAPSHOTSのセクションを参照してください。
|
||||
|
||||
7.8 nohidden
|
||||
------------
|
||||
|
||||
すべての隠しファイルとディレクトリを除外します。
|
||||
Unixでは、隠しファイルは `.` で始まるファイルです。
|
||||
Windowsでは、隠し属性を持つファイルです。
|
||||
|
||||
7.8 exclude/include PATTERN
|
||||
7.9 exclude/include PATTERN
|
||||
---------------------------
|
||||
|
||||
syncプロセスで除外または含めるファイルまたはディレクトリのパターンを定義します。
|
||||
|
|
@ -1162,12 +1204,16 @@ syncプロセスで除外または含めるファイルまたはディレクト
|
|||
パターンが一致しない場合、最後に指定されたパターンが `include` の場合はファイルは除外され、
|
||||
`exclude` の場合は含まれます。
|
||||
|
||||
フィルタリングはディレクトリの走査時に階層的に実行されることに注意してください。
|
||||
ディレクトリが `exclude` ルールに一致した場合、そのディレクトリ全体がスキップ(プルーニング)され、
|
||||
その内部にあるファイルやサブディレクトリに対する `include` ルールは評価されません。
|
||||
|
||||
パターン仕様の詳細については、PATTERNセクションを参照してください。
|
||||
|
||||
このオプションは複数回使用できます。
|
||||
|
||||
7.9 blocksize SIZE_IN_KIBIBYTES
|
||||
-------------------------------
|
||||
7.10 blocksize SIZE_IN_KIBIBYTES
|
||||
--------------------------------
|
||||
|
||||
パリティの基本ブロックサイズをキビバイト単位で定義します。
|
||||
1キビバイトは1024バイトです。
|
||||
|
|
@ -1210,7 +1256,7 @@ Linuxでより大きなパリティパーティションを取得するトリッ
|
|||
これにより、約1.5%の追加スペース、4 TBディスクで約60 GBが得られ、
|
||||
浪費スペースなしで各データディスクで約460,000ファイルが可能になります。
|
||||
|
||||
7.10 hashsize SIZE_IN_BYTES
|
||||
7.11 hashsize SIZE_IN_BYTES
|
||||
---------------------------
|
||||
|
||||
保存されたブロックのハッシュサイズをバイト単位で定義します。
|
||||
|
|
@ -1224,34 +1270,34 @@ Linuxでより大きなパリティパーティションを取得するトリッ
|
|||
経験則として、SnapRAIDは通常、アレイ内のデータ16 TBごとに1 GiBのRAMを必要とします。
|
||||
|
||||
具体的には、データのハッシュを保存するために、SnapRAIDは
|
||||
約 $TS \cdot (1 + HS) / BS$ バイトのRAMを必要とします。
|
||||
約 TS*(1+HS)/BS バイトのRAMを必要とします。
|
||||
ここで、TSはディスクアレイの合計サイズ(バイト)、BSはブロックサイズ(バイト)、HSはハッシュサイズ(バイト)です。
|
||||
|
||||
たとえば、4 TBのディスク8台、ブロックサイズ256 KiB(1 KiB = 1024バイト)、
|
||||
ハッシュサイズ16の場合:
|
||||
|
||||
RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (256 \cdot 2^{10}) = 1.93 \text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
|
||||
|
||||
ハッシュサイズを8に切り替えると:
|
||||
|
||||
RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (256 \cdot 2^{10}) = 1.02 \text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
|
||||
|
||||
ブロックサイズを512に切り替えると:
|
||||
|
||||
RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (512 \cdot 2^{10}) = 0.96 \text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
|
||||
|
||||
ハッシュサイズを8、ブロックサイズを512の両方に切り替えると:
|
||||
|
||||
RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (512 \cdot 2^{10}) = 0.51 \text{ GiB}$
|
||||
RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
|
||||
|
||||
7.11 autosave SIZE_IN_GIGABYTES
|
||||
7.12 autosave SIZE_IN_GIGABYTES
|
||||
-------------------------------
|
||||
|
||||
処理された指定されたGB量後に、同期またはスクラビング時に状態を自動的に保存します。
|
||||
このオプションは、マシンクラッシュやその他のイベントによって中断された場合に、
|
||||
長い `sync` コマンドを最初から再起動するのを避けるのに役立ちます。
|
||||
|
||||
7.12 temp_limit TEMPERATURE_CELSIUS
|
||||
7.13 temp_limit TEMPERATURE_CELSIUS
|
||||
-----------------------------------
|
||||
|
||||
許容される最大ディスク温度を摂氏で設定します。指定されている場合、
|
||||
|
|
@ -1279,13 +1325,13 @@ SnapRAIDの動作には影響しません。プログラムの動作は、実際
|
|||
通常、SnapRAIDは最も熱いディスクの温度のみを表示します。
|
||||
すべてのディスクの温度を表示するには、-A または --stats オプションを使用します。
|
||||
|
||||
7.13 temp_sleep TIME_IN_MINUTES
|
||||
7.14 temp_sleep TIME_IN_MINUTES
|
||||
-------------------------------
|
||||
|
||||
温度制限に達したときのスタンバイ時間(分単位)を設定します。この期間中、ディスクは
|
||||
スピンダウンしたままです。デフォルトは5分です。
|
||||
|
||||
7.14 pool DIR
|
||||
7.15 pool DIR
|
||||
-------------
|
||||
|
||||
`pool` コマンドを使用してディスクアレイの仮想ビューが作成されるプーリングディレクトリを
|
||||
|
|
@ -1293,7 +1339,7 @@ SnapRAIDの動作には影響しません。プログラムの動作は、実際
|
|||
|
||||
ディレクトリは既に存在している必要があります。
|
||||
|
||||
7.15 share UNC_DIR
|
||||
7.16 share UNC_DIR
|
||||
------------------
|
||||
|
||||
ディスクにリモートでアクセスするために必要なWindows UNCパスを定義します。
|
||||
|
|
@ -1308,7 +1354,7 @@ SnapRAIDの動作には影響しません。プログラムの動作は、実際
|
|||
|
||||
このオプションはWindowsでのみ必要です。
|
||||
|
||||
7.16 smartctl DISK/PARITY OPTIONS...
|
||||
7.17 smartctl DISK/PARITY OPTIONS...
|
||||
------------------------------------
|
||||
|
||||
各ディスクのSMART属性を取得するためのカスタムsmartctlオプションを定義します。
|
||||
|
|
@ -1324,6 +1370,9 @@ PARITY はパリティ名のいずれかです:`parity`、`2-parity`、`3-pari
|
|||
RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、
|
||||
`%s` を使用する必要はないかもしれません。
|
||||
|
||||
デフォルトの `-a` オプションを置き換えるために、`[info: ...]` タグを使用して
|
||||
カスタム情報オプション文字列を指定することもできます。
|
||||
|
||||
使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。
|
||||
|
||||
https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1331,9 +1380,10 @@ RAIDコントローラーの場合、デバイスは固定されている可能
|
|||
|
||||
例:
|
||||
|
||||
smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
smartctl parity -d sat %s
|
||||
|
||||
7.17 smartignore DISK/PARITY ATTR [ATTR...]
|
||||
7.18 smartignore DISK/PARITY ATTR [ATTR...]
|
||||
-------------------------------------------
|
||||
|
||||
ディスク障害の確率を計算するときに、指定されたSMART属性を無視します。
|
||||
|
|
@ -1345,16 +1395,22 @@ PARITY はパリティ名のいずれかです:`parity`、`2-parity`、`3-pari
|
|||
`4-parity`、`5-parity`、`6-parity`、または `z-parity`。
|
||||
特殊な値 `*` は、すべてのディスクで属性を無視するために使用できます。
|
||||
|
||||
例として、すべてのディスクで `Current Pending Sector Count` 属性を無視するには:
|
||||
複数の属性をスペースで区切って指定できます。
|
||||
各属性は1から255までの数値、または大文字と小文字を区别しない名前
|
||||
(例: `Current_Pending_Sector`)として指定できます。
|
||||
|
||||
smartignore * 197
|
||||
例として、すべてのディスクで `Current Pending Sector Count` と
|
||||
`Reallocated Sectors Count` 属性を番号または名前で無視するには:
|
||||
|
||||
smartignore * 197 5
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
最初のパリティディスクでのみ無視するには:
|
||||
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
|
||||
7.18 Examples
|
||||
-------------
|
||||
7.19 例 (Examples)
|
||||
-----------------
|
||||
|
||||
Unixの一般的な構成の例は次のとおりです。
|
||||
|
||||
|
|
@ -1366,7 +1422,7 @@ Unixの一般的な構成の例は次のとおりです。
|
|||
data d3 /mnt/disk3/
|
||||
exclude /lost+found/
|
||||
exclude /tmp/
|
||||
smartctl d1 -d sat %s
|
||||
smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
smartctl d2 -d usbjmicron %s
|
||||
smartctl parity -d areca,1/1 /dev/sg0
|
||||
smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1382,14 +1438,148 @@ Windowsの一般的な構成の例は次のとおりです。
|
|||
exclude Thumbs.db
|
||||
exclude \$RECYCLE.BIN
|
||||
exclude \System Volume Information
|
||||
smartctl d1 -d sat %s
|
||||
smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
smartctl d2 -d usbjmicron %s
|
||||
smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
|
||||
8 PATTERN
|
||||
=========
|
||||
8 スナップショット (SNAPSHOTS)
|
||||
======================
|
||||
|
||||
設定でスナップショットオプションが有効になっている場合、SnapRAIDは
|
||||
ファイルシステムのスナップショットを使用して、操作中に読み取られるデータを安定に保ちます。
|
||||
これは、ライブファイルシステム上のファイルが後から変更または削除された場合でも同様です。
|
||||
|
||||
スナップショットの管理は完全に自動かつ透過的です。
|
||||
バックグラウンドで完全に処理されるスナップショットによる追加の保護を受けながら、
|
||||
これまでとまったく同じようにSnapRAIDを使用し続けることができます。
|
||||
|
||||
これには主に2つのメリットがあります。
|
||||
|
||||
整合性 - 長時間かかるsyncやscrubの実行中にライブファイルシステム上でファイルが変更されても、
|
||||
スナップショットされた各ファイルシステムは操作中変更されないため、
|
||||
パリティの不一致や処理の中断は発生しません。
|
||||
復元 - ライブファイルシステムからファイルが更新または削除されても、スナップショット内に保存され続けます。
|
||||
次のsyncが実行される前にディスク故障が発生した場合、SnapRAIDはスナップショットに保存されている
|
||||
データを使用して、故障したディスクを再構築します。
|
||||
|
||||
アクティブなsync処理中にディスクが故障した場合、SnapRAIDは前のパリティ計算の
|
||||
スナップショットと現在のスナップショットの両方から自動的に読み取ることも可能です。
|
||||
これにより、同期の間にブロックが変更または削除されていた場合でも、パリティ方程式を解くために
|
||||
必要な正確なデータブロックへのアクセスが提供され、完全な復元の可能性が最大化されます。
|
||||
|
||||
スナップショットがない場合、正常なディスク上の更新または削除されたファイルはデータブロックの欠損を
|
||||
招き、他の故障したディスクを修復するために必要となるブロックが失われる可能性があります。
|
||||
|
||||
スナップショットはデータディスクに対してのみ、かつ基礎となるファイルシステムがその機能をサポートして
|
||||
いる場合にのみ作成されます。パリティディスクは常にライブファイルシステムを使用します。
|
||||
|
||||
現在、これはLinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでサポートされています。
|
||||
|
||||
異なるファイルシステムを持つデータディスクを混在させることができます。スナップショットをサポートして
|
||||
いるディスクのみがそれを利用し、他のディスクはライブファイルシステム上で直接動作し続けます。
|
||||
|
||||
スナップショットの作成と削除には管理者権限が必要です。
|
||||
スナップショットが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。
|
||||
|
||||
8.1 スナップショット使用時のコマンドの挙動 (Command Behavior with Snapshots)
|
||||
---------------------------------------------------------
|
||||
|
||||
`sync` および `scrub` コマンドは、ファイルシステムがサポートしているデータディスクに対して
|
||||
スナップショットを使用します。スナップショットされたディスクでは、コマンドはライブファイルシステムへの
|
||||
同時変更の影響を受けない安定したファイルシステムイメージを参照します。
|
||||
`sync` の実行中、サポートされている各データファイルシステムに対して独立して新しいスナップショットが
|
||||
作成されます。これらのスナップショットは全体としてパリティ計算に使用されるデータを提供します。
|
||||
対照的に、`scrub` コマンドは、既存のパリティと一致する信頼できる参照ポイントを維持するために、
|
||||
最も直近の同期中に作成された最後のスナップショットを利用します。
|
||||
|
||||
`check` および `fix` コマンドの場合、最後のスナップショットの使用は、
|
||||
-d, --filter-disk オプションを使用して特定のディスクがターゲットに指定されているかどうかによって異なります。
|
||||
|
||||
-d を介して明示的に選択されたディスク(操作の「ターゲット」)は、常にライブファイルシステムを使用します。
|
||||
`fix` の場合、これによりアクティブな交換ディスクにデータを復元できます。
|
||||
`check` の場合、同じ条件下で `fix` 操作をシミュレートできます。
|
||||
|
||||
他のすべてのデータディスク(「参照」ディスク)は、それぞれのスナップショットを介してアクセスされます。
|
||||
これにより、復旧の進行中に正常なディスク上のファイルを変更している場合でも、SnapRAIDは
|
||||
パリティ方程式を解くための安定した凍結された参照を持つことができます。
|
||||
|
||||
-d オプションが指定されていない場合、SnapRAIDは操作がアレイ全体に適用されると想定します。
|
||||
この場合、`check` と `fix` はライブファイルシステムのみを排他的に使用します。
|
||||
|
||||
他のすべてのコマンドは、ライブファイルシステム上でのみ動作します。
|
||||
|
||||
|
||||
9 スナップショットのライフサイクル (SNAPSHOTS LIFECYCLE)
|
||||
========================================
|
||||
|
||||
SnapRAIDは、各データサブボリュームのルートにある隠しディレクトリ内で、
|
||||
`stable`(安定)、`pending`(保留)、および `scan`(スキャン)という3つの特定のスナップショットを管理します。
|
||||
Btrfs、Bcachefs、およびNTFSでは `.snapraid/` ディレクトリが使用され、
|
||||
ZFSでは標準の `.zfs/snapshot/` が使用されます。
|
||||
|
||||
`stable` スナップショットは、最後に正常に完了した `sync` の状態を表し、
|
||||
現在のパリティの計算に使用された正確なデータを含んでいます。これは、
|
||||
`scrub`、`check`、および `fix` コマンドの主要なデータソースとして機能します。
|
||||
|
||||
`scan` スナップショットは、スキャンとパリティ計算のための凍結された状態を提供するために、
|
||||
`sync` の開始時に作成される一時的なイメージです。
|
||||
スキャンを実行し、新しいコンテンツ状態を保存した後、以前の `pending` スナップショットを置き換えます。
|
||||
|
||||
`pending` スナップショットは、中断された `sync` によって使用されるイメージです。
|
||||
操作が正常に完了すると、以前の `stable` スナップショットが削除され、
|
||||
`pending` スナップショットが新しい安定した参照として昇格します。
|
||||
|
||||
`sync` が中断された場合、`pending` スナップショットは保持されます。
|
||||
パリティが部分的にしか同期されていない場合でも、.content ファイルに記録されたファイルシステム状態と
|
||||
一致するため、その後の `scrub`、`check`、および `fix` コマンドはこの保留中のスナップショットを使用します。
|
||||
|
||||
`sync` が中断された場合、`check` および `fix` コマンドは `stable` スナップショットからも
|
||||
読み取りを行い、同期中に更新または削除されたファイルからデータブロックを取得します。
|
||||
これは、.content ファイルが同期プロセス全体を通じて、変更または削除されたすべてのファイルの
|
||||
メタデータを保持しているために可能です。
|
||||
この履歴情報は、syncが正常に終了し、.content ファイルの最終バージョンが保存されたときにのみクリアされます。
|
||||
|
||||
中断後に `sync` が再開されると、既存の保留中(pending)のスナップショットは削除され、
|
||||
ライブファイルシステムの現在の状態をキャプチャするために新しいスナップショットが作成されます。
|
||||
ただし、`sync` が中断された場合は、その後の `sync` が正常に完了するまで、
|
||||
ファイルの変更、削除、置換、または移動を行わないでください。
|
||||
パリティには、中断された sync で使用されたスナップショットから計算されたブロックが
|
||||
まだ含まれている可能性があります。その後の sync によりそのスナップショットが
|
||||
置き換えられ、中間バージョンのファイルが復元できなくなる可能性があります。
|
||||
|
||||
9.1 ファイルシステムスナップショットと外部バックアップ (External backups with filesystem snapshots)
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
ファイルシステムスナップショットが有効な場合、SnapRAIDは各データサブボリューム、
|
||||
ボリューム、またはデータセットのルートにあるスナップショットにアクセスまたは作成します。
|
||||
|
||||
外部ツールとの干渉を避ける簡単な方法は、`data` 設定をサブボリュームまたは
|
||||
ボリューム内の通常のサブディレクトリ(例えば `/mnt/subvol` の代わりに
|
||||
`/mnt/subvol/data`)に指定することです。SnapRAIDは常にサブボリュームのルートに
|
||||
スナップショットディレクトリを作成するため(例えば `/mnt/subvol/.snapraid/`)、
|
||||
データサブディレクトリがクリーンに保たれ、スナップショットはそのディレクトリ内で
|
||||
動作するバックアップツールから見えない状態のままになります。
|
||||
|
||||
一方、設定された `data` ディレクトリ自体がサブボリュームまたはボリュームの
|
||||
ルートである場合、SnapRAIDはその直下に `.snapraid/` ディレクトリを作成します(Btrfs、
|
||||
Bcachefs、およびNTFS)。SnapRAID自身のスキャンからは自動的に除外されますが、
|
||||
外部のバックアップツールやファイル同期ツールはそのディレクトリを検出します。
|
||||
除外設定を行わない場合、スナップショットやディレクトリリンク内を走査して凍結された
|
||||
データツリー全体をコピーしてしまい、データが重複してバックアップストレージを使い果たす
|
||||
可能性があります。外部バックアップツールでは、必ず `.snapraid/` ディレクトリを
|
||||
除外するように設定してください。
|
||||
|
||||
ZFSでは、スナップショットは `.snapraid/` ではなく標準の仮想ディレクトリ
|
||||
`.zfs/snapshot/` 経由で公開されます。デフォルト(`snapdir=hidden`)では、ZFSはこの
|
||||
ディレクトリを一覧表示から隠すため、外部バックアップツールが走査することはありません。
|
||||
`snapdir=visible` を有効にしている場合は、バックアップツールが `.zfs/` ディレクトリを
|
||||
除外するように設定してください。
|
||||
|
||||
|
||||
10 パターン (PATTERN)
|
||||
=================
|
||||
|
||||
パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を
|
||||
提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、
|
||||
|
|
@ -1404,17 +1594,18 @@ Windowsの一般的な構成の例は次のとおりです。
|
|||
単一のパスコンポーネント内での一致に適しています。これは、シェルの
|
||||
グロブでおなじみの標準的なワイルドカードの動作です。
|
||||
|
||||
ダブルアスタリスク `**` はより強力で、ディレクトリ区切り文字を含む
|
||||
任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを
|
||||
またいで一致できるようになります。`**` がパターン内に直接埋め込まれている場合、
|
||||
周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。
|
||||
ダブルアスタリスクのワイルドカード `**` は、ディレクトリ区切り文字に隣接
|
||||
している場合(スラッシュの前または後にある場合)にのみ、ディレクトリ区切り
|
||||
文字をまたいで一致します。この形式では、複数のディレクトリレベルにわたって
|
||||
0個以上の文字に一致します。例えば、`foo/**/bar` は `foo/bar`、`foo/a/bar`、
|
||||
および `foo/a/b/bar` に一致し、`**/build` は `build` および `foo/bar/build` に
|
||||
一致し、`src/**.js` は `src/main.js` および `src/ui/components/main.js` に一致します。
|
||||
単独の形式 `/**/` は完全なパターンとして受け入れられません。
|
||||
|
||||
`**` の最も重要な使い方は、特別な形式である `/**/` です。これは
|
||||
0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、
|
||||
ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。
|
||||
例えば、パターン `src/**/main.js` は `src/main.js`(ディレクトリを0個スキップ)、
|
||||
`src/ui/main.js`(1個スキップ)、`src/ui/components/main.js`(2個スキップ)
|
||||
に一致します。
|
||||
`**` がスラッシュに隣接していない場合、`*` と同様に動作し、ディレクトリ区切り
|
||||
文字には一致しません。例えば、`**.jpg` はカレントディレクトリ内の `photo.jpg` に
|
||||
一致しますが、`dir/photo.jpg` には一致しません。その目的には `**/*.jpg` を
|
||||
使用してください。
|
||||
|
||||
角括弧 `[]` を使用した文字クラスは、指定されたセットまたは範囲の
|
||||
任意の1文字に一致します。他の単一文字パターンと同様に、
|
||||
|
|
@ -1423,7 +1614,8 @@ Windowsの一般的な構成の例は次のとおりです。
|
|||
|
||||
覚えておくべき根本的な違いは、`*`、`?`、および文字クラスはすべて
|
||||
ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、
|
||||
`**` はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。
|
||||
`**` はスラッシュに隣接している場合にのみディレクトリ区切り文字を
|
||||
またいで一致できるということです。
|
||||
|
||||
4つの異なる種類のパターンがあります。
|
||||
|
||||
|
|
@ -1490,6 +1682,24 @@ Unixではエスケープ文字は `\` です。Windowsでは `^` です。
|
|||
include /musics/
|
||||
include /pictures/
|
||||
|
||||
ディレクトリを除外すると(DIR/ または /PATH/DIR/ を使用)、SnapRAID がそのディレクトリに入って
|
||||
スキャンすることが防止されることに注意してください。したがって、除外された親ディレクトリ内に
|
||||
存在するファイルやサブディレクトリを `include` ルールで再度含めることはできません(スキャナが
|
||||
そのディレクトリ内を走査しないため)。
|
||||
|
||||
例えば、以下の設定では `/keep/` がプルーニングされるため、`file.dat` は含まれません:
|
||||
|
||||
# 意図通りに動作しません: /keep/ は完全にスキップされます
|
||||
include /keep/file.dat
|
||||
exclude /keep/
|
||||
|
||||
特定のファイルを残しつつディレクトリ内のファイルを一括除外するには、ディレクトリ自体を除外するのではなく、
|
||||
ディレクトリ内のファイルパターンを除外してください:
|
||||
|
||||
# 意図通りに動作します: /keep/ は走査され、内部の他のファイルのみが除外されます
|
||||
include /keep/file.dat
|
||||
exclude /keep/*
|
||||
|
||||
コマンドラインで -f オプションを使用する場合、`include` パターンのみを
|
||||
使用できます。例:
|
||||
|
||||
|
|
@ -1501,11 +1711,11 @@ Unixでは、コマンドラインでグロブ文字を使用する場合、シ
|
|||
防ぐために引用符で囲む必要があります。
|
||||
|
||||
|
||||
9 IGNORE FILE
|
||||
=============
|
||||
11 除外ファイル (IGNORE FILE)
|
||||
=======================
|
||||
|
||||
設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに
|
||||
.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
`.snapraidignore` ファイルを配置して、分散型の除外ルールを定義できます。
|
||||
|
||||
`.snapraidignore` で定義されたルールは、設定ファイルのルールの後に
|
||||
適用されます。これは、それらがより高い優先度を持ち、グローバル設定で
|
||||
|
|
@ -1545,20 +1755,23 @@ Unixでは、コマンドラインでグロブ文字を使用する場合、シ
|
|||
*.tmp
|
||||
|
||||
|
||||
10 CONTENT
|
||||
==========
|
||||
12 コンテンツ (CONTENT)
|
||||
==================
|
||||
|
||||
SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。
|
||||
|
||||
これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、
|
||||
それらの整合性を検証するためのすべてのチェックサムを一覧表示します。
|
||||
|
||||
このファイルは `sync` および `scrub` コマンドによって読み書きされ、
|
||||
`fix`、`check`、および `status` コマンドによって読み取られます。
|
||||
コンテンツファイルは `sync`、`scrub`、`touch`、および `rehash`
|
||||
コマンドによって読み書きされます。`status`、`diff`、`check`、
|
||||
`fix`、`list`、`dup`、`locate`、および `pool` コマンドによって読み取られ、
|
||||
`smart`、`probe`、`up`、`down`、および `devices` コマンドによって
|
||||
完全に無視されます。
|
||||
|
||||
|
||||
11 PARITY
|
||||
=========
|
||||
13 パリティ (PARITY)
|
||||
================
|
||||
|
||||
SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。
|
||||
|
||||
|
|
@ -1569,8 +1782,8 @@ SnapRAIDは、アレイのパリティ情報をパリティファイルに保存
|
|||
`scrub` および `check` コマンドによって**読み取られるだけ**です。
|
||||
|
||||
|
||||
12 ENCODING
|
||||
===========
|
||||
14 エンコーディング (ENCODING)
|
||||
======================
|
||||
|
||||
UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている
|
||||
のと同じエンコーディングでファイル名を読み取り、保存します。
|
||||
|
|
@ -1579,18 +1792,214 @@ Windowsでは、ファイルシステムから読み取られたすべての名
|
|||
処理されます。
|
||||
|
||||
ファイル名を正しく出力するには、`chcp 65001` コマンドでWindowsコンソールをUTF-8モードに設定し、
|
||||
コンソールフォントとして `Lucida Console` などのTrueTypeフォントを**使用する**必要があります。
|
||||
コンソールフォントとして `Lucida Console` などのTrueTypeフォントを使用する必要があります。
|
||||
これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、
|
||||
結果のファイルは常にUTF-8形式になります。
|
||||
|
||||
|
||||
13 COPYRIGHT
|
||||
============
|
||||
15 終了コード (EXIT CODE)
|
||||
====================
|
||||
|
||||
This file is Copyright (C) 2025 Andrea Mazzoleni
|
||||
SnapRAIDは以下のエラーコードで終了します:
|
||||
|
||||
0 - すべて正常。
|
||||
1 - コマンドでエラーが発生しました。
|
||||
2 - `diff` コマンドはすべて正常であると判定しましたが、 `sync` が必要です。
|
||||
3 - ディスクデバイスコマンド(`probe`、`smart`、`devices`、`up`、`down`)は完了しましたが、
|
||||
少なくとも1つのファイルシステムがデバイス不足のためデグレード(縮退)モードで動作しています。
|
||||
|
||||
|
||||
14 SEE ALSO
|
||||
===========
|
||||
16 既知の問題 (KNOWN ISSUES)
|
||||
=======================
|
||||
|
||||
snapraid_log(1), snapraidd(1)
|
||||
16.1 ファイルシステムの境界
|
||||
----------------
|
||||
|
||||
SnapRAIDは、データディスクのスキャン中にファイルシステム、マウントポイント、
|
||||
またはサブボリュームの境界を越えません。そのような境界が検出された場合、
|
||||
SnapRAIDは警告(WARNING)を報告し、その先をスキャンしません。
|
||||
|
||||
そのような境界の先にあるファイルはデータディスクに含まれないため、保護する
|
||||
必要がある場合は個別に設定する必要があります。
|
||||
|
||||
16.2 ファイルシステムスナップショット使用時のマウントポイント
|
||||
---------------------------------
|
||||
|
||||
ファイルシステムスナップショットが有効になっている場合、データディスク内の
|
||||
ネストされたマウントポイントおよびバインドマウントはサポートされません。
|
||||
|
||||
マウントポイントは稼働中システムのマウント名前空間の一部であり、ファイルシステムの
|
||||
スナップショットには保持されません。その結果、スナップショットをスキャンする際、
|
||||
稼働中ファイルシステムでマウントポイントによって隠されていたディレクトリが
|
||||
見えるようになる場合があります。
|
||||
|
||||
ファイルシステムスナップショットが有効な場合は、データディスク内にネストされた
|
||||
マウントポイントやバインドマウントを配置しないでください。
|
||||
|
||||
16.3 ファイルシステムスナップショット使用時の複数設定
|
||||
-----------------------------
|
||||
|
||||
同じファイルシステムのスナップショット名前空間を使用する複数の独立した
|
||||
SnapRAID設定で、スナップショットサポートを安全に共有することはできません。
|
||||
|
||||
BtrfsおよびBcachefsでは、スナップショットサポートが有効なSnapRAID設定は、
|
||||
同一サブボリューム内のデータディレクトリを1つしか使用できません。ZFSでは
|
||||
同じ制限がデータセットに、NTFSではボリュームに適用されます。
|
||||
|
||||
同じスナップショット名前空間を共有する複数の設定は、同一の `stable`、
|
||||
`pending`、および `scan` スナップショットを使用します。そのため、一方の設定を
|
||||
実行すると、もう一方の設定で必要なリカバリスナップショットが置換または
|
||||
削除される可能性があります。
|
||||
|
||||
16.4 タイムスタンプの変更を伴わないインプレースファイル変更
|
||||
--------------------------------
|
||||
|
||||
SnapRAIDは、ファイルサイズと変更タイムスタンプ(mtime)を比較することによって
|
||||
ファイルの変更を検出します。
|
||||
|
||||
アプリケーションがファイルサイズを変更せず、変更タイムスタンプも更新せずに
|
||||
インプレースでファイルを変更した場合、"diff" および "sync" はファイルが
|
||||
変更されたことを検出できず、そのパリティは更新されません。
|
||||
|
||||
SnapRAIDにそのような変更を確実に認識させるには、ファイルの変更タイムスタンプ
|
||||
を更新してください(たとえば、"touch" ユーティリティなどを使用)。そうしない
|
||||
場合、その差分は後続の "scrub" または "check" 中のハッシュ不一致としてのみ
|
||||
検出されます。
|
||||
|
||||
16.5 Windowsにおける非ASCII文字の大文字・小文字の一致
|
||||
-----------------------------------
|
||||
|
||||
SnapRAIDはすべてのプラットフォームで標準的で予測可能なUTF-8エンコーディング
|
||||
を使用し、大文字・小文字を区別しないマッチングをASCII文字に限定しています。
|
||||
|
||||
Windowsファイルシステムは、任意のシステム依存のフォールディングテーブルを介して
|
||||
Unicodeファイル名全体で大文字・小文字の不区別を強制するというレガシーな設計の
|
||||
影響を受けています。その結果、Windowsは全く異なるUnicodeバイトシーケンスをあたかも
|
||||
同じファイルであるかのように扱い、ファイルシステムの実態を覆い隠してしまいます。
|
||||
|
||||
たとえば、`À.txt` と `à.txt` は明確に異なるUnicode名ですが、Windowsは非論理的にも
|
||||
これらを同一として扱い、SnapRAIDはそれらの本来の区別を維持します。
|
||||
|
||||
この制限は、WindowsによるUnicodeファイル名の非一貫な処理と、大文字・小文字を区別
|
||||
しないエイリアスへの固執によって引き起こされます。Windowsの大文字・小文字フォール
|
||||
ディングに起因する不一致を防ぐため、設定パスおよびフィルター内の非ASCII文字には
|
||||
常に正確な大文字・小文字を指定してください。
|
||||
|
||||
16.6 部分的な fix による回復
|
||||
-------------------
|
||||
|
||||
`fix` を `-S, --start` または `-B, --count` で制限した場合、
|
||||
SnapRAID は選択されたブロックのみを処理し、ファイルレベルの完了処理や
|
||||
隔離を行いません。
|
||||
|
||||
回復によって現在の内容を表していると証明できないベストエフォートのデータが
|
||||
生成された場合でも、それらのブロックは通常のファイル名で書き込まれる
|
||||
可能性があります。これらの回復されたブロックに関連する不確実性は、コマンドの
|
||||
終了後には保持されません。
|
||||
|
||||
その結果、後続の `fix` はこれらの読み取り可能なブロックを有効なファイルデータ
|
||||
として扱い、再度の回復を試みません。これにより、ファイル内に不完全または
|
||||
古いデータが残っているにもかかわらず、後続の回復が成功と報告される場合が
|
||||
あります。
|
||||
|
||||
`-S` および `-B` オプションは、通常の `fix` が失敗した後の高度な手動回復
|
||||
のみを目的としています。部分的な `fix` で回復不能なデータが報告された場合は、
|
||||
別の回復を試みる前に対象のファイルを削除または名前変更するか、その内容を手動で
|
||||
確認してください。
|
||||
|
||||
16.7 NTFS ハードリンクと除外されたパス
|
||||
------------------------
|
||||
|
||||
NTFS では、ディレクトリエントリが各ハードリンクのファイルサイズとタイム
|
||||
スタンプを個別にキャッシュします。ファイルがいずれか1つのリンクを通じて
|
||||
変更された場合、同じファイルを参照している他のリンクのディレクトリエントリ
|
||||
は、それらにアクセスされるまで古いメタデータを保持し続けることがあります。
|
||||
|
||||
SnapRAID は、スキャン中に同じファイルへのハードリンクが2つ以上見つかった
|
||||
場合、この状態を自動的に検出して正規化します。しかし、他のリンクがフィルタ
|
||||
によって除外されているか、またはデータディスクのパスの外部にあるために
|
||||
1つのハードリンクのみがスキャンされた場合、SnapRAID は inode の衝突を検出
|
||||
できず、単一の見えているリンクのキャッシュされたメタデータに依存します。
|
||||
|
||||
その結果、除外されたリンクや外部のハードリンクを通じて加えられた変更は、
|
||||
対象のファイルがアクセスされたりそのパスを通じて開かれたりして OS により
|
||||
含まれるリンクのメタデータが更新されるまで、SnapRAID に気付かれない可能性
|
||||
があります。
|
||||
|
||||
この制限を回避するには、SnapRAID から除外されているハードリンクを通じて
|
||||
保護対象のファイルを変更しないようにするか、SnapRAID が正常に正規化
|
||||
できるように、ファイルへのすべてのハードリンクがスキャンに含まれるように
|
||||
してください。
|
||||
|
||||
16.8 中断されたマルチパリティ sync 後の回復
|
||||
---------------------------
|
||||
|
||||
複数のパリティディスクを持つアレイにおいて、`sync` が中断されると、
|
||||
異なるパリティレベル間で更新状態が一時的に不一致になることがあります。
|
||||
たとえば、パリティ 1 にはすでに新しく更新されたデータが含まれている一方、
|
||||
パリティ 2 にはまだ古いデータが残っているといった状況です。
|
||||
|
||||
`check` または `fix` の実行中、SnapRAID はさまざまなパリティの組み合わせを
|
||||
試し、既知のブロックハッシュ(ブロック全体、通常 256 KiB をカバー)に
|
||||
対して再構築されたデータを検証します。
|
||||
|
||||
SnapRAID が新旧のパリティが混在する不整合な組み合わせを使用して再構築を
|
||||
試みた場合、線形 RAID 方程式は誤ったデータを生成します。このような無効な
|
||||
組み合わせが誤って受け入れられるには、同じストライプ内の他の非同期ブロックが
|
||||
不正なデータで再構築されているにもかかわらず、方程式が偶然にも少なくとも
|
||||
1つの完全な 256 KiB ブロックを完璧に再構築してハッシュを一致させる必要が
|
||||
あります。
|
||||
|
||||
この事態はハッシュの衝突によるものではありません。むしろ、混在した
|
||||
パリティ方程式自体が偶然にも元の正確な 256 KiB ブロック内容を生成する
|
||||
必要があります。これは特別に作成されたデータや極めて反復的なデータでは
|
||||
数学的に考えられますが、実際のデータでは事実上不可能です。
|
||||
|
||||
すべてのディスクが正常な場合は、それ以上の変更を加える前に中断された `sync`
|
||||
を完了させることで、この不確実性を排除できます。ディスクに障害が発生して
|
||||
回復が必要な場合は、`check` または `fix` を実行する前にデータディスクを
|
||||
変更しないようにしてください。
|
||||
|
||||
16.9 予約済みのファイル名およびディレクトリ名
|
||||
-------------------------
|
||||
|
||||
SnapRAID は内部処理のために一部のファイル名、ディレクトリ名、
|
||||
スナップショット名を予約しています。これらの名前をユーザーデータに
|
||||
使用しないでください:
|
||||
|
||||
.snapraidignore - ローカル除外ルールファイル。
|
||||
.snapraid - スナップショットコンテナディレクトリ。
|
||||
snapraid-* - SnapRAID が管理する ZFS スナップショット名。
|
||||
*.unrecoverable - 回復中に隔離された破損ファイル。
|
||||
CONTENT.tmp - content 更新用の一時ファイル。
|
||||
CONTENT.lock - content ロックファイル。
|
||||
PARITY.spaceholder - Windows でのパリティ割り当て時の一時的な
|
||||
プレースホルダーファイル。
|
||||
|
||||
これらの名前を無関係なデータに使用すると、ファイルやスナップショットが
|
||||
無視されたり、メタデータとして誤認されたり、上書き、名前変更、または
|
||||
削除されたりする可能性があります。
|
||||
|
||||
Windows では、大文字と小文字を区別するように構成された NTFS
|
||||
ディレクトリであっても、すべての大文字・小文字のバリエーションが
|
||||
同様に予約されます(例: .SNAPRAIDIGNORE、.SnapRaid、CONTENT.TMP、
|
||||
CONTENT.Lock)。
|
||||
|
||||
|
||||
17 翻訳 (TRANSLATION)
|
||||
===================
|
||||
|
||||
この文書は英語版マニュアルの自動翻訳です。
|
||||
正確な記述については英語版マニュアルを参照してください。
|
||||
|
||||
|
||||
18 著作権 (COPYRIGHT)
|
||||
==================
|
||||
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
|
||||
19 関連項目 (SEE ALSO)
|
||||
==================
|
||||
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.TH "디스크 어레이를 위한 SnapRAID 백업" 1
|
||||
.SH NAME
|
||||
snapraid \- 디스크 어레이를 위한 SnapRAID 백업
|
||||
.SH SYNOPSIS
|
||||
.SH 개요 (SYNOPSIS)
|
||||
snapraid [\-c, \-\-conf CONFIG]
|
||||
.PD 0
|
||||
.PP
|
||||
|
|
@ -77,7 +77,7 @@ snapraid [\-c, \-\-conf CONFIG]
|
|||
snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PD 0
|
||||
.PD
|
||||
.SH DESCRIPTION
|
||||
.SH 설명 (DESCRIPTION)
|
||||
SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로,
|
||||
최대 6개의 디스크 오류가 발생해도 데이터를 복구하기 위한
|
||||
패리티 정보를 저장합니다.
|
||||
|
|
@ -89,7 +89,7 @@ SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로,
|
|||
파일을 다시 포맷할 필요 없이 이미 파일로 채워진 디스크를
|
||||
활용할 수 있으며, 평소처럼 액세스할 수 있습니다.
|
||||
.IP \(bu
|
||||
데이터 무결성을 보장하고 무단 손상을 방지하기 위해 모든 데이터가
|
||||
데이터 무결성을 보장하고 조용한 데이터 손상을 방지하기 위해 모든 데이터가
|
||||
해시됩니다.
|
||||
.IP \(bu
|
||||
실패한 디스크의 수가 패리티 수를 초과하는 경우, 데이터 손실은
|
||||
|
|
@ -116,20 +116,34 @@ https://www.snapraid.it/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH LIMITATIONS
|
||||
SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을
|
||||
결합하는 것을 목표로 합니다. 하지만, 사용 전에 고려해야 할 몇 가지
|
||||
제한 사항이 있습니다.
|
||||
.SH 제한 사항 (LIMITATIONS)
|
||||
SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 결합하는 것을
|
||||
목표로 합니다. 그러나 사용하기 전에 고려해야 할 몇 가지 제한 사항이 있습니다.
|
||||
.PP
|
||||
주요 제한 사항은 디스크가 실패하고 최근에 동기화(sync)하지 않은 경우,
|
||||
완전히 복구하지 못할 수 있다는 것입니다.
|
||||
더 구체적으로, 마지막 동기화 작업 이후 변경되거나 삭제된 파일의
|
||||
크기만큼 복구가 불가능할 수 있습니다.
|
||||
이는 변경되거나 삭제된 파일이 실패한 디스크에 있지 않더라도 발생합니다.
|
||||
이것이 SnapRAID가 **거의 변경되지 않는 데이터**에 더 적합한 이유입니다.
|
||||
가장 큰 제한 사항은 디스크가 고장 날 경우, 마지막 \`sync\`(동기화) 작업의 상태까지만
|
||||
데이터를 복구할 수 있다는 점입니다. 마지막 동기화 이후에 추가되거나 수정된 데이터 중
|
||||
고장 난 디스크에 위치한 데이터는 모두 손실됩니다.
|
||||
.PP
|
||||
반면에, 새로 추가된 파일은 이미 존재하는 파일의 복구를 방해하지 않습니다.
|
||||
새로 추가된 파일이 실패한 디스크에 있는 경우에만 해당 파일을 잃게 됩니다.
|
||||
따라서 SnapRAID는 주로 데이터 변경이 거의 없는 환경에 적합합니다.
|
||||
.PP
|
||||
마지막 동기화 시점에 이미 존재했던 데이터의 경우, 복구 신뢰성은 \`snapshot\`(스냅샷)
|
||||
옵션의 사용 여부에 따라 달라집니다.
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
스냅샷 지원이 있는 경우 (Btrfs, ZFS, Bcachefs 및 NTFS에서 사용 가능):
|
||||
SnapRAID는 지원되는 각 데이터 파일시스템의 독립적인 동결된 참조를
|
||||
자동으로 유지할 수 있습니다.
|
||||
이를 통해 동기화 중이나 동기화 후에 라이브 파일시스템의 파일을 수정하거나 삭제하더라도
|
||||
복구 프로세스가 일관되고 신뢰할 수 있게 유지됩니다.
|
||||
.PD
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
스냅샷 지원이 없는 경우:
|
||||
\`sync\` 후에 파일을 삭제하거나 변경하면 다른 고장 난 디스크의 완전한 복구가 방해받을 수
|
||||
있습니다. 이는 수정된 파일이 고장 난 디스크에 없더라도 패리티가 수정된 파일과
|
||||
더 이상 일치하지 않기 때문에 발생합니다. 반면에 새로 추가된 파일은 이미 존재하는
|
||||
파일의 복구를 방해하지 않습니다.
|
||||
.PD
|
||||
.PP
|
||||
기타 SnapRAID 제한 사항은 다음과 같습니다:
|
||||
.PD 0
|
||||
|
|
@ -150,7 +164,7 @@ SnapRAID는 제한된 수의 디스크 오류에서만 데이터를 복구할
|
|||
파일 이름, 타임스탬프, 심볼릭 링크, 하드 링크만 저장됩니다.
|
||||
권한, 소유권, 확장 속성은 저장되지 않습니다.
|
||||
.PD
|
||||
.SH GETTING STARTED
|
||||
.SH 시작하기 (GETTING STARTED)
|
||||
SnapRAID를 사용하려면, 먼저 디스크 어레이에서 하나의 디스크를
|
||||
\`parity\`(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로
|
||||
RAID5와 유사하게 단일 디스크 오류로부터 복구할 수 있습니다.
|
||||
|
|
@ -290,11 +304,11 @@ snapraid sync
|
|||
Ctrl+C를 눌러 언제든지 중지할 수 있으며, 다음 실행 시 중단된
|
||||
곳에서 재개됩니다.
|
||||
.PP
|
||||
이 명령이 완료되면 데이터는 **SAFE**합니다.
|
||||
이 명령이 완료되면 데이터는 안전합니다.
|
||||
.PP
|
||||
이제 어레이를 원하는 대로 사용하고 주기적으로 \`sync\` 명령을
|
||||
실행하여 패리티 정보를 업데이트할 수 있습니다.
|
||||
.SS Scrubbing
|
||||
.SS 스크러빙 (Scrubbing)
|
||||
주기적으로 데이터 및 패리티의 오류를 확인하려면 \`scrub\` 명령을
|
||||
실행할 수 있습니다.
|
||||
.PP
|
||||
|
|
@ -320,7 +334,7 @@ snapraid \-p 5 \-o 20 scrub
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은
|
||||
이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면, 해당 블록은
|
||||
\`content\` 파일에 bad로 표시되며 \`status\` 명령에 나열됩니다.
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -351,7 +365,7 @@ snapraid \-p bad scrub
|
|||
동기화되지 않은 어레이에서 \`scrub\`을 실행하면 제거되거나 수정된 파일로
|
||||
인한 오류가 보고될 수 있습니다. 이러한 오류는 \`scrub\` 출력에는
|
||||
보고되지만, 관련 블록은 bad로 표시되지 않습니다.
|
||||
.SS Pooling
|
||||
.SS 풀링 (Pooling)
|
||||
참고: 아래에 설명된 풀링(pooling) 기능은 **mergerfs** 도구로 대체되었으며,
|
||||
이는 SnapRAID 커뮤니티에서 Linux 사용자를 위한 권장 옵션입니다.
|
||||
Mergefs는 여러 드라이브를 단일 통합 마운트 지점으로 풀링하는 더 유연하고
|
||||
|
|
@ -499,7 +513,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Undeleting
|
||||
.SS 삭제 취소 (Undeleting)
|
||||
SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며,
|
||||
\-f, \-\-filter 옵션을 사용하여 파일이나 디렉토리를 이전 상태로 복원하거나
|
||||
삭제 취소할 수 있습니다:
|
||||
|
|
@ -535,12 +549,13 @@ snapraid fix \-m
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Recovering
|
||||
.SS 복구 (Recovering)
|
||||
최악의 상황이 발생하여 하나 이상의 디스크를 잃었습니다!
|
||||
.PP
|
||||
**패닉하지 마십시오!** 복구할 수 있습니다!
|
||||
**당황하지 마십시오!** 복구할 수 있습니다!
|
||||
.PP
|
||||
가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다.
|
||||
다른 작업을 하기 전에 디스크 어레이를 일절 변경하지 마십시오. 남은 디스크의
|
||||
데이터를 수정하거나 삭제하면 복구가 불가능해질 수 있습니다.
|
||||
모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된
|
||||
프로세스를 비활성화하십시오.
|
||||
.PP
|
||||
|
|
@ -636,27 +651,27 @@ snapraid sync
|
|||
.RE
|
||||
.PP
|
||||
모든 것이 복구되면 이 명령은 즉시 완료됩니다.
|
||||
.SH COMMANDS
|
||||
SnapRAID는 다음을 허용하는 몇 가지 간단한 명령을 제공합니다:
|
||||
.SH 명령어 (COMMANDS)
|
||||
SnapRAID는 다음과 같은 작업을 수행할 수 있는 몇 가지 간단한 명령어를 제공합니다.
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
어레이의 상태 출력 \-> \`status\`
|
||||
.IP \(bu
|
||||
디스크 제어 \-> \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
.IP \(bu
|
||||
백업/스냅샷 생성 \-> \`sync\`
|
||||
백업/복구 지점 생성 \-> \`sync\`
|
||||
.IP \(bu
|
||||
주기적으로 데이터 확인 \-> \`scrub\`
|
||||
주기적인 데이터 검사 \-> \`scrub\`
|
||||
.IP \(bu
|
||||
마지막 백업/스냅샷 복원 \-> \`fix\`.
|
||||
마지막 백업/복구 지점 복원 \-> \`fix\`
|
||||
.PD
|
||||
.PP
|
||||
명령은 소문자로 작성해야 합니다.
|
||||
명령어는 반드시 소문자로 작성해야 합니다.
|
||||
.SS status
|
||||
디스크 어레이의 상태 요약을 출력합니다.
|
||||
.PP
|
||||
패리티 단편화, 확인 없이 블록이 얼마나 오래되었는지, 그리고
|
||||
스크럽 중에 발생한 모든 기록된 무단 오류에 대한 정보를 포함합니다.
|
||||
스크럽 중에 발생한 모든 기록된 조용한 오류에 대한 정보를 포함합니다.
|
||||
.PP
|
||||
제시된 정보는 마지막으로 \`sync\`를 실행했을 때를 나타냅니다.
|
||||
나중에 수정된 내용은 고려되지 않습니다.
|
||||
|
|
@ -773,9 +788,9 @@ SMART가 디스크가 실패하고 있다고 보고하면, 해당 디스크에
|
|||
크기 또는 타임스탬프가 다른 파일, 즉 수정된 파일.
|
||||
.HP 4
|
||||
.I moved
|
||||
동일한 디스크의 다른 디렉토리로 이동된 파일.
|
||||
이들은 이름, 크기, 타임스탬프 및 아이노드가 동일하지만
|
||||
디렉토리가 다른 것으로 식별됩니다.
|
||||
동일한 inode를 유지하면서 동일한 디스크에서 이동되거나
|
||||
이름이 변경된 파일. 동일한 inode, 크기 및 타임스탬프를 가지지만
|
||||
경로가 다른 것으로 식별됩니다. 파일 이름도 다를 수 있습니다.
|
||||
.HP 4
|
||||
.I copied
|
||||
원본 파일이 여전히 존재하는 동일한 디스크 또는 다른
|
||||
|
|
@ -786,14 +801,12 @@ SMART가 디스크가 실패하고 있다고 보고하면, 해당 디스크에
|
|||
일치해야 식별됩니다.
|
||||
.HP 4
|
||||
.I relocated
|
||||
원본이 사라진 동일한 디스크 또는 다른 디스크로 이
|
||||
동된 파일.
|
||||
이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니
|
||||
다.
|
||||
하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치
|
||||
해야 합니다.
|
||||
동일한 디스크의 \'moved\' 파일과 달리, 재배치된 파일은 다른
|
||||
inode를 가집니다.
|
||||
원본 파일이 사라지고 inode가 유지되지 않는, 다른
|
||||
디렉토리 또는 디스크로 이동된 파일.
|
||||
이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니다.
|
||||
하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치해야
|
||||
합니다. \'moved\' 파일과 달리, 재배치된 파일은 파일 이름이 동일해야
|
||||
합니다.
|
||||
.HP 4
|
||||
.I restored
|
||||
inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬
|
||||
|
|
@ -814,7 +827,7 @@ inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬
|
|||
중지할 수 있습니다.
|
||||
다음 실행 시 \`sync\` 프로세스는 중단된 곳에서 재개됩니다.
|
||||
.PP
|
||||
이 프로세스 중에 무단 또는 입출력 오류가 발견되면,
|
||||
이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면,
|
||||
해당 블록은 bad로 표시됩니다.
|
||||
.PP
|
||||
파일은 경로 및/또는 아이노드로 식별되며 크기와 타임스탬프로
|
||||
|
|
@ -829,7 +842,7 @@ inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬
|
|||
\`content\` 및 \`parity\` 파일은 필요한 경우 수정됩니다.
|
||||
어레이의 파일은 수정되지 않습니다.
|
||||
.SS scrub
|
||||
어레이를 스크럽하여 데이터 및 패리티 디스크의 무단 또는 입출력 오류를
|
||||
어레이를 스크럽하여 데이터 및 패리티 디스크의 조용한 오류 또는 입출력 오류를
|
||||
확인합니다.
|
||||
.PP
|
||||
각 호출은 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의
|
||||
|
|
@ -852,7 +865,7 @@ full \- 모든 것 스크럽.
|
|||
.PP
|
||||
스크럽 상태의 세부 정보를 얻으려면 \`status\` 명령을 사용하십시오.
|
||||
.PP
|
||||
발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 \`content\` 파일에
|
||||
발견된 모든 조용한 오류 또는 입출력 오류에 대해, 해당 블록은 \`content\` 파일에
|
||||
bad로 표시됩니다.
|
||||
이러한 bad 블록은 \`status\`에 나열되며 \`fix \-e\`로 수정할 수 있습니다.
|
||||
수정 후, 다음 스크럽 시에 다시 확인되며, 수정된 것으로 발견되면 bad
|
||||
|
|
@ -860,7 +873,7 @@ bad로 표시됩니다.
|
|||
bad 블록만 스크럽하려면 \`scrub \-p bad\` 명령을 사용할 수 있습니다.
|
||||
.PP
|
||||
동기화되지 않은 데이터로 인한 보고된 오류를 피하기 위해 동기화된
|
||||
어레이에서만 \`scrub\`을 실행하는 것이 좋습니다. 이러한 오류는 무단
|
||||
어레이에서만 \`scrub\`을 실행하는 것이 좋습니다. 이러한 오류는 조용한
|
||||
오류가 아닌 것으로 인식되며, 블록은 bad로 표시되지 않지만,
|
||||
이러한 오류는 명령의 출력에 보고됩니다.
|
||||
.PP
|
||||
|
|
@ -869,14 +882,14 @@ bad 블록만 스크럽하려면 \`scrub \-p bad\` 명령을 사용할 수 있
|
|||
\`parity\` 파일은 수정되지 않습니다.
|
||||
어레이의 파일은 수정되지 않습니다.
|
||||
.SS fix
|
||||
모든 파일과 패리티 데이터를 수정합니다.
|
||||
모든 파일과 패리티 데이터를 복구(수정)합니다.
|
||||
.PP
|
||||
모든 파일과 패리티 데이터는 마지막 \`sync\`에 저장된 스냅샷
|
||||
상태와 비교됩니다.
|
||||
차이가 발견되면 저장된 스냅샷으로 되돌려집니다.
|
||||
모든 파일과 패리티 데이터는 마지막 \`sync\`에 저장된 상태와 비교됩니다.
|
||||
차이점이 발견되면 저장된 상태로 되돌립니다.
|
||||
.PP
|
||||
**경고!** \`fix\` 명령은 오류와 의도적인 수정 사이를 구별하지
|
||||
않습니다. 파일 상태를 무조건 마지막 \`sync\`로 되돌립니다.
|
||||
경고!
|
||||
\`fix\` 명령어는 오류와 의도적인 수정을 구별하지 않습니다.
|
||||
파일 상태를 조건 없이 마지막 \`sync\` 상태로 되돌립니다.
|
||||
.PP
|
||||
다른 옵션이 지정되지 않으면 전체 어레이가 처리됩니다.
|
||||
필터 옵션을 사용하여 처리할 파일 또는 디스크의 하위 집합을 선택하십시오.
|
||||
|
|
@ -997,7 +1010,7 @@ SnapRAID가 이동되거나 복사된 파일을 인식하는 능력을 향상시
|
|||
사용할 수 있습니다.
|
||||
재할당 과정 동안 해당 파일들은 패리티에 의해 보호되지 않으므로
|
||||
주의하십시오.
|
||||
.SH OPTIONS
|
||||
.SH 옵션 (OPTIONS)
|
||||
SnapRAID는 다음 옵션을 제공합니다:
|
||||
.TP
|
||||
.B \-c, \-\-conf CONFIG
|
||||
|
|
@ -1038,7 +1051,7 @@ Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합
|
|||
.TP
|
||||
.B \-e, \-\-filter\-error
|
||||
\`check\` 및 \`fix\`에서 오류가 있는 파일을 처리합니다.
|
||||
\`status\`에 나열된 대로 \`sync\` 및 \`scrub\` 중에 무단 또는 입출력 오류가
|
||||
\`status\`에 나열된 대로 \`sync\` 및 \`scrub\` 중에 조용한 오류 또는 입출력 오류가
|
||||
표시된 블록을 가진 파일만 처리합니다.
|
||||
이 옵션은 \`check\` 및 \`fix\`에서만 사용할 수 있습니다.
|
||||
.TP
|
||||
|
|
@ -1052,7 +1065,7 @@ Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합
|
|||
.TP
|
||||
.B \-o, \-\-older\-than DAYS
|
||||
\`scrub\`에서 처리할 어레이의 가장 오래된 부분을 선택합니다.
|
||||
DAYS는 블록이 스크럽되어야 하는 최소 일령(days)이며,
|
||||
DAYS는 블록이 스크럽되어야 하는 최소 경과 일수(days)이며,
|
||||
기본값은 10입니다.
|
||||
bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다.
|
||||
이 옵션은 \`scrub\`에서만 사용할 수 있습니다.
|
||||
|
|
@ -1072,7 +1085,7 @@ bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다.
|
|||
이 프로세스는 모든 디스크가 회전하고 CPU가 바쁜, 시스템이
|
||||
과부하 상태일 때 발생합니다.
|
||||
이는 기계의 극한 조건이며, 잠재된 하드웨어 문제가 있는 경우
|
||||
데이터가 아직 해시되지 않았기 때문에 무단 오류가 감지되지 않고
|
||||
데이터가 아직 해시되지 않았기 때문에 조용한 오류가 감지되지 않고
|
||||
지나갈 수 있습니다.
|
||||
이러한 위험을 피하려면, \`pre\-hash\` 모드를 활성화하여 모든 데이터를
|
||||
두 번 읽어 무결성을 보장할 수 있습니다.
|
||||
|
|
@ -1102,7 +1115,7 @@ bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다.
|
|||
초당 바이트 수입니다. K, M, 또는 G와 같은 승수(예: \-\-bw\-limit 1G)를
|
||||
지정할 수 있습니다.
|
||||
.TP
|
||||
.B \-t, \-\-tail 크기
|
||||
.B \-t, \-\-tail SIZE
|
||||
패리티 디스크의 지정된 꼬리 크기 이하를 사용하는 파일로
|
||||
목록을 제한합니다.
|
||||
K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: \-\-tail 1G).
|
||||
|
|
@ -1174,7 +1187,7 @@ SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면,
|
|||
동일한 속성을 가진 파일이 동일한 데이터를 가진 복사본이라고
|
||||
가정합니다.
|
||||
이는 한 디스크에서 다른 디스크로 복사되거나 이동된 파일을
|
||||
식별하고, 이미 계산된 해시 정보를 재사용하여 무단 오류를
|
||||
식별하고, 이미 계산된 해시 정보를 재사용하여 조용한 오류를
|
||||
감지하거나 누락된 파일을 복구할 수 있도록 합니다.
|
||||
일부 드문 경우에 이 동작은 오탐(false positives) 또는 많은
|
||||
해시 확인으로 인한 느린 프로세스를 초래할 수 있으며, 이 옵션을
|
||||
|
|
@ -1201,7 +1214,7 @@ content 파일에 있는 해시를 재사용하여 데이터를 검증하고
|
|||
강력히 권장됩니다.
|
||||
\`sync\` 작업 중에는 데이터 보호가 없습니다.
|
||||
.TP
|
||||
.B \-W, \-\-force\-realloc\-tail 크기
|
||||
.B \-W, \-\-force\-realloc\-tail SIZE
|
||||
\-R, \-\-force\-realloc과 같이 작동하지만, 각 패리티 파일의 지정된
|
||||
꼬리 부분(마지막 \'크기\' 바이트)으로 제한됩니다.
|
||||
현재 해당 꼬리 섹션에 저장된 모든 파일 조각/블록의 재할당(이동)을
|
||||
|
|
@ -1248,11 +1261,13 @@ locate \-t, \-\-tail을 사용하여 영향을 받는 파일을 사전에
|
|||
지정된 블록 번호부터 처리를 시작합니다.
|
||||
이는 손상된 디스크의 경우 특정 블록을 다시 확인하거나 수정하는 데
|
||||
유용할 수 있습니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것입니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것이며 \`check\` 및 \`fix\`에서만
|
||||
지원됩니다.
|
||||
.TP
|
||||
.B \-B, \-\-count BLKCOUNT
|
||||
지정된 수의 블록만 처리합니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것입니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것이며 \`check\` 및 \`fix\`에서만
|
||||
지원됩니다.
|
||||
.TP
|
||||
.B \-C, \-\-gen\-conf CONTENT
|
||||
기존 content 파일에서 더미 설정 파일을 생성합니다.
|
||||
|
|
@ -1278,7 +1293,7 @@ locate \-t, \-\-tail을 사용하여 영향을 받는 파일을 사전에
|
|||
.TP
|
||||
.B \-V, \-\-version
|
||||
프로그램 버전을 출력합니다.
|
||||
.SH CONFIGURATION
|
||||
.SH 설정 (CONFIGURATION)
|
||||
SnapRAID는 디스크 어레이의 위치와 패리티 정보를 저장할 위치를
|
||||
알기 위해 설정 파일이 필요합니다.
|
||||
.PP
|
||||
|
|
@ -1296,8 +1311,8 @@ Windows에서는 \`snapraid.exe\`와 같은 디렉토리에 있는
|
|||
여러 파일을 지정할 수 있으며, 이들은 서로 다른 디스크에
|
||||
있어야 합니다.
|
||||
하나의 파일이 더 이상 커질 수 없을 때 다음 파일이 사용됩니다.
|
||||
총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크보다
|
||||
적어도 커야 합니다.
|
||||
총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크의 크기
|
||||
이상이어야 합니다.
|
||||
.PP
|
||||
나중에 추가 패리티 파일을 추가할 수 있지만, 순서를 바꾸거나
|
||||
제거할 수는 없습니다.
|
||||
|
|
@ -1371,6 +1386,11 @@ NAME은 디스크를 식별하는 데 사용되며 고유해야 합니다. DIR
|
|||
NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점을
|
||||
변경할 수 있습니다.
|
||||
.PP
|
||||
그러나 구성된 경로는 항상 동일한 기본 데이터로 확인되어야 합니다.
|
||||
경로에 심볼릭 링크가 포함된 경우 해당 대상이 안정적으로 유지되어야 합니다.
|
||||
데이터 디렉터리를 즉석에서 전환하기 위해 이러한 심볼릭 링크의 대상을
|
||||
변경하는 것은 지원되지 않습니다.
|
||||
.PP
|
||||
어레이의 각 데이터 디스크에 대해 하나의 옵션을 사용해야 합니다.
|
||||
.PP
|
||||
나중에 설정 파일에서 직접 NAME을 변경하고 \`sync\` 명령을
|
||||
|
|
@ -1385,6 +1405,27 @@ NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점
|
|||
.PP
|
||||
이러한 디스크는 항상 회전할 것으로 예상되므로 \`up\` 및 \`down\` 명령의
|
||||
영향을 받지 않습니다.
|
||||
.SS snapshot
|
||||
\`sync\`, \`scrub\`, \`check\` 및 \`fix\` 명령어에 파일시스템 스냅샷 사용을
|
||||
활성화합니다.
|
||||
.PP
|
||||
활성화되면 SnapRAID는 \`sync\` 시작 시 지원되는 각 데이터 파일시스템의
|
||||
읽기 전용 스냅샷을 생성합니다. 이는 각 파일시스템의 안정적인 뷰를 제공하여,
|
||||
이후의 수정으로 인해 패리티 계산에 사용되는 데이터가 변경되는 것을 방지합니다.
|
||||
.PP
|
||||
이는 복구 가능성을 크게 향상시킵니다. 라이브 파일시스템에서 파일이 삭제되더라도
|
||||
스냅샷에 그대로 보존됩니다. 이를 통해 해당 블록의 패리티가 \[dq]깨지는\[dq] 것을 방지하여,
|
||||
다른 디스크가 고장 나더라도 데이터를 성공적으로 복구할 수 있도록 보장합니다.
|
||||
.PP
|
||||
이 옵션은 Linux의 Btrfs, Bcachefs 또는 ZFS 파일시스템과 Windows의 NTFS로 포맷된
|
||||
데이터 디스크에만 독점적으로 적용됩니다.
|
||||
패리티 디스크나 다른 파일시스템을 사용하는 데이터 디스크는 항상 파일시스템의
|
||||
라이브 버전을 사용합니다.
|
||||
.PP
|
||||
스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다.
|
||||
이 옵션이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오.
|
||||
.PP
|
||||
스냅샷 수명 주기에 대한 자세한 설명은 SNAPSHOTS 섹션을 참조하십시오.
|
||||
.SS nohidden
|
||||
모든 숨겨진 파일 및 디렉토리를 제외합니다.
|
||||
Unix에서는 숨겨진 파일은 \'.\'으로 시작하는 파일입니다.
|
||||
|
|
@ -1399,6 +1440,10 @@ sync 프로세스에서 제외하거나 포함할 파일 또는 디렉토리 패
|
|||
일치하는 패턴이 없으면, 지정된 마지막 패턴이 \`include\`이면
|
||||
파일은 제외되고, \`exclude\`이면 포함됩니다.
|
||||
.PP
|
||||
필터링은 디렉토리 순회 중에 계층적으로 수행됩니다. 디렉토리가 \`exclude\`
|
||||
규칙과 일치하면 해당 디렉토리 전체가 건너뛰어지며(가지치기됨), 그 안에
|
||||
있는 파일이나 하위 디렉토리에 대한 \`include\` 규칙은 평가되지 않습니다.
|
||||
.PP
|
||||
패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오.
|
||||
.PP
|
||||
이 옵션은 여러 번 사용될 수 있습니다.
|
||||
|
|
@ -1507,11 +1552,11 @@ SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다.
|
|||
다시 일시 중지될 수 있습니다.
|
||||
.PP
|
||||
작동 중에 SnapRAID는 각 디스크의 가열 곡선을 분석하고 활동이 계속되면
|
||||
도달할 것으로 예상되는 장기 정상 온도를 추정합니다.
|
||||
도달할 것으로 예상되는 장기 평형 온도를 추정합니다.
|
||||
추정은 디스크 온도가 네 번 증가한 후에만 수행되어, 신뢰할 수 있는
|
||||
추세를 설정하기에 충분한 데이터 포인트가 확보되도록 합니다.
|
||||
이 예측된 정상 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의
|
||||
냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 온도는 정보 제공
|
||||
이 예측된 평형 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의
|
||||
냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 평형 온도는 정보 제공
|
||||
목적일 뿐이며 SnapRAID의 동작에는 영향을 미치지 않습니다.
|
||||
프로그램의 동작은 오로지 실제 측정된 디스크 온도에 기반합니다.
|
||||
.PP
|
||||
|
|
@ -1557,6 +1602,9 @@ PARITY는 \`parity\`, \`2\-parity\`, \`3\-parity\`, \`4\-parity\`, \`5\-parity\`
|
|||
RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므로
|
||||
\`%s\`를 사용할 필요가 없을 수 있습니다.
|
||||
.PP
|
||||
기본 \`\-a\` 옵션을 대체하기 위해 \`[info: ...]\` 태그를 사용하여
|
||||
사용자 정의 정보 옵션 문자열을 지정할 수도 있습니다.
|
||||
.PP
|
||||
가능한 옵션은 smartmontools 설명서를 참조하십시오:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1572,6 +1620,10 @@ https://www.smartmontools.org/wiki/Supported_USB\-Devices
|
|||
예:
|
||||
.PP
|
||||
.RS 4
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl parity \-d sat %s
|
||||
.PD 0
|
||||
.PD
|
||||
|
|
@ -1586,11 +1638,19 @@ PARITY는 \`parity\`, \`2\-parity\`, \`3\-parity\`, \`4\-parity\`, \`5\-parity\`
|
|||
\`6\-parity\`, 또는 \`z\-parity\` 중 하나의 패리티 이름입니다.
|
||||
특수 값 *는 모든 디스크에서 속성을 무시하는 데 사용될 수 있습니다.
|
||||
.PP
|
||||
예를 들어, 모든 디스크에서 \`Current Pending Sector Count\` 속성을
|
||||
무시하려면:
|
||||
여러 속성을 공백으로 구분하여 지정할 수 있습니다.
|
||||
각 속성은 1에서 255 사이의 숫자나 대소문자를 구분하지 않는 이름
|
||||
(예: \`Current_Pending_Sector\`)으로 지정할 수 있습니다.
|
||||
.PP
|
||||
예를 들어, 모든 디스크에서 \`Current Pending Sector Count\` 와
|
||||
\`Reallocated Sectors Count\` 속성을 번호나 이름으로 무시하려면:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore * 197
|
||||
smartignore * 197 5
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
|
|
@ -1598,7 +1658,7 @@ smartignore * 197
|
|||
첫 번째 패리티 디스크에서만 무시하려면:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
|
|
@ -1638,7 +1698,7 @@ exclude /tmp/
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1694,7 +1754,7 @@ exclude \\System Volume Information
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1710,7 +1770,137 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH PATTERN
|
||||
.SH 스냅샷 (SNAPSHOTS)
|
||||
구성에서 스냅샷 옵션이 활성화된 경우, SnapRAID는 작업 중에 읽은 데이터를
|
||||
안정적으로 유지하기 위해 파일시스템 스냅샷을 사용하며, 이는 라이브 파일시스템의
|
||||
파일이 이후에 수정되거나 삭제되는 경우에도 마찬가지입니다.
|
||||
.PP
|
||||
스냅샷 관리는 완전히 자동적이고 투명하게 이루어집니다.
|
||||
백그라운드에서 완전히 처리되는 스냅샷의 추가적인 보호와 함께,
|
||||
기존과 완전히 동일하게 SnapRAID를 계속 사용할 수 있습니다.
|
||||
.PP
|
||||
이것은 두 가지 주요 이점을 제공합니다.
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 일관성
|
||||
장시간 실행되는 sync 또는 scrub 중에 라이브 파일시스템에서 수정된 파일은
|
||||
스냅샷이 생성된 각 파일시스템이 작업 기간 동안 변경되지 않고 유지되므로
|
||||
패리티 불일치나 작업 중단을 유발하지 않습니다.
|
||||
.HP 4
|
||||
.I 복구
|
||||
라이브 파일시스템에서 파일이 업데이트되거나 삭제되더라도 스냅샷에 보존됩니다.
|
||||
다음 sync가 실행되기 전에 디스크 고장이 발생하면, SnapRAID는 스냅샷에 보존된
|
||||
데이터를 사용하여 고장 난 디스크를 재구성합니다.
|
||||
.PD
|
||||
.PP
|
||||
.RS 4
|
||||
.PD 0
|
||||
활성 sync 프로세스 중에 디스크 고장이 발생하는 경우,
|
||||
SnapRAID는 이전 패리티 계산의 스냅샷과 현재 스냅샷 모두에서 자동으로 읽을 수도 있습니다.
|
||||
이는 동기화 사이에 블록이 수정되거나 삭제되었더라도 패리티 방정식을 푸는 데
|
||||
필요한 정확한 데이터 블록에 대한 접근을 제공함으로써 완전한 복구 확률을 최대화합니다.
|
||||
.PD
|
||||
.PP
|
||||
.PD 0
|
||||
스냅샷이 없으면 정상 디스크에서 업데이트되거나 삭제된 파일로 인해 데이터 블록이 누락되며,
|
||||
이는 다른 고장 난 디스크를 복구하는 데 필요할 수 있습니다.
|
||||
.PD
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
스냅샷은 데이터 디스크에 대해서만 생성되며, 기본 파일시스템이 이 기능을 지원하는 경우에만
|
||||
생성됩니다. 패리티 디스크는 항상 라이브 파일시스템을 사용합니다.
|
||||
.PP
|
||||
현재 이는 Linux의 Btrfs, Bcachefs, ZFS 및 Windows의 NTFS에서 지원됩니다.
|
||||
.PP
|
||||
서로 다른 파일시스템을 가진 데이터 디스크를 혼합할 수 있습니다. 스냅샷을 지원하는 디스크만
|
||||
이를 활용하고, 다른 디스크는 라이브 파일시스템에서 직접 계속 작동합니다.
|
||||
.PP
|
||||
스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다.
|
||||
스냅샷이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오.
|
||||
.SS 스냅샷 사용 시 명령어 동작 (Command Behavior with Snapshots)
|
||||
\`sync\` 및 \`scrub\` 명령어는 파일시스템이 스냅샷을 지원하는 데이터 디스크에 대해
|
||||
스냅샷을 사용합니다. 스냅샷이 생성된 디스크에서 명령어는 라이브 파일시스템의
|
||||
동시 변경에 영향을 받지 않는 안정적인 파일시스템 이미지를 봅니다.
|
||||
\`sync\` 중에 지원되는 각 데이터 파일시스템에 대해 독립적으로 새 스냅샷이 생성됩니다.
|
||||
이러한 스냅샷은 집합적으로 패리티 계산에 사용되는 데이터를 제공합니다.
|
||||
반면에 \`scrub\` 명령어는 기존 패리티와 일치하는 신뢰할 수 있는 참조 지점을 유지하기 위해
|
||||
가장 최근 동기화 중에 생성된 마지막 스냅샷을 이용합니다.
|
||||
.PP
|
||||
\`check\` 및 \`fix\` 명령어의 경우, 마지막 스냅샷의 사용 여부는
|
||||
\-d, \-\-filter\-disk 옵션을 사용하여 특정 디스크를 대상으로 지정하는지 여부에 따라 달라집니다.
|
||||
.TP
|
||||
.B \-d를 통해 명시적으로 선택된 디스크(작업의 \[dq]대상\[dq])는 항상 라이브 파일시스템을 사용합니다.
|
||||
\`fix\` 의 경우 이를 통해 활성 교체 디스크에 데이터를 복원할 수 있습니다.
|
||||
\`check\` 의 경우 동일한 조건에서 \`fix\` 작업을 시뮬레이션할 수 있습니다.
|
||||
.PP
|
||||
다른 모든 데이터 디스크(\[dq]참조\[dq] 디스크)는 해당 스냅샷을 통해 액세스됩니다.
|
||||
이를 통해 복구가 진행되는 동안 정상 디스크의 파일을 수정하고 있더라도 SnapRAID가
|
||||
패리티 방정식을 풀기 위한 안정적이고 동결된 참조를 가질 수 있습니다.
|
||||
.TP
|
||||
.B \-d 옵션이 제공되지 않으면 SnapRAID는 작업이 전체 어레이에 적용된다고 가정하며, 이 경우
|
||||
\`check\` 와 \`fix\` 는 라이브 파일시스템만을 독점적으로 사용합니다.
|
||||
.PP
|
||||
다른 모든 명령어는 라이브 파일시스템에서만 독점적으로 작동합니다.
|
||||
.SH 스냅샷 수명 주기 (SNAPSHOTS LIFECYCLE)
|
||||
SnapRAID는 각 데이터 하위 볼륨의 루트에 있는 숨겨진 디렉터리 내에서
|
||||
\`stable\`(안정), \`pending\`(보류) 및 \`scan\`(스캔)이라는 세 가지 특정 스냅샷을 관리합니다.
|
||||
Btrfs, Bcachefs 및 NTFS에서는 \`.snapraid/\` 디렉터리가 사용되며,
|
||||
ZFS에서는 표준 \`.zfs/snapshot/\` 이 사용됩니다.
|
||||
.PP
|
||||
\`stable\` 스냅샷은 성공적으로 완료된 마지막 \`sync\` 상태를 나타내며,
|
||||
현재 패리티를 계산하는 데 사용된 정확한 데이터를 포함합니다. 이는
|
||||
\`scrub\`, \`check\` 및 \`fix\` 명령어의 기본 데이터 소스 역할을 합니다.
|
||||
.PP
|
||||
\`scan\` 스냅샷은 검사 및 패리티 계산을 위한 동결된 상태를 제공하기 위해 \`sync\` 시작 시
|
||||
생성되는 임시 이미지입니다.
|
||||
검사를 수행하고 새 콘텐츠 상태를 저장한 후 이전 \`pending\` 스냅샷을 대체합니다.
|
||||
.PP
|
||||
\`pending\` 스냅샷은 중단된 \`sync\` 에서 사용하는 이미지입니다.
|
||||
작업이 성공적으로 완료되면 이전의 \`stable\` 스냅샷은 삭제되고, \`pending\` 스냅샷이
|
||||
새로운 안정적인 참조로 자리를 잡도록 승격됩니다.
|
||||
.PP
|
||||
\`sync\` 가 중단되면 \`pending\` 스냅샷은 보존됩니다.
|
||||
패리티가 부분적으로만 동기화되었더라도 .content 파일에 기록된 파일시스템 상태와 일치하므로
|
||||
이후의 \`scrub\`, \`check\` 및 \`fix\` 명령어는 이 보류 중인 스냅샷을 사용합니다.
|
||||
.PP
|
||||
\`sync\` 가 중단된 경우, \`check\` 및 \`fix\` 명령어는 \`stable\` 스냅샷에서도 읽어와
|
||||
동기화 중에 업데이트되거나 삭제된 파일에서 데이터 블록을 검색합니다.
|
||||
이는 동기화 프로세스 전반에 걸쳐 .content 파일이 수정되거나 삭제된 모든 파일의
|
||||
메타데이터를 유지하기 때문에 가능합니다.
|
||||
이 기록 정보는 동기화가 성공적으로 완료되고 .content 파일의 최종 버전이 저장되어야만 삭제됩니다.
|
||||
.PP
|
||||
중단 후 \`sync\` 가 재시작되면 기존의 보류 중인(pending) 스냅샷은 삭제되고,
|
||||
라이브 파일시스템의 현재 상태를 캡처하기 위해 새 스냅샷이 생성됩니다.
|
||||
그러나 \`sync\` 가 중단된 경우 후속 \`sync\` 가 성공적으로 완료될 때까지
|
||||
파일을 수정, 삭제, 교체 또는 이동하지 마십시오.
|
||||
패리티에는 중단된 sync에서 사용된 스냅샷에서 계산된 블록이
|
||||
여전히 포함되어 있을 수 있습니다. 이후의 sync로 인해 해당 스냅샷이
|
||||
교체되어 복구에 필요한 중간 버전의 파일을 사용할 수 없게 될 수 있습니다.
|
||||
.SS 파일 시스템 스냅샷을 사용한 외부 백업 (External backups with filesystem snapshots)
|
||||
파일 시스템 스냅샷이 활성화되면 SnapRAID는 각 데이터 서브볼륨, 볼륨 또는
|
||||
데이터셋의 루트에서 스냅샷에 접근하거나 생성합니다.
|
||||
.PP
|
||||
외부 도구와의 간섭을 피하는 간단한 방법은 서브볼륨이나 볼륨 내의 일반
|
||||
하위 디렉터리(예: \`/mnt/subvol\` 대신 \`/mnt/subvol/data\`)를 가리키도록
|
||||
\`data\` 를 설정하는 것입니다. SnapRAID는 항상 서브볼륨 루트에 스냅샷 디렉터리를
|
||||
생성하므로(예: \`/mnt/subvol/.snapraid/\`), 데이터 하위 디렉터리를 깨끗하게
|
||||
유지하여 해당 디렉터리 내에서 작동하는 백업 도구에 스냅샷이 노출되지 않도록 합니다.
|
||||
.PP
|
||||
그렇지 않고 설정된 \`data\` 디렉터리 자체가 서브볼륨이나 볼륨 루트인 경우,
|
||||
SnapRAID는 해당 디렉터리 바로 안에 \`.snapraid/\` 디렉터리를 생성합니다(Btrfs,
|
||||
Bcachefs 및 NTFS). SnapRAID 자체 스캔에서는 이 디렉터리가 자동으로 제외되지만,
|
||||
외부 백업 도구나 파일 동기화 도구는 이를 발견하게 됩니다. 제외하지 않으면
|
||||
스냅샷이나 디렉터리 링크를 탐색하여 동결된 전체 데이터 트리를 복사함으로써
|
||||
데이터를 중복 생성하고 백업 저장 공간을 고갈시킬 수 있습니다. 항상 외부 백업
|
||||
도구에서 \`.snapraid/\` 디렉터리를 제외하도록 구성하십시오.
|
||||
.PP
|
||||
ZFS에서는 스냅샷이 \`.snapraid/\` 대신 표준 가상 디렉터리인 \`.zfs/snapshot/\` 을
|
||||
통해 노출됩니다. 기본값(\`snapdir=hidden\`)에서는 ZFS가 디렉터리 목록에서 이
|
||||
디렉터리를 숨기므로 외부 백업 도구가 이를 탐색하지 않습니다. \`snapdir=visible\` 로
|
||||
설정한 경우 백업 도구에서 \`.zfs/\` 디렉터리를 제외하도록 하십시오.
|
||||
.SH 패턴 (PATTERN)
|
||||
패턴은 포함하거나 제외할 파일을 필터링하는 유연한 방법을 제공합니다.
|
||||
글로빙(globbing) 문자를 사용하면 모든 경로를 일일이 나열하지 않고도
|
||||
특정 파일 이름이나 전체 디렉토리 구조와 일치하는 규칙을 정의할 수 있습니다.
|
||||
|
|
@ -1724,17 +1914,18 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
내에서의 일치에 적합합니다. 이는 쉘 글로빙에서 익숙한 표준 와일드카드
|
||||
동작입니다.
|
||||
.PP
|
||||
이중 별표 \`**\`는 더 강력하며 디렉토리 구분 기호를 포함한 모든 문자
|
||||
시퀀스와 일치합니다. 이를 통해 패턴이 여러 디렉토리 수준에서 일치할 수
|
||||
있습니다. \`**\`가 패턴 내에 직접 포함된 경우, 주변 리터럴 텍스트 사이의
|
||||
슬래시를 포함하여 0개 이상의 문자와 일치할 수 있습니다.
|
||||
이중 별표 와일드카드 \`**\`는 디렉토리 구분 기호에 인접해 있는 경우(슬래시
|
||||
앞이나 뒤에 오는 경우)에만 디렉토리 구분 기호를 가로질러 일치합니다.
|
||||
이 형식에서는 여러 디렉토리 수준에 걸쳐 0개 이상의 문자와 일치합니다.
|
||||
예를 들어, \`foo/**/bar\`는 \`foo/bar\`, \`foo/a/bar\` 및 \`foo/a/b/bar\`와 일치하고,
|
||||
\`**/build\`는 \`build\` 및 \`foo/bar/build\`와 일치하며, \`src/**.js\`는 \`src/main.js\` 및
|
||||
\`src/ui/components/main.js\`와 일치합니다.
|
||||
독립형 형식인 \`/**/\`는 완전한 패턴으로 허용되지 않습니다.
|
||||
.PP
|
||||
\`**\`의 가장 중요한 용도는 특수 형식인 \`/**/\`입니다. 이는 0개 이상의
|
||||
전체 디렉토리 수준과 일치하므로 정확한 경로 구조를 모르더라도
|
||||
디렉토리 트리의 모든 깊이에서 파일과 일치시킬 수 있습니다.
|
||||
예를 들어, \`src/**/main.js\` 패턴은 \`src/main.js\`(0개의 디렉토리 건너뜀),
|
||||
\`src/ui/main.js\`(1개의 디렉토리 건너뜀), \`src/ui/components/main.js\`
|
||||
(2개의 디렉토리 건너뜀)와 일치합니다.
|
||||
\`**\`가 슬래시에 인접하지 않은 경우 \`*\`처럼 작동하며 디렉토리 구분 기호와
|
||||
일치하지 않습니다. 예를 들어, \`**.jpg\`는 현재 디렉토리의 \`photo.jpg\`와는
|
||||
일치하지만 \`dir/photo.jpg\`와는 일치하지 않습니다. 해당 용도로는 \`**/*.jpg\`를
|
||||
사용하십시오.
|
||||
.PP
|
||||
대괄호 \`[]\`를 사용하는 문자 클래스는 지정된 세트 또는 범위에서
|
||||
단일 문자와 일치합니다. 다른 단일 문자 패턴과 마찬가지로 디렉토리
|
||||
|
|
@ -1743,7 +1934,8 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PP
|
||||
기억해야 할 근본적인 차이점은 \`*\`, \`?\` 및 문자 클래스는 모두
|
||||
디렉토리 경계를 준수하고 단일 경로 구성 요소 내에서만 일치하는 반면,
|
||||
\`**\`는 디렉토리 구분 기호를 가로질러 일치할 수 있는 유일한 패턴이라는 것입니다.
|
||||
\`**\`는 슬래시에 인접해 있는 경우에만 디렉토리 구분 기호를 가로질러
|
||||
일치할 수 있다는 것입니다.
|
||||
.PP
|
||||
네 가지 유형의 패턴이 있습니다:
|
||||
.TP
|
||||
|
|
@ -1870,6 +2062,45 @@ include /pictures/
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
디렉토리를 제외하면(DIR/ 또는 /PATH/DIR/ 사용) SnapRAID가 해당 디렉토리에
|
||||
진입하여 스캔하는 것이 차단됩니다. 따라서 제외된 상위 디렉토리 내에 있는
|
||||
파일이나 하위 디렉토리는 스캐너가 탐색하지 않으므로 \`include\` 규칙으로 다시
|
||||
포함할 수 없습니다.
|
||||
.PP
|
||||
예를 들어, 다음 설정에서는 \`/keep/\`이 가지치기되므로 \`file.dat\`가 포함되지
|
||||
않습니다:
|
||||
.PP
|
||||
.RS 4
|
||||
# 의도대로 작동하지 않음: /keep/ 전체를 건너뜀
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
디렉토리 자체를 제외하지 않고 특정 파일만 유지하면서 내부 파일들을 제외하려면,
|
||||
디렉토리 자체가 아니라 내부의 파일 패턴을 제외하십시오:
|
||||
.PP
|
||||
.RS 4
|
||||
# 의도대로 작동함: /keep/을 순회하지만 내부의 다른 파일들은 제외됨
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/*
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
명령줄에서 \-f 옵션을 사용할 때 \`include\` 패턴만 사용할 수 있습니다.
|
||||
예를 들어:
|
||||
.PP
|
||||
|
|
@ -1889,7 +2120,7 @@ snapraid \-f \[dq]*.mp3\[dq] check
|
|||
.PP
|
||||
Unix에서는 명령줄에서 글로빙 문자를 사용할 때 셸이 확장하는 것을
|
||||
방지하기 위해 따옴표로 묶어야 합니다.
|
||||
.SH IGNORE FILE
|
||||
.SH 제외 파일 (IGNORE FILE)
|
||||
설정 파일의 전역 규칙 외에도, 배열 내의 모든 디렉토리에 \`.snapraidignore\`
|
||||
파일을 배치하여 분산된 제외 규칙을 정의할 수 있습니다.
|
||||
.PP
|
||||
|
|
@ -1947,15 +2178,17 @@ build/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH CONTENT
|
||||
.SH 콘텐츠 (CONTENT)
|
||||
SnapRAID는 content 파일에 파일 목록과 체크섬을 저장합니다.
|
||||
.PP
|
||||
이것은 디스크 어레이에 있는 모든 파일의 목록과 무결성을 확인하기 위한
|
||||
모든 체크섬을 나열하는 이진 파일입니다.
|
||||
.PP
|
||||
이 파일은 \`sync\` 및 \`scrub\` 명령에 의해 읽고 쓰여지며,
|
||||
\`fix\`, \`check\`, 및 \`status\` 명령에 의해 읽혀집니다.
|
||||
.SH PARITY
|
||||
content 파일은 \`sync\`, \`scrub\`, \`touch\` 및 \`rehash\` 명령에 의해
|
||||
읽고 쓰여집니다. 이것은 \`status\`, \`diff\`, \`check\`, \`fix\`, \`list\`,
|
||||
\`dup\`, \`locate\` 및 \`pool\` 명령에 의해 읽혀지며, \`smart\`, \`probe\`,
|
||||
\`up\`, \`down\` 및 \`devices\` 명령에 의해 완전히 무시됩니다.
|
||||
.SH 패리티 (PARITY)
|
||||
SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다.
|
||||
.PP
|
||||
이들은 \`content\` 파일에 정의된 모든 블록의 계산된 패리티를 포함하는
|
||||
|
|
@ -1963,7 +2196,7 @@ SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다
|
|||
.PP
|
||||
이 파일들은 \`sync\` 및 \`fix\` 명령에 의해 읽고 쓰여지며,
|
||||
\`scrub\` 및 \`check\` 명령에 의해서만 읽혀집니다.
|
||||
.SH ENCODING
|
||||
.SH 인코딩 (ENCODING)
|
||||
Unix의 SnapRAID는 인코딩을 무시합니다. 파일 시스템에서 사용되는
|
||||
것과 동일한 인코딩으로 파일 이름을 읽고 저장합니다.
|
||||
.PP
|
||||
|
|
@ -1975,7 +2208,182 @@ Windows 콘솔을 UTF\-8 모드로 설정하고 콘솔 글꼴로 \`Lucida Consol
|
|||
같은 TrueType 글꼴을 사용해야 합니다.
|
||||
이는 출력되는 파일 이름에만 영향을 미치며, 콘솔 출력을 파일로
|
||||
리디렉션하는 경우 결과 파일은 항상 UTF\-8 형식입니다.
|
||||
.SH COPYRIGHT
|
||||
This file is Copyright (C) 2025 Andrea Mazzoleni
|
||||
.SH SEE ALSO
|
||||
snapraid_log(1), snapraidd(1)
|
||||
.SH 종료 코드 (EXIT CODE)
|
||||
SnapRAID는 다음과 같은 오류 코드로 종료됩니다:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 0
|
||||
모두 정상.
|
||||
.HP 4
|
||||
.I 1
|
||||
명령 실행 중 오류가 발생했습니다.
|
||||
.HP 4
|
||||
.I 2
|
||||
\`diff\` 명령으로 모두 정상임을 확인했으나 \`sync\`가 필요합니다.
|
||||
.HP 4
|
||||
.I 3
|
||||
디스크 장치 명령(\`probe\`, \`smart\`, \`devices\`, \`up\`, \`down\`)이 완료되었으나,
|
||||
누락된 장치로 인해 하나 이상의 파일 시스템이 저하(degraded) 모드로 실행 중입니다.
|
||||
.PD
|
||||
.RE
|
||||
.SH 알려진 문제 (KNOWN ISSUES)
|
||||
.SS 파일 시스템 경계
|
||||
SnapRAID는 데이터 디스크를 스캔하는 동안 파일 시스템, 마운트 또는 서브볼륨 경계를
|
||||
넘지 않습니다. 이러한 경계가 감지되면 SnapRAID는 경고(WARNING)를 보고하고
|
||||
그 너머를 스캔하지 않습니다.
|
||||
.PP
|
||||
이러한 경계 너머에 있는 파일은 데이터 디스크에 포함되지 않으며, 보호해야 하는 경우
|
||||
별도로 구성해야 합니다.
|
||||
.SS 파일 시스템 스냅샷 사용 시 마운트 지점
|
||||
파일 시스템 스냅샷이 활성화된 경우, 데이터 디스크 내부의 중첩된 마운트 지점 및
|
||||
바인드 마운트는 지원되지 않습니다.
|
||||
.PP
|
||||
마운트 지점은 라이브 시스템 마운트 네임스페이스의 일부이며 파일 시스템 스냅샷에
|
||||
보존되지 않습니다. 따라서 스냅샷을 스캔할 때 라이브 파일 시스템에서 마운트 지점에
|
||||
의해 숨겨졌던 디렉터리가 보일 수 있습니다.
|
||||
.PP
|
||||
파일 시스템 스냅샷이 활성화된 경우 데이터 디스크 내에 중첩된 마운트 지점이나
|
||||
바인드 마운트를 배치하지 마십시오.
|
||||
.SS 파일 시스템 스냅샷 사용 시 여러 설정
|
||||
동일한 파일 시스템 스냅샷 네임스페이스를 사용하는 여러 독립된 SnapRAID
|
||||
설정 간에는 스냅샷 지원을 안전하게 공유할 수 없습니다.
|
||||
.PP
|
||||
Btrfs 및 Bcachefs에서는 스냅샷 지원이 활성화된 단 하나의 SnapRAID 설정만이
|
||||
동일한 서브볼륨 내의 데이터 디렉터리를 사용할 수 있습니다. ZFS에서는 동일한
|
||||
제한이 데이터셋에 적용되며, NTFS에서는 볼륨에 적용됩니다.
|
||||
.PP
|
||||
동일한 스냅샷 네임스페이스를 공유하는 여러 설정은 동일한 \`stable\`, \`pending\`
|
||||
및 \`scan\` 스냅샷을 사용합니다. 따라서 하나의 설정을 실행하면 다른 설정에 필요한
|
||||
복구 스냅샷을 대체하거나 삭제할 수 있습니다.
|
||||
.SS 타임스탬프 변경 없는 인플레이스 파일 수정
|
||||
SnapRAID는 파일 크기와 수정 타임스탬프(mtime)를 비교하여 파일 수정을 감지합니다.
|
||||
.PP
|
||||
애플리케이션이 파일 크기를 변경하지 않고 수정 타임스탬프도 업데이트하지 않은 채
|
||||
인플레이스로 파일을 수정하는 경우, \[dq]diff\[dq] 및 \[dq]sync\[dq]는 파일이 변경되었음을 감지하지
|
||||
못하며 패리티가 업데이트되지 않습니다.
|
||||
.PP
|
||||
SnapRAID가 이러한 변경 사항을 인식하도록 하려면 파일의 수정 타임스탬프를
|
||||
업데이트하십시오(예: \[dq]touch\[dq] 유틸리티 사용). 그렇지 않으면 이 차이점은 이후의
|
||||
\[dq]scrub\[dq] 또는 \[dq]check\[dq] 중에 해시 불일치로만 감지됩니다.
|
||||
.SS Windows 비ASCII 대소문자 일치
|
||||
SnapRAID는 모든 플랫폼에서 표준적이고 예측 가능한 UTF\-8 인코딩을 사용하며,
|
||||
대소문자를 구분하지 않는 일치를 ASCII 문자로 제한합니다.
|
||||
.PP
|
||||
Windows 파일 시스템은 임의의 시스템 종속 폴딩 테이블을 통해 유니코드 파일 이름
|
||||
전체에서 대소문자 구분을 없애도록 강제하는 레거시 디자인의 한계를 안고 있습니다.
|
||||
결과적으로 Windows는 완전히 다른 유니코드 바이트 시퀀스를 마치 동일한 파일인 것처럼
|
||||
취급하여 파일 시스템의 실제 상태를 왜곡합니다.
|
||||
.PP
|
||||
예를 들어 \`À.txt\`와 \`à.txt\`는 고유한 유니코드 이름이지만, Windows는 비논리적으로
|
||||
이를 동일하게 취급하는 반면 SnapRAID는 이들의 진정한 차이를 보존합니다.
|
||||
.PP
|
||||
이 제한은 Windows의 일관성 없는 유니코드 파일 이름 처리와 대소문자를 구분하지 않는
|
||||
별칭 지정 고집으로 인해 발생합니다. Windows의 대소문자 폴딩으로 인한 불일치를
|
||||
방지하려면 구성 경로 및 필터의 비ASCII 문자에 대해 항상 정확한 대소문자를
|
||||
지정하십시오.
|
||||
.SS 부분 fix 복구
|
||||
\`fix\`가 \`\-S, \-\-start\` 또는 \`\-B, \-\-count\`를 사용하여 제한되면,
|
||||
SnapRAID는 선택된 블록에서만 작동하며 파일 수준의 완료 처리나 격리를
|
||||
수행하지 않습니다.
|
||||
.PP
|
||||
복구 결과 현재 내용을 나타낸다고 입증할 수 없는 최선의(best\-effort) 데이터가
|
||||
생성되더라도, 이러한 블록은 일반 파일 이름으로 기록될 수 있습니다. 이러한
|
||||
복구된 블록과 관련된 불확실성은 명령이 종료된 후 유지되지 않습니다.
|
||||
.PP
|
||||
결과적으로 이후의 \`fix\`는 이러한 읽기 가능한 블록을 유효한 파일 데이터로
|
||||
취급하고 다시 복구하려고 시도하지 않습니다. 이로 인해 파일에 불완전하거나
|
||||
오래된 데이터가 남아 있음에도 후속 복구가 성공으로 보고될 수 있습니다.
|
||||
.PP
|
||||
\`\-S\` 및 \`\-B\` 옵션은 일반적으로 일반 \`fix\`가 실패한 후 고급 수동 복구만을
|
||||
위한 것입니다. 부분 \`fix\`에서 복구할 수 없는 데이터가 보고되면 다른 복구를
|
||||
시도하기 전에 영향을 받는 파일을 제거하거나 이름을 바꾸거나 해당 내용을
|
||||
수동으로 확인하십시오.
|
||||
.SS NTFS 하드 링크 및 제외된 경로
|
||||
NTFS에서는 디렉터리 항목이 각 하드 링크의 파일 크기와 타임스탬프를
|
||||
독립적으로 캐시합니다. 한 링크를 통해 파일이 수정되면 동일한 파일을
|
||||
가리키는 다른 링크의 디렉터리 항목은 액세스될 때까지 오래된 메타데이터를
|
||||
유지할 수 있습니다.
|
||||
.PP
|
||||
SnapRAID는 스캔 중에 동일한 파일에 대한 하드 링크를 2개 이상 발견하면
|
||||
이러한 상태를 자동으로 감지하고 정규화합니다. 그러나 다른 링크가 필터에
|
||||
의해 제외되었거나 데이터 디스크 경로 외부에 있어 하나의 하드 링크만
|
||||
스캔되는 경우, SnapRAID는 inode 충돌을 감지할 수 없으며 표시되는 유일한
|
||||
링크의 캐시된 메타데이터에 의존합니다.
|
||||
.PP
|
||||
결과적으로 제외되었거나 외부 하드 링크를 통해 변경된 사항은 해당 경로를
|
||||
통해 파일에 액세스하거나 열어 운영 체제에서 포함된 링크의 메타데이터를
|
||||
새로 고칠 때까지 SnapRAID에서 감지되지 않을 수 있습니다.
|
||||
.PP
|
||||
이러한 제한을 방지하려면 SnapRAID에서 제외된 하드 링크를 통해 보호된
|
||||
파일을 수정하지 않거나, SnapRAID가 이를 정규화할 수 있도록 파일의 모든
|
||||
하드 링크가 스캔에 포함되도록 하십시오.
|
||||
.SS 중단된 다중 패리티 sync 후 복구
|
||||
다중 패리티 디스크가 있는 어레이에서 \`sync\`가 중단되면 서로 다른
|
||||
패리티 레벨이 일시적으로 동기화되지 않은 상태로 남을 수 있습니다.
|
||||
예를 들어 패리티 1에는 새로 업데이트된 데이터가 이미 포함되어 있는 반면,
|
||||
패리티 2에는 여전히 이전 데이터가 남아 있을 수 있습니다.
|
||||
.PP
|
||||
\`check\` 또는 \`fix\`를 수행하는 동안 SnapRAID는 다양한 패리티 조합을
|
||||
시도하고 알려진 블록 해시(전체 블록을 포함하며 일반적으로 256 KiB)에 대해
|
||||
재구성된 데이터를 검증합니다.
|
||||
.PP
|
||||
SnapRAID가 이전 패리티와 새 패리티의 일치하지 않는 혼합을 사용하여
|
||||
재구성을 시도하면 선형 RAID 방정식은 잘못된 데이터를 생성합니다. 이러한
|
||||
유효하지 않은 조합이 잘못 수락되려면, 동일한 스트라이프의 다른 비동기화된
|
||||
블록이 잘못된 데이터로 재구성되는 와중에도 방정식이 우연히 하나 이상의
|
||||
완전한 256 KiB 블록을 완벽하게 재구성하여 해시가 일치해야 합니다.
|
||||
.PP
|
||||
이 시나리오는 해시 충돌에 의존하지 않습니다. 오히려 혼합된 패리티
|
||||
방정식 자체가 우연히 원래의 정확한 256 KiB 블록 내용을 생성해야 합니다.
|
||||
이는 특별히 조작되었거나 매우 반복적인 데이터에서는 수학적으로 가능하지만,
|
||||
실제 데이터에서는 사실상 불가능합니다.
|
||||
.PP
|
||||
모든 디스크가 정상인 경우 추가 변경을 수행하기 전에 중단된 \`sync\`를
|
||||
완료하면 이러한 불확실성이 제거됩니다. 디스크에 오류가 발생하여 복구가
|
||||
필요한 경우 \`check\` 또는 \`fix\`를 실행하기 전에 데이터 디스크를 수정하지
|
||||
마십시오.
|
||||
.SS 예약된 파일 및 디렉터리 이름
|
||||
SnapRAID는 내부 작업을 위해 일부 파일, 디렉터리 및 스냅샷 이름을
|
||||
예약합니다. 사용자 데이터에 이러한 이름을 사용하지 마십시오:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I .snapraidignore
|
||||
로컬 제외 규칙 파일.
|
||||
.HP 4
|
||||
.I .snapraid
|
||||
스냅샷 컨테이너 디렉터리.
|
||||
.HP 4
|
||||
.I snapraid\-*
|
||||
SnapRAID에서 관리하는 ZFS 스냅샷 이름.
|
||||
.HP 4
|
||||
.I *.unrecoverable
|
||||
복구 중 격리된 손상된 파일.
|
||||
.HP 4
|
||||
.I CONTENT.tmp
|
||||
content 업데이트용 임시 파일.
|
||||
.HP 4
|
||||
.I CONTENT.lock
|
||||
content 잠금 파일.
|
||||
.HP 4
|
||||
.I PARITY.spaceholder
|
||||
Windows 패리티 할당 중 사용되는 임시
|
||||
공간 확보 파일.
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
관련 없는 데이터에 이러한 이름을 사용하면 파일이나 스냅샷이 무시되거나,
|
||||
메타데이터로 잘못 해석되거나, 덮어쓰기되거나, 이름이 바뀌거나, 삭제될 수
|
||||
있습니다.
|
||||
.PP
|
||||
Windows에서는 대소문자를 구분하도록 구성된 NTFS 디렉터리에서도 모든
|
||||
대소문자 변형이 마찬가지로 예약됩니다(예: .SNAPRAIDIGNORE, .SnapRaid,
|
||||
CONTENT.TMP, CONTENT.Lock).
|
||||
.SH 번역 (TRANSLATION)
|
||||
이 문서는 영어 매뉴얼의 자동 번역본입니다.
|
||||
공식 버전은 영어 매뉴얼을 참조하십시오.
|
||||
.SH 저작권 (COPYRIGHT)
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
.SH 참고 (SEE ALSO)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Name{number}
|
||||
snapraid - 디스크 어레이를 위한 SnapRAID 백업
|
||||
|
||||
Synopsis
|
||||
개요 (Synopsis)
|
||||
:snapraid [-c, --conf CONFIG]
|
||||
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
: [-m, --filter-missing] [-e, --filter-error]
|
||||
|
|
@ -23,7 +23,7 @@ Synopsis
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
설명 (Description)
|
||||
SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로,
|
||||
최대 6개의 디스크 오류가 발생해도 데이터를 복구하기 위한
|
||||
패리티 정보를 저장합니다.
|
||||
|
|
@ -33,7 +33,7 @@ Description
|
|||
|
||||
* 파일을 다시 포맷할 필요 없이 이미 파일로 채워진 디스크를
|
||||
활용할 수 있으며, 평소처럼 액세스할 수 있습니다.
|
||||
* 데이터 무결성을 보장하고 무단 손상을 방지하기 위해 모든 데이터가
|
||||
* 데이터 무결성을 보장하고 조용한 데이터 손상을 방지하기 위해 모든 데이터가
|
||||
해시됩니다.
|
||||
* 실패한 디스크의 수가 패리티 수를 초과하는 경우, 데이터 손실은
|
||||
영향을 받은 디스크로 제한되며, 다른 디스크의 데이터는
|
||||
|
|
@ -50,20 +50,30 @@ Description
|
|||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitations
|
||||
SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을
|
||||
결합하는 것을 목표로 합니다. 하지만, 사용 전에 고려해야 할 몇 가지
|
||||
제한 사항이 있습니다.
|
||||
제한 사항 (Limitations)
|
||||
SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 결합하는 것을
|
||||
목표로 합니다. 그러나 사용하기 전에 고려해야 할 몇 가지 제한 사항이 있습니다.
|
||||
|
||||
주요 제한 사항은 디스크가 실패하고 최근에 동기화(sync)하지 않은 경우,
|
||||
완전히 복구하지 못할 수 있다는 것입니다.
|
||||
더 구체적으로, 마지막 동기화 작업 이후 변경되거나 삭제된 파일의
|
||||
크기만큼 복구가 불가능할 수 있습니다.
|
||||
이는 변경되거나 삭제된 파일이 실패한 디스크에 있지 않더라도 발생합니다.
|
||||
이것이 SnapRAID가 **거의 변경되지 않는 데이터**에 더 적합한 이유입니다.
|
||||
가장 큰 제한 사항은 디스크가 고장 날 경우, 마지막 `sync`(동기화) 작업의 상태까지만
|
||||
데이터를 복구할 수 있다는 점입니다. 마지막 동기화 이후에 추가되거나 수정된 데이터 중
|
||||
고장 난 디스크에 위치한 데이터는 모두 손실됩니다.
|
||||
|
||||
반면에, 새로 추가된 파일은 이미 존재하는 파일의 복구를 방해하지 않습니다.
|
||||
새로 추가된 파일이 실패한 디스크에 있는 경우에만 해당 파일을 잃게 됩니다.
|
||||
따라서 SnapRAID는 주로 데이터 변경이 거의 없는 환경에 적합합니다.
|
||||
|
||||
마지막 동기화 시점에 이미 존재했던 데이터의 경우, 복구 신뢰성은 `snapshot`(스냅샷)
|
||||
옵션의 사용 여부에 따라 달라집니다.
|
||||
|
||||
* 스냅샷 지원이 있는 경우 (Btrfs, ZFS, Bcachefs 및 NTFS에서 사용 가능):
|
||||
SnapRAID는 지원되는 각 데이터 파일시스템의 독립적인 동결된 참조를
|
||||
자동으로 유지할 수 있습니다.
|
||||
이를 통해 동기화 중이나 동기화 후에 라이브 파일시스템의 파일을 수정하거나 삭제하더라도
|
||||
복구 프로세스가 일관되고 신뢰할 수 있게 유지됩니다.
|
||||
|
||||
* 스냅샷 지원이 없는 경우:
|
||||
`sync` 후에 파일을 삭제하거나 변경하면 다른 고장 난 디스크의 완전한 복구가 방해받을 수
|
||||
있습니다. 이는 수정된 파일이 고장 난 디스크에 없더라도 패리티가 수정된 파일과
|
||||
더 이상 일치하지 않기 때문에 발생합니다. 반면에 새로 추가된 파일은 이미 존재하는
|
||||
파일의 복구를 방해하지 않습니다.
|
||||
|
||||
기타 SnapRAID 제한 사항은 다음과 같습니다:
|
||||
|
||||
|
|
@ -79,7 +89,7 @@ Limitations
|
|||
* 파일 이름, 타임스탬프, 심볼릭 링크, 하드 링크만 저장됩니다.
|
||||
권한, 소유권, 확장 속성은 저장되지 않습니다.
|
||||
|
||||
Getting Started
|
||||
시작하기 (Getting Started)
|
||||
SnapRAID를 사용하려면, 먼저 디스크 어레이에서 하나의 디스크를
|
||||
`parity`(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로
|
||||
RAID5와 유사하게 단일 디스크 오류로부터 복구할 수 있습니다.
|
||||
|
|
@ -154,12 +164,12 @@ Getting Started
|
|||
Ctrl+C를 눌러 언제든지 중지할 수 있으며, 다음 실행 시 중단된
|
||||
곳에서 재개됩니다.
|
||||
|
||||
이 명령이 완료되면 데이터는 **SAFE**합니다.
|
||||
이 명령이 완료되면 데이터는 안전합니다.
|
||||
|
||||
이제 어레이를 원하는 대로 사용하고 주기적으로 `sync` 명령을
|
||||
실행하여 패리티 정보를 업데이트할 수 있습니다.
|
||||
|
||||
Scrubbing
|
||||
스크러빙 (Scrubbing)
|
||||
주기적으로 데이터 및 패리티의 오류를 확인하려면 `scrub` 명령을
|
||||
실행할 수 있습니다.
|
||||
|
||||
|
|
@ -177,7 +187,7 @@ Getting Started
|
|||
|
||||
:snapraid -p 5 -o 20 scrub
|
||||
|
||||
이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은
|
||||
이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면, 해당 블록은
|
||||
`content` 파일에 bad로 표시되며 `status` 명령에 나열됩니다.
|
||||
|
||||
:snapraid status
|
||||
|
|
@ -197,7 +207,7 @@ Getting Started
|
|||
인한 오류가 보고될 수 있습니다. 이러한 오류는 `scrub` 출력에는
|
||||
보고되지만, 관련 블록은 bad로 표시되지 않습니다.
|
||||
|
||||
Pooling
|
||||
풀링 (Pooling)
|
||||
참고: 아래에 설명된 풀링(pooling) 기능은 **mergerfs** 도구로 대체되었으며,
|
||||
이는 SnapRAID 커뮤니티에서 Linux 사용자를 위한 권장 옵션입니다.
|
||||
Mergefs는 여러 드라이브를 단일 통합 마운트 지점으로 풀링하는 더 유연하고
|
||||
|
|
@ -269,7 +279,7 @@ Getting Started
|
|||
|
||||
:fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
Undeleting
|
||||
삭제 취소 (Undeleting)
|
||||
SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며,
|
||||
-f, --filter 옵션을 사용하여 파일이나 디렉토리를 이전 상태로 복원하거나
|
||||
삭제 취소할 수 있습니다:
|
||||
|
|
@ -290,12 +300,13 @@ Getting Started
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recovering
|
||||
복구 (Recovering)
|
||||
최악의 상황이 발생하여 하나 이상의 디스크를 잃었습니다!
|
||||
|
||||
**패닉하지 마십시오!** 복구할 수 있습니다!
|
||||
**당황하지 마십시오!** 복구할 수 있습니다!
|
||||
|
||||
가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다.
|
||||
다른 작업을 하기 전에 디스크 어레이를 일절 변경하지 마십시오. 남은 디스크의
|
||||
데이터를 수정하거나 삭제하면 복구가 불가능해질 수 있습니다.
|
||||
모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된
|
||||
프로세스를 비활성화하십시오.
|
||||
|
||||
|
|
@ -376,22 +387,22 @@ Getting Started
|
|||
|
||||
모든 것이 복구되면 이 명령은 즉시 완료됩니다.
|
||||
|
||||
Commands
|
||||
SnapRAID는 다음을 허용하는 몇 가지 간단한 명령을 제공합니다:
|
||||
명령어 (Commands)
|
||||
SnapRAID는 다음과 같은 작업을 수행할 수 있는 몇 가지 간단한 명령어를 제공합니다.
|
||||
|
||||
* 어레이의 상태 출력 -> `status`
|
||||
* 디스크 제어 -> `smart`, `probe`, `up`, `down`
|
||||
* 백업/스냅샷 생성 -> `sync`
|
||||
* 주기적으로 데이터 확인 -> `scrub`
|
||||
* 마지막 백업/스냅샷 복원 -> `fix`.
|
||||
* 백업/복구 지점 생성 -> `sync`
|
||||
* 주기적인 데이터 검사 -> `scrub`
|
||||
* 마지막 백업/복구 지점 복원 -> `fix`
|
||||
|
||||
명령은 소문자로 작성해야 합니다.
|
||||
명령어는 반드시 소문자로 작성해야 합니다.
|
||||
|
||||
status
|
||||
디스크 어레이의 상태 요약을 출력합니다.
|
||||
|
||||
패리티 단편화, 확인 없이 블록이 얼마나 오래되었는지, 그리고
|
||||
스크럽 중에 발생한 모든 기록된 무단 오류에 대한 정보를 포함합니다.
|
||||
스크럽 중에 발생한 모든 기록된 조용한 오류에 대한 정보를 포함합니다.
|
||||
|
||||
제시된 정보는 마지막으로 `sync`를 실행했을 때를 나타냅니다.
|
||||
나중에 수정된 내용은 고려되지 않습니다.
|
||||
|
|
@ -487,23 +498,21 @@ Commands
|
|||
added - 이전에 없던 추가된 파일.
|
||||
removed - 제거된 파일.
|
||||
updated - 크기 또는 타임스탬프가 다른 파일, 즉 수정된 파일.
|
||||
moved - 동일한 디스크의 다른 디렉토리로 이동된 파일.
|
||||
이들은 이름, 크기, 타임스탬프 및 아이노드가 동일하지만
|
||||
디렉토리가 다른 것으로 식별됩니다.
|
||||
moved - 동일한 inode를 유지하면서 동일한 디스크에서 이동되거나
|
||||
이름이 변경된 파일. 동일한 inode, 크기 및 타임스탬프를 가지지만
|
||||
경로가 다른 것으로 식별됩니다. 파일 이름도 다를 수 있습니다.
|
||||
copied - 원본 파일이 여전히 존재하는 동일한 디스크 또는 다른
|
||||
디스크에 복사된 파일.
|
||||
이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니
|
||||
다.
|
||||
하위 초 타임스탬프가 0인 경우, 이름뿐만 아니라 전체 경로가
|
||||
일치해야 식별됩니다.
|
||||
relocated - 원본이 사라진 동일한 디스크 또는 다른 디스크로 이
|
||||
동된 파일.
|
||||
이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니
|
||||
다.
|
||||
하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치
|
||||
해야 합니다.
|
||||
동일한 디스크의 'moved' 파일과 달리, 재배치된 파일은 다른
|
||||
inode를 가집니다.
|
||||
relocated - 원본 파일이 사라지고 inode가 유지되지 않는, 다른
|
||||
디렉토리 또는 디스크로 이동된 파일.
|
||||
이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니다.
|
||||
하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치해야
|
||||
합니다. 'moved' 파일과 달리, 재배치된 파일은 파일 이름이 동일해야
|
||||
합니다.
|
||||
restored - inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬
|
||||
프가 일치하는 파일.
|
||||
이들은 대개 삭제된 후 복구된 파일들입니다.
|
||||
|
|
@ -521,7 +530,7 @@ Commands
|
|||
중지할 수 있습니다.
|
||||
다음 실행 시 `sync` 프로세스는 중단된 곳에서 재개됩니다.
|
||||
|
||||
이 프로세스 중에 무단 또는 입출력 오류가 발견되면,
|
||||
이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면,
|
||||
해당 블록은 bad로 표시됩니다.
|
||||
|
||||
파일은 경로 및/또는 아이노드로 식별되며 크기와 타임스탬프로
|
||||
|
|
@ -537,7 +546,7 @@ Commands
|
|||
어레이의 파일은 수정되지 않습니다.
|
||||
|
||||
scrub
|
||||
어레이를 스크럽하여 데이터 및 패리티 디스크의 무단 또는 입출력 오류를
|
||||
어레이를 스크럽하여 데이터 및 패리티 디스크의 조용한 오류 또는 입출력 오류를
|
||||
확인합니다.
|
||||
|
||||
각 호출은 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의
|
||||
|
|
@ -560,7 +569,7 @@ Commands
|
|||
|
||||
스크럽 상태의 세부 정보를 얻으려면 `status` 명령을 사용하십시오.
|
||||
|
||||
발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 `content` 파일에
|
||||
발견된 모든 조용한 오류 또는 입출력 오류에 대해, 해당 블록은 `content` 파일에
|
||||
bad로 표시됩니다.
|
||||
이러한 bad 블록은 `status`에 나열되며 `fix -e`로 수정할 수 있습니다.
|
||||
수정 후, 다음 스크럽 시에 다시 확인되며, 수정된 것으로 발견되면 bad
|
||||
|
|
@ -568,7 +577,7 @@ Commands
|
|||
bad 블록만 스크럽하려면 `scrub -p bad` 명령을 사용할 수 있습니다.
|
||||
|
||||
동기화되지 않은 데이터로 인한 보고된 오류를 피하기 위해 동기화된
|
||||
어레이에서만 `scrub`을 실행하는 것이 좋습니다. 이러한 오류는 무단
|
||||
어레이에서만 `scrub`을 실행하는 것이 좋습니다. 이러한 오류는 조용한
|
||||
오류가 아닌 것으로 인식되며, 블록은 bad로 표시되지 않지만,
|
||||
이러한 오류는 명령의 출력에 보고됩니다.
|
||||
|
||||
|
|
@ -578,14 +587,14 @@ Commands
|
|||
어레이의 파일은 수정되지 않습니다.
|
||||
|
||||
fix
|
||||
모든 파일과 패리티 데이터를 수정합니다.
|
||||
모든 파일과 패리티 데이터를 복구(수정)합니다.
|
||||
|
||||
모든 파일과 패리티 데이터는 마지막 `sync`에 저장된 스냅샷
|
||||
상태와 비교됩니다.
|
||||
차이가 발견되면 저장된 스냅샷으로 되돌려집니다.
|
||||
모든 파일과 패리티 데이터는 마지막 `sync`에 저장된 상태와 비교됩니다.
|
||||
차이점이 발견되면 저장된 상태로 되돌립니다.
|
||||
|
||||
**경고!** `fix` 명령은 오류와 의도적인 수정 사이를 구별하지
|
||||
않습니다. 파일 상태를 무조건 마지막 `sync`로 되돌립니다.
|
||||
경고!
|
||||
`fix` 명령어는 오류와 의도적인 수정을 구별하지 않습니다.
|
||||
파일 상태를 조건 없이 마지막 `sync` 상태로 되돌립니다.
|
||||
|
||||
다른 옵션이 지정되지 않으면 전체 어레이가 처리됩니다.
|
||||
필터 옵션을 사용하여 처리할 파일 또는 디스크의 하위 집합을 선택하십시오.
|
||||
|
|
@ -715,7 +724,7 @@ Commands
|
|||
재할당 과정 동안 해당 파일들은 패리티에 의해 보호되지 않으므로
|
||||
주의하십시오.
|
||||
|
||||
Options
|
||||
옵션 (Options)
|
||||
SnapRAID는 다음 옵션을 제공합니다:
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -756,7 +765,7 @@ Options
|
|||
|
||||
-e, --filter-error
|
||||
`check` 및 `fix`에서 오류가 있는 파일을 처리합니다.
|
||||
`status`에 나열된 대로 `sync` 및 `scrub` 중에 무단 또는 입출력 오류가
|
||||
`status`에 나열된 대로 `sync` 및 `scrub` 중에 조용한 오류 또는 입출력 오류가
|
||||
표시된 블록을 가진 파일만 처리합니다.
|
||||
이 옵션은 `check` 및 `fix`에서만 사용할 수 있습니다.
|
||||
|
||||
|
|
@ -770,7 +779,7 @@ Options
|
|||
|
||||
-o, --older-than DAYS
|
||||
`scrub`에서 처리할 어레이의 가장 오래된 부분을 선택합니다.
|
||||
DAYS는 블록이 스크럽되어야 하는 최소 일령(days)이며,
|
||||
DAYS는 블록이 스크럽되어야 하는 최소 경과 일수(days)이며,
|
||||
기본값은 10입니다.
|
||||
bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다.
|
||||
이 옵션은 `scrub`에서만 사용할 수 있습니다.
|
||||
|
|
@ -790,7 +799,7 @@ Options
|
|||
이 프로세스는 모든 디스크가 회전하고 CPU가 바쁜, 시스템이
|
||||
과부하 상태일 때 발생합니다.
|
||||
이는 기계의 극한 조건이며, 잠재된 하드웨어 문제가 있는 경우
|
||||
데이터가 아직 해시되지 않았기 때문에 무단 오류가 감지되지 않고
|
||||
데이터가 아직 해시되지 않았기 때문에 조용한 오류가 감지되지 않고
|
||||
지나갈 수 있습니다.
|
||||
이러한 위험을 피하려면, `pre-hash` 모드를 활성화하여 모든 데이터를
|
||||
두 번 읽어 무결성을 보장할 수 있습니다.
|
||||
|
|
@ -820,7 +829,7 @@ Options
|
|||
초당 바이트 수입니다. K, M, 또는 G와 같은 승수(예: --bw-limit 1G)를
|
||||
지정할 수 있습니다.
|
||||
|
||||
-t, --tail 크기
|
||||
-t, --tail SIZE
|
||||
패리티 디스크의 지정된 꼬리 크기 이하를 사용하는 파일로
|
||||
목록을 제한합니다.
|
||||
K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: --tail 1G).
|
||||
|
|
@ -892,7 +901,7 @@ Options
|
|||
동일한 속성을 가진 파일이 동일한 데이터를 가진 복사본이라고
|
||||
가정합니다.
|
||||
이는 한 디스크에서 다른 디스크로 복사되거나 이동된 파일을
|
||||
식별하고, 이미 계산된 해시 정보를 재사용하여 무단 오류를
|
||||
식별하고, 이미 계산된 해시 정보를 재사용하여 조용한 오류를
|
||||
감지하거나 누락된 파일을 복구할 수 있도록 합니다.
|
||||
일부 드문 경우에 이 동작은 오탐(false positives) 또는 많은
|
||||
해시 확인으로 인한 느린 프로세스를 초래할 수 있으며, 이 옵션을
|
||||
|
|
@ -919,7 +928,7 @@ Options
|
|||
강력히 권장됩니다.
|
||||
`sync` 작업 중에는 데이터 보호가 없습니다.
|
||||
|
||||
-W, --force-realloc-tail 크기
|
||||
-W, --force-realloc-tail SIZE
|
||||
-R, --force-realloc과 같이 작동하지만, 각 패리티 파일의 지정된
|
||||
꼬리 부분(마지막 '크기' 바이트)으로 제한됩니다.
|
||||
현재 해당 꼬리 섹션에 저장된 모든 파일 조각/블록의 재할당(이동)을
|
||||
|
|
@ -966,11 +975,13 @@ Options
|
|||
지정된 블록 번호부터 처리를 시작합니다.
|
||||
이는 손상된 디스크의 경우 특정 블록을 다시 확인하거나 수정하는 데
|
||||
유용할 수 있습니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것입니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것이며 `check` 및 `fix`에서만
|
||||
지원됩니다.
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
지정된 수의 블록만 처리합니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것입니다.
|
||||
이 옵션은 주로 고급 수동 복구를 위한 것이며 `check` 및 `fix`에서만
|
||||
지원됩니다.
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
기존 content 파일에서 더미 설정 파일을 생성합니다.
|
||||
|
|
@ -997,7 +1008,7 @@ Options
|
|||
-V, --version
|
||||
프로그램 버전을 출력합니다.
|
||||
|
||||
Configuration
|
||||
설정 (Configuration)
|
||||
SnapRAID는 디스크 어레이의 위치와 패리티 정보를 저장할 위치를
|
||||
알기 위해 설정 파일이 필요합니다.
|
||||
|
||||
|
|
@ -1016,8 +1027,8 @@ Configuration
|
|||
여러 파일을 지정할 수 있으며, 이들은 서로 다른 디스크에
|
||||
있어야 합니다.
|
||||
하나의 파일이 더 이상 커질 수 없을 때 다음 파일이 사용됩니다.
|
||||
총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크보다
|
||||
적어도 커야 합니다.
|
||||
총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크의 크기
|
||||
이상이어야 합니다.
|
||||
|
||||
나중에 추가 패리티 파일을 추가할 수 있지만, 순서를 바꾸거나
|
||||
제거할 수는 없습니다.
|
||||
|
|
@ -1089,6 +1100,11 @@ Configuration
|
|||
NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점을
|
||||
변경할 수 있습니다.
|
||||
|
||||
그러나 구성된 경로는 항상 동일한 기본 데이터로 확인되어야 합니다.
|
||||
경로에 심볼릭 링크가 포함된 경우 해당 대상이 안정적으로 유지되어야 합니다.
|
||||
데이터 디렉터리를 즉석에서 전환하기 위해 이러한 심볼릭 링크의 대상을
|
||||
변경하는 것은 지원되지 않습니다.
|
||||
|
||||
어레이의 각 데이터 디스크에 대해 하나의 옵션을 사용해야 합니다.
|
||||
|
||||
나중에 설정 파일에서 직접 NAME을 변경하고 `sync` 명령을
|
||||
|
|
@ -1105,6 +1121,28 @@ Configuration
|
|||
이러한 디스크는 항상 회전할 것으로 예상되므로 `up` 및 `down` 명령의
|
||||
영향을 받지 않습니다.
|
||||
|
||||
snapshot
|
||||
`sync`, `scrub`, `check` 및 `fix` 명령어에 파일시스템 스냅샷 사용을
|
||||
활성화합니다.
|
||||
|
||||
활성화되면 SnapRAID는 `sync` 시작 시 지원되는 각 데이터 파일시스템의
|
||||
읽기 전용 스냅샷을 생성합니다. 이는 각 파일시스템의 안정적인 뷰를 제공하여,
|
||||
이후의 수정으로 인해 패리티 계산에 사용되는 데이터가 변경되는 것을 방지합니다.
|
||||
|
||||
이는 복구 가능성을 크게 향상시킵니다. 라이브 파일시스템에서 파일이 삭제되더라도
|
||||
스냅샷에 그대로 보존됩니다. 이를 통해 해당 블록의 패리티가 "깨지는" 것을 방지하여,
|
||||
다른 디스크가 고장 나더라도 데이터를 성공적으로 복구할 수 있도록 보장합니다.
|
||||
|
||||
이 옵션은 Linux의 Btrfs, Bcachefs 또는 ZFS 파일시스템과 Windows의 NTFS로 포맷된
|
||||
데이터 디스크에만 독점적으로 적용됩니다.
|
||||
패리티 디스크나 다른 파일시스템을 사용하는 데이터 디스크는 항상 파일시스템의
|
||||
라이브 버전을 사용합니다.
|
||||
|
||||
스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다.
|
||||
이 옵션이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오.
|
||||
|
||||
스냅샷 수명 주기에 대한 자세한 설명은 SNAPSHOTS 섹션을 참조하십시오.
|
||||
|
||||
nohidden
|
||||
모든 숨겨진 파일 및 디렉토리를 제외합니다.
|
||||
Unix에서는 숨겨진 파일은 '.'으로 시작하는 파일입니다.
|
||||
|
|
@ -1120,6 +1158,10 @@ Configuration
|
|||
일치하는 패턴이 없으면, 지정된 마지막 패턴이 `include`이면
|
||||
파일은 제외되고, `exclude`이면 포함됩니다.
|
||||
|
||||
필터링은 디렉토리 순회 중에 계층적으로 수행됩니다. 디렉토리가 `exclude`
|
||||
규칙과 일치하면 해당 디렉토리 전체가 건너뛰어지며(가지치기됨), 그 안에
|
||||
있는 파일이나 하위 디렉토리에 대한 `include` 규칙은 평가되지 않습니다.
|
||||
|
||||
패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오.
|
||||
|
||||
이 옵션은 여러 번 사용될 수 있습니다.
|
||||
|
|
@ -1220,11 +1262,11 @@ Configuration
|
|||
다시 일시 중지될 수 있습니다.
|
||||
|
||||
작동 중에 SnapRAID는 각 디스크의 가열 곡선을 분석하고 활동이 계속되면
|
||||
도달할 것으로 예상되는 장기 정상 온도를 추정합니다.
|
||||
도달할 것으로 예상되는 장기 평형 온도를 추정합니다.
|
||||
추정은 디스크 온도가 네 번 증가한 후에만 수행되어, 신뢰할 수 있는
|
||||
추세를 설정하기에 충분한 데이터 포인트가 확보되도록 합니다.
|
||||
이 예측된 정상 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의
|
||||
냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 온도는 정보 제공
|
||||
이 예측된 평형 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의
|
||||
냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 평형 온도는 정보 제공
|
||||
목적일 뿐이며 SnapRAID의 동작에는 영향을 미치지 않습니다.
|
||||
프로그램의 동작은 오로지 실제 측정된 디스크 온도에 기반합니다.
|
||||
|
||||
|
|
@ -1274,6 +1316,9 @@ Configuration
|
|||
RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므로
|
||||
`%s`를 사용할 필요가 없을 수 있습니다.
|
||||
|
||||
기본 `-a` 옵션을 대체하기 위해 `[info: ...]` 태그를 사용하여
|
||||
사용자 정의 정보 옵션 문자열을 지정할 수도 있습니다.
|
||||
|
||||
가능한 옵션은 smartmontools 설명서를 참조하십시오:
|
||||
|
||||
:https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1281,6 +1326,7 @@ Configuration
|
|||
|
||||
예:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1293,14 +1339,19 @@ Configuration
|
|||
`6-parity`, 또는 `z-parity` 중 하나의 패리티 이름입니다.
|
||||
특수 값 *는 모든 디스크에서 속성을 무시하는 데 사용될 수 있습니다.
|
||||
|
||||
예를 들어, 모든 디스크에서 `Current Pending Sector Count` 속성을
|
||||
무시하려면:
|
||||
여러 속성을 공백으로 구분하여 지정할 수 있습니다.
|
||||
각 속성은 1에서 255 사이의 숫자나 대소문자를 구분하지 않는 이름
|
||||
(예: `Current_Pending_Sector`)으로 지정할 수 있습니다.
|
||||
|
||||
:smartignore * 197
|
||||
예를 들어, 모든 디스크에서 `Current Pending Sector Count` 와
|
||||
`Reallocated Sectors Count` 속성을 번호나 이름으로 무시하려면:
|
||||
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
첫 번째 패리티 디스크에서만 무시하려면:
|
||||
|
||||
:smartignore parity 197
|
||||
:smartignore parity 197 5
|
||||
|
||||
Examples
|
||||
Unix의 일반적인 설정 예는 다음과 같습니다:
|
||||
|
|
@ -1313,7 +1364,7 @@ Configuration
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1329,12 +1380,133 @@ Configuration
|
|||
:exclude Thumbs.db
|
||||
:exclude \$RECYCLE.BIN
|
||||
:exclude \System Volume Information
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Pattern
|
||||
스냅샷 (Snapshots)
|
||||
구성에서 스냅샷 옵션이 활성화된 경우, SnapRAID는 작업 중에 읽은 데이터를
|
||||
안정적으로 유지하기 위해 파일시스템 스냅샷을 사용하며, 이는 라이브 파일시스템의
|
||||
파일이 이후에 수정되거나 삭제되는 경우에도 마찬가지입니다.
|
||||
|
||||
스냅샷 관리는 완전히 자동적이고 투명하게 이루어집니다.
|
||||
백그라운드에서 완전히 처리되는 스냅샷의 추가적인 보호와 함께,
|
||||
기존과 완전히 동일하게 SnapRAID를 계속 사용할 수 있습니다.
|
||||
|
||||
이것은 두 가지 주요 이점을 제공합니다.
|
||||
|
||||
일관성 - 장시간 실행되는 sync 또는 scrub 중에 라이브 파일시스템에서 수정된 파일은
|
||||
스냅샷이 생성된 각 파일시스템이 작업 기간 동안 변경되지 않고 유지되므로
|
||||
패리티 불일치나 작업 중단을 유발하지 않습니다.
|
||||
복구 - 라이브 파일시스템에서 파일이 업데이트되거나 삭제되더라도 스냅샷에 보존됩니다.
|
||||
다음 sync가 실행되기 전에 디스크 고장이 발생하면, SnapRAID는 스냅샷에 보존된
|
||||
데이터를 사용하여 고장 난 디스크를 재구성합니다.
|
||||
|
||||
활성 sync 프로세스 중에 디스크 고장이 발생하는 경우,
|
||||
SnapRAID는 이전 패리티 계산의 스냅샷과 현재 스냅샷 모두에서 자동으로 읽을 수도 있습니다.
|
||||
이는 동기화 사이에 블록이 수정되거나 삭제되었더라도 패리티 방정식을 푸는 데
|
||||
필요한 정확한 데이터 블록에 대한 접근을 제공함으로써 완전한 복구 확률을 최대화합니다.
|
||||
|
||||
스냅샷이 없으면 정상 디스크에서 업데이트되거나 삭제된 파일로 인해 데이터 블록이 누락되며,
|
||||
이는 다른 고장 난 디스크를 복구하는 데 필요할 수 있습니다.
|
||||
|
||||
스냅샷은 데이터 디스크에 대해서만 생성되며, 기본 파일시스템이 이 기능을 지원하는 경우에만
|
||||
생성됩니다. 패리티 디스크는 항상 라이브 파일시스템을 사용합니다.
|
||||
|
||||
현재 이는 Linux의 Btrfs, Bcachefs, ZFS 및 Windows의 NTFS에서 지원됩니다.
|
||||
|
||||
서로 다른 파일시스템을 가진 데이터 디스크를 혼합할 수 있습니다. 스냅샷을 지원하는 디스크만
|
||||
이를 활용하고, 다른 디스크는 라이브 파일시스템에서 직접 계속 작동합니다.
|
||||
|
||||
스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다.
|
||||
스냅샷이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오.
|
||||
|
||||
스냅샷 사용 시 명령어 동작 (Command Behavior with Snapshots)
|
||||
`sync` 및 `scrub` 명령어는 파일시스템이 스냅샷을 지원하는 데이터 디스크에 대해
|
||||
스냅샷을 사용합니다. 스냅샷이 생성된 디스크에서 명령어는 라이브 파일시스템의
|
||||
동시 변경에 영향을 받지 않는 안정적인 파일시스템 이미지를 봅니다.
|
||||
`sync` 중에 지원되는 각 데이터 파일시스템에 대해 독립적으로 새 스냅샷이 생성됩니다.
|
||||
이러한 스냅샷은 집합적으로 패리티 계산에 사용되는 데이터를 제공합니다.
|
||||
반면에 `scrub` 명령어는 기존 패리티와 일치하는 신뢰할 수 있는 참조 지점을 유지하기 위해
|
||||
가장 최근 동기화 중에 생성된 마지막 스냅샷을 이용합니다.
|
||||
|
||||
`check` 및 `fix` 명령어의 경우, 마지막 스냅샷의 사용 여부는
|
||||
-d, --filter-disk 옵션을 사용하여 특정 디스크를 대상으로 지정하는지 여부에 따라 달라집니다.
|
||||
|
||||
-d를 통해 명시적으로 선택된 디스크(작업의 "대상")는 항상 라이브 파일시스템을 사용합니다.
|
||||
`fix` 의 경우 이를 통해 활성 교체 디스크에 데이터를 복원할 수 있습니다.
|
||||
`check` 의 경우 동일한 조건에서 `fix` 작업을 시뮬레이션할 수 있습니다.
|
||||
|
||||
다른 모든 데이터 디스크("참조" 디스크)는 해당 스냅샷을 통해 액세스됩니다.
|
||||
이를 통해 복구가 진행되는 동안 정상 디스크의 파일을 수정하고 있더라도 SnapRAID가
|
||||
패리티 방정식을 풀기 위한 안정적이고 동결된 참조를 가질 수 있습니다.
|
||||
|
||||
-d 옵션이 제공되지 않으면 SnapRAID는 작업이 전체 어레이에 적용된다고 가정하며, 이 경우
|
||||
`check` 와 `fix` 는 라이브 파일시스템만을 독점적으로 사용합니다.
|
||||
|
||||
다른 모든 명령어는 라이브 파일시스템에서만 독점적으로 작동합니다.
|
||||
|
||||
스냅샷 수명 주기 (Snapshots Lifecycle)
|
||||
SnapRAID는 각 데이터 하위 볼륨의 루트에 있는 숨겨진 디렉터리 내에서
|
||||
`stable`(안정), `pending`(보류) 및 `scan`(스캔)이라는 세 가지 특정 스냅샷을 관리합니다.
|
||||
Btrfs, Bcachefs 및 NTFS에서는 `.snapraid/` 디렉터리가 사용되며,
|
||||
ZFS에서는 표준 `.zfs/snapshot/` 이 사용됩니다.
|
||||
|
||||
`stable` 스냅샷은 성공적으로 완료된 마지막 `sync` 상태를 나타내며,
|
||||
현재 패리티를 계산하는 데 사용된 정확한 데이터를 포함합니다. 이는
|
||||
`scrub`, `check` 및 `fix` 명령어의 기본 데이터 소스 역할을 합니다.
|
||||
|
||||
`scan` 스냅샷은 검사 및 패리티 계산을 위한 동결된 상태를 제공하기 위해 `sync` 시작 시
|
||||
생성되는 임시 이미지입니다.
|
||||
검사를 수행하고 새 콘텐츠 상태를 저장한 후 이전 `pending` 스냅샷을 대체합니다.
|
||||
|
||||
`pending` 스냅샷은 중단된 `sync` 에서 사용하는 이미지입니다.
|
||||
작업이 성공적으로 완료되면 이전의 `stable` 스냅샷은 삭제되고, `pending` 스냅샷이
|
||||
새로운 안정적인 참조로 자리를 잡도록 승격됩니다.
|
||||
|
||||
`sync` 가 중단되면 `pending` 스냅샷은 보존됩니다.
|
||||
패리티가 부분적으로만 동기화되었더라도 .content 파일에 기록된 파일시스템 상태와 일치하므로
|
||||
이후의 `scrub`, `check` 및 `fix` 명령어는 이 보류 중인 스냅샷을 사용합니다.
|
||||
|
||||
`sync` 가 중단된 경우, `check` 및 `fix` 명령어는 `stable` 스냅샷에서도 읽어와
|
||||
동기화 중에 업데이트되거나 삭제된 파일에서 데이터 블록을 검색합니다.
|
||||
이는 동기화 프로세스 전반에 걸쳐 .content 파일이 수정되거나 삭제된 모든 파일의
|
||||
메타데이터를 유지하기 때문에 가능합니다.
|
||||
이 기록 정보는 동기화가 성공적으로 완료되고 .content 파일의 최종 버전이 저장되어야만 삭제됩니다.
|
||||
|
||||
중단 후 `sync` 가 재시작되면 기존의 보류 중인(pending) 스냅샷은 삭제되고,
|
||||
라이브 파일시스템의 현재 상태를 캡처하기 위해 새 스냅샷이 생성됩니다.
|
||||
그러나 `sync` 가 중단된 경우 후속 `sync` 가 성공적으로 완료될 때까지
|
||||
파일을 수정, 삭제, 교체 또는 이동하지 마십시오.
|
||||
패리티에는 중단된 sync에서 사용된 스냅샷에서 계산된 블록이
|
||||
여전히 포함되어 있을 수 있습니다. 이후의 sync로 인해 해당 스냅샷이
|
||||
교체되어 복구에 필요한 중간 버전의 파일을 사용할 수 없게 될 수 있습니다.
|
||||
|
||||
파일 시스템 스냅샷을 사용한 외부 백업 (External backups with filesystem snapshots)
|
||||
파일 시스템 스냅샷이 활성화되면 SnapRAID는 각 데이터 서브볼륨, 볼륨 또는
|
||||
데이터셋의 루트에서 스냅샷에 접근하거나 생성합니다.
|
||||
|
||||
외부 도구와의 간섭을 피하는 간단한 방법은 서브볼륨이나 볼륨 내의 일반
|
||||
하위 디렉터리(예: `/mnt/subvol` 대신 `/mnt/subvol/data`)를 가리키도록
|
||||
`data` 를 설정하는 것입니다. SnapRAID는 항상 서브볼륨 루트에 스냅샷 디렉터리를
|
||||
생성하므로(예: `/mnt/subvol/.snapraid/`), 데이터 하위 디렉터리를 깨끗하게
|
||||
유지하여 해당 디렉터리 내에서 작동하는 백업 도구에 스냅샷이 노출되지 않도록 합니다.
|
||||
|
||||
그렇지 않고 설정된 `data` 디렉터리 자체가 서브볼륨이나 볼륨 루트인 경우,
|
||||
SnapRAID는 해당 디렉터리 바로 안에 `.snapraid/` 디렉터리를 생성합니다(Btrfs,
|
||||
Bcachefs 및 NTFS). SnapRAID 자체 스캔에서는 이 디렉터리가 자동으로 제외되지만,
|
||||
외부 백업 도구나 파일 동기화 도구는 이를 발견하게 됩니다. 제외하지 않으면
|
||||
스냅샷이나 디렉터리 링크를 탐색하여 동결된 전체 데이터 트리를 복사함으로써
|
||||
데이터를 중복 생성하고 백업 저장 공간을 고갈시킬 수 있습니다. 항상 외부 백업
|
||||
도구에서 `.snapraid/` 디렉터리를 제외하도록 구성하십시오.
|
||||
|
||||
ZFS에서는 스냅샷이 `.snapraid/` 대신 표준 가상 디렉터리인 `.zfs/snapshot/` 을
|
||||
통해 노출됩니다. 기본값(`snapdir=hidden`)에서는 ZFS가 디렉터리 목록에서 이
|
||||
디렉터리를 숨기므로 외부 백업 도구가 이를 탐색하지 않습니다. `snapdir=visible` 로
|
||||
설정한 경우 백업 도구에서 `.zfs/` 디렉터리를 제외하도록 하십시오.
|
||||
|
||||
패턴 (Pattern)
|
||||
패턴은 포함하거나 제외할 파일을 필터링하는 유연한 방법을 제공합니다.
|
||||
글로빙(globbing) 문자를 사용하면 모든 경로를 일일이 나열하지 않고도
|
||||
특정 파일 이름이나 전체 디렉토리 구조와 일치하는 규칙을 정의할 수 있습니다.
|
||||
|
|
@ -1348,17 +1520,18 @@ Pattern
|
|||
내에서의 일치에 적합합니다. 이는 쉘 글로빙에서 익숙한 표준 와일드카드
|
||||
동작입니다.
|
||||
|
||||
이중 별표 `**`는 더 강력하며 디렉토리 구분 기호를 포함한 모든 문자
|
||||
시퀀스와 일치합니다. 이를 통해 패턴이 여러 디렉토리 수준에서 일치할 수
|
||||
있습니다. `**`가 패턴 내에 직접 포함된 경우, 주변 리터럴 텍스트 사이의
|
||||
슬래시를 포함하여 0개 이상의 문자와 일치할 수 있습니다.
|
||||
이중 별표 와일드카드 `**`는 디렉토리 구분 기호에 인접해 있는 경우(슬래시
|
||||
앞이나 뒤에 오는 경우)에만 디렉토리 구분 기호를 가로질러 일치합니다.
|
||||
이 형식에서는 여러 디렉토리 수준에 걸쳐 0개 이상의 문자와 일치합니다.
|
||||
예를 들어, `foo/**/bar`는 `foo/bar`, `foo/a/bar` 및 `foo/a/b/bar`와 일치하고,
|
||||
`**/build`는 `build` 및 `foo/bar/build`와 일치하며, `src/**.js`는 `src/main.js` 및
|
||||
`src/ui/components/main.js`와 일치합니다.
|
||||
독립형 형식인 `/**/`는 완전한 패턴으로 허용되지 않습니다.
|
||||
|
||||
`**`의 가장 중요한 용도는 특수 형식인 `/**/`입니다. 이는 0개 이상의
|
||||
전체 디렉토리 수준과 일치하므로 정확한 경로 구조를 모르더라도
|
||||
디렉토리 트리의 모든 깊이에서 파일과 일치시킬 수 있습니다.
|
||||
예를 들어, `src/**/main.js` 패턴은 `src/main.js`(0개의 디렉토리 건너뜀),
|
||||
`src/ui/main.js`(1개의 디렉토리 건너뜀), `src/ui/components/main.js`
|
||||
(2개의 디렉토리 건너뜀)와 일치합니다.
|
||||
`**`가 슬래시에 인접하지 않은 경우 `*`처럼 작동하며 디렉토리 구분 기호와
|
||||
일치하지 않습니다. 예를 들어, `**.jpg`는 현재 디렉토리의 `photo.jpg`와는
|
||||
일치하지만 `dir/photo.jpg`와는 일치하지 않습니다. 해당 용도로는 `**/*.jpg`를
|
||||
사용하십시오.
|
||||
|
||||
대괄호 `[]`를 사용하는 문자 클래스는 지정된 세트 또는 범위에서
|
||||
단일 문자와 일치합니다. 다른 단일 문자 패턴과 마찬가지로 디렉토리
|
||||
|
|
@ -1367,7 +1540,8 @@ Pattern
|
|||
|
||||
기억해야 할 근본적인 차이점은 `*`, `?` 및 문자 클래스는 모두
|
||||
디렉토리 경계를 준수하고 단일 경로 구성 요소 내에서만 일치하는 반면,
|
||||
`**`는 디렉토리 구분 기호를 가로질러 일치할 수 있는 유일한 패턴이라는 것입니다.
|
||||
`**`는 슬래시에 인접해 있는 경우에만 디렉토리 구분 기호를 가로질러
|
||||
일치할 수 있다는 것입니다.
|
||||
|
||||
네 가지 유형의 패턴이 있습니다:
|
||||
|
||||
|
|
@ -1437,6 +1611,25 @@ Pattern
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
디렉토리를 제외하면(DIR/ 또는 /PATH/DIR/ 사용) SnapRAID가 해당 디렉토리에
|
||||
진입하여 스캔하는 것이 차단됩니다. 따라서 제외된 상위 디렉토리 내에 있는
|
||||
파일이나 하위 디렉토리는 스캐너가 탐색하지 않으므로 `include` 규칙으로 다시
|
||||
포함할 수 없습니다.
|
||||
|
||||
예를 들어, 다음 설정에서는 `/keep/`이 가지치기되므로 `file.dat`가 포함되지
|
||||
않습니다:
|
||||
|
||||
:# 의도대로 작동하지 않음: /keep/ 전체를 건너뜀
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
디렉토리 자체를 제외하지 않고 특정 파일만 유지하면서 내부 파일들을 제외하려면,
|
||||
디렉토리 자체가 아니라 내부의 파일 패턴을 제외하십시오:
|
||||
|
||||
:# 의도대로 작동함: /keep/을 순회하지만 내부의 다른 파일들은 제외됨
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
명령줄에서 -f 옵션을 사용할 때 `include` 패턴만 사용할 수 있습니다.
|
||||
예를 들어:
|
||||
|
||||
|
|
@ -1447,7 +1640,7 @@ Pattern
|
|||
Unix에서는 명령줄에서 글로빙 문자를 사용할 때 셸이 확장하는 것을
|
||||
방지하기 위해 따옴표로 묶어야 합니다.
|
||||
|
||||
Ignore File
|
||||
제외 파일 (Ignore File)
|
||||
설정 파일의 전역 규칙 외에도, 배열 내의 모든 디렉토리에 `.snapraidignore`
|
||||
파일을 배치하여 분산된 제외 규칙을 정의할 수 있습니다.
|
||||
|
||||
|
|
@ -1487,16 +1680,18 @@ Ignore File
|
|||
:# projects/ 또는 그 하위 폴더의 모든 .tmp 파일 제외
|
||||
:*.tmp
|
||||
|
||||
Content
|
||||
콘텐츠 (Content)
|
||||
SnapRAID는 content 파일에 파일 목록과 체크섬을 저장합니다.
|
||||
|
||||
이것은 디스크 어레이에 있는 모든 파일의 목록과 무결성을 확인하기 위한
|
||||
모든 체크섬을 나열하는 이진 파일입니다.
|
||||
|
||||
이 파일은 `sync` 및 `scrub` 명령에 의해 읽고 쓰여지며,
|
||||
`fix`, `check`, 및 `status` 명령에 의해 읽혀집니다.
|
||||
content 파일은 `sync`, `scrub`, `touch` 및 `rehash` 명령에 의해
|
||||
읽고 쓰여집니다. 이것은 `status`, `diff`, `check`, `fix`, `list`,
|
||||
`dup`, `locate` 및 `pool` 명령에 의해 읽혀지며, `smart`, `probe`,
|
||||
`up`, `down` 및 `devices` 명령에 의해 완전히 무시됩니다.
|
||||
|
||||
Parity
|
||||
패리티 (Parity)
|
||||
SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다.
|
||||
|
||||
이들은 `content` 파일에 정의된 모든 블록의 계산된 패리티를 포함하는
|
||||
|
|
@ -1505,7 +1700,7 @@ Parity
|
|||
이 파일들은 `sync` 및 `fix` 명령에 의해 읽고 쓰여지며,
|
||||
`scrub` 및 `check` 명령에 의해서만 읽혀집니다.
|
||||
|
||||
Encoding
|
||||
인코딩 (Encoding)
|
||||
Unix의 SnapRAID는 인코딩을 무시합니다. 파일 시스템에서 사용되는
|
||||
것과 동일한 인코딩으로 파일 이름을 읽고 저장합니다.
|
||||
|
||||
|
|
@ -1518,8 +1713,166 @@ Encoding
|
|||
이는 출력되는 파일 이름에만 영향을 미치며, 콘솔 출력을 파일로
|
||||
리디렉션하는 경우 결과 파일은 항상 UTF-8 형식입니다.
|
||||
|
||||
Copyright
|
||||
This file is Copyright (C) 2025 Andrea Mazzoleni
|
||||
종료 코드 (Exit Code)
|
||||
SnapRAID는 다음과 같은 오류 코드로 종료됩니다:
|
||||
|
||||
See Also
|
||||
snapraid_log(1), snapraidd(1)
|
||||
0 - 모두 정상.
|
||||
1 - 명령 실행 중 오류가 발생했습니다.
|
||||
2 - `diff` 명령으로 모두 정상임을 확인했으나 `sync`가 필요합니다.
|
||||
3 - 디스크 장치 명령(`probe`, `smart`, `devices`, `up`, `down`)이 완료되었으나,
|
||||
누락된 장치로 인해 하나 이상의 파일 시스템이 저하(degraded) 모드로 실행 중입니다.
|
||||
|
||||
알려진 문제 (Known Issues)
|
||||
파일 시스템 경계
|
||||
SnapRAID는 데이터 디스크를 스캔하는 동안 파일 시스템, 마운트 또는 서브볼륨 경계를
|
||||
넘지 않습니다. 이러한 경계가 감지되면 SnapRAID는 경고(WARNING)를 보고하고
|
||||
그 너머를 스캔하지 않습니다.
|
||||
|
||||
이러한 경계 너머에 있는 파일은 데이터 디스크에 포함되지 않으며, 보호해야 하는 경우
|
||||
별도로 구성해야 합니다.
|
||||
|
||||
파일 시스템 스냅샷 사용 시 마운트 지점
|
||||
파일 시스템 스냅샷이 활성화된 경우, 데이터 디스크 내부의 중첩된 마운트 지점 및
|
||||
바인드 마운트는 지원되지 않습니다.
|
||||
|
||||
마운트 지점은 라이브 시스템 마운트 네임스페이스의 일부이며 파일 시스템 스냅샷에
|
||||
보존되지 않습니다. 따라서 스냅샷을 스캔할 때 라이브 파일 시스템에서 마운트 지점에
|
||||
의해 숨겨졌던 디렉터리가 보일 수 있습니다.
|
||||
|
||||
파일 시스템 스냅샷이 활성화된 경우 데이터 디스크 내에 중첩된 마운트 지점이나
|
||||
바인드 마운트를 배치하지 마십시오.
|
||||
|
||||
파일 시스템 스냅샷 사용 시 여러 설정
|
||||
동일한 파일 시스템 스냅샷 네임스페이스를 사용하는 여러 독립된 SnapRAID
|
||||
설정 간에는 스냅샷 지원을 안전하게 공유할 수 없습니다.
|
||||
|
||||
Btrfs 및 Bcachefs에서는 스냅샷 지원이 활성화된 단 하나의 SnapRAID 설정만이
|
||||
동일한 서브볼륨 내의 데이터 디렉터리를 사용할 수 있습니다. ZFS에서는 동일한
|
||||
제한이 데이터셋에 적용되며, NTFS에서는 볼륨에 적용됩니다.
|
||||
|
||||
동일한 스냅샷 네임스페이스를 공유하는 여러 설정은 동일한 `stable`, `pending`
|
||||
및 `scan` 스냅샷을 사용합니다. 따라서 하나의 설정을 실행하면 다른 설정에 필요한
|
||||
복구 스냅샷을 대체하거나 삭제할 수 있습니다.
|
||||
|
||||
타임스탬프 변경 없는 인플레이스 파일 수정
|
||||
SnapRAID는 파일 크기와 수정 타임스탬프(mtime)를 비교하여 파일 수정을 감지합니다.
|
||||
|
||||
애플리케이션이 파일 크기를 변경하지 않고 수정 타임스탬프도 업데이트하지 않은 채
|
||||
인플레이스로 파일을 수정하는 경우, "diff" 및 "sync"는 파일이 변경되었음을 감지하지
|
||||
못하며 패리티가 업데이트되지 않습니다.
|
||||
|
||||
SnapRAID가 이러한 변경 사항을 인식하도록 하려면 파일의 수정 타임스탬프를
|
||||
업데이트하십시오(예: "touch" 유틸리티 사용). 그렇지 않으면 이 차이점은 이후의
|
||||
"scrub" 또는 "check" 중에 해시 불일치로만 감지됩니다.
|
||||
|
||||
Windows 비ASCII 대소문자 일치
|
||||
SnapRAID는 모든 플랫폼에서 표준적이고 예측 가능한 UTF-8 인코딩을 사용하며,
|
||||
대소문자를 구분하지 않는 일치를 ASCII 문자로 제한합니다.
|
||||
|
||||
Windows 파일 시스템은 임의의 시스템 종속 폴딩 테이블을 통해 유니코드 파일 이름
|
||||
전체에서 대소문자 구분을 없애도록 강제하는 레거시 디자인의 한계를 안고 있습니다.
|
||||
결과적으로 Windows는 완전히 다른 유니코드 바이트 시퀀스를 마치 동일한 파일인 것처럼
|
||||
취급하여 파일 시스템의 실제 상태를 왜곡합니다.
|
||||
|
||||
예를 들어 `À.txt`와 `à.txt`는 고유한 유니코드 이름이지만, Windows는 비논리적으로
|
||||
이를 동일하게 취급하는 반면 SnapRAID는 이들의 진정한 차이를 보존합니다.
|
||||
|
||||
이 제한은 Windows의 일관성 없는 유니코드 파일 이름 처리와 대소문자를 구분하지 않는
|
||||
별칭 지정 고집으로 인해 발생합니다. Windows의 대소문자 폴딩으로 인한 불일치를
|
||||
방지하려면 구성 경로 및 필터의 비ASCII 문자에 대해 항상 정확한 대소문자를
|
||||
지정하십시오.
|
||||
|
||||
부분 fix 복구
|
||||
`fix`가 `-S, --start` 또는 `-B, --count`를 사용하여 제한되면,
|
||||
SnapRAID는 선택된 블록에서만 작동하며 파일 수준의 완료 처리나 격리를
|
||||
수행하지 않습니다.
|
||||
|
||||
복구 결과 현재 내용을 나타낸다고 입증할 수 없는 최선의(best-effort) 데이터가
|
||||
생성되더라도, 이러한 블록은 일반 파일 이름으로 기록될 수 있습니다. 이러한
|
||||
복구된 블록과 관련된 불확실성은 명령이 종료된 후 유지되지 않습니다.
|
||||
|
||||
결과적으로 이후의 `fix`는 이러한 읽기 가능한 블록을 유효한 파일 데이터로
|
||||
취급하고 다시 복구하려고 시도하지 않습니다. 이로 인해 파일에 불완전하거나
|
||||
오래된 데이터가 남아 있음에도 후속 복구가 성공으로 보고될 수 있습니다.
|
||||
|
||||
`-S` 및 `-B` 옵션은 일반적으로 일반 `fix`가 실패한 후 고급 수동 복구만을
|
||||
위한 것입니다. 부분 `fix`에서 복구할 수 없는 데이터가 보고되면 다른 복구를
|
||||
시도하기 전에 영향을 받는 파일을 제거하거나 이름을 바꾸거나 해당 내용을
|
||||
수동으로 확인하십시오.
|
||||
|
||||
NTFS 하드 링크 및 제외된 경로
|
||||
NTFS에서는 디렉터리 항목이 각 하드 링크의 파일 크기와 타임스탬프를
|
||||
독립적으로 캐시합니다. 한 링크를 통해 파일이 수정되면 동일한 파일을
|
||||
가리키는 다른 링크의 디렉터리 항목은 액세스될 때까지 오래된 메타데이터를
|
||||
유지할 수 있습니다.
|
||||
|
||||
SnapRAID는 스캔 중에 동일한 파일에 대한 하드 링크를 2개 이상 발견하면
|
||||
이러한 상태를 자동으로 감지하고 정규화합니다. 그러나 다른 링크가 필터에
|
||||
의해 제외되었거나 데이터 디스크 경로 외부에 있어 하나의 하드 링크만
|
||||
스캔되는 경우, SnapRAID는 inode 충돌을 감지할 수 없으며 표시되는 유일한
|
||||
링크의 캐시된 메타데이터에 의존합니다.
|
||||
|
||||
결과적으로 제외되었거나 외부 하드 링크를 통해 변경된 사항은 해당 경로를
|
||||
통해 파일에 액세스하거나 열어 운영 체제에서 포함된 링크의 메타데이터를
|
||||
새로 고칠 때까지 SnapRAID에서 감지되지 않을 수 있습니다.
|
||||
|
||||
이러한 제한을 방지하려면 SnapRAID에서 제외된 하드 링크를 통해 보호된
|
||||
파일을 수정하지 않거나, SnapRAID가 이를 정규화할 수 있도록 파일의 모든
|
||||
하드 링크가 스캔에 포함되도록 하십시오.
|
||||
|
||||
중단된 다중 패리티 sync 후 복구
|
||||
다중 패리티 디스크가 있는 어레이에서 `sync`가 중단되면 서로 다른
|
||||
패리티 레벨이 일시적으로 동기화되지 않은 상태로 남을 수 있습니다.
|
||||
예를 들어 패리티 1에는 새로 업데이트된 데이터가 이미 포함되어 있는 반면,
|
||||
패리티 2에는 여전히 이전 데이터가 남아 있을 수 있습니다.
|
||||
|
||||
`check` 또는 `fix`를 수행하는 동안 SnapRAID는 다양한 패리티 조합을
|
||||
시도하고 알려진 블록 해시(전체 블록을 포함하며 일반적으로 256 KiB)에 대해
|
||||
재구성된 데이터를 검증합니다.
|
||||
|
||||
SnapRAID가 이전 패리티와 새 패리티의 일치하지 않는 혼합을 사용하여
|
||||
재구성을 시도하면 선형 RAID 방정식은 잘못된 데이터를 생성합니다. 이러한
|
||||
유효하지 않은 조합이 잘못 수락되려면, 동일한 스트라이프의 다른 비동기화된
|
||||
블록이 잘못된 데이터로 재구성되는 와중에도 방정식이 우연히 하나 이상의
|
||||
완전한 256 KiB 블록을 완벽하게 재구성하여 해시가 일치해야 합니다.
|
||||
|
||||
이 시나리오는 해시 충돌에 의존하지 않습니다. 오히려 혼합된 패리티
|
||||
방정식 자체가 우연히 원래의 정확한 256 KiB 블록 내용을 생성해야 합니다.
|
||||
이는 특별히 조작되었거나 매우 반복적인 데이터에서는 수학적으로 가능하지만,
|
||||
실제 데이터에서는 사실상 불가능합니다.
|
||||
|
||||
모든 디스크가 정상인 경우 추가 변경을 수행하기 전에 중단된 `sync`를
|
||||
완료하면 이러한 불확실성이 제거됩니다. 디스크에 오류가 발생하여 복구가
|
||||
필요한 경우 `check` 또는 `fix`를 실행하기 전에 데이터 디스크를 수정하지
|
||||
마십시오.
|
||||
|
||||
예약된 파일 및 디렉터리 이름
|
||||
SnapRAID는 내부 작업을 위해 일부 파일, 디렉터리 및 스냅샷 이름을
|
||||
예약합니다. 사용자 데이터에 이러한 이름을 사용하지 마십시오:
|
||||
|
||||
.snapraidignore - 로컬 제외 규칙 파일.
|
||||
.snapraid - 스냅샷 컨테이너 디렉터리.
|
||||
snapraid-* - SnapRAID에서 관리하는 ZFS 스냅샷 이름.
|
||||
*.unrecoverable - 복구 중 격리된 손상된 파일.
|
||||
CONTENT.tmp - content 업데이트용 임시 파일.
|
||||
CONTENT.lock - content 잠금 파일.
|
||||
PARITY.spaceholder - Windows 패리티 할당 중 사용되는 임시
|
||||
공간 확보 파일.
|
||||
|
||||
관련 없는 데이터에 이러한 이름을 사용하면 파일이나 스냅샷이 무시되거나,
|
||||
메타데이터로 잘못 해석되거나, 덮어쓰기되거나, 이름이 바뀌거나, 삭제될 수
|
||||
있습니다.
|
||||
|
||||
Windows에서는 대소문자를 구분하도록 구성된 NTFS 디렉터리에서도 모든
|
||||
대소문자 변형이 마찬가지로 예약됩니다(예: .SNAPRAIDIGNORE, .SnapRaid,
|
||||
CONTENT.TMP, CONTENT.Lock).
|
||||
|
||||
번역 (Translation)
|
||||
이 문서는 영어 매뉴얼의 자동 번역본입니다.
|
||||
공식 버전은 영어 매뉴얼을 참조하십시오.
|
||||
|
||||
저작권 (Copyright)
|
||||
This file is Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
참고 (See Also)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
.TH "Kopia zapasowa SnapRAID dla macierzy dyskowych" 1
|
||||
.TH "Program do tworzenia kopii zapasowych SnapRAID dla macierzy dyskowych" 1
|
||||
.SH NAME
|
||||
snapraid \- Kopia zapasowa SnapRAID dla macierzy dyskowych
|
||||
.SH SYNOPSIS
|
||||
snapraid \- Program do tworzenia kopii zapasowych SnapRAID dla macierzy dyskowych
|
||||
.SH SKłADNIA (SYNOPSIS)
|
||||
snapraid [\-c, \-\-conf CONFIG]
|
||||
.PD 0
|
||||
.PP
|
||||
|
|
@ -77,7 +77,7 @@ snapraid [\-c, \-\-conf CONFIG]
|
|||
snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PD 0
|
||||
.PD
|
||||
.SH DESCRIPTION
|
||||
.SH OPIS (DESCRIPTION)
|
||||
SnapRAID to program do tworzenia kopii zapasowych przeznaczony
|
||||
dla macierzy dyskowych, przechowujący informacje parzystości
|
||||
do odzyskiwania danych w przypadku awarii do sześciu dysków.
|
||||
|
|
@ -116,22 +116,35 @@ https://www.snapraid.it/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH LIMITATIONS
|
||||
SnapRAID to hybryda programu RAID i programu do tworzenia kopii zapasowych,
|
||||
której celem jest połączenie najlepszych zalet obu. Ma jednak pewne
|
||||
ograniczenia, które należy wziąć pod uwagę przed jego użyciem.
|
||||
.SH OGRANICZENIA (LIMITATIONS)
|
||||
SnapRAID jest hybrydą pomiędzy RAID a programem do tworzenia kopii zapasowych, mającą na celu połączenie
|
||||
najlepszych zalet obu tych rozwiązań. Posiada jednak pewne ograniczenia, które należy
|
||||
wziąć pod uwagę przed jego użyciem.
|
||||
.PP
|
||||
Głównym ograniczeniem jest to, że jeśli dysk ulegnie awarii, a Ty nie wykonałeś
|
||||
niedawno synchronizacji, możesz nie być w stanie w pełni odzyskać danych.
|
||||
Dokładniej, możesz nie być w stanie odzyskać danych o wielkości
|
||||
zmienionych lub usuniętych plików od czasu ostatniej operacji synchronizacji.
|
||||
Dzieje się tak, nawet jeśli zmienione lub usunięte pliki nie znajdują się na
|
||||
uszkodzonym dysku. Dlatego SnapRAID jest lepiej dostosowany do
|
||||
danych, które rzadko się zmieniają.
|
||||
Głównym ograniczeniem jest to, że w przypadku awarii dysku można odzyskać dane tylko do
|
||||
stanu z momentu ostatniej operacji \`sync\` (synchronizacji). Wszelkie dane dodane lub modyfikacje dokonane
|
||||
od ostatniej synchronizacji, które znajdują się na uszkodzonym dysku, zostaną utracone.
|
||||
.PP
|
||||
Z drugiej strony, nowo dodane pliki nie uniemożliwiają odzyskania już
|
||||
istniejących plików. Stracisz tylko ostatnio dodane pliki, jeśli
|
||||
znajdują się one na uszkodzonym dysku.
|
||||
W związku z tym SnapRAID nadaje się głównie do danych, które rzadko się zmieniają.
|
||||
.PP
|
||||
W przypadku danych, które już istniały podczas ostatniej synchronizacji, niezawodność odzyskiwania zależy
|
||||
od tego, czy użyto opcji \`snapshot\` (migawki):
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Z obsługą migawek (dostępną w systemach plików Btrfs, ZFS, Bcachefs i NTFS),
|
||||
SnapRAID może automatycznie utrzymywać niezależny, zamrożony punkt
|
||||
odniesienia dla każdego obsługiwanego systemu plików z danymi.
|
||||
Zapewnia to, że nawet jeśli zmodyfikujesz lub usuniesz pliki w aktywnym systemie plików
|
||||
w trakcie lub po synchronizacji, proces odzyskiwania pozostanie spójny i niezawodny.
|
||||
.PD
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Bez obsługi migawek, usunięcie lub zmiana plików po operacji \`sync\`
|
||||
może uniemożliwić pełne odzyskanie danych z innych uszkodzonych dysków. Dzieje się tak,
|
||||
ponieważ parzystość nie odpowiada już zmodyfikowanym plikom, nawet jeśli
|
||||
pliki te nie znajdują się na uszkodzonym dysku. Z drugiej strony, nowo dodane
|
||||
pliki nie uniemożliwiają odzyskania już istniejących plików.
|
||||
.PD
|
||||
.PP
|
||||
Inne ograniczenia SnapRAID to:
|
||||
.PD 0
|
||||
|
|
@ -151,9 +164,9 @@ awarii całej macierzy dysków.
|
|||
.IP \(bu
|
||||
Zapisywane są tylko nazwy plików, znaczniki czasu, dowiązania symboliczne
|
||||
i dowiązania twarde.
|
||||
Uprawnienia, właścicielstwo i rozszerzone atrybuty nie są zapisywane.
|
||||
Uprawnienia, właściciel (własność) i rozszerzone atrybuty nie są zapisywane.
|
||||
.PD
|
||||
.SH GETTING STARTED
|
||||
.SH PIERWSZE KROKI (GETTING STARTED)
|
||||
Aby użyć SnapRAID, musisz najpierw wybrać jeden dysk w swojej macierzy
|
||||
dysków, który zostanie przeznaczony na informacje o \`parzystości\`. Z jednym dyskiem
|
||||
na parzystość będziesz w stanie odzyskać dane po awarii pojedynczego dysku,
|
||||
|
|
@ -300,7 +313,7 @@ Kiedy to polecenie się zakończy, Twoje dane są BEZPIECZNE.
|
|||
.PP
|
||||
Teraz możesz zacząć używać swojej macierzy, jak chcesz, i okresowo
|
||||
aktualizować informacje o parzystości, uruchamiając polecenie \`sync\`.
|
||||
.SS Scrubbing
|
||||
.SS Scrubbing (Scrubbing)
|
||||
Aby okresowo sprawdzać dane i parzystość pod kątem błędów, możesz
|
||||
uruchomić polecenie \`scrub\`.
|
||||
.PP
|
||||
|
|
@ -357,10 +370,10 @@ snapraid \-p bad scrub
|
|||
Uruchomienie \`scrub\` na niezsynchronizowanej macierzy może zgłosić błędy
|
||||
spowodowane usuniętymi lub zmodyfikowanymi plikami. Błędy te są zgłaszane
|
||||
w wyniku \`scrub\`, ale powiązane bloki nie są oznaczane jako złe.
|
||||
.SS Pooling
|
||||
.SS Łączenie w pulę (Pooling)
|
||||
Uwaga: Funkcja łączenia w pulę opisana poniżej została zastąpiona przez
|
||||
narzędzie mergerfs, które jest obecnie zalecaną opcją dla użytkowników Linuksa
|
||||
w społeczności SnapRAID. Mergefs zapewnia bardziej elastyczny i wydajny
|
||||
w społeczności SnapRAID. Mergerfs zapewnia bardziej elastyczny i wydajny
|
||||
sposób łączenia wielu dysków w jeden ujednolicony punkt montowania,
|
||||
umożliwiając bezproblemowy dostęp do plików w całej macierzy bez polegania
|
||||
na dowiązaniach symbolicznych. Dobrze integruje się z SnapRAID w celu ochrony
|
||||
|
|
@ -505,7 +518,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Undeleting
|
||||
.SS Cofanie usuwania (Undeleting)
|
||||
SnapRAID działa bardziej jak program do tworzenia kopii zapasowych niż system RAID
|
||||
i może być użyty do przywrócenia lub odzyskania usuniętych plików do ich poprzedniego
|
||||
stanu za pomocą opcji \-f, \-\-filter:
|
||||
|
|
@ -541,12 +554,14 @@ snapraid fix \-m
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Recovering
|
||||
.SS Odzyskiwanie (Recovering)
|
||||
Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków!
|
||||
.PP
|
||||
NIE PANIKUJ! Będziesz w stanie je odzyskać!
|
||||
.PP
|
||||
Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków.
|
||||
Zanim zrobisz cokolwiek innego, unikaj wprowadzania jakichkolwiek zmian w Twojej
|
||||
macierzy dysków, ponieważ modyfikowanie lub usuwanie danych na pozostałych
|
||||
dyskach może uniemożliwić odzyskanie.
|
||||
Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym
|
||||
jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID.
|
||||
.PP
|
||||
|
|
@ -602,7 +617,7 @@ Teraz odzyskałeś wszystko, co jest możliwe do odzyskania. Jeśli niektóre pl
|
|||
są częściowo lub całkowicie nie do odzyskania, zostaną one przemianowane
|
||||
poprzez dodanie rozszerzenia \`.unrecoverable\`.
|
||||
.PP
|
||||
Szczegółową listę wszystkich nie do odzyskania bloków znajdziesz w pliku fix.log,
|
||||
Szczegółową listę wszystkich bloków nie do odzyskania znajdziesz w pliku fix.log,
|
||||
sprawdzając wszystkie linie zaczynające się od \`unrecoverable:\`.
|
||||
.PP
|
||||
Jeśli nie jesteś zadowolony z odzyskiwania, możesz spróbować ponownie
|
||||
|
|
@ -643,22 +658,22 @@ snapraid sync
|
|||
.RE
|
||||
.PP
|
||||
Jeśli wszystko zostanie odzyskane, to polecenie jest natychmiastowe.
|
||||
.SH COMMANDS
|
||||
.SH POLECENIA (COMMANDS)
|
||||
SnapRAID udostępnia kilka prostych poleceń, które pozwalają na:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Wyświetlenie statusu macierzy \-> \`status\`
|
||||
Wyświetlenie stanu macierzy \-> \`status\`
|
||||
.IP \(bu
|
||||
Kontrolę dysków \-> \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
Kontrola dysków \-> \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
.IP \(bu
|
||||
Wykonanie kopii zapasowej/migawki \-> \`sync\`
|
||||
Utworzenie punktu kopii zapasowej/przywracania \-> \`sync\`
|
||||
.IP \(bu
|
||||
Okresowe sprawdzanie danych \-> \`scrub\`
|
||||
.IP \(bu
|
||||
Przywrócenie ostatniej kopii zapasowej/migawki \-> \`fix\`.
|
||||
Przywrócenie ostatniego punktu kopii zapasowej/przywracania \-> \`fix\`.
|
||||
.PD
|
||||
.PP
|
||||
Polecenia muszą być zapisane małymi literami.
|
||||
Polecenia muszą być wpisywane małymi literami.
|
||||
.SS status
|
||||
Wyświetla podsumowanie stanu macierzy dysków.
|
||||
.PP
|
||||
|
|
@ -785,9 +800,10 @@ Pliki o innym rozmiarze lub znaczniku czasu, co oznacza, że
|
|||
zostały zmodyfikowane.
|
||||
.HP 4
|
||||
.I moved
|
||||
Pliki przeniesione do innego katalogu na tym samym dysku.
|
||||
Są one identyfikowane przez tę samą nazwę, rozmiar, znacznik czasu
|
||||
i inode, ale inny katalog.
|
||||
Pliki przeniesione lub o zmienionej nazwie na tym samym dysku
|
||||
z zachowaniem tego samego i\-węzła (inode). Są identyfikowane przez
|
||||
ten sam inode, rozmiar i znacznik czasu, ale inną ścieżkę. Nazwa
|
||||
pliku może być również inna.
|
||||
.HP 4
|
||||
.I copied
|
||||
Pliki skopiowane na ten sam lub inny dysk, gdzie
|
||||
|
|
@ -799,17 +815,16 @@ musi być zgodna, aby plik został zidentyfikowany, a nie
|
|||
tylko nazwa.
|
||||
.HP 4
|
||||
.I relocated
|
||||
Pliki przeniesione na ten sam lub inny dysk, gdzie
|
||||
oryginał zniknął.
|
||||
Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru
|
||||
i znacznika czasu.
|
||||
Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka
|
||||
musi być zgodna, aby plik został zidentyfikowany.
|
||||
W przeciwieństwie do plików \'moved\' na tym samym dysku, pliki
|
||||
relokowane mają inny i\-węzeł.
|
||||
Pliki przeniesione do innego katalogu lub na inny dysk,
|
||||
gdzie oryginalny plik zniknął, a inode nie został zachowany.
|
||||
Są identyfikowane przez posiadanie tej samej nazwy, rozmiaru i
|
||||
znacznika czasu. Jeśli podsekundowy znacznik czasu wynosi zero,
|
||||
pełna ścieżka musi być zgodna, aby plik został zidentyfikowany.
|
||||
W przeciwieństwie do plików \'moved\', pliki relokowane wymagają,
|
||||
aby nazwa pliku pozostała taka sama.
|
||||
.HP 4
|
||||
.I restored
|
||||
Pliki o innym i\-węźle, ale pasującym katalogu,
|
||||
Pliki o innym inode, ale pasującym katalogu,
|
||||
nazwie, rozmiarze i znaczniku czasu.
|
||||
Są to zazwyczaj pliki przywrócone po ich usunięciu.
|
||||
.PD
|
||||
|
|
@ -876,7 +891,7 @@ Aby sprawdzić tylko złe bloki, możesz użyć polecenia \`scrub \-p bad\`.
|
|||
.PP
|
||||
Zaleca się uruchamianie \`scrub\` tylko na zsynchronizowanej macierzy, aby uniknąć
|
||||
zgłaszania błędów spowodowanych przez niezsynchronizowane dane. Błędy te są rozpoznawane
|
||||
jako nie będące cichymi błędami, a bloki nie są oznaczane jako złe,
|
||||
jako niebędące cichymi błędami, a bloki nie są oznaczane jako złe,
|
||||
ale takie błędy są zgłaszane w wyniku polecenia.
|
||||
.PP
|
||||
Plik \`content\` jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia
|
||||
|
|
@ -884,15 +899,14 @@ dla każdego bloku i oznaczenia złych bloków.
|
|||
Pliki \`parity\` NIE są modyfikowane.
|
||||
Pliki w macierzy NIE są modyfikowane.
|
||||
.SS fix
|
||||
Naprawia wszystkie pliki i dane parzystości.
|
||||
Naprawia wszystkie pliki oraz dane parzystości.
|
||||
.PP
|
||||
Wszystkie pliki i dane parzystości są porównywane ze stanem migawki
|
||||
zapisanym w ostatniej \`sync\`.
|
||||
Jeśli zostanie znaleziona różnica, jest ona przywracana do zapisanego stanu migawki.
|
||||
Wszystkie pliki i dane parzystości są porównywane ze stanem zapisanym podczas
|
||||
ostatniej operacji \`sync\`. W przypadku znalezienia różnicy, następuje przywrócenie stanu zapisanego.
|
||||
.PP
|
||||
OSTRZEŻENIE! Polecenie \`fix\` nie rozróżnia błędów od
|
||||
celowych modyfikacji. Bezwarunkowo przywraca stan pliku
|
||||
do ostatniej \`sync\`.
|
||||
UWAGA!
|
||||
Polecenie \`fix\` nie odróżnia błędów od celowych modyfikacji.
|
||||
Bezwzględnie przywraca stan plików do momentu ostatniej operacji \`sync\`.
|
||||
.PP
|
||||
Jeśli nie określono żadnej innej opcji, przetwarzana jest cała macierz.
|
||||
Użyj opcji filtra, aby wybrać podzbiór plików lub dysków do operacji.
|
||||
|
|
@ -1020,7 +1034,7 @@ Jeśli chcesz dokonać realokacji tych plików, możesz użyć opcji
|
|||
\-W, \-\-force\-realloc\-tail.
|
||||
Pamiętaj, że takie pliki nie będą chronione przez parzystość podczas procesu
|
||||
realokacji.
|
||||
.SH OPTIONS
|
||||
.SH OPCJE (OPTIONS)
|
||||
SnapRAID udostępnia następujące opcje:
|
||||
.TP
|
||||
.B \-c, \-\-conf CONFIG
|
||||
|
|
@ -1131,9 +1145,9 @@ Stosuje globalne ograniczenie przepustowości dla wszystkich dysków. RATE to
|
|||
liczba bajtów na sekundę. Możesz określić mnożnik,
|
||||
taki jak K, M lub G (np. \-\-bw\-limit 1G).
|
||||
.TP
|
||||
.B \-t, \-\-tail ROZMIAR
|
||||
Ogranicza listę plików do tych, które nie używają więcej niż określony
|
||||
końcowy rozmiar dysków parzystości.
|
||||
.B \-t, \-\-tail SIZE
|
||||
Ogranicza listę plików do tych, które nie wykraczają poza określoną
|
||||
sekcję końcową (ogon) plików parzystości.
|
||||
Możesz użyć mnożników takich jak K, M, G lub T (np. \-\-tail 1G).
|
||||
Opcja ta jest ważna tylko wtedy, gdy jest używana wraz z poleceniem
|
||||
\`locate\`.
|
||||
|
|
@ -1231,9 +1245,9 @@ OSTRZEŻENIE! Ta opcja jest tylko dla ekspertów i jest wysoce
|
|||
zalecane, aby jej nie używać.
|
||||
NIE MASZ ochrony danych podczas operacji \`sync\`.
|
||||
.TP
|
||||
.B \-W, \-\-force\-realloc\-tail ROZMIAR
|
||||
.B \-W, \-\-force\-realloc\-tail SIZE
|
||||
Działa jak \-R, \-\-force\-realloc, ale ogranicza się do określonej części
|
||||
końcowej (ostatnie ROZMIAR bajtów) każdego pliku parzystości.
|
||||
końcowej (ostatnie SIZE bajtów) każdego pliku parzystości.
|
||||
Wymusza realokację (przeniesienie) wszelkich fragmentów/bloków plików
|
||||
obecnie przechowywanych w tej sekcji końcowej, pozwalając na ich
|
||||
umieszczenie w dowolnym miejscu w pliku (plikach) parzystości, gdzie
|
||||
|
|
@ -1265,7 +1279,7 @@ w trybie dołączania. Wystąpienia \`%D\` i \`%T\` w nazwie są
|
|||
zastępowane datą i czasem w formacie RRRRMMDD i
|
||||
GGMMSS. W plikach wsadowych Windows musisz podwoić
|
||||
znak \`%\`, np. result\-%%D.log. Aby użyć \`>>\`, musisz
|
||||
ujęć nazwę w cudzysłów, np. \`\[dq]>>result.log\[dq]\`.
|
||||
ująć nazwę w cudzysłów, np. \`\[dq]>>result.log\[dq]\`.
|
||||
Aby wyprowadzić log do standardowego wyjścia lub standardowego błędu,
|
||||
możesz użyć odpowiednio \`\[dq]>&1\[dq]\` i \`\[dq]>&2\[dq]\`.
|
||||
Opisy tagów logu znajdziesz w pliku snapraid_log.txt lub na stronie podręcznika.
|
||||
|
|
@ -1283,11 +1297,13 @@ Jednak \`check\` i \`fix\` zawsze zatrzymują się przy pierwszym błędzie.
|
|||
Zaczyna przetwarzanie od określonego
|
||||
numeru bloku. Może to być przydatne do ponownej próby sprawdzenia
|
||||
lub naprawy określonych bloków w przypadku uszkodzonego dysku.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania
|
||||
i jest obsługiwana tylko przez \`check\` i \`fix\`.
|
||||
.TP
|
||||
.B \-B, \-\-count BLKCOUNT
|
||||
Przetwarza tylko określoną liczbę bloków.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania
|
||||
i jest obsługiwana tylko przez \`check\` i \`fix\`.
|
||||
.TP
|
||||
.B \-C, \-\-gen\-conf CONTENT
|
||||
Generuje atrapę pliku konfiguracyjnego z istniejącego
|
||||
|
|
@ -1317,7 +1333,7 @@ Wyświetla krótki ekran pomocy.
|
|||
.TP
|
||||
.B \-V, \-\-version
|
||||
Wyświetla wersję programu.
|
||||
.SH CONFIGURATION
|
||||
.SH KONFIGURACJA (CONFIGURATION)
|
||||
SnapRAID wymaga pliku konfiguracyjnego, aby wiedzieć, gdzie znajduje się Twoja macierz
|
||||
dysków i gdzie przechowywać informacje o parzystości.
|
||||
.PP
|
||||
|
|
@ -1410,6 +1426,11 @@ systemie plików.
|
|||
Możesz zmieniać punkt montowania w razie potrzeby, o ile
|
||||
zachowasz stałą nazwę NAME.
|
||||
.PP
|
||||
Jednak skonfigurowana ścieżka musi spójnie wskazywać na te same
|
||||
dane bazowe. Jeśli ścieżka zawiera dowiązania symboliczne,
|
||||
ich cele muszą pozostać stabilne. Zmiana takich dowiązań w celu
|
||||
przełączenia katalogu danych w locie jest nieobsługiwana.
|
||||
.PP
|
||||
Powinieneś użyć jednej opcji dla każdego dysku danych w macierzy.
|
||||
.PP
|
||||
Możesz później zmienić nazwę dysku, zmieniając bezpośrednio nazwę NAME
|
||||
|
|
@ -1426,6 +1447,30 @@ dysk rozruchowy.
|
|||
.PP
|
||||
Należy zauważyć, że polecenia \`up\` i \`down\` nie mają wpływu na takie
|
||||
dyski, ponieważ oczekuje się, że będą one zawsze w ruchu.
|
||||
.SS snapshot
|
||||
Włącza używanie migawek systemu plików dla poleceń \`sync\`, \`scrub\`,
|
||||
\`check\` oraz \`fix\`.
|
||||
.PP
|
||||
Po włączeniu, SnapRAID tworzy migawkę w trybie tylko do odczytu dla każdego
|
||||
obsługiwanego systemu plików z danymi na początku operacji \'sync\'. Zapewnia to
|
||||
stabilny obraz każdego systemu plików, zapobiegając sytuacji, w której późniejsze
|
||||
modyfikacje zmieniłyby dane użyte do obliczenia parzystości.
|
||||
.PP
|
||||
To znacznie usprawnia odzyskiwanie danych: jeśli plik zostanie usunięty z aktywnego systemu
|
||||
plików, pozostaje zachowany w migawce. Zapobiega to sytuacji, w której parzystość staje się \[dq]uszkodzona\[dq]
|
||||
dla tego bloku, zapewniając możliwość pomyślnego odzyskania danych,
|
||||
jeśli ulegnie awarii inny dysk.
|
||||
.PP
|
||||
Opcja ta dotyczy wyłącznie dysków z danymi sformatowanych w systemach plików
|
||||
Btrfs, Bcachefs lub ZFS w systemie Linux oraz NTFS w systemie Windows.
|
||||
Dyski parzystości lub dyski z danymi korzystające z innych systemów plików będą zawsze używać
|
||||
aktywnej wersji systemu plików.
|
||||
.PP
|
||||
Tworzenie i usuwanie migawek wymaga uprawnień administratora.
|
||||
Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo), gdy
|
||||
opcja ta jest włączona.
|
||||
.PP
|
||||
Szczegółowe wyjaśnienie cyklu życia migawek znajduje się w sekcji SNAPSHOTS.
|
||||
.SS nohidden
|
||||
Wyklucza wszystkie ukryte pliki i katalogi.
|
||||
W systemie Unix ukryte pliki to te zaczynające się od \`.\`.
|
||||
|
|
@ -1440,6 +1485,11 @@ jest wykluczony. Jeśli jest to \`include\`, plik jest włączony.
|
|||
Jeśli żaden wzorzec nie pasuje, plik jest wykluczony, jeśli ostatni określony
|
||||
wzorzec to \`include\`, lub włączony, jeśli ostatni określony wzorzec to \`exclude\`.
|
||||
.PP
|
||||
Należy pamiętać, że filtrowanie odbywa się hierarchicznie podczas
|
||||
przechodzenia katalogów. Jeśli katalog pasuje do reguły \`exclude\`, cały
|
||||
katalog jest pomijany (odrzucany), a wszelkie reguły \`include\` dla plików
|
||||
lub podkatalogów w nim zawartych nie będą oceniane.
|
||||
.PP
|
||||
Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji
|
||||
wzorców.
|
||||
.PP
|
||||
|
|
@ -1472,7 +1522,7 @@ zmarnujesz 12,8 GB parzystości, co może skutkować
|
|||
.PP
|
||||
Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą \`status\`.
|
||||
Jest to ilość miejsca, którą musisz pozostawić wolną na dyskach danych
|
||||
lub użyć dla plików nie włączonych do macierzy.
|
||||
lub użyć dla plików niewłączonych do macierzy.
|
||||
Jeśli ta wartość jest ujemna, oznacza to, że jesteś blisko wypełnienia
|
||||
parzystości i reprezentuje to przestrzeń, którą nadal możesz zmarnować.
|
||||
.PP
|
||||
|
|
@ -1546,7 +1596,7 @@ Ustawia maksymalną dozwoloną temperaturę dysku w stopniach Celsjusza. Po okre
|
|||
SnapRAID okresowo sprawdza temperaturę wszystkich dysków za pomocą
|
||||
narzędzia smartctl. Aktualne temperatury dysków są wyświetlane podczas
|
||||
działania SnapRAID. Jeśli którykolwiek dysk przekroczy ten limit, wszystkie operacje
|
||||
zostają zatrzymane, a dyski są zatrzymywane (przechodzą w stan gotowości) na czas
|
||||
zostają zatrzymane, a dyski są wyłączane (przechodzą w stan czuwania / uśpienia) na czas
|
||||
zdefiniowany przez opcję \`temp_sleep\`. Po okresie uśpienia, operacje
|
||||
są wznawiane, potencjalnie ponownie zatrzymując się, jeśli limit temperatury
|
||||
zostanie ponownie osiągnięty.
|
||||
|
|
@ -1554,7 +1604,7 @@ zostanie ponownie osiągnięty.
|
|||
Podczas działania SnapRAID analizuje również krzywą nagrzewania każdego
|
||||
dysku i szacuje długoterminową stałą temperaturę, którą mają
|
||||
osiągnąć, jeśli aktywność będzie kontynuowana. Oszacowanie jest wykonywane tylko po
|
||||
czterokrotnym wzroście temperatury dysku, co zapewnia, że
|
||||
czterokrotnym zarejestrowaniu wzrostu temperatury dysku, co zapewnia, że
|
||||
dostępnych jest wystarczająco dużo punktów danych do ustalenia wiarygodnego trendu.
|
||||
Ta przewidywana stała temperatura jest pokazywana w nawiasach obok
|
||||
aktualnej wartości i pomaga ocenić, czy chłodzenie systemu jest
|
||||
|
|
@ -1570,7 +1620,7 @@ wykorzystuje najniższą temperaturę dysku zmierzoną na początku uruchomienia
|
|||
Normalnie SnapRAID pokazuje tylko temperaturę najgorętszego dysku.
|
||||
Aby wyświetlić temperaturę wszystkich dysków, użyj opcji \-A lub \-\-stats.
|
||||
.SS temp_sleep TIME_IN_MINUTES
|
||||
Ustawia czas gotowości, w minutach, po osiągnięciu limitu temperatury.
|
||||
Ustawia czas wstrzymania (czuwania), w minutach, po osiągnięciu limitu temperatury.
|
||||
W tym okresie dyski pozostają zatrzymane. Domyślnie jest to 5 minut.
|
||||
.SS pool DIR
|
||||
Definiuje katalog puli, w którym tworzony jest wirtualny widok macierzy
|
||||
|
|
@ -1604,6 +1654,9 @@ W określonych OPCJACH ciąg \`%s\` jest zastępowany
|
|||
nazwą urządzenia. W przypadku kontrolerów RAID, urządzenie jest
|
||||
prawdopodobnie stałe i może nie być konieczne użycie \`%s\`.
|
||||
.PP
|
||||
Możesz również określić niestandardowy ciąg opcji informacyjnych za pomocą
|
||||
znacznika \`[info: ...]\`, aby zastąpić domyślną opcję \`\-a\`.
|
||||
.PP
|
||||
Zapoznaj się z dokumentacją smartmontools, aby uzyskać możliwe opcje:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1619,6 +1672,10 @@ https://www.smartmontools.org/wiki/Supported_USB\-Devices
|
|||
Na przykład:
|
||||
.PP
|
||||
.RS 4
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl parity \-d sat %s
|
||||
.PD 0
|
||||
.PD
|
||||
|
|
@ -1633,19 +1690,27 @@ PARITY to jedna z nazw parzystości: \`parity\`, \`2\-parity\`, \`3\-parity\`,
|
|||
\`4\-parity\`, \`5\-parity\`, \`6\-parity\` lub \`z\-parity\`.
|
||||
Specjalna wartość * może być użyta do zignorowania atrybutu na wszystkich dyskach.
|
||||
.PP
|
||||
Na przykład, aby zignorować atrybut \`Current Pending Sector Count\` na
|
||||
wszystkich dyskach:
|
||||
Można określić wiele atrybutów oddzielonych spacjami.
|
||||
Każdy atrybut można określić jako liczbę od 1 do 255 lub jako nazwę
|
||||
niewrażliwą na wielkość liter (np. \`Current_Pending_Sector\`).
|
||||
.PP
|
||||
Na przykład, aby zignorować atrybuty \`Current Pending Sector Count\` i
|
||||
\`Reallocated Sectors Count\` na wszystkich dyskach za pomocą ich numeru lub nazwy:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore * 197
|
||||
smartignore * 197 5
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Aby zignorować go tylko na pierwszym dysku parzystości:
|
||||
Aby zignorować je tylko na pierwszym dysku parzystości:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
|
|
@ -1685,7 +1750,7 @@ exclude /tmp/
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1741,7 +1806,7 @@ exclude \\System Volume Information
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1757,7 +1822,171 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH PATTERN
|
||||
.SH MIGAWKI (SNAPSHOTS)
|
||||
Jeśli opcja snapshot jest włączona w konfiguracji, SnapRAID
|
||||
używa migawek systemu plików, aby utrzymać stabilność danych odczytywanych
|
||||
podczas operacji, nawet jeśli pliki w aktywnych systemach plików zostaną
|
||||
później zmodyfikowane lub usunięte.
|
||||
.PP
|
||||
Zarządzanie migawkami jest całkowicie automatyczne i przejrzyste.
|
||||
Możesz nadal używać SnapRAID dokładnie tak jak dotychczas, z dodatkową
|
||||
ochroną zapewnianą przez migawki, która jest realizowana w całości w
|
||||
tle.
|
||||
.PP
|
||||
Zapewnia to dwie główne korzyści:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I Spójność
|
||||
Pliki zmodyfikowane w aktywnym systemie plików podczas długotrwałej
|
||||
operacji sync lub scrub nie spowodują niezgodności parzystości ani przerwania
|
||||
operacji, ponieważ każdy objęty migawką system plików pozostaje niezmieniony
|
||||
przez cały czas trwania operacji.
|
||||
.HP 4
|
||||
.I Odzyskiwanie
|
||||
Jeśli plik zostanie zaktualizowany lub usunięty z aktywnego systemu plików,
|
||||
pozostaje zachowany w migawce. Jeśli awaria dysku nastąpi
|
||||
przed uruchomieniem kolejnej operacji sync, SnapRAID użyje danych zachowanych
|
||||
w migawce do odbudowania uszkodzonego dysku.
|
||||
.PD
|
||||
.PP
|
||||
.RS 4
|
||||
.PD 0
|
||||
W przypadku awarii dysku podczas aktywnego procesu sync,
|
||||
SnapRAID jest również w stanie automatycznie czytać zarówno z migawki
|
||||
poprzedniego obliczenia parzystości, jak i z bieżącej.
|
||||
Maksymalizuje to prawdopodobieństwo pełnego odzyskania danych poprzez
|
||||
zapewnienie dostępu do dokładnych bloków danych wymaganych do rozwiązania
|
||||
równań parzystości, nawet jeśli bloki te zostały zmodyfikowane
|
||||
lub usunięte pomiędzy operacjami sync.
|
||||
.PD
|
||||
.PP
|
||||
.PD 0
|
||||
Bez migawek, zaktualizowany lub usunięty plik na sprawnym dysku
|
||||
skutkuje brakiem bloków danych, które mogą być wymagane do
|
||||
naprawy innych uszkodzonych dysków.
|
||||
.PD
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
Migawki są tworzone tylko dla dysków z danymi i tylko wtedy, gdy bazowy
|
||||
system plików obsługuje tę funkcjonalność. Dyski parzystości zawsze używają
|
||||
aktywnego systemu plików.
|
||||
.PP
|
||||
Obecnie jest to obsługiwane w systemach Btrfs, Bcachefs i ZFS w systemie Linux
|
||||
oraz NTFS w systemie Windows.
|
||||
.PP
|
||||
Można mieszać dyski z danymi o różnych systemach plików. Tylko te, które
|
||||
obsługują migawki, będą z nich korzystać, podczas gdy inne dyski będą nadal
|
||||
działać bezpośrednio na aktywnym systemie plików.
|
||||
.PP
|
||||
Tworzenie i usuwanie migawek wymaga uprawnień administratora.
|
||||
Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo),
|
||||
gdy migawki są włączone.
|
||||
.SS Zachowanie poleceń przy użyciu migawek
|
||||
Polecenia \`sync\` oraz \`scrub\` używają migawek dla dysków z danymi, których
|
||||
systemy plików je obsługują. Na dysku objętym migawką polecenie widzi stabilny
|
||||
obraz systemu plików, na który nie mają wpływu równoczesne zmiany w aktywnym
|
||||
systemie plików.
|
||||
Podczas operacji \`sync\` nowa migawka jest tworzona niezależnie dla każdego
|
||||
obsługiwanego systemu plików z danymi. Migawki te łącznie dostarczają dane
|
||||
używane do obliczenia parzystości.
|
||||
W przeciwieństwie do tego, polecenie \`scrub\` wykorzystuje ostatnią migawkę, tę
|
||||
utworzoną podczas najnowszej synchronizacji, aby utrzymać wiarygodny punkt odniesienia
|
||||
odpowiadający istniejącej parzystości.
|
||||
.PP
|
||||
W przypadku poleceń \`check\` oraz \`fix\`, użycie ostatniej migawki
|
||||
zależy od tego, czy konkretne dyski są wskazywane za pomocą opcji
|
||||
\-d, \-\-filter\-disk.
|
||||
.PP
|
||||
Dysk jawnie wybrany za pomocą opcji \-d (\[dq]cel\[dq] operacji)
|
||||
zawsze używa aktywnego systemu plików. Dla \`fix\` pozwala to na przywrócenie
|
||||
danych na aktywny dysk zamienny. Dla \`check\` pozwala to na symulację
|
||||
operacji \`fix\` w tych samych warunkach.
|
||||
.PP
|
||||
Wszystkie inne dyski z danymi (dyski \[dq]referencyjne\[dq]) będą dostępne za pośrednictwem
|
||||
swoich migawek. Zapewnia to, że nawet jeśli modyfikujesz pliki
|
||||
na sprawnych dyskach podczas trwania odzyskiwania danych, SnapRAID
|
||||
posiada stabilny, zamrożony punkt odniesienia do rozwiązania równań parzystości.
|
||||
.PP
|
||||
Jeśli nie podano opcji \-d, SnapRAID zakłada, że operacja dotyczy
|
||||
całej macierzy. W takim przypadku \`check\` oraz \`fix\` będą używać wyłącznie
|
||||
aktywnych systemów plików.
|
||||
.PP
|
||||
Wszystkie inne polecenia działają wyłącznie na aktywnym systemie plików.
|
||||
.SH CYKL żYCIA MIGAWEK (SNAPSHOTS LIFECYCLE)
|
||||
SnapRAID zarządza trzema określonymi migawkami, \`stable\` (stabilną), \`pending\` (oczekującą) oraz \`scan\` (skanowania),
|
||||
w ukrytym katalogu w katalogu głównym każdego podwolumenu danych.
|
||||
W systemach Btrfs, Bcachefs i NTFS używany jest katalog \`.snapraid/\`,
|
||||
w systemie ZFS standardowy \`.zfs/snapshot/\`.
|
||||
.PP
|
||||
Migawka \`stable\` reprezentuje stan ostatniej
|
||||
pomyślnie zakończonej operacji \`sync\`, zawierając dokładne dane użyte do
|
||||
obliczenia bieżącej parzystości. Służy ona jako główne źródło danych
|
||||
dla poleceń \`scrub\`, \`check\` i \`fix\`.
|
||||
.PP
|
||||
Migawka \`scan\` to tymczasowy obraz tworzony na początku
|
||||
operacji \`sync\` w celu zapewnienia zamrożonego stanu do skanowania i obliczenia parzystości.
|
||||
Po zeskanowaniu i zapisaniu nowego stanu zawartości zastępuje ona poprzednią
|
||||
migawkę \`pending\`.
|
||||
.PP
|
||||
Migawka \`pending\` to obraz używany przez przerwaną operację \`sync\`.
|
||||
Po pomyślnym zakończeniu operacji poprzednia migawka \`stable\`
|
||||
jest usuwana, a migawka \`pending\` zostaje podniesiona do rangi
|
||||
nowej stabilnej referencji.
|
||||
.PP
|
||||
Jeśli operacja \`sync\` zostanie przerwana, migawka \`pending\` zostaje zachowana.
|
||||
Kolejne polecenia \`scrub\`, \`check\` i \`fix\` będą używać tej oczekującej migawki,
|
||||
ponieważ odpowiada ona stanowi systemu plików zapisanemu w pliku .content,
|
||||
nawet jeśli parzystość jest zsynchronizowana tylko częściowo.
|
||||
.PP
|
||||
W przypadku przerwania operacji \`sync\`, polecenia \`check\` i \`fix\`
|
||||
odczytują dane również z migawki \`stable\`, aby pobrać bloki danych
|
||||
z plików, które zostały zaktualizowane lub usunięte podczas synchronizacji.
|
||||
Jest to możliwe, ponieważ plik .content zachowuje metadane dla
|
||||
wszystkich zmodyfikowanych lub usuniętych plików przez cały proces sync.
|
||||
Te informacje historyczne są czyszczone dopiero po pomyślnym zakończeniu operacji sync
|
||||
i zapisaniu ostatecznej wersji pliku .content.
|
||||
.PP
|
||||
Jeśli operacja \`sync\` zostanie zrestartowana po przerwaniu, istniejąca
|
||||
oczekująca (pending) migawka jest usuwana, a tworzona jest nowa, aby
|
||||
uchwycić bieżący stan aktywnego systemu plików.
|
||||
Jeśli jednak operacja \`sync\` zostanie przerwana, należy unikać modyfikowania,
|
||||
usuwania, zastępowania lub przenoszenia plików do momentu pomyślnego ukończenia
|
||||
kolejnej operacji \`sync\`. Parzystość może nadal zawierać bloki obliczone na podstawie
|
||||
migawki użytej przez przerwaną synchronizację. Późniejsza synchronizacja może zastąpić
|
||||
tę migawkę, uniemożliwiając odzyskanie pośrednich wersji plików.
|
||||
.SS Kopie zapasowe z migawkami systemu plików (External backups with filesystem snapshots)
|
||||
Gdy migawki systemu plików są włączone, SnapRAID uzyskuje dostęp do migawek
|
||||
lub tworzy je w katalogu głównym każdego podwoluminu danych, woluminu lub
|
||||
zestawu danych (dataset).
|
||||
.PP
|
||||
Prostym sposobem na uniknięcie jakichkolwiek konfliktów z zewnętrznymi
|
||||
narzędziami jest wskazanie w konfiguracji \`data\` zwykłego podkatalogu
|
||||
wewnątrz podwoluminu lub woluminu (na przykład \`/mnt/subvol/data\` zamiast
|
||||
\`/mnt/subvol\`). SnapRAID zawsze tworzy katalog migawek w katalogu głównym
|
||||
podwoluminu (na przykład \`/mnt/subvol/.snapraid/\`), pozostawiając podkatalog
|
||||
danych czysty, dzięki czemu migawki pozostają na zewnątrz i są niewidoczne
|
||||
dla narzędzi do tworzenia kopii zapasowych działających w tym katalogu.
|
||||
.PP
|
||||
W przeciwnym razie, jeśli skonfigurowany katalog \`data\` jest sam w sobie
|
||||
katalogiem głównym podwoluminu lub woluminu, SnapRAID utworzy katalog
|
||||
\`.snapraid/\` bezpośrednio w nim (w systemach Btrfs, Bcachefs i NTFS).
|
||||
Chociaż SnapRAID automatycznie wyklucza ten katalog z własnego skanowania,
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych lub synchronizacji
|
||||
plików napotkają go. Jeśli nie zostanie wykluczony, mogą wejść do migawek
|
||||
lub dowiązań katalogów i skopiować całe zamrożone drzewo danych, duplikując
|
||||
dane i wyczerpując przestrzeń dyskową kopii zapasowej. Zawsze konfiguruj
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych tak, aby wykluczały
|
||||
katalog \`.snapraid/\`.
|
||||
.PP
|
||||
W systemie ZFS migawki są udostępniane za pośrednictwem standardowego
|
||||
katalogu wirtualnego \`.zfs/snapshot/\` zamiast \`.snapraid/\`. Domyślnie
|
||||
(\`snapdir=hidden\`) system ZFS ukrywa ten katalog na listach katalogów, więc
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych go nie przeskanują. Jeśli
|
||||
włączono opcję \`snapdir=visible\`, upewnij się, że narzędzia do tworzenia kopii
|
||||
zapasowych wykluczają katalog \`.zfs/\`.
|
||||
.SH WZORCE (PATTERN)
|
||||
Wzorce zapewniają elastyczny sposób filtrowania plików do uwzględnienia lub
|
||||
wykluczenia. Używając znaków globbingowych, można zdefiniować reguły, które
|
||||
pasują do określonych nazw plików lub całych struktur katalogów bez
|
||||
|
|
@ -1773,18 +2002,18 @@ ukośniku, co czyni ją odpowiednią do dopasowywania w obrębie jednego
|
|||
składnika ścieżki. Jest to standardowe zachowanie symboli wieloznacznych znane
|
||||
z globbingu powłoki (shell).
|
||||
.PP
|
||||
Podwójna gwiazdka \`**\` jest potężniejsza, dopasowuje dowolną sekwencję
|
||||
znaków, w tym separatory katalogów. Pozwala to wzorcom dopasowywać się
|
||||
na wielu poziomach katalogów. Gdy \`**\` pojawia się bezpośrednio wewnątrz
|
||||
wzorca, może dopasować zero lub więcej znaków, w tym ukośniki między
|
||||
otaczającym tekstem dosłownym.
|
||||
Symbol wieloznaczny podwójnej gwiazdki \`**\` dopasowuje się poprzez separatory
|
||||
katalogów tylko wtedy, gdy sąsiaduje z separatorem katalogów (jest poprzedzony
|
||||
lub zakończony ukośnikiem). W tej formie dopasowuje zero lub więcej znaków
|
||||
na wielu poziomach katalogów. Na przykład \`foo/**/bar\` dopasowuje \`foo/bar\`,
|
||||
\`foo/a/bar\` oraz \`foo/a/b/bar\`; \`**/build\` dopasowuje \`build\` oraz
|
||||
\`foo/bar/build\`; a \`src/**.js\` dopasowuje \`src/main.js\` oraz
|
||||
\`src/ui/components/main.js\`.
|
||||
Samodzielna forma \`/**/\` nie jest akceptowana jako kompletny wzorzec.
|
||||
.PP
|
||||
Najważniejszym zastosowaniem \`**\` jest specjalna forma \`/**/\`. Dopasowuje ona
|
||||
zero lub więcej pełnych poziomów katalogów, umożliwiając dopasowanie plików
|
||||
na dowolnej głębokości w drzewie katalogów bez znajomości dokładnej struktury ścieżki.
|
||||
Na przykład wzorzec \`src/**/main.js\` pasuje do \`src/main.js\` (pomijając
|
||||
zero katalogów), \`src/ui/main.js\` (pomijając jeden katalog) oraz
|
||||
\`src/ui/components/main.js\` (pomijając dwa katalogi).
|
||||
Gdy \`**\` nie sąsiaduje z ukośnikiem, zachowuje się jak \`*\` i nie dopasowuje
|
||||
separatorów katalogów. Na przykład \`**.jpg\` dopasowuje \`photo.jpg\` w bieżącym
|
||||
katalogu, ale nie pasuje do \`dir/photo.jpg\`. W tym celu należy użyć \`**/*.jpg\`.
|
||||
.PP
|
||||
Klasy znaków używające nawiasów kwadratowych \`[]\` dopasowują pojedynczy znak z
|
||||
określonego zestawu lub zakresu. Podobnie jak inne wzorce pojedynczych znaków,
|
||||
|
|
@ -1793,8 +2022,8 @@ wykrzyknika.
|
|||
.PP
|
||||
Podstawową różnicą, o której należy pamiętać, jest to, że \`*\`, \`?\` i klasy znaków
|
||||
wszystkie respektują granice katalogów i dopasowują się tylko w obrębie jednego
|
||||
składnika ścieżki, podczas gdy \`**\` jest jedynym wzorcem, który może dopasowywać się poprzez
|
||||
separatory katalogów.
|
||||
składnika ścieżki, podczas gdy \`**\` może dopasowywać się poprzez separatory
|
||||
katalogów tylko wtedy, gdy sąsiaduje z ukośnikiem.
|
||||
.PP
|
||||
Istnieją cztery różne typy wzorców:
|
||||
.TP
|
||||
|
|
@ -1823,7 +2052,7 @@ specjalne katalogi Windows są traktowane jako pliki, co oznacza, że aby je
|
|||
wykluczyć, musisz użyć reguły pliku, a nie katalogu.
|
||||
.PP
|
||||
Jeśli nazwa pliku zawiera znak \`*\`, \`?\`, \`[\`,
|
||||
lub \`]\`, musisz go uciec, aby uniknąć interpretacji jako
|
||||
lub \`]\`, musisz go zamaskować (poprzedzić znakiem ucieczki), aby uniknąć interpretacji jako
|
||||
znaku globbing. W systemie Unix znakiem ucieczki jest \`\\\`; w systemie Windows jest to \`^\`.
|
||||
Gdy wzorzec znajduje się w wierszu poleceń, musisz podwoić znak ucieczki,
|
||||
aby uniknąć interpretacji przez powłokę poleceń.
|
||||
|
|
@ -1920,6 +2149,47 @@ include /pictures/
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Należy pamiętać, że wykluczenie katalogu (za pomocą DIR/ lub /PATH/DIR/)
|
||||
uniemożliwia programowi SnapRAID wejście i skanowanie tego katalogu.
|
||||
W konsekwencji nie jest możliwe ponowne włączenie pliku lub podkatalogu
|
||||
znajdującego się w wykluczonym katalogu nadrzędnym, ponieważ skaner nigdy
|
||||
do niego nie przechodzi.
|
||||
.PP
|
||||
Na przykład poniższa konfiguracja NIE uwzględni pliku \`file.dat\`,
|
||||
ponieważ katalog \`/keep/\` zostanie odrzucony, zanim \`file.dat\` będzie
|
||||
mógł zostać sprawdzony:
|
||||
.PP
|
||||
.RS 4
|
||||
# NIE działa zgodnie z oczekiwaniami: /keep/ jest całkowicie pomijany
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Aby wykluczyć pliki wewnątrz katalogu, zachowując wybrane, należy dopasować
|
||||
wzorzec plików wewnątrz katalogu, zamiast wykluczać sam katalog:
|
||||
.PP
|
||||
.RS 4
|
||||
# Działa: /keep/ jest przeszukiwany, ale pozostałe pliki są wykluczane
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/*
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
W wierszu poleceń, używając opcji \-f, możesz użyć tylko wzorców \`include\`.
|
||||
Na przykład:
|
||||
.PP
|
||||
|
|
@ -1939,7 +2209,7 @@ snapraid \-f \[dq]*.mp3\[dq] check
|
|||
.PP
|
||||
W systemie Unix, używając znaków globbing w wierszu poleceń, musisz
|
||||
je cytować, aby zapobiec ich rozszerzeniu przez powłokę.
|
||||
.SH IGNORE FILE
|
||||
.SH PLIK IGNOROWANIA (IGNORE FILE)
|
||||
Oprócz reguł globalnych w pliku konfiguracyjnym, możesz umieścić pliki
|
||||
\`.snapraidignore\` w dowolnym katalogu w macierzy, aby zdefiniować
|
||||
zdecentralizowane reguły wykluczania.
|
||||
|
|
@ -1999,15 +2269,18 @@ build/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH CONTENT
|
||||
.SH ZAWARTOść (CONTENT)
|
||||
SnapRAID przechowuje listę i sumy kontrolne Twoich plików w pliku zawartości.
|
||||
.PP
|
||||
Jest to plik binarny, który zawiera listę wszystkich plików obecnych w Twojej macierzy dysków,
|
||||
wraz ze wszystkimi sumami kontrolnymi w celu weryfikacji ich integralności.
|
||||
.PP
|
||||
Ten plik jest odczytywany i zapisywany przez polecenia \`sync\` i \`scrub\`
|
||||
oraz odczytywany przez polecenia \`fix\`, \`check\` i \`status\`.
|
||||
.SH PARITY
|
||||
Plik zawartości jest odczytywany i zapisywany przez polecenia \`sync\`,
|
||||
\`scrub\`, \`touch\` i \`rehash\`. Jest odczytywany przez polecenia \`status\`,
|
||||
\`diff\`, \`check\`, \`fix\`, \`list\`, \`dup\`, \`locate\` i \`pool\`, oraz jest
|
||||
całkowicie ignorowany przez polecenia \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
i \`devices\`.
|
||||
.SH PARZYSTOść (PARITY)
|
||||
SnapRAID przechowuje informacje o parzystości Twojej macierzy w plikach
|
||||
parzystości.
|
||||
.PP
|
||||
|
|
@ -2016,7 +2289,7 @@ bloków zdefiniowanych w pliku \`content\`.
|
|||
.PP
|
||||
Pliki te są odczytywane i zapisywane przez polecenia \`sync\` i \`fix\`
|
||||
oraz tylko odczytywane przez polecenia \`scrub\` i \`check\`.
|
||||
.SH ENCODING
|
||||
.SH KODOWANIE (ENCODING)
|
||||
SnapRAID w systemie Unix ignoruje wszelkie kodowanie. Odczytuje i przechowuje
|
||||
nazwy plików z tym samym kodowaniem używanym przez system plików.
|
||||
.PP
|
||||
|
|
@ -2029,7 +2302,204 @@ czcionki TrueType, takiej jak \`Lucida Console\`, jako czcionki konsoli.
|
|||
Dotyczy to tylko drukowanych nazw plików; jeśli
|
||||
przekierujesz wyjście konsoli do pliku, wynikowy plik jest zawsze
|
||||
w formacie UTF\-8.
|
||||
.SH COPYRIGHT
|
||||
Ten plik jest chroniony prawem autorskim (C) 2025 Andrea Mazzoleni
|
||||
.SH SEE ALSO
|
||||
snapraid_log(1), snapraidd(1)
|
||||
.SH KOD WYJśCIA (EXIT CODE)
|
||||
SnapRAID kończy działanie z następującymi kodami błędów:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 0
|
||||
Wszystko w porządku.
|
||||
.HP 4
|
||||
.I 1
|
||||
Polecenie napotkało błędy.
|
||||
.HP 4
|
||||
.I 2
|
||||
Polecenie \`diff\` wykazało, że wszystko jest w porządku, ale wymagane jest \`sync\`.
|
||||
.HP 4
|
||||
.I 3
|
||||
Polecenie urządzenia dyskowego (\`probe\`, \`smart\`, \`devices\`, \`up\`,
|
||||
\`down\`) zostało zakończone, ale co najmniej jeden system plików działa
|
||||
w trybie zdegradowanym z brakującymi urządzeniami.
|
||||
.PD
|
||||
.RE
|
||||
.SH ZNANE PROBLEMY (KNOWN ISSUES)
|
||||
.SS Granice systemu plików
|
||||
SnapRAID nie przekracza granic systemów plików, punktów montowania ani
|
||||
podwolumenów podczas skanowania dysku z danymi. Po wykryciu takiej granicy
|
||||
SnapRAID zgłasza OSTRZEŻENIE i nie skanuje dalej.
|
||||
.PP
|
||||
Pliki znajdujące się poza takimi granicami nie są uwzględniane na dysku
|
||||
z danymi i muszą zostać skonfigurowane oddzielnie, jeśli mają być chronione.
|
||||
.SS Punkty montowania z migawkami systemu plików
|
||||
Gdy migawki systemu plików są włączone, zagnieżdżone punkty montowania oraz
|
||||
montowania bind wewnątrz dysku z danymi nie są obsługiwane.
|
||||
.PP
|
||||
Punkty montowania są częścią przestrzeni nazw montowania działającego
|
||||
systemu i nie są zachowywane w migawkach systemu plików. W związku z tym
|
||||
podczas skanowania migawki katalog ukryty przez punkt montowania w aktywnym
|
||||
systemie plików może stać się widoczny.
|
||||
.PP
|
||||
Nie umieszczaj zagnieżdżonych punktów montowania ani montowań bind wewnątrz
|
||||
dysków z danymi, gdy migawki systemu plików są włączone.
|
||||
.SS Wiele konfiguracji z migawkami systemu plików
|
||||
Obsługa migawek nie może być bezpiecznie współdzielona przez wiele
|
||||
niezależnych konfiguracji SnapRAID korzystających z tej samej przestrzeni
|
||||
nazw migawek systemu plików.
|
||||
.PP
|
||||
W systemach Btrfs i Bcachefs tylko jedna konfiguracja SnapRAID z włączoną
|
||||
obsługą migawek może używać katalogów danych w obrębie tego samego
|
||||
podwolumenu. W systemie ZFS to samo ograniczenie dotyczy datasetu, a w NTFS
|
||||
woluminu.
|
||||
.PP
|
||||
Wiele konfiguracji współdzielących tę samą przestrzeń nazw migawek używa tych
|
||||
samych migawek \`stable\`, \`pending\` oraz \`scan\`. Uruchomienie jednej
|
||||
konfiguracji może zatem zastąpić lub usunąć migawki odzyskiwania wymagane
|
||||
przez inną.
|
||||
.SS Modyfikacje plików w miejscu bez zmiany znacznika czasu
|
||||
SnapRAID wykrywa modyfikacje plików, porównując rozmiary plików oraz
|
||||
znaczniki czasu modyfikacji (mtime).
|
||||
.PP
|
||||
Jeśli aplikacja modyfikuje plik w miejscu bez zmiany jego rozmiaru ani
|
||||
aktualizacji znacznika czasu modyfikacji, polecenia \[dq]diff\[dq] i \[dq]sync\[dq] nie
|
||||
wykryją zmiany pliku, a jego parzystość nie zostanie zaktualizowana.
|
||||
.PP
|
||||
Aby SnapRAID rozpoznał takie zmiany, zaktualizuj znacznik czasu modyfikacji
|
||||
pliku (na przykład za pomocą narzędzia \[dq]touch\[dq]). W przeciwnym razie różnica
|
||||
zostanie wykryta dopiero jako niezgodność skrótu podczas kolejnego \[dq]scrub\[dq]
|
||||
lub \[dq]check\[dq].
|
||||
.SS Dopasowywanie wielkości liter znaków spoza ASCII w systemie Windows
|
||||
SnapRAID używa standardowego, przewidywalnego kodowania UTF\-8 na wszystkich
|
||||
platformach, ograniczając dopasowywanie bez uwzględniania wielkości liter do
|
||||
znaków ASCII.
|
||||
.PP
|
||||
Systemy plików Windows cierpią z powodu przestarzałego projektu narzucania
|
||||
braku rozróżniania wielkości liter w nazwach plików Unicode za pomocą
|
||||
arbitralnych, zależnych od systemu tabel składania znaków (folding tables).
|
||||
W rezultacie Windows zaciera rzeczywistość systemu plików, traktując zupełnie
|
||||
różne sekwencje bajtów Unicode tak, jakby były tym samym plikiem.
|
||||
.PP
|
||||
Na przykład \`À.txt\` i \`à.txt\` to odrębne nazwy Unicode, a jednak Windows
|
||||
nielogicznie traktuje je jako identyczne, podczas gdy SnapRAID zachowuje ich
|
||||
rzeczywiste rozróżnienie.
|
||||
.PP
|
||||
Ograniczenie to wynika z niespójnej obsługi nazw plików Unicode przez system
|
||||
Windows oraz jego uporczywego stosowania aliasów bez uwzględniania wielkości
|
||||
liter. Aby zapobiec rozbieżnościom wynikającym ze składania znaków przez
|
||||
Windows, zawsze podawaj dokładną wielkość liter w przypadku znaków spoza ASCII
|
||||
w ścieżkach konfiguracyjnych i filtrach.
|
||||
.SS Odzyskiwanie za pomocą częściowego fix
|
||||
Gdy polecenie \`fix\` jest ograniczone za pomocą \`\-S, \-\-start\` lub \`\-B, \-\-count\`,
|
||||
SnapRAID działa tylko na wybranych blokach i nie przeprowadza finalizacji
|
||||
na poziomie plików ani kwarantanny.
|
||||
.PP
|
||||
Jeśli odzyskiwanie da dane typu best\-effort, co do których nie można udowodnić,
|
||||
że reprezentują bieżącą zawartość, takie bloki mogą nadal zostać zapisane pod
|
||||
zwykłą nazwą pliku. Niepewność związana z tymi odzyskanymi blokami nie jest
|
||||
zachowywana po zakończeniu polecenia.
|
||||
.PP
|
||||
W rezultacie późniejsze wykonanie \`fix\` potraktuje te czytelne bloki jako
|
||||
prawidłowe dane pliku i nie podejmie ponownej próby ich odzyskania. Może to
|
||||
spowodować, że późniejsze odzyskiwanie zgłosi sukces, pozostawiając w pliku
|
||||
niekompletne lub nieaktualne dane.
|
||||
.PP
|
||||
Opcje \`\-S\` i \`\-B\` są przeznaczone wyłącznie do zaawansowanego odzyskiwania
|
||||
ręcznego, zazwyczaj po niepowodzeniu normalnego \`fix\`. Jeśli częściowy \`fix\`
|
||||
zgłosi dane niemożliwe do odzyskania, przed podjęciem kolejnej próby odzyskiwania
|
||||
należy usunąć lub zmienić nazwę plików, których to dotyczy, albo ręcznie zweryfikować
|
||||
ich zawartość.
|
||||
.SS Twarde dowiązania NTFS i wykluczone ścieżki
|
||||
W systemie plików NTFS wpisy katalogowe niezależnie buforują rozmiar pliku
|
||||
i znaczniki czasu dla każdego twardego dowiązania. Gdy plik zostanie
|
||||
zmodyfikowany za pośrednictwem jednego dowiązania, wpisy katalogowe innych
|
||||
dowiązań wskazujących ten sam plik mogą zachowywać nieaktualne metadane
|
||||
do momentu uzyskania do nich dostępu.
|
||||
.PP
|
||||
SnapRAID automatycznie wykrywa i normalizuje ten stan, gdy podczas skanowania
|
||||
napotka co najmniej dwa twarde dowiązania do tego samego pliku. Jeśli jednak
|
||||
zeskanowane zostanie tylko jedno twarde dowiązanie, podczas gdy pozostałe są
|
||||
wykluczone przez filtry lub znajdują się poza ścieżką dysku danych, SnapRAID
|
||||
nie może wykryć kolizji i\-węzłów (inode) i polega na buforowanych metadanych
|
||||
jedynego widocznego dowiązania.
|
||||
.PP
|
||||
W konsekwencji modyfikacje dokonane za pośrednictwem wykluczonego lub
|
||||
zewnętrznego twardego dowiązania mogą pozostać niezauważone przez SnapRAID,
|
||||
dopóki metadane uwzględnionego dowiązania nie zostaną odświeżone przez system
|
||||
operacyjny (na przykład po uzyskaniu dostępu do pliku lub otwarciu go
|
||||
przez tę ścieżkę).
|
||||
.PP
|
||||
Aby uniknąć tego ograniczenia, należy unikać modyfikowania chronionych plików
|
||||
za pośrednictwem twardych dowiązań wykluczonych ze SnapRAID lub upewnić się,
|
||||
że wszystkie twarde dowiązania do danego pliku są uwzględnione w skanowaniu,
|
||||
aby SnapRAID mógł je znormalizować.
|
||||
.SS Odzyskiwanie po przerwanym sync z wieloma parzystościami
|
||||
W macierzy z wieloma dyskami parzystości przerwane polecenie \`sync\` może
|
||||
pozostawić różne poziomy parzystości chwilowo niezsynchronizowane ze sobą.
|
||||
Na przykład parzystość 1 może już zawierać nowo zaktualizowane dane,
|
||||
podczas gdy parzystość 2 nadal zawiera stare dane.
|
||||
.PP
|
||||
Podczas wykonywania \`check\` lub \`fix\` SnapRAID sprawdza różne kombinacje
|
||||
parzystości i weryfikuje zrekonstruowane dane z wykorzystaniem znanych
|
||||
skrótów bloków (obejmujących cały blok, zazwyczaj 256 KiB).
|
||||
.PP
|
||||
Jeśli SnapRAID podejmie próbę rekonstrukcji z użyciem niespójnej
|
||||
mieszanki starej i nowej parzystości, liniowe równania RAID dadzą
|
||||
nieprawidłowe dane. Aby taka niepoprawna kombinacja została omyłkowo
|
||||
zaakceptowana, równania musiałyby przypadkowo zrekonstruować co najmniej
|
||||
jeden pełny blok 256 KiB tak idealnie, aby jego skrót się zgadzał,
|
||||
podczas gdy inne niezsynchronizowane bloki w tym samym pasku zostaną
|
||||
zrekonstruowane z błędnymi danymi.
|
||||
.PP
|
||||
Scenariusz ten nie zależy od kolizji skrótów; wymagałby raczej, aby same
|
||||
równania mieszanej parzystości przypadkowo odtworzyły dokładną,
|
||||
oryginalną zawartość 256\-KiB bloku. Choć jest to matematycznie możliwe
|
||||
w przypadku specjalnie spreparowanych lub silnie powtarzalnych danych,
|
||||
jest to praktycznie niemożliwe w przypadku rzeczywistych danych.
|
||||
.PP
|
||||
Jeśli wszystkie dyski są sprawne, dokończenie przerwanego \`sync\` przed
|
||||
wprowadzeniem dalszych zmian usuwa tę niejednoznaczność. Jeśli nastąpiła
|
||||
awaria dysku i konieczne jest odzyskanie danych, należy unikać modyfikacji
|
||||
dysków danych przed uruchomieniem \`check\` lub \`fix\`.
|
||||
.SS Zastrzeżone nazwy plików i katalogów
|
||||
SnapRAID rezerwuje niektóre nazwy plików, katalogów i migawek do swoich
|
||||
wewnętrznych operacji. Nie używaj tych nazw dla danych użytkownika:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I .snapraidignore
|
||||
Lokalny plik reguł wykluczeń.
|
||||
.HP 4
|
||||
.I .snapraid
|
||||
Katalog kontenera migawek.
|
||||
.HP 4
|
||||
.I snapraid\-*
|
||||
Nazwy migawek ZFS zarządzanych przez SnapRAID.
|
||||
.HP 4
|
||||
.I *.unrecoverable
|
||||
Uszkodzone pliki objęte kwarantanną podczas odzyskiwania.
|
||||
.HP 4
|
||||
.I CONTENT.tmp
|
||||
Plik tymczasowy do aktualizacji pliku content.
|
||||
.HP 4
|
||||
.I CONTENT.lock
|
||||
Plik blokady pliku content.
|
||||
.HP 4
|
||||
.I PARITY.spaceholder
|
||||
Tymczasowy plik rezerwacji miejsca podczas alokacji
|
||||
parzystości w systemie Windows.
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Użycie tych nazw dla niepowiązanych danych może spowodować, że pliki lub
|
||||
migawki zostaną zignorowane, błędnie zinterpretowane jako metadane,
|
||||
nadpisane, przemianowane lub usunięte.
|
||||
.PP
|
||||
W systemie Windows wszystkie warianty wielkości liter są również zastrzeżone,
|
||||
nawet w katalogach NTFS skonfigurowanych do rozróżniania wielkości liter
|
||||
(na przykład .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP i CONTENT.Lock).
|
||||
.SH TłUMACZENIE (TRANSLATION)
|
||||
Ten dokument jest automatycznym tłumaczeniem angielskiej instrukcji.
|
||||
Wersję oficjalną stanowi oryginalny podręcznik w języku angielskim.
|
||||
.SH PRAWA AUTORSKIE (COPYRIGHT)
|
||||
Ten plik jest chroniony prawem autorskim (C) 2026 Andrea Mazzoleni
|
||||
.SH ZOBACZ RóWNIEż (SEE ALSO)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Name{number}
|
||||
snapraid - Kopia zapasowa SnapRAID dla macierzy dyskowych
|
||||
snapraid - Program do tworzenia kopii zapasowych SnapRAID dla macierzy dyskowych
|
||||
|
||||
Synopsis
|
||||
Składnia (Synopsis)
|
||||
:snapraid [-c, --conf CONFIG]
|
||||
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
: [-m, --filter-missing] [-e, --filter-error]
|
||||
|
|
@ -23,7 +23,7 @@ Synopsis
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
Opis (Description)
|
||||
SnapRAID to program do tworzenia kopii zapasowych przeznaczony
|
||||
dla macierzy dyskowych, przechowujący informacje parzystości
|
||||
do odzyskiwania danych w przypadku awarii do sześciu dysków.
|
||||
|
|
@ -50,22 +50,31 @@ Description
|
|||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitations
|
||||
SnapRAID to hybryda programu RAID i programu do tworzenia kopii zapasowych,
|
||||
której celem jest połączenie najlepszych zalet obu. Ma jednak pewne
|
||||
ograniczenia, które należy wziąć pod uwagę przed jego użyciem.
|
||||
Ograniczenia (Limitations)
|
||||
SnapRAID jest hybrydą pomiędzy RAID a programem do tworzenia kopii zapasowych, mającą na celu połączenie
|
||||
najlepszych zalet obu tych rozwiązań. Posiada jednak pewne ograniczenia, które należy
|
||||
wziąć pod uwagę przed jego użyciem.
|
||||
|
||||
Głównym ograniczeniem jest to, że jeśli dysk ulegnie awarii, a Ty nie wykonałeś
|
||||
niedawno synchronizacji, możesz nie być w stanie w pełni odzyskać danych.
|
||||
Dokładniej, możesz nie być w stanie odzyskać danych o wielkości
|
||||
zmienionych lub usuniętych plików od czasu ostatniej operacji synchronizacji.
|
||||
Dzieje się tak, nawet jeśli zmienione lub usunięte pliki nie znajdują się na
|
||||
uszkodzonym dysku. Dlatego SnapRAID jest lepiej dostosowany do
|
||||
danych, które rzadko się zmieniają.
|
||||
Głównym ograniczeniem jest to, że w przypadku awarii dysku można odzyskać dane tylko do
|
||||
stanu z momentu ostatniej operacji `sync` (synchronizacji). Wszelkie dane dodane lub modyfikacje dokonane
|
||||
od ostatniej synchronizacji, które znajdują się na uszkodzonym dysku, zostaną utracone.
|
||||
|
||||
Z drugiej strony, nowo dodane pliki nie uniemożliwiają odzyskania już
|
||||
istniejących plików. Stracisz tylko ostatnio dodane pliki, jeśli
|
||||
znajdują się one na uszkodzonym dysku.
|
||||
W związku z tym SnapRAID nadaje się głównie do danych, które rzadko się zmieniają.
|
||||
|
||||
W przypadku danych, które już istniały podczas ostatniej synchronizacji, niezawodność odzyskiwania zależy
|
||||
od tego, czy użyto opcji `snapshot` (migawki):
|
||||
|
||||
* Z obsługą migawek (dostępną w systemach plików Btrfs, ZFS, Bcachefs i NTFS),
|
||||
SnapRAID może automatycznie utrzymywać niezależny, zamrożony punkt
|
||||
odniesienia dla każdego obsługiwanego systemu plików z danymi.
|
||||
Zapewnia to, że nawet jeśli zmodyfikujesz lub usuniesz pliki w aktywnym systemie plików
|
||||
w trakcie lub po synchronizacji, proces odzyskiwania pozostanie spójny i niezawodny.
|
||||
|
||||
* Bez obsługi migawek, usunięcie lub zmiana plików po operacji `sync`
|
||||
może uniemożliwić pełne odzyskanie danych z innych uszkodzonych dysków. Dzieje się tak,
|
||||
ponieważ parzystość nie odpowiada już zmodyfikowanym plikom, nawet jeśli
|
||||
pliki te nie znajdują się na uszkodzonym dysku. Z drugiej strony, nowo dodane
|
||||
pliki nie uniemożliwiają odzyskania już istniejących plików.
|
||||
|
||||
Inne ograniczenia SnapRAID to:
|
||||
|
||||
|
|
@ -80,9 +89,9 @@ Limitations
|
|||
awarii całej macierzy dysków.
|
||||
* Zapisywane są tylko nazwy plików, znaczniki czasu, dowiązania symboliczne
|
||||
i dowiązania twarde.
|
||||
Uprawnienia, właścicielstwo i rozszerzone atrybuty nie są zapisywane.
|
||||
Uprawnienia, właściciel (własność) i rozszerzone atrybuty nie są zapisywane.
|
||||
|
||||
Getting Started
|
||||
Pierwsze kroki (Getting Started)
|
||||
Aby użyć SnapRAID, musisz najpierw wybrać jeden dysk w swojej macierzy
|
||||
dysków, który zostanie przeznaczony na informacje o `parzystości`. Z jednym dyskiem
|
||||
na parzystość będziesz w stanie odzyskać dane po awarii pojedynczego dysku,
|
||||
|
|
@ -165,7 +174,7 @@ Getting Started
|
|||
Teraz możesz zacząć używać swojej macierzy, jak chcesz, i okresowo
|
||||
aktualizować informacje o parzystości, uruchamiając polecenie `sync`.
|
||||
|
||||
Scrubbing
|
||||
Scrubbing (Scrubbing)
|
||||
Aby okresowo sprawdzać dane i parzystość pod kątem błędów, możesz
|
||||
uruchomić polecenie `scrub`.
|
||||
|
||||
|
|
@ -203,10 +212,10 @@ Getting Started
|
|||
spowodowane usuniętymi lub zmodyfikowanymi plikami. Błędy te są zgłaszane
|
||||
w wyniku `scrub`, ale powiązane bloki nie są oznaczane jako złe.
|
||||
|
||||
Pooling
|
||||
Łączenie w pulę (Pooling)
|
||||
Uwaga: Funkcja łączenia w pulę opisana poniżej została zastąpiona przez
|
||||
narzędzie mergerfs, które jest obecnie zalecaną opcją dla użytkowników Linuksa
|
||||
w społeczności SnapRAID. Mergefs zapewnia bardziej elastyczny i wydajny
|
||||
w społeczności SnapRAID. Mergerfs zapewnia bardziej elastyczny i wydajny
|
||||
sposób łączenia wielu dysków w jeden ujednolicony punkt montowania,
|
||||
umożliwiając bezproblemowy dostęp do plików w całej macierzy bez polegania
|
||||
na dowiązaniach symbolicznych. Dobrze integruje się z SnapRAID w celu ochrony
|
||||
|
|
@ -275,7 +284,7 @@ Getting Started
|
|||
|
||||
:fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
|
||||
|
||||
Undeleting
|
||||
Cofanie usuwania (Undeleting)
|
||||
SnapRAID działa bardziej jak program do tworzenia kopii zapasowych niż system RAID
|
||||
i może być użyty do przywrócenia lub odzyskania usuniętych plików do ich poprzedniego
|
||||
stanu za pomocą opcji -f, --filter:
|
||||
|
|
@ -296,12 +305,14 @@ Getting Started
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recovering
|
||||
Odzyskiwanie (Recovering)
|
||||
Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków!
|
||||
|
||||
NIE PANIKUJ! Będziesz w stanie je odzyskać!
|
||||
|
||||
Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków.
|
||||
Zanim zrobisz cokolwiek innego, unikaj wprowadzania jakichkolwiek zmian w Twojej
|
||||
macierzy dysków, ponieważ modyfikowanie lub usuwanie danych na pozostałych
|
||||
dyskach może uniemożliwić odzyskanie.
|
||||
Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym
|
||||
jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID.
|
||||
|
||||
|
|
@ -347,7 +358,7 @@ Getting Started
|
|||
są częściowo lub całkowicie nie do odzyskania, zostaną one przemianowane
|
||||
poprzez dodanie rozszerzenia `.unrecoverable`.
|
||||
|
||||
Szczegółową listę wszystkich nie do odzyskania bloków znajdziesz w pliku fix.log,
|
||||
Szczegółową listę wszystkich bloków nie do odzyskania znajdziesz w pliku fix.log,
|
||||
sprawdzając wszystkie linie zaczynające się od `unrecoverable:`.
|
||||
|
||||
Jeśli nie jesteś zadowolony z odzyskiwania, możesz spróbować ponownie
|
||||
|
|
@ -383,16 +394,16 @@ Getting Started
|
|||
|
||||
Jeśli wszystko zostanie odzyskane, to polecenie jest natychmiastowe.
|
||||
|
||||
Commands
|
||||
Polecenia (Commands)
|
||||
SnapRAID udostępnia kilka prostych poleceń, które pozwalają na:
|
||||
|
||||
* Wyświetlenie statusu macierzy -> `status`
|
||||
* Kontrolę dysków -> `smart`, `probe`, `up`, `down`
|
||||
* Wykonanie kopii zapasowej/migawki -> `sync`
|
||||
* Wyświetlenie stanu macierzy -> `status`
|
||||
* Kontrola dysków -> `smart`, `probe`, `up`, `down`
|
||||
* Utworzenie punktu kopii zapasowej/przywracania -> `sync`
|
||||
* Okresowe sprawdzanie danych -> `scrub`
|
||||
* Przywrócenie ostatniej kopii zapasowej/migawki -> `fix`.
|
||||
* Przywrócenie ostatniego punktu kopii zapasowej/przywracania -> `fix`.
|
||||
|
||||
Polecenia muszą być zapisane małymi literami.
|
||||
Polecenia muszą być wpisywane małymi literami.
|
||||
|
||||
status
|
||||
Wyświetla podsumowanie stanu macierzy dysków.
|
||||
|
|
@ -499,9 +510,10 @@ Commands
|
|||
removed - Pliki usunięte.
|
||||
updated - Pliki o innym rozmiarze lub znaczniku czasu, co oznacza, że
|
||||
zostały zmodyfikowane.
|
||||
moved - Pliki przeniesione do innego katalogu na tym samym dysku.
|
||||
Są one identyfikowane przez tę samą nazwę, rozmiar, znacznik czasu
|
||||
i inode, ale inny katalog.
|
||||
moved - Pliki przeniesione lub o zmienionej nazwie na tym samym dysku
|
||||
z zachowaniem tego samego i-węzła (inode). Są identyfikowane przez
|
||||
ten sam inode, rozmiar i znacznik czasu, ale inną ścieżkę. Nazwa
|
||||
pliku może być również inna.
|
||||
copied - Pliki skopiowane na ten sam lub inny dysk, gdzie
|
||||
oryginalny plik nadal istnieje.
|
||||
Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru
|
||||
|
|
@ -509,15 +521,14 @@ Commands
|
|||
Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka
|
||||
musi być zgodna, aby plik został zidentyfikowany, a nie
|
||||
tylko nazwa.
|
||||
relocated - Pliki przeniesione na ten sam lub inny dysk, gdzie
|
||||
oryginał zniknął.
|
||||
Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru
|
||||
i znacznika czasu.
|
||||
Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka
|
||||
musi być zgodna, aby plik został zidentyfikowany.
|
||||
W przeciwieństwie do plików 'moved' na tym samym dysku, pliki
|
||||
relokowane mają inny i-węzeł.
|
||||
restored - Pliki o innym i-węźle, ale pasującym katalogu,
|
||||
relocated - Pliki przeniesione do innego katalogu lub na inny dysk,
|
||||
gdzie oryginalny plik zniknął, a inode nie został zachowany.
|
||||
Są identyfikowane przez posiadanie tej samej nazwy, rozmiaru i
|
||||
znacznika czasu. Jeśli podsekundowy znacznik czasu wynosi zero,
|
||||
pełna ścieżka musi być zgodna, aby plik został zidentyfikowany.
|
||||
W przeciwieństwie do plików 'moved', pliki relokowane wymagają,
|
||||
aby nazwa pliku pozostała taka sama.
|
||||
restored - Pliki o innym inode, ale pasującym katalogu,
|
||||
nazwie, rozmiarze i znaczniku czasu.
|
||||
Są to zazwyczaj pliki przywrócone po ich usunięciu.
|
||||
|
||||
|
|
@ -584,7 +595,7 @@ Commands
|
|||
|
||||
Zaleca się uruchamianie `scrub` tylko na zsynchronizowanej macierzy, aby uniknąć
|
||||
zgłaszania błędów spowodowanych przez niezsynchronizowane dane. Błędy te są rozpoznawane
|
||||
jako nie będące cichymi błędami, a bloki nie są oznaczane jako złe,
|
||||
jako niebędące cichymi błędami, a bloki nie są oznaczane jako złe,
|
||||
ale takie błędy są zgłaszane w wyniku polecenia.
|
||||
|
||||
Plik `content` jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia
|
||||
|
|
@ -593,15 +604,14 @@ Commands
|
|||
Pliki w macierzy NIE są modyfikowane.
|
||||
|
||||
fix
|
||||
Naprawia wszystkie pliki i dane parzystości.
|
||||
Naprawia wszystkie pliki oraz dane parzystości.
|
||||
|
||||
Wszystkie pliki i dane parzystości są porównywane ze stanem migawki
|
||||
zapisanym w ostatniej `sync`.
|
||||
Jeśli zostanie znaleziona różnica, jest ona przywracana do zapisanego stanu migawki.
|
||||
Wszystkie pliki i dane parzystości są porównywane ze stanem zapisanym podczas
|
||||
ostatniej operacji `sync`. W przypadku znalezienia różnicy, następuje przywrócenie stanu zapisanego.
|
||||
|
||||
OSTRZEŻENIE! Polecenie `fix` nie rozróżnia błędów od
|
||||
celowych modyfikacji. Bezwarunkowo przywraca stan pliku
|
||||
do ostatniej `sync`.
|
||||
UWAGA!
|
||||
Polecenie `fix` nie odróżnia błędów od celowych modyfikacji.
|
||||
Bezwzględnie przywraca stan plików do momentu ostatniej operacji `sync`.
|
||||
|
||||
Jeśli nie określono żadnej innej opcji, przetwarzana jest cała macierz.
|
||||
Użyj opcji filtra, aby wybrać podzbiór plików lub dysków do operacji.
|
||||
|
|
@ -738,7 +748,7 @@ Commands
|
|||
Pamiętaj, że takie pliki nie będą chronione przez parzystość podczas procesu
|
||||
realokacji.
|
||||
|
||||
Options
|
||||
Opcje (Options)
|
||||
SnapRAID udostępnia następujące opcje:
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -849,9 +859,9 @@ Options
|
|||
liczba bajtów na sekundę. Możesz określić mnożnik,
|
||||
taki jak K, M lub G (np. --bw-limit 1G).
|
||||
|
||||
-t, --tail ROZMIAR
|
||||
Ogranicza listę plików do tych, które nie używają więcej niż określony
|
||||
końcowy rozmiar dysków parzystości.
|
||||
-t, --tail SIZE
|
||||
Ogranicza listę plików do tych, które nie wykraczają poza określoną
|
||||
sekcję końcową (ogon) plików parzystości.
|
||||
Możesz użyć mnożników takich jak K, M, G lub T (np. --tail 1G).
|
||||
Opcja ta jest ważna tylko wtedy, gdy jest używana wraz z poleceniem
|
||||
`locate`.
|
||||
|
|
@ -949,9 +959,9 @@ Options
|
|||
zalecane, aby jej nie używać.
|
||||
NIE MASZ ochrony danych podczas operacji `sync`.
|
||||
|
||||
-W, --force-realloc-tail ROZMIAR
|
||||
-W, --force-realloc-tail SIZE
|
||||
Działa jak -R, --force-realloc, ale ogranicza się do określonej części
|
||||
końcowej (ostatnie ROZMIAR bajtów) każdego pliku parzystości.
|
||||
końcowej (ostatnie SIZE bajtów) każdego pliku parzystości.
|
||||
Wymusza realokację (przeniesienie) wszelkich fragmentów/bloków plików
|
||||
obecnie przechowywanych w tej sekcji końcowej, pozwalając na ich
|
||||
umieszczenie w dowolnym miejscu w pliku (plikach) parzystości, gdzie
|
||||
|
|
@ -983,7 +993,7 @@ Options
|
|||
zastępowane datą i czasem w formacie RRRRMMDD i
|
||||
GGMMSS. W plikach wsadowych Windows musisz podwoić
|
||||
znak `%`, np. result-%%D.log. Aby użyć `>>`, musisz
|
||||
ujęć nazwę w cudzysłów, np. `">>result.log"`.
|
||||
ująć nazwę w cudzysłów, np. `">>result.log"`.
|
||||
Aby wyprowadzić log do standardowego wyjścia lub standardowego błędu,
|
||||
możesz użyć odpowiednio `">&1"` i `">&2"`.
|
||||
Opisy tagów logu znajdziesz w pliku snapraid_log.txt lub na stronie podręcznika.
|
||||
|
|
@ -1001,11 +1011,13 @@ Options
|
|||
Zaczyna przetwarzanie od określonego
|
||||
numeru bloku. Może to być przydatne do ponownej próby sprawdzenia
|
||||
lub naprawy określonych bloków w przypadku uszkodzonego dysku.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania
|
||||
i jest obsługiwana tylko przez `check` i `fix`.
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
Przetwarza tylko określoną liczbę bloków.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania.
|
||||
Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania
|
||||
i jest obsługiwana tylko przez `check` i `fix`.
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
Generuje atrapę pliku konfiguracyjnego z istniejącego
|
||||
|
|
@ -1036,7 +1048,7 @@ Options
|
|||
-V, --version
|
||||
Wyświetla wersję programu.
|
||||
|
||||
Configuration
|
||||
Konfiguracja (Configuration)
|
||||
SnapRAID wymaga pliku konfiguracyjnego, aby wiedzieć, gdzie znajduje się Twoja macierz
|
||||
dysków i gdzie przechowywać informacje o parzystości.
|
||||
|
||||
|
|
@ -1128,6 +1140,11 @@ Configuration
|
|||
Możesz zmieniać punkt montowania w razie potrzeby, o ile
|
||||
zachowasz stałą nazwę NAME.
|
||||
|
||||
Jednak skonfigurowana ścieżka musi spójnie wskazywać na te same
|
||||
dane bazowe. Jeśli ścieżka zawiera dowiązania symboliczne,
|
||||
ich cele muszą pozostać stabilne. Zmiana takich dowiązań w celu
|
||||
przełączenia katalogu danych w locie jest nieobsługiwana.
|
||||
|
||||
Powinieneś użyć jednej opcji dla każdego dysku danych w macierzy.
|
||||
|
||||
Możesz później zmienić nazwę dysku, zmieniając bezpośrednio nazwę NAME
|
||||
|
|
@ -1146,6 +1163,31 @@ Configuration
|
|||
Należy zauważyć, że polecenia `up` i `down` nie mają wpływu na takie
|
||||
dyski, ponieważ oczekuje się, że będą one zawsze w ruchu.
|
||||
|
||||
snapshot
|
||||
Włącza używanie migawek systemu plików dla poleceń `sync`, `scrub`,
|
||||
`check` oraz `fix`.
|
||||
|
||||
Po włączeniu, SnapRAID tworzy migawkę w trybie tylko do odczytu dla każdego
|
||||
obsługiwanego systemu plików z danymi na początku operacji 'sync'. Zapewnia to
|
||||
stabilny obraz każdego systemu plików, zapobiegając sytuacji, w której późniejsze
|
||||
modyfikacje zmieniłyby dane użyte do obliczenia parzystości.
|
||||
|
||||
To znacznie usprawnia odzyskiwanie danych: jeśli plik zostanie usunięty z aktywnego systemu
|
||||
plików, pozostaje zachowany w migawce. Zapobiega to sytuacji, w której parzystość staje się "uszkodzona"
|
||||
dla tego bloku, zapewniając możliwość pomyślnego odzyskania danych,
|
||||
jeśli ulegnie awarii inny dysk.
|
||||
|
||||
Opcja ta dotyczy wyłącznie dysków z danymi sformatowanych w systemach plików
|
||||
Btrfs, Bcachefs lub ZFS w systemie Linux oraz NTFS w systemie Windows.
|
||||
Dyski parzystości lub dyski z danymi korzystające z innych systemów plików będą zawsze używać
|
||||
aktywnej wersji systemu plików.
|
||||
|
||||
Tworzenie i usuwanie migawek wymaga uprawnień administratora.
|
||||
Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo), gdy
|
||||
opcja ta jest włączona.
|
||||
|
||||
Szczegółowe wyjaśnienie cyklu życia migawek znajduje się w sekcji SNAPSHOTS.
|
||||
|
||||
nohidden
|
||||
Wyklucza wszystkie ukryte pliki i katalogi.
|
||||
W systemie Unix ukryte pliki to te zaczynające się od `.`.
|
||||
|
|
@ -1161,6 +1203,11 @@ Configuration
|
|||
Jeśli żaden wzorzec nie pasuje, plik jest wykluczony, jeśli ostatni określony
|
||||
wzorzec to `include`, lub włączony, jeśli ostatni określony wzorzec to `exclude`.
|
||||
|
||||
Należy pamiętać, że filtrowanie odbywa się hierarchicznie podczas
|
||||
przechodzenia katalogów. Jeśli katalog pasuje do reguły `exclude`, cały
|
||||
katalog jest pomijany (odrzucany), a wszelkie reguły `include` dla plików
|
||||
lub podkatalogów w nim zawartych nie będą oceniane.
|
||||
|
||||
Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji
|
||||
wzorców.
|
||||
|
||||
|
|
@ -1194,7 +1241,7 @@ Configuration
|
|||
|
||||
Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą `status`.
|
||||
Jest to ilość miejsca, którą musisz pozostawić wolną na dyskach danych
|
||||
lub użyć dla plików nie włączonych do macierzy.
|
||||
lub użyć dla plików niewłączonych do macierzy.
|
||||
Jeśli ta wartość jest ujemna, oznacza to, że jesteś blisko wypełnienia
|
||||
parzystości i reprezentuje to przestrzeń, którą nadal możesz zmarnować.
|
||||
|
||||
|
|
@ -1259,7 +1306,7 @@ Configuration
|
|||
SnapRAID okresowo sprawdza temperaturę wszystkich dysków za pomocą
|
||||
narzędzia smartctl. Aktualne temperatury dysków są wyświetlane podczas
|
||||
działania SnapRAID. Jeśli którykolwiek dysk przekroczy ten limit, wszystkie operacje
|
||||
zostają zatrzymane, a dyski są zatrzymywane (przechodzą w stan gotowości) na czas
|
||||
zostają zatrzymane, a dyski są wyłączane (przechodzą w stan czuwania / uśpienia) na czas
|
||||
zdefiniowany przez opcję `temp_sleep`. Po okresie uśpienia, operacje
|
||||
są wznawiane, potencjalnie ponownie zatrzymując się, jeśli limit temperatury
|
||||
zostanie ponownie osiągnięty.
|
||||
|
|
@ -1267,7 +1314,7 @@ Configuration
|
|||
Podczas działania SnapRAID analizuje również krzywą nagrzewania każdego
|
||||
dysku i szacuje długoterminową stałą temperaturę, którą mają
|
||||
osiągnąć, jeśli aktywność będzie kontynuowana. Oszacowanie jest wykonywane tylko po
|
||||
czterokrotnym wzroście temperatury dysku, co zapewnia, że
|
||||
czterokrotnym zarejestrowaniu wzrostu temperatury dysku, co zapewnia, że
|
||||
dostępnych jest wystarczająco dużo punktów danych do ustalenia wiarygodnego trendu.
|
||||
Ta przewidywana stała temperatura jest pokazywana w nawiasach obok
|
||||
aktualnej wartości i pomaga ocenić, czy chłodzenie systemu jest
|
||||
|
|
@ -1284,7 +1331,7 @@ Configuration
|
|||
Aby wyświetlić temperaturę wszystkich dysków, użyj opcji -A lub --stats.
|
||||
|
||||
temp_sleep TIME_IN_MINUTES
|
||||
Ustawia czas gotowości, w minutach, po osiągnięciu limitu temperatury.
|
||||
Ustawia czas wstrzymania (czuwania), w minutach, po osiągnięciu limitu temperatury.
|
||||
W tym okresie dyski pozostają zatrzymane. Domyślnie jest to 5 minut.
|
||||
|
||||
pool DIR
|
||||
|
|
@ -1321,6 +1368,9 @@ Configuration
|
|||
nazwą urządzenia. W przypadku kontrolerów RAID, urządzenie jest
|
||||
prawdopodobnie stałe i może nie być konieczne użycie `%s`.
|
||||
|
||||
Możesz również określić niestandardowy ciąg opcji informacyjnych za pomocą
|
||||
znacznika `[info: ...]`, aby zastąpić domyślną opcję `-a`.
|
||||
|
||||
Zapoznaj się z dokumentacją smartmontools, aby uzyskać możliwe opcje:
|
||||
|
||||
:https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1328,6 +1378,7 @@ Configuration
|
|||
|
||||
Na przykład:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1340,14 +1391,19 @@ Configuration
|
|||
`4-parity`, `5-parity`, `6-parity` lub `z-parity`.
|
||||
Specjalna wartość * może być użyta do zignorowania atrybutu na wszystkich dyskach.
|
||||
|
||||
Na przykład, aby zignorować atrybut `Current Pending Sector Count` na
|
||||
wszystkich dyskach:
|
||||
Można określić wiele atrybutów oddzielonych spacjami.
|
||||
Każdy atrybut można określić jako liczbę od 1 do 255 lub jako nazwę
|
||||
niewrażliwą na wielkość liter (np. `Current_Pending_Sector`).
|
||||
|
||||
:smartignore * 197
|
||||
Na przykład, aby zignorować atrybuty `Current Pending Sector Count` i
|
||||
`Reallocated Sectors Count` na wszystkich dyskach za pomocą ich numeru lub nazwy:
|
||||
|
||||
Aby zignorować go tylko na pierwszym dysku parzystości:
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
:smartignore parity 197
|
||||
Aby zignorować je tylko na pierwszym dysku parzystości:
|
||||
|
||||
:smartignore parity 197 5
|
||||
|
||||
Examples
|
||||
Przykład typowej konfiguracji dla systemu Unix:
|
||||
|
|
@ -1360,7 +1416,7 @@ Configuration
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1376,12 +1432,167 @@ Configuration
|
|||
:exclude Thumbs.db
|
||||
:exclude \$RECYCLE.BIN
|
||||
:exclude \System Volume Information
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Pattern
|
||||
Migawki (Snapshots)
|
||||
Jeśli opcja snapshot jest włączona w konfiguracji, SnapRAID
|
||||
używa migawek systemu plików, aby utrzymać stabilność danych odczytywanych
|
||||
podczas operacji, nawet jeśli pliki w aktywnych systemach plików zostaną
|
||||
później zmodyfikowane lub usunięte.
|
||||
|
||||
Zarządzanie migawkami jest całkowicie automatyczne i przejrzyste.
|
||||
Możesz nadal używać SnapRAID dokładnie tak jak dotychczas, z dodatkową
|
||||
ochroną zapewnianą przez migawki, która jest realizowana w całości w
|
||||
tle.
|
||||
|
||||
Zapewnia to dwie główne korzyści:
|
||||
|
||||
Spójność - Pliki zmodyfikowane w aktywnym systemie plików podczas długotrwałej
|
||||
operacji sync lub scrub nie spowodują niezgodności parzystości ani przerwania
|
||||
operacji, ponieważ każdy objęty migawką system plików pozostaje niezmieniony
|
||||
przez cały czas trwania operacji.
|
||||
Odzyskiwanie - Jeśli plik zostanie zaktualizowany lub usunięty z aktywnego systemu plików,
|
||||
pozostaje zachowany w migawce. Jeśli awaria dysku nastąpi
|
||||
przed uruchomieniem kolejnej operacji sync, SnapRAID użyje danych zachowanych
|
||||
w migawce do odbudowania uszkodzonego dysku.
|
||||
|
||||
W przypadku awarii dysku podczas aktywnego procesu sync,
|
||||
SnapRAID jest również w stanie automatycznie czytać zarówno z migawki
|
||||
poprzedniego obliczenia parzystości, jak i z bieżącej.
|
||||
Maksymalizuje to prawdopodobieństwo pełnego odzyskania danych poprzez
|
||||
zapewnienie dostępu do dokładnych bloków danych wymaganych do rozwiązania
|
||||
równań parzystości, nawet jeśli bloki te zostały zmodyfikowane
|
||||
lub usunięte pomiędzy operacjami sync.
|
||||
|
||||
Bez migawek, zaktualizowany lub usunięty plik na sprawnym dysku
|
||||
skutkuje brakiem bloków danych, które mogą być wymagane do
|
||||
naprawy innych uszkodzonych dysków.
|
||||
|
||||
Migawki są tworzone tylko dla dysków z danymi i tylko wtedy, gdy bazowy
|
||||
system plików obsługuje tę funkcjonalność. Dyski parzystości zawsze używają
|
||||
aktywnego systemu plików.
|
||||
|
||||
Obecnie jest to obsługiwane w systemach Btrfs, Bcachefs i ZFS w systemie Linux
|
||||
oraz NTFS w systemie Windows.
|
||||
|
||||
Można mieszać dyski z danymi o różnych systemach plików. Tylko te, które
|
||||
obsługują migawki, będą z nich korzystać, podczas gdy inne dyski będą nadal
|
||||
działać bezpośrednio na aktywnym systemie plików.
|
||||
|
||||
Tworzenie i usuwanie migawek wymaga uprawnień administratora.
|
||||
Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo),
|
||||
gdy migawki są włączone.
|
||||
|
||||
Zachowanie poleceń przy użyciu migawek
|
||||
Polecenia `sync` oraz `scrub` używają migawek dla dysków z danymi, których
|
||||
systemy plików je obsługują. Na dysku objętym migawką polecenie widzi stabilny
|
||||
obraz systemu plików, na który nie mają wpływu równoczesne zmiany w aktywnym
|
||||
systemie plików.
|
||||
Podczas operacji `sync` nowa migawka jest tworzona niezależnie dla każdego
|
||||
obsługiwanego systemu plików z danymi. Migawki te łącznie dostarczają dane
|
||||
używane do obliczenia parzystości.
|
||||
W przeciwieństwie do tego, polecenie `scrub` wykorzystuje ostatnią migawkę, tę
|
||||
utworzoną podczas najnowszej synchronizacji, aby utrzymać wiarygodny punkt odniesienia
|
||||
odpowiadający istniejącej parzystości.
|
||||
|
||||
W przypadku poleceń `check` oraz `fix`, użycie ostatniej migawki
|
||||
zależy od tego, czy konkretne dyski są wskazywane za pomocą opcji
|
||||
-d, --filter-disk.
|
||||
|
||||
Dysk jawnie wybrany za pomocą opcji -d ("cel" operacji)
|
||||
zawsze używa aktywnego systemu plików. Dla `fix` pozwala to na przywrócenie
|
||||
danych na aktywny dysk zamienny. Dla `check` pozwala to na symulację
|
||||
operacji `fix` w tych samych warunkach.
|
||||
|
||||
Wszystkie inne dyski z danymi (dyski "referencyjne") będą dostępne za pośrednictwem
|
||||
swoich migawek. Zapewnia to, że nawet jeśli modyfikujesz pliki
|
||||
na sprawnych dyskach podczas trwania odzyskiwania danych, SnapRAID
|
||||
posiada stabilny, zamrożony punkt odniesienia do rozwiązania równań parzystości.
|
||||
|
||||
Jeśli nie podano opcji -d, SnapRAID zakłada, że operacja dotyczy
|
||||
całej macierzy. W takim przypadku `check` oraz `fix` będą używać wyłącznie
|
||||
aktywnych systemów plików.
|
||||
|
||||
Wszystkie inne polecenia działają wyłącznie na aktywnym systemie plików.
|
||||
|
||||
Cykl życia migawek (Snapshots Lifecycle)
|
||||
SnapRAID zarządza trzema określonymi migawkami, `stable` (stabilną), `pending` (oczekującą) oraz `scan` (skanowania),
|
||||
w ukrytym katalogu w katalogu głównym każdego podwolumenu danych.
|
||||
W systemach Btrfs, Bcachefs i NTFS używany jest katalog `.snapraid/`,
|
||||
w systemie ZFS standardowy `.zfs/snapshot/`.
|
||||
|
||||
Migawka `stable` reprezentuje stan ostatniej
|
||||
pomyślnie zakończonej operacji `sync`, zawierając dokładne dane użyte do
|
||||
obliczenia bieżącej parzystości. Służy ona jako główne źródło danych
|
||||
dla poleceń `scrub`, `check` i `fix`.
|
||||
|
||||
Migawka `scan` to tymczasowy obraz tworzony na początku
|
||||
operacji `sync` w celu zapewnienia zamrożonego stanu do skanowania i obliczenia parzystości.
|
||||
Po zeskanowaniu i zapisaniu nowego stanu zawartości zastępuje ona poprzednią
|
||||
migawkę `pending`.
|
||||
|
||||
Migawka `pending` to obraz używany przez przerwaną operację `sync`.
|
||||
Po pomyślnym zakończeniu operacji poprzednia migawka `stable`
|
||||
jest usuwana, a migawka `pending` zostaje podniesiona do rangi
|
||||
nowej stabilnej referencji.
|
||||
|
||||
Jeśli operacja `sync` zostanie przerwana, migawka `pending` zostaje zachowana.
|
||||
Kolejne polecenia `scrub`, `check` i `fix` będą używać tej oczekującej migawki,
|
||||
ponieważ odpowiada ona stanowi systemu plików zapisanemu w pliku .content,
|
||||
nawet jeśli parzystość jest zsynchronizowana tylko częściowo.
|
||||
|
||||
W przypadku przerwania operacji `sync`, polecenia `check` i `fix`
|
||||
odczytują dane również z migawki `stable`, aby pobrać bloki danych
|
||||
z plików, które zostały zaktualizowane lub usunięte podczas synchronizacji.
|
||||
Jest to możliwe, ponieważ plik .content zachowuje metadane dla
|
||||
wszystkich zmodyfikowanych lub usuniętych plików przez cały proces sync.
|
||||
Te informacje historyczne są czyszczone dopiero po pomyślnym zakończeniu operacji sync
|
||||
i zapisaniu ostatecznej wersji pliku .content.
|
||||
|
||||
Jeśli operacja `sync` zostanie zrestartowana po przerwaniu, istniejąca
|
||||
oczekująca (pending) migawka jest usuwana, a tworzona jest nowa, aby
|
||||
uchwycić bieżący stan aktywnego systemu plików.
|
||||
Jeśli jednak operacja `sync` zostanie przerwana, należy unikać modyfikowania,
|
||||
usuwania, zastępowania lub przenoszenia plików do momentu pomyślnego ukończenia
|
||||
kolejnej operacji `sync`. Parzystość może nadal zawierać bloki obliczone na podstawie
|
||||
migawki użytej przez przerwaną synchronizację. Późniejsza synchronizacja może zastąpić
|
||||
tę migawkę, uniemożliwiając odzyskanie pośrednich wersji plików.
|
||||
|
||||
Kopie zapasowe z migawkami systemu plików (External backups with filesystem snapshots)
|
||||
Gdy migawki systemu plików są włączone, SnapRAID uzyskuje dostęp do migawek
|
||||
lub tworzy je w katalogu głównym każdego podwoluminu danych, woluminu lub
|
||||
zestawu danych (dataset).
|
||||
|
||||
Prostym sposobem na uniknięcie jakichkolwiek konfliktów z zewnętrznymi
|
||||
narzędziami jest wskazanie w konfiguracji `data` zwykłego podkatalogu
|
||||
wewnątrz podwoluminu lub woluminu (na przykład `/mnt/subvol/data` zamiast
|
||||
`/mnt/subvol`). SnapRAID zawsze tworzy katalog migawek w katalogu głównym
|
||||
podwoluminu (na przykład `/mnt/subvol/.snapraid/`), pozostawiając podkatalog
|
||||
danych czysty, dzięki czemu migawki pozostają na zewnątrz i są niewidoczne
|
||||
dla narzędzi do tworzenia kopii zapasowych działających w tym katalogu.
|
||||
|
||||
W przeciwnym razie, jeśli skonfigurowany katalog `data` jest sam w sobie
|
||||
katalogiem głównym podwoluminu lub woluminu, SnapRAID utworzy katalog
|
||||
`.snapraid/` bezpośrednio w nim (w systemach Btrfs, Bcachefs i NTFS).
|
||||
Chociaż SnapRAID automatycznie wyklucza ten katalog z własnego skanowania,
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych lub synchronizacji
|
||||
plików napotkają go. Jeśli nie zostanie wykluczony, mogą wejść do migawek
|
||||
lub dowiązań katalogów i skopiować całe zamrożone drzewo danych, duplikując
|
||||
dane i wyczerpując przestrzeń dyskową kopii zapasowej. Zawsze konfiguruj
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych tak, aby wykluczały
|
||||
katalog `.snapraid/`.
|
||||
|
||||
W systemie ZFS migawki są udostępniane za pośrednictwem standardowego
|
||||
katalogu wirtualnego `.zfs/snapshot/` zamiast `.snapraid/`. Domyślnie
|
||||
(`snapdir=hidden`) system ZFS ukrywa ten katalog na listach katalogów, więc
|
||||
zewnętrzne narzędzia do tworzenia kopii zapasowych go nie przeskanują. Jeśli
|
||||
włączono opcję `snapdir=visible`, upewnij się, że narzędzia do tworzenia kopii
|
||||
zapasowych wykluczają katalog `.zfs/`.
|
||||
|
||||
Wzorce (Pattern)
|
||||
Wzorce zapewniają elastyczny sposób filtrowania plików do uwzględnienia lub
|
||||
wykluczenia. Używając znaków globbingowych, można zdefiniować reguły, które
|
||||
pasują do określonych nazw plików lub całych struktur katalogów bez
|
||||
|
|
@ -1397,18 +1608,18 @@ Pattern
|
|||
składnika ścieżki. Jest to standardowe zachowanie symboli wieloznacznych znane
|
||||
z globbingu powłoki (shell).
|
||||
|
||||
Podwójna gwiazdka `**` jest potężniejsza, dopasowuje dowolną sekwencję
|
||||
znaków, w tym separatory katalogów. Pozwala to wzorcom dopasowywać się
|
||||
na wielu poziomach katalogów. Gdy `**` pojawia się bezpośrednio wewnątrz
|
||||
wzorca, może dopasować zero lub więcej znaków, w tym ukośniki między
|
||||
otaczającym tekstem dosłownym.
|
||||
Symbol wieloznaczny podwójnej gwiazdki `**` dopasowuje się poprzez separatory
|
||||
katalogów tylko wtedy, gdy sąsiaduje z separatorem katalogów (jest poprzedzony
|
||||
lub zakończony ukośnikiem). W tej formie dopasowuje zero lub więcej znaków
|
||||
na wielu poziomach katalogów. Na przykład `foo/**/bar` dopasowuje `foo/bar`,
|
||||
`foo/a/bar` oraz `foo/a/b/bar`; `**/build` dopasowuje `build` oraz
|
||||
`foo/bar/build`; a `src/**.js` dopasowuje `src/main.js` oraz
|
||||
`src/ui/components/main.js`.
|
||||
Samodzielna forma `/**/` nie jest akceptowana jako kompletny wzorzec.
|
||||
|
||||
Najważniejszym zastosowaniem `**` jest specjalna forma `/**/`. Dopasowuje ona
|
||||
zero lub więcej pełnych poziomów katalogów, umożliwiając dopasowanie plików
|
||||
na dowolnej głębokości w drzewie katalogów bez znajomości dokładnej struktury ścieżki.
|
||||
Na przykład wzorzec `src/**/main.js` pasuje do `src/main.js` (pomijając
|
||||
zero katalogów), `src/ui/main.js` (pomijając jeden katalog) oraz
|
||||
`src/ui/components/main.js` (pomijając dwa katalogi).
|
||||
Gdy `**` nie sąsiaduje z ukośnikiem, zachowuje się jak `*` i nie dopasowuje
|
||||
separatorów katalogów. Na przykład `**.jpg` dopasowuje `photo.jpg` w bieżącym
|
||||
katalogu, ale nie pasuje do `dir/photo.jpg`. W tym celu należy użyć `**/*.jpg`.
|
||||
|
||||
Klasy znaków używające nawiasów kwadratowych `[]` dopasowują pojedynczy znak z
|
||||
określonego zestawu lub zakresu. Podobnie jak inne wzorce pojedynczych znaków,
|
||||
|
|
@ -1417,8 +1628,8 @@ Pattern
|
|||
|
||||
Podstawową różnicą, o której należy pamiętać, jest to, że `*`, `?` i klasy znaków
|
||||
wszystkie respektują granice katalogów i dopasowują się tylko w obrębie jednego
|
||||
składnika ścieżki, podczas gdy `**` jest jedynym wzorcem, który może dopasowywać się poprzez
|
||||
separatory katalogów.
|
||||
składnika ścieżki, podczas gdy `**` może dopasowywać się poprzez separatory
|
||||
katalogów tylko wtedy, gdy sąsiaduje z ukośnikiem.
|
||||
|
||||
Istnieją cztery różne typy wzorców:
|
||||
|
||||
|
|
@ -1447,7 +1658,7 @@ Pattern
|
|||
wykluczyć, musisz użyć reguły pliku, a nie katalogu.
|
||||
|
||||
Jeśli nazwa pliku zawiera znak `*`, `?`, `[`,
|
||||
lub `]`, musisz go uciec, aby uniknąć interpretacji jako
|
||||
lub `]`, musisz go zamaskować (poprzedzić znakiem ucieczki), aby uniknąć interpretacji jako
|
||||
znaku globbing. W systemie Unix znakiem ucieczki jest `\`; w systemie Windows jest to `^`.
|
||||
Gdy wzorzec znajduje się w wierszu poleceń, musisz podwoić znak ucieczki,
|
||||
aby uniknąć interpretacji przez powłokę poleceń.
|
||||
|
|
@ -1487,6 +1698,27 @@ Pattern
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
Należy pamiętać, że wykluczenie katalogu (za pomocą DIR/ lub /PATH/DIR/)
|
||||
uniemożliwia programowi SnapRAID wejście i skanowanie tego katalogu.
|
||||
W konsekwencji nie jest możliwe ponowne włączenie pliku lub podkatalogu
|
||||
znajdującego się w wykluczonym katalogu nadrzędnym, ponieważ skaner nigdy
|
||||
do niego nie przechodzi.
|
||||
|
||||
Na przykład poniższa konfiguracja NIE uwzględni pliku `file.dat`,
|
||||
ponieważ katalog `/keep/` zostanie odrzucony, zanim `file.dat` będzie
|
||||
mógł zostać sprawdzony:
|
||||
|
||||
:# NIE działa zgodnie z oczekiwaniami: /keep/ jest całkowicie pomijany
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
Aby wykluczyć pliki wewnątrz katalogu, zachowując wybrane, należy dopasować
|
||||
wzorzec plików wewnątrz katalogu, zamiast wykluczać sam katalog:
|
||||
|
||||
:# Działa: /keep/ jest przeszukiwany, ale pozostałe pliki są wykluczane
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
W wierszu poleceń, używając opcji -f, możesz użyć tylko wzorców `include`.
|
||||
Na przykład:
|
||||
|
||||
|
|
@ -1497,7 +1729,7 @@ Pattern
|
|||
W systemie Unix, używając znaków globbing w wierszu poleceń, musisz
|
||||
je cytować, aby zapobiec ich rozszerzeniu przez powłokę.
|
||||
|
||||
Ignore File
|
||||
Plik ignorowania (Ignore File)
|
||||
Oprócz reguł globalnych w pliku konfiguracyjnym, możesz umieścić pliki
|
||||
`.snapraidignore` w dowolnym katalogu w macierzy, aby zdefiniować
|
||||
zdecentralizowane reguły wykluczania.
|
||||
|
|
@ -1539,16 +1771,19 @@ Ignore File
|
|||
:# Wyklucza każdy plik .tmp wewnątrz projects/ lub jego podfolderach
|
||||
:*.tmp
|
||||
|
||||
Content
|
||||
Zawartość (Content)
|
||||
SnapRAID przechowuje listę i sumy kontrolne Twoich plików w pliku zawartości.
|
||||
|
||||
Jest to plik binarny, który zawiera listę wszystkich plików obecnych w Twojej macierzy dysków,
|
||||
wraz ze wszystkimi sumami kontrolnymi w celu weryfikacji ich integralności.
|
||||
|
||||
Ten plik jest odczytywany i zapisywany przez polecenia `sync` i `scrub`
|
||||
oraz odczytywany przez polecenia `fix`, `check` i `status`.
|
||||
Plik zawartości jest odczytywany i zapisywany przez polecenia `sync`,
|
||||
`scrub`, `touch` i `rehash`. Jest odczytywany przez polecenia `status`,
|
||||
`diff`, `check`, `fix`, `list`, `dup`, `locate` i `pool`, oraz jest
|
||||
całkowicie ignorowany przez polecenia `smart`, `probe`, `up`, `down`
|
||||
i `devices`.
|
||||
|
||||
Parity
|
||||
Parzystość (Parity)
|
||||
SnapRAID przechowuje informacje o parzystości Twojej macierzy w plikach
|
||||
parzystości.
|
||||
|
||||
|
|
@ -1558,7 +1793,7 @@ Parity
|
|||
Pliki te są odczytywane i zapisywane przez polecenia `sync` i `fix`
|
||||
oraz tylko odczytywane przez polecenia `scrub` i `check`.
|
||||
|
||||
Encoding
|
||||
Kodowanie (Encoding)
|
||||
SnapRAID w systemie Unix ignoruje wszelkie kodowanie. Odczytuje i przechowuje
|
||||
nazwy plików z tym samym kodowaniem używanym przez system plików.
|
||||
|
||||
|
|
@ -1572,8 +1807,188 @@ Encoding
|
|||
przekierujesz wyjście konsoli do pliku, wynikowy plik jest zawsze
|
||||
w formacie UTF-8.
|
||||
|
||||
Copyright
|
||||
Ten plik jest chroniony prawem autorskim (C) 2025 Andrea Mazzoleni
|
||||
Kod wyjścia (Exit Code)
|
||||
SnapRAID kończy działanie z następującymi kodami błędów:
|
||||
|
||||
See Also
|
||||
snapraid_log(1), snapraidd(1)
|
||||
0 - Wszystko w porządku.
|
||||
1 - Polecenie napotkało błędy.
|
||||
2 - Polecenie `diff` wykazało, że wszystko jest w porządku, ale wymagane jest `sync`.
|
||||
3 - Polecenie urządzenia dyskowego (`probe`, `smart`, `devices`, `up`,
|
||||
`down`) zostało zakończone, ale co najmniej jeden system plików działa
|
||||
w trybie zdegradowanym z brakującymi urządzeniami.
|
||||
|
||||
Znane problemy (Known Issues)
|
||||
Granice systemu plików
|
||||
SnapRAID nie przekracza granic systemów plików, punktów montowania ani
|
||||
podwolumenów podczas skanowania dysku z danymi. Po wykryciu takiej granicy
|
||||
SnapRAID zgłasza OSTRZEŻENIE i nie skanuje dalej.
|
||||
|
||||
Pliki znajdujące się poza takimi granicami nie są uwzględniane na dysku
|
||||
z danymi i muszą zostać skonfigurowane oddzielnie, jeśli mają być chronione.
|
||||
|
||||
Punkty montowania z migawkami systemu plików
|
||||
Gdy migawki systemu plików są włączone, zagnieżdżone punkty montowania oraz
|
||||
montowania bind wewnątrz dysku z danymi nie są obsługiwane.
|
||||
|
||||
Punkty montowania są częścią przestrzeni nazw montowania działającego
|
||||
systemu i nie są zachowywane w migawkach systemu plików. W związku z tym
|
||||
podczas skanowania migawki katalog ukryty przez punkt montowania w aktywnym
|
||||
systemie plików może stać się widoczny.
|
||||
|
||||
Nie umieszczaj zagnieżdżonych punktów montowania ani montowań bind wewnątrz
|
||||
dysków z danymi, gdy migawki systemu plików są włączone.
|
||||
|
||||
Wiele konfiguracji z migawkami systemu plików
|
||||
Obsługa migawek nie może być bezpiecznie współdzielona przez wiele
|
||||
niezależnych konfiguracji SnapRAID korzystających z tej samej przestrzeni
|
||||
nazw migawek systemu plików.
|
||||
|
||||
W systemach Btrfs i Bcachefs tylko jedna konfiguracja SnapRAID z włączoną
|
||||
obsługą migawek może używać katalogów danych w obrębie tego samego
|
||||
podwolumenu. W systemie ZFS to samo ograniczenie dotyczy datasetu, a w NTFS
|
||||
woluminu.
|
||||
|
||||
Wiele konfiguracji współdzielących tę samą przestrzeń nazw migawek używa tych
|
||||
samych migawek `stable`, `pending` oraz `scan`. Uruchomienie jednej
|
||||
konfiguracji może zatem zastąpić lub usunąć migawki odzyskiwania wymagane
|
||||
przez inną.
|
||||
|
||||
Modyfikacje plików w miejscu bez zmiany znacznika czasu
|
||||
SnapRAID wykrywa modyfikacje plików, porównując rozmiary plików oraz
|
||||
znaczniki czasu modyfikacji (mtime).
|
||||
|
||||
Jeśli aplikacja modyfikuje plik w miejscu bez zmiany jego rozmiaru ani
|
||||
aktualizacji znacznika czasu modyfikacji, polecenia "diff" i "sync" nie
|
||||
wykryją zmiany pliku, a jego parzystość nie zostanie zaktualizowana.
|
||||
|
||||
Aby SnapRAID rozpoznał takie zmiany, zaktualizuj znacznik czasu modyfikacji
|
||||
pliku (na przykład za pomocą narzędzia "touch"). W przeciwnym razie różnica
|
||||
zostanie wykryta dopiero jako niezgodność skrótu podczas kolejnego "scrub"
|
||||
lub "check".
|
||||
|
||||
Dopasowywanie wielkości liter znaków spoza ASCII w systemie Windows
|
||||
SnapRAID używa standardowego, przewidywalnego kodowania UTF-8 na wszystkich
|
||||
platformach, ograniczając dopasowywanie bez uwzględniania wielkości liter do
|
||||
znaków ASCII.
|
||||
|
||||
Systemy plików Windows cierpią z powodu przestarzałego projektu narzucania
|
||||
braku rozróżniania wielkości liter w nazwach plików Unicode za pomocą
|
||||
arbitralnych, zależnych od systemu tabel składania znaków (folding tables).
|
||||
W rezultacie Windows zaciera rzeczywistość systemu plików, traktując zupełnie
|
||||
różne sekwencje bajtów Unicode tak, jakby były tym samym plikiem.
|
||||
|
||||
Na przykład `À.txt` i `à.txt` to odrębne nazwy Unicode, a jednak Windows
|
||||
nielogicznie traktuje je jako identyczne, podczas gdy SnapRAID zachowuje ich
|
||||
rzeczywiste rozróżnienie.
|
||||
|
||||
Ograniczenie to wynika z niespójnej obsługi nazw plików Unicode przez system
|
||||
Windows oraz jego uporczywego stosowania aliasów bez uwzględniania wielkości
|
||||
liter. Aby zapobiec rozbieżnościom wynikającym ze składania znaków przez
|
||||
Windows, zawsze podawaj dokładną wielkość liter w przypadku znaków spoza ASCII
|
||||
w ścieżkach konfiguracyjnych i filtrach.
|
||||
|
||||
Odzyskiwanie za pomocą częściowego fix
|
||||
Gdy polecenie `fix` jest ograniczone za pomocą `-S, --start` lub `-B, --count`,
|
||||
SnapRAID działa tylko na wybranych blokach i nie przeprowadza finalizacji
|
||||
na poziomie plików ani kwarantanny.
|
||||
|
||||
Jeśli odzyskiwanie da dane typu best-effort, co do których nie można udowodnić,
|
||||
że reprezentują bieżącą zawartość, takie bloki mogą nadal zostać zapisane pod
|
||||
zwykłą nazwą pliku. Niepewność związana z tymi odzyskanymi blokami nie jest
|
||||
zachowywana po zakończeniu polecenia.
|
||||
|
||||
W rezultacie późniejsze wykonanie `fix` potraktuje te czytelne bloki jako
|
||||
prawidłowe dane pliku i nie podejmie ponownej próby ich odzyskania. Może to
|
||||
spowodować, że późniejsze odzyskiwanie zgłosi sukces, pozostawiając w pliku
|
||||
niekompletne lub nieaktualne dane.
|
||||
|
||||
Opcje `-S` i `-B` są przeznaczone wyłącznie do zaawansowanego odzyskiwania
|
||||
ręcznego, zazwyczaj po niepowodzeniu normalnego `fix`. Jeśli częściowy `fix`
|
||||
zgłosi dane niemożliwe do odzyskania, przed podjęciem kolejnej próby odzyskiwania
|
||||
należy usunąć lub zmienić nazwę plików, których to dotyczy, albo ręcznie zweryfikować
|
||||
ich zawartość.
|
||||
|
||||
Twarde dowiązania NTFS i wykluczone ścieżki
|
||||
W systemie plików NTFS wpisy katalogowe niezależnie buforują rozmiar pliku
|
||||
i znaczniki czasu dla każdego twardego dowiązania. Gdy plik zostanie
|
||||
zmodyfikowany za pośrednictwem jednego dowiązania, wpisy katalogowe innych
|
||||
dowiązań wskazujących ten sam plik mogą zachowywać nieaktualne metadane
|
||||
do momentu uzyskania do nich dostępu.
|
||||
|
||||
SnapRAID automatycznie wykrywa i normalizuje ten stan, gdy podczas skanowania
|
||||
napotka co najmniej dwa twarde dowiązania do tego samego pliku. Jeśli jednak
|
||||
zeskanowane zostanie tylko jedno twarde dowiązanie, podczas gdy pozostałe są
|
||||
wykluczone przez filtry lub znajdują się poza ścieżką dysku danych, SnapRAID
|
||||
nie może wykryć kolizji i-węzłów (inode) i polega na buforowanych metadanych
|
||||
jedynego widocznego dowiązania.
|
||||
|
||||
W konsekwencji modyfikacje dokonane za pośrednictwem wykluczonego lub
|
||||
zewnętrznego twardego dowiązania mogą pozostać niezauważone przez SnapRAID,
|
||||
dopóki metadane uwzględnionego dowiązania nie zostaną odświeżone przez system
|
||||
operacyjny (na przykład po uzyskaniu dostępu do pliku lub otwarciu go
|
||||
przez tę ścieżkę).
|
||||
|
||||
Aby uniknąć tego ograniczenia, należy unikać modyfikowania chronionych plików
|
||||
za pośrednictwem twardych dowiązań wykluczonych ze SnapRAID lub upewnić się,
|
||||
że wszystkie twarde dowiązania do danego pliku są uwzględnione w skanowaniu,
|
||||
aby SnapRAID mógł je znormalizować.
|
||||
|
||||
Odzyskiwanie po przerwanym sync z wieloma parzystościami
|
||||
W macierzy z wieloma dyskami parzystości przerwane polecenie `sync` może
|
||||
pozostawić różne poziomy parzystości chwilowo niezsynchronizowane ze sobą.
|
||||
Na przykład parzystość 1 może już zawierać nowo zaktualizowane dane,
|
||||
podczas gdy parzystość 2 nadal zawiera stare dane.
|
||||
|
||||
Podczas wykonywania `check` lub `fix` SnapRAID sprawdza różne kombinacje
|
||||
parzystości i weryfikuje zrekonstruowane dane z wykorzystaniem znanych
|
||||
skrótów bloków (obejmujących cały blok, zazwyczaj 256 KiB).
|
||||
|
||||
Jeśli SnapRAID podejmie próbę rekonstrukcji z użyciem niespójnej
|
||||
mieszanki starej i nowej parzystości, liniowe równania RAID dadzą
|
||||
nieprawidłowe dane. Aby taka niepoprawna kombinacja została omyłkowo
|
||||
zaakceptowana, równania musiałyby przypadkowo zrekonstruować co najmniej
|
||||
jeden pełny blok 256 KiB tak idealnie, aby jego skrót się zgadzał,
|
||||
podczas gdy inne niezsynchronizowane bloki w tym samym pasku zostaną
|
||||
zrekonstruowane z błędnymi danymi.
|
||||
|
||||
Scenariusz ten nie zależy od kolizji skrótów; wymagałby raczej, aby same
|
||||
równania mieszanej parzystości przypadkowo odtworzyły dokładną,
|
||||
oryginalną zawartość 256-KiB bloku. Choć jest to matematycznie możliwe
|
||||
w przypadku specjalnie spreparowanych lub silnie powtarzalnych danych,
|
||||
jest to praktycznie niemożliwe w przypadku rzeczywistych danych.
|
||||
|
||||
Jeśli wszystkie dyski są sprawne, dokończenie przerwanego `sync` przed
|
||||
wprowadzeniem dalszych zmian usuwa tę niejednoznaczność. Jeśli nastąpiła
|
||||
awaria dysku i konieczne jest odzyskanie danych, należy unikać modyfikacji
|
||||
dysków danych przed uruchomieniem `check` lub `fix`.
|
||||
|
||||
Zastrzeżone nazwy plików i katalogów
|
||||
SnapRAID rezerwuje niektóre nazwy plików, katalogów i migawek do swoich
|
||||
wewnętrznych operacji. Nie używaj tych nazw dla danych użytkownika:
|
||||
|
||||
.snapraidignore - Lokalny plik reguł wykluczeń.
|
||||
.snapraid - Katalog kontenera migawek.
|
||||
snapraid-* - Nazwy migawek ZFS zarządzanych przez SnapRAID.
|
||||
*.unrecoverable - Uszkodzone pliki objęte kwarantanną podczas odzyskiwania.
|
||||
CONTENT.tmp - Plik tymczasowy do aktualizacji pliku content.
|
||||
CONTENT.lock - Plik blokady pliku content.
|
||||
PARITY.spaceholder - Tymczasowy plik rezerwacji miejsca podczas alokacji
|
||||
parzystości w systemie Windows.
|
||||
|
||||
Użycie tych nazw dla niepowiązanych danych może spowodować, że pliki lub
|
||||
migawki zostaną zignorowane, błędnie zinterpretowane jako metadane,
|
||||
nadpisane, przemianowane lub usunięte.
|
||||
|
||||
W systemie Windows wszystkie warianty wielkości liter są również zastrzeżone,
|
||||
nawet w katalogach NTFS skonfigurowanych do rozróżniania wielkości liter
|
||||
(na przykład .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP i CONTENT.Lock).
|
||||
|
||||
Tłumaczenie (Translation)
|
||||
Ten dokument jest automatycznym tłumaczeniem angielskiej instrukcji.
|
||||
Wersję oficjalną stanowi oryginalny podręcznik w języku angielskim.
|
||||
|
||||
Prawa autorskie (Copyright)
|
||||
Ten plik jest chroniony prawem autorskim (C) 2026 Andrea Mazzoleni
|
||||
|
||||
Zobacz również (See Also)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
.TH "SnapRAID Backup para Arrays de Disco" 1
|
||||
.SH NAME
|
||||
snapraid \- SnapRAID Backup para Arrays de Disco
|
||||
.SH SINOPSE
|
||||
.SH SINOPSE (SYNOPSIS)
|
||||
snapraid [\-c, \-\-conf CONFIG]
|
||||
.PD 0
|
||||
.PP
|
||||
|
|
@ -77,7 +77,7 @@ snapraid [\-c, \-\-conf CONFIG]
|
|||
snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PD 0
|
||||
.PD
|
||||
.SH DESCRIçãO
|
||||
.SH DESCRIçãO (DESCRIPTION)
|
||||
SnapRAID é um programa de backup projetado para arrays de disco,
|
||||
armazenando informações de paridade para recuperação de dados no
|
||||
caso de até seis falhas de disco.
|
||||
|
|
@ -117,22 +117,35 @@ https://www.snapraid.it/
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH LIMITAçõES
|
||||
SnapRAID é um híbrido entre um programa RAID e um programa de backup,
|
||||
visando combinar os melhores benefícios de ambos. No entanto, ele tem
|
||||
algumas limitações que você deve considerar antes de usá\-lo.
|
||||
.SH LIMITAçõES (LIMITATIONS)
|
||||
O SnapRAID é um híbrido entre um RAID e um programa de backup, com o objetivo de combinar
|
||||
os melhores benefícios de ambos. No entanto, possui algumas limitações que deve
|
||||
considerar antes de o utilizar.
|
||||
.PP
|
||||
A principal limitação é que, se um disco falhar e você não tiver
|
||||
sincronizado recentemente, talvez não consiga recuperar totalmente.
|
||||
Mais especificamente, você pode não conseguir recuperar até o tamanho dos
|
||||
arquivos alterados ou excluídos desde a última operação de sincronização.
|
||||
Isso ocorre mesmo que os arquivos alterados ou excluídos não estejam no
|
||||
disco com falha. É por isso que o SnapRAID é mais adequado para
|
||||
dados que raramente mudam.
|
||||
A principal limitação é que, se um disco falhar, apenas poderá recuperar dados até ao
|
||||
estado da última operação de sincronização (\`sync\`). Quaisquer dados adicionados ou modificações feitas
|
||||
desde a última sincronização que estejam localizados no disco com falha serão perdidos.
|
||||
.PP
|
||||
Por outro lado, arquivos recém\-adicionados não impedem a recuperação de
|
||||
arquivos já existentes. Você perderá apenas os arquivos adicionados
|
||||
recentemente se estiverem no disco com falha.
|
||||
Consequentemente, o SnapRAID é adequado principalmente para dados que raramente mudam.
|
||||
.PP
|
||||
Para dados que já existiam na última sincronização, a fiabilidade da recuperação depende
|
||||
de a opção \`snapshot\` ser ou não utilizada:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Com suporte a instantâneos (disponível em Btrfs, ZFS, Bcachefs e NTFS),
|
||||
o SnapRAID pode manter automaticamente uma referência congelada
|
||||
independente de cada sistema de arquivos de dados suportado.
|
||||
Isso garante que, mesmo que modifique ou exclua arquivos no seu sistema de arquivos ativo
|
||||
durante ou após uma sincronização, o processo de recuperação permanece consistente e confiável.
|
||||
.PD
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Sem suporte a instantâneos, excluir ou alterar arquivos após um \`sync\`
|
||||
pode impedir a recuperação total de outros discos com falha. Isso ocorre
|
||||
porque a paridade já não corresponde aos arquivos modificados, mesmo que
|
||||
esses arquivos não estejam no disco com falha. Por outro lado, arquivos adicionados recentemente
|
||||
não impedem a recuperação de arquivos já existentes.
|
||||
.PD
|
||||
.PP
|
||||
Outras limitações do SnapRAID são:
|
||||
.PD 0
|
||||
|
|
@ -153,7 +166,7 @@ de todo o array de discos.
|
|||
Apenas nomes de arquivos, carimbos de data/hora, symlinks e hardlinks
|
||||
são salvos. Permissões, propriedade e atributos estendidos não são salvos.
|
||||
.PD
|
||||
.SH PRIMEIROS PASSOS
|
||||
.SH PRIMEIROS PASSOS (GETTING STARTED)
|
||||
Para usar o SnapRAID, você precisa primeiro selecionar um disco em seu array
|
||||
de discos para dedicar às informações de \`parity\` (paridade). Com um
|
||||
disco para paridade, você poderá recuperar de uma única falha de disco,
|
||||
|
|
@ -300,7 +313,7 @@ Quando este comando for concluído, seus dados estarão SEGUROS.
|
|||
.PP
|
||||
Agora você pode começar a usar seu array como quiser e periodicamente
|
||||
atualizar as informações de paridade executando o comando \`sync\`.
|
||||
.SS Scrubbing
|
||||
.SS Scrubbing (Scrubbing)
|
||||
Para verificar periodicamente os dados e a paridade em busca de erros,
|
||||
você pode executar o comando \`scrub\`.
|
||||
.PP
|
||||
|
|
@ -358,10 +371,10 @@ snapraid \-p bad scrub
|
|||
Executar \`scrub\` em um array não sincronizado pode relatar erros causados por
|
||||
arquivos removidos ou modificados. Esses erros são relatados na saída de \`scrub\`,
|
||||
mas os blocos relacionados não são marcados como ruins.
|
||||
.SS Pooling
|
||||
.SS Pooling (Pooling)
|
||||
Nota: O recurso de pooling descrito abaixo foi substituído pela ferramenta
|
||||
mergerfs, que agora é a opção recomendada para usuários Linux na comunidade
|
||||
SnapRAID. Mergefs oferece uma maneira mais flexível e eficiente de agrupar
|
||||
SnapRAID. Mergerfs oferece uma maneira mais flexível e eficiente de agrupar
|
||||
várias unidades em um único ponto de montagem unificado, permitindo acesso
|
||||
perfeito a arquivos em todo o seu array sem depender de links simbólicos.
|
||||
Ele se integra bem ao SnapRAID para proteção de paridade e é comumente usado
|
||||
|
|
@ -545,13 +558,15 @@ snapraid fix \-m
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SS Recuperando
|
||||
.SS Recuperação (Recovering)
|
||||
O pior aconteceu e você perdeu um ou mais discos!
|
||||
.PP
|
||||
NÃO ENTRE EM PÂNICO! Você será capaz de recuperá\-los!
|
||||
.PP
|
||||
A primeira coisa que você deve fazer é evitar mais alterações em seu array
|
||||
de discos. Desabilite quaisquer conexões remotas a ele e quaisquer
|
||||
Antes de fazer qualquer outra coisa, evite fazer qualquer alteração em seu
|
||||
array de discos, pois modificar ou excluir dados nos discos restantes pode
|
||||
tornar a recuperação impossível.
|
||||
Desabilite quaisquer conexões remotas a ele e quaisquer
|
||||
processos agendados, incluindo qualquer sincronização noturna ou scrub
|
||||
agendado do SnapRAID.
|
||||
.PP
|
||||
|
|
@ -614,7 +629,7 @@ no arquivo fix.log, verificando todas as linhas que começam com \`unrecoverable
|
|||
Se você não estiver satisfeito com a recuperação, pode tentar novamente
|
||||
quantas vezes quiser.
|
||||
.PP
|
||||
Por exemplo, se você removeu arquivos do array após a última
|
||||
Por exemplo, se você removeu arquivos do array após o último
|
||||
\`sync\`, isso pode resultar em alguns arquivos não sendo recuperados.
|
||||
Neste caso, você pode tentar novamente o \`fix\` usando a opção \-i, \-\-import,
|
||||
especificando onde esses arquivos estão agora para incluí\-los novamente
|
||||
|
|
@ -650,19 +665,19 @@ snapraid sync
|
|||
.RE
|
||||
.PP
|
||||
Se tudo for recuperado, este comando é imediato.
|
||||
.SH COMANDOS
|
||||
SnapRAID fornece alguns comandos simples que permitem a você:
|
||||
.SH COMANDOS (COMMANDS)
|
||||
O SnapRAID fornece alguns comandos simples que lhe permitem:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
Imprimir o status do array \-> \`status\`
|
||||
Imprimir o estado do array \-> \`status\`
|
||||
.IP \(bu
|
||||
Controlar os discos \-> \`smart\`, \`probe\`, \`up\`, \`down\`
|
||||
.IP \(bu
|
||||
Fazer um backup/snapshot \-> \`sync\`
|
||||
Criar um ponto de backup/recuperação \-> \`sync\`
|
||||
.IP \(bu
|
||||
Verificar periodicamente os dados \-> \`scrub\`
|
||||
.IP \(bu
|
||||
Restaurar o último backup/snapshot \-> \`fix\`.
|
||||
Restaurar o último ponto de backup/recuperação \-> \`fix\`.
|
||||
.PD
|
||||
.PP
|
||||
Os comandos devem ser escritos em letras minúsculas.
|
||||
|
|
@ -795,9 +810,10 @@ Arquivos com tamanho ou carimbo de data/hora diferente,
|
|||
o que significa que foram modificados.
|
||||
.HP 4
|
||||
.I moved
|
||||
Arquivos movidos para um diretório diferente no mesmo disco.
|
||||
Eles são identificados por terem o mesmo nome, tamanho,
|
||||
carimbo de data/hora e inode, mas um diretório diferente.
|
||||
Arquivos movidos ou renomeados no mesmo disco, mantendo
|
||||
o mesmo inode. Eles são identificados por terem o mesmo inode,
|
||||
tamanho e carimbo de data/hora, mas um caminho diferente. O nome
|
||||
do arquivo também pode ser diferente.
|
||||
.HP 4
|
||||
.I copied
|
||||
Arquivos copiados no mesmo disco ou em um disco
|
||||
|
|
@ -809,14 +825,13 @@ completo deve corresponder para ser identificado, não apenas
|
|||
o nome.
|
||||
.HP 4
|
||||
.I relocated
|
||||
Arquivos movidos no mesmo disco ou em um disco
|
||||
diferente onde o original desapareceu.
|
||||
Eles são identificados por terem o mesmo nome, tamanho e
|
||||
carimbo de data/hora.
|
||||
Se o carimbo de data/hora de subsegundos for zero, o caminho
|
||||
completo deve corresponder para ser identificado.
|
||||
Ao contrário dos arquivos \'moved\' no mesmo disco, os arquivos
|
||||
realocados têm um inode diferente.
|
||||
Arquivos movidos para um diretório ou disco diferente onde
|
||||
o arquivo original desapareceu e o inode não é mantido.
|
||||
Eles são identificados por terem o mesmo nome, tamanho e carimbo
|
||||
de data/hora. Se o carimbo de data/hora de subsegundos for zero, o
|
||||
caminho completo deve corresponder para ser identificado. Ao
|
||||
contrário dos arquivos \'moved\', os arquivos relocados exigem que
|
||||
o nome do arquivo permaneça o mesmo.
|
||||
.HP 4
|
||||
.I restored
|
||||
Arquivos com um inode diferente, mas com diretório,
|
||||
|
|
@ -825,7 +840,7 @@ Geralmente são arquivos restaurados após serem excluídos.
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Se uma \`sync\` for necessária, o código de retorno do processo é 2,
|
||||
Se um \`sync\` for necessário, o código de retorno do processo é 2,
|
||||
em vez do padrão 0. O código de retorno 1 é usado para uma condição
|
||||
de erro genérica.
|
||||
.PP
|
||||
|
|
@ -901,13 +916,12 @@ Os arquivos no array NÃO são modificados.
|
|||
.SS fix
|
||||
Corrige todos os arquivos e os dados de paridade.
|
||||
.PP
|
||||
Todos os arquivos e dados de paridade são comparados com o estado de
|
||||
snapshot salvo na última \`sync\`.
|
||||
Se uma diferença for encontrada, ela é revertida para o snapshot armazenado.
|
||||
Todos os arquivos e dados de paridade são comparados com o estado salvo no
|
||||
último \`sync\`. Se for encontrada uma diferença, esta é revertida para o estado armazenado.
|
||||
.PP
|
||||
ATENÇÃO! O comando \`fix\` não diferencia entre erros e modificações
|
||||
intencionais. Ele reverte incondicionalmente o estado do arquivo
|
||||
para a última \`sync\`.
|
||||
AVISO!
|
||||
O comando \`fix\` não diferencia erros de modificações intencionais.
|
||||
Reverte incondicionalmente o estado do arquivo para o do último \`sync\`.
|
||||
.PP
|
||||
Se nenhuma outra opção for especificada, todo o array é processado.
|
||||
Use as opções de filtro para selecionar um subconjunto de arquivos ou
|
||||
|
|
@ -916,13 +930,13 @@ discos para operar.
|
|||
Para corrigir apenas os blocos marcados como ruins durante \`sync\` e \`scrub\`,
|
||||
use a opção \-e, \-\-filter\-error.
|
||||
Ao contrário de outras opções de filtro, esta aplica correções apenas a
|
||||
arquivos que não foram alterados desde a última \`sync\`.
|
||||
arquivos que não foram alterados desde o último \`sync\`.
|
||||
.PP
|
||||
O SnapRAID renomeia todos os arquivos que não podem ser corrigidos adicionando
|
||||
a extensão \`.unrecoverable\`.
|
||||
.PP
|
||||
Antes de corrigir, todo o array é escaneado para encontrar quaisquer
|
||||
arquivos movidos desde a última operação \`sync\`.
|
||||
arquivos movidos desde a última operação de \`sync\`.
|
||||
Esses arquivos são identificados por seu carimbo de data/hora, ignorando
|
||||
seu nome e diretório, e são usados no processo de recuperação, se
|
||||
necessário.
|
||||
|
|
@ -1038,7 +1052,7 @@ Se desejar realocar esses arquivos, você poderá usar a opção
|
|||
\-W, \-\-force\-realloc\-tail.
|
||||
Esteja ciente de que tais arquivos não estarão protegidos pela paridade durante
|
||||
o processo de realocação.
|
||||
.SH OPçõES
|
||||
.SH OPçõES (OPTIONS)
|
||||
SnapRAID fornece as seguintes opções:
|
||||
.TP
|
||||
.B \-c, \-\-conf CONFIG
|
||||
|
|
@ -1113,9 +1127,9 @@ esta opção pode acelerar significativamente o processo de verificação.
|
|||
Esta opção pode ser usada apenas com \`check\`.
|
||||
.TP
|
||||
.B \-h, \-\-pre\-hash
|
||||
Em \`sync\`, executa uma fase de hash preliminar de todos os novos dados
|
||||
Em \`sync\`, executa uma fase de hash prexcluir de todos os novos dados
|
||||
para verificação adicional antes do cálculo da paridade.
|
||||
Normalmente, em \`sync\`, nenhum hash preliminar é feito, e os novos
|
||||
Normalmente, em \`sync\`, nenhum hash prexcluir é feito, e os novos
|
||||
dados são hashados logo antes do cálculo da paridade, quando são lidos
|
||||
pela primeira vez.
|
||||
Este processo ocorre quando o sistema está sob
|
||||
|
|
@ -1152,7 +1166,7 @@ Aplica um limite de largura de banda global para todos os discos. A
|
|||
RATE é o número de bytes por segundo. Você pode especificar um
|
||||
multiplicador como K, M ou G (por exemplo, \-\-bw\-limit 1G).
|
||||
.TP
|
||||
.B \-t, \-\-tail TAMANHO
|
||||
.B \-t, \-\-tail SIZE
|
||||
Limita a listagem de arquivos àqueles que não usam mais do que o
|
||||
tamanho final especificado dos discos de paridade.
|
||||
Você pode usar multiplicadores como K, M, G ou T (ex: \-\-tail 1G).
|
||||
|
|
@ -1258,9 +1272,9 @@ ATENÇÃO! Esta opção é apenas para especialistas e é altamente
|
|||
recomendado não usá\-la.
|
||||
Você NÃO tem proteção de dados durante a operação \`sync\`.
|
||||
.TP
|
||||
.B \-W, \-\-force\-realloc\-tail TAMANHO
|
||||
.B \-W, \-\-force\-realloc\-tail SIZE
|
||||
Funciona como \-R, \-\-force\-realloc, mas limitado à parte final
|
||||
especificada (últimos TAMANHO bytes) de cada arquivo de paridade.
|
||||
especificada (últimos SIZE bytes) de cada arquivo de paridade.
|
||||
Força a realocação (movimentação) de quaisquer fragmentos/blocos de arquivos
|
||||
atualmente armazenados nessa seção final, permitindo que sejam colocados
|
||||
em qualquer lugar no(s) arquivo(s) de paridade onde houver espaço livre
|
||||
|
|
@ -1274,10 +1288,9 @@ Você pode usar multiplicadores como K, M, G ou T (ex:
|
|||
\-\-force\-realloc\-tail 1G).
|
||||
Você pode usar locate \-t, \-\-tail para saber antecipadamente os
|
||||
arquivos afetados.
|
||||
AVISO!
|
||||
Esta opção é apenas para especialistas e é altamente recomendado
|
||||
não utilizá\-la.
|
||||
Você NÃO terá proteção de datos durante a operação \`sync\` para os
|
||||
ATENÇÃO! Esta opção é apenas para especialistas e é altamente
|
||||
recomendado não usá\-la.
|
||||
Você NÃO tem proteção de dados durante a operação \`sync\` para os
|
||||
arquivos afetados.
|
||||
.TP
|
||||
.B \-l, \-\-log FILE
|
||||
|
|
@ -1312,11 +1325,13 @@ No entanto, \`check\` e \`fix\` sempre param no primeiro erro.
|
|||
Começa o processamento a partir do número de bloco
|
||||
especificado. Isso pode ser útil para tentar verificar
|
||||
ou corrigir blocos específicos em caso de um disco danificado.
|
||||
Esta opção é principalmente para recuperação manual avançada.
|
||||
Esta opção é principalmente para recuperação manual avançada
|
||||
e é suportada apenas por \`check\` e \`fix\`.
|
||||
.TP
|
||||
.B \-B, \-\-count BLKCOUNT
|
||||
Processa apenas o número especificado de blocos.
|
||||
Esta opção é principalmente para recuperação manual avançada.
|
||||
Esta opção é principalmente para recuperação manual avançada
|
||||
e é suportada apenas por \`check\` e \`fix\`.
|
||||
.TP
|
||||
.B \-C, \-\-gen\-conf CONTENT
|
||||
Gera um arquivo de configuração dummy a partir de um arquivo
|
||||
|
|
@ -1346,7 +1361,7 @@ Imprime uma tela de ajuda curta.
|
|||
.TP
|
||||
.B \-V, \-\-version
|
||||
Imprime a versão do programa.
|
||||
.SH CONFIGURAçãO
|
||||
.SH CONFIGURAçãO (CONFIGURATION)
|
||||
SnapRAID requer um arquivo de configuração para saber onde seu array
|
||||
de discos está localizado e onde armazenar as informações de paridade.
|
||||
.PP
|
||||
|
|
@ -1440,6 +1455,11 @@ sistema de arquivos.
|
|||
Você pode alterar o ponto de montagem conforme necessário, desde que
|
||||
mantenha o NAME fixo.
|
||||
.PP
|
||||
No entanto, o caminho configurado deve apontar consistentemente para os
|
||||
mesmos dados subjacentes. Se o caminho contiver links simbólicos,
|
||||
seus destinos devem permanecer estáveis. A alteração desses links simbólicos
|
||||
para alternar o diretório de dados em tempo real não é suportada.
|
||||
.PP
|
||||
Você deve usar uma opção para cada disco de dados no array.
|
||||
.PP
|
||||
Você pode renomear um disco mais tarde alterando o NAME diretamente
|
||||
|
|
@ -1450,12 +1470,37 @@ armazenado dos discos.
|
|||
Define o nome e o ponto de montagem de discos adicionais para
|
||||
monitorar com os comandos \`smart\` e \`probe\`.
|
||||
.PP
|
||||
Isso é útil para monitorar discos que não fazem parte da matriz,
|
||||
Isso é útil para monitorar discos que não fazem parte do array,
|
||||
mas que são necessários para o funcionamento do sistema, como o
|
||||
disco de inicialização.
|
||||
.PP
|
||||
Observe que tais discos não são afetados pelos comandos \`up\` e \`down\`
|
||||
porque se espera que estejam sempre girando.
|
||||
.SS snapshot
|
||||
Ativa o uso de instantâneos (snapshots) do sistema de arquivos para os comandos \`sync\`, \`scrub\`,
|
||||
\`check\` e \`fix\`.
|
||||
.PP
|
||||
Quando ativado, o SnapRAID cria um instantâneo de somente leitura de cada
|
||||
sistema de arquivos de dados suportado no início de um \'sync\'. Isso fornece uma visão
|
||||
estável de cada sistema de arquivos, evitando que modificações posteriores alterem os
|
||||
dados utilizados para o cálculo da paridade.
|
||||
.PP
|
||||
Isso melhora significativamente a recuperação: se um arquivo for excluído do sistema de arquivos ativo,
|
||||
ele permanece preservado no instantâneo. Isso evita que a paridade fique \[dq]corrompida\[dq]
|
||||
para esse bloco, garantindo que ainda pode recuperar os dados com sucesso
|
||||
se outro disco falhar.
|
||||
.PP
|
||||
Esta opção aplica\-se exclusivamente a discos de dados formatados com os sistemas de
|
||||
arquivos Btrfs, Bcachefs ou ZFS em Linux e NTFS em Windows.
|
||||
Discos de paridade, ou discos de dados que utilizem outros sistemas de arquivos, usarão sempre
|
||||
a versão ativa do sistema de arquivos.
|
||||
.PP
|
||||
A criação e exclusão de instantâneos requerem privilégios administrativos.
|
||||
Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo) quando
|
||||
esta opção estiver ativada.
|
||||
.PP
|
||||
Consulte a seção SNAPSHOTS para uma explicação detalhada do ciclo de vida
|
||||
dos instantâneos.
|
||||
.SS nohidden
|
||||
Exclui todos os arquivos e diretórios ocultos.
|
||||
No Unix, arquivos ocultos são aqueles que começam com \`.\`.
|
||||
|
|
@ -1471,6 +1516,11 @@ Se nenhum padrão corresponder, o arquivo é excluído se o último padrão
|
|||
especificado for um \`include\`, ou incluído se o último padrão
|
||||
especificado for um \`exclude\`.
|
||||
.PP
|
||||
Observe que a filtragem ocorre hierarquicamente durante o percurso
|
||||
dos diretórios. Se um diretório corresponder a uma regra \`exclude\`,
|
||||
todo o diretório será ignorado (podado) e nenhuma regra \`include\` para
|
||||
arquivos ou subdiretórios dentro dele será avaliada.
|
||||
.PP
|
||||
Consulte a seção PATTERN para obter mais detalhes sobre
|
||||
especificações de padrão.
|
||||
.PP
|
||||
|
|
@ -1587,7 +1637,7 @@ temperatura for atingido mais uma vez.
|
|||
Durante a operação, o SnapRAID também analisa a curva de aquecimento de
|
||||
cada disco e estima a temperatura estável de longo prazo que eles
|
||||
devem atingir se a atividade continuar. A estimativa é realizada apenas
|
||||
depois que a temperatura do disco aumentou quatro vezes, garantindo
|
||||
depois que a temperatura do disco tiver subido quatro vezes, garantindo
|
||||
que pontos de dados suficientes estejam disponíveis para estabelecer uma
|
||||
tendência confiável.
|
||||
Esta temperatura estável prevista é mostrada entre parênteses ao lado
|
||||
|
|
@ -1641,6 +1691,9 @@ Nas OPTIONS especificadas, a string \`%s\` é substituída pelo
|
|||
nome do dispositivo. Para controladores RAID, o dispositivo é
|
||||
provavelmente fixo, e você pode não precisar usar \`%s\`.
|
||||
.PP
|
||||
Você também pode especificar uma string personalizada de opções de informação
|
||||
usando a tag \`[info: ...]\` para substituir a opção padrão \`\-a\`.
|
||||
.PP
|
||||
Consulte a documentação do smartmontools para possíveis opções:
|
||||
.PP
|
||||
.RS 4
|
||||
|
|
@ -1656,6 +1709,10 @@ https://www.smartmontools.org/wiki/Supported_USB\-Devices
|
|||
Por exemplo:
|
||||
.PP
|
||||
.RS 4
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl parity \-d sat %s
|
||||
.PD 0
|
||||
.PD
|
||||
|
|
@ -1670,19 +1727,27 @@ PARITY é um dos nomes de paridade: \`parity\`, \`2\-parity\`, \`3\-parity\`,
|
|||
\`4\-parity\`, \`5\-parity\`, \`6\-parity\` ou \`z\-parity\`.
|
||||
O valor especial * pode ser usado para ignorar o atributo em todos os discos.
|
||||
.PP
|
||||
Por exemplo, para ignorar o atributo \`Current Pending Sector Count\` em
|
||||
todos os discos:
|
||||
Múltiplos atributos podem ser especificados separados por espaços.
|
||||
Cada atributo pode ser especificado como um número de 1 a 255, ou como um
|
||||
nome insensível a maiúsculas/minúsculas (por exemplo, \`Current_Pending_Sector\`).
|
||||
.PP
|
||||
Por exemplo, para ignorar os atributos \`Current Pending Sector Count\` e
|
||||
\`Reallocated Sectors Count\` em todos os discos pelo seu número ou nome:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore * 197
|
||||
smartignore * 197 5
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Para ignorá\-lo apenas no primeiro disco de paridade:
|
||||
Para ignorá\-los apenas no primeiro disco de paridade:
|
||||
.PP
|
||||
.RS 4
|
||||
smartignore parity 197
|
||||
smartignore parity 197 5
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
|
|
@ -1722,7 +1787,7 @@ exclude /tmp/
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1778,7 +1843,7 @@ exclude \\System Volume Information
|
|||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
smartctl d1 \-d sat %s
|
||||
smartctl d1 [info: \-H \-i \-c \-A] \-d sat %s
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
|
|
@ -1794,6 +1859,171 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.SH INSTANTâNEOS (SNAPSHOTS)
|
||||
Se a opção de instantâneo estiver ativada na configuração, o SnapRAID
|
||||
utiliza instantâneos do sistema de arquivos para manter estáveis os dados lidos
|
||||
durante uma operação, mesmo quando arquivos nos sistemas de arquivos ativos
|
||||
são posteriormente modificados ou excluídos.
|
||||
.PP
|
||||
A gestão de instantâneos é completamente automática e transparente.
|
||||
Pode continuar a utilizar o SnapRAID exatamente como antes, com a
|
||||
proteção adicional fornecida por instantâneos geridos inteiramente em
|
||||
segundo plano.
|
||||
.PP
|
||||
Isso proporciona dois benefícios principais:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I Consistência
|
||||
Arquivos modificados no sistema de arquivos ativo durante um sync ou scrub de
|
||||
longa duração não causarão divergências de paridade ou operações abortadas,
|
||||
porque cada sistema de arquivos com instantâneo permanece inalterado durante
|
||||
toda a operação.
|
||||
.HP 4
|
||||
.I Recuperação
|
||||
Se um arquivo for atualizado ou excluído do sistema de arquivos ativo,
|
||||
ele permanece preservado no instantâneo. Se ocorrer uma falha de disco
|
||||
antes de o próximo sync ser executado, o SnapRAID utiliza os dados preservados
|
||||
no instantâneo para reconstruir o disco com falha.
|
||||
.PD
|
||||
.PP
|
||||
.RS 4
|
||||
.PD 0
|
||||
Em caso de falha de um disco durante um processo de sync ativo,
|
||||
o SnapRAID também é capaz de ler automaticamente tanto do instantâneo
|
||||
da computação de paridade anterior quanto da atual.
|
||||
Isso maximiza a probabilidade de uma recuperação completa ao
|
||||
fornecer acesso aos blocos de dados exatos necessários para resolver
|
||||
as equações de paridade, mesmo que esses blocos tenham sido modificados
|
||||
ou excluídos entre os syncs.
|
||||
.PD
|
||||
.PP
|
||||
.PD 0
|
||||
Sem instantâneos, um arquivo atualizado ou excluído num disco saudável
|
||||
resulta na falta de blocos de dados que podem ser necessários para
|
||||
reparar outros discos com falha.
|
||||
.PD
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
Os instantâneos são criados apenas para discos de dados e apenas se o sistema de arquivos
|
||||
subjacente suportar esta funcionalidade. Os discos de paridade usam sempre
|
||||
o sistema de arquivos ativo.
|
||||
.PP
|
||||
Atualmente, isso é suportado em Btrfs, Bcachefs e ZFS em Linux
|
||||
e em NTFS em Windows.
|
||||
.PP
|
||||
Pode misturar discos de dados com sistemas de arquivos diferentes. Apenas aqueles que
|
||||
suportam instantâneos os utilizarão, enquanto os outros discos continuarão
|
||||
a operar diretamente no sistema de arquivos ativo.
|
||||
.PP
|
||||
A criação e exclusão de instantâneos requerem privilégios administrativos.
|
||||
Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo)
|
||||
quando os instantâneos estão ativados.
|
||||
.SS Comportamento dos Comandos com Instantâneos
|
||||
Os comandos \`sync\` e \`scrub\` utilizam instantâneos para discos de dados cujos
|
||||
sistemas de arquivos os suportam. Num disco com instantâneo, o comando vê
|
||||
uma imagem estável do sistema de arquivos não afetada por alterações simultâneas no
|
||||
sistema de arquivos ativo.
|
||||
Durante um \`sync\`, um novo instantâneo é criado independentemente para cada
|
||||
sistema de arquivos de dados suportado. Esses instantâneos fornecem coletivamente os
|
||||
dados utilizados para o cálculo da paridade.
|
||||
Em contraste, o comando \`scrub\` utiliza o último instantâneo, aquele
|
||||
criado durante o sync mais recente, para manter um ponto de referência confiável
|
||||
que corresponda à paridade existente.
|
||||
.PP
|
||||
Para os comandos \`check\` e \`fix\`, o uso do último instantâneo
|
||||
depende de discos específicos serem ou não alvo da operação utilizando a opção
|
||||
\-d, \-\-filter\-disk.
|
||||
.PP
|
||||
Um disco explicitamente selecionado via \-d (o \[dq]alvo\[dq] da operação)
|
||||
usa sempre o sistema de arquivos ativo. Para \`fix\`, isso permite restaurar
|
||||
dados para a substituição do disco ativo. Para \`check\`, permite simular
|
||||
a operação \`fix\` sob as mesmas condições.
|
||||
.PP
|
||||
Todos os outros discos de dados (os discos de \[dq]referência\[dq]) serão acessados através dos
|
||||
seus instantâneos. Isso garante que, mesmo que esteja modificando arquivos
|
||||
nos seus discos saudáveis enquanto uma recuperação está em curso, o SnapRAID
|
||||
tem uma referência estável e congelada para resolver as equações de paridade.
|
||||
.PP
|
||||
Se nenhuma opção \-d for fornecida, o SnapRAID assume que a operação se aplica
|
||||
a todo o array, neste caso, \`check\` e \`fix\` usarão os sistemas
|
||||
de arquivos ativos exclusivamente.
|
||||
.PP
|
||||
Todos os outros comandos operam exclusivamente no sistema de arquivos ativo.
|
||||
.SH CICLO DE VIDA DOS INSTANTâNEOS (SNAPSHOTS LIFECYCLE)
|
||||
O SnapRAID gerencia três instantâneos específicos, \`stable\` (estável), \`pending\` (pendente) e \`scan\` (verificação),
|
||||
dentro de um diretório oculto na raiz de cada subvolume de dados.
|
||||
Em Btrfs, Bcachefs e NTFS é utilizado o diretório \`.snapraid/\`,
|
||||
em ZFS o padrão \`.zfs/snapshot/\`.
|
||||
.PP
|
||||
O instantâneo \`stable\` representa o estado do último
|
||||
\`sync\` concluído com sucesso, contendo os dados exatos utilizados para
|
||||
computar a paridade atual. Serve como a principal fonte de dados
|
||||
para os comandos \`scrub\`, \`check\` e \`fix\`.
|
||||
.PP
|
||||
O instantâneo \`scan\` é uma imagem temporária criada ao início
|
||||
de um \`sync\` para fornecer um estado congelado para a verificação e a computação da paridade.
|
||||
Após a verificação e salvamento do novo estado de conteúdo, ele substitui o instantâneo
|
||||
\`pending\` anterior.
|
||||
.PP
|
||||
O instantâneo \`pending\` é a imagem usada por um \`sync\` interrompido.
|
||||
Após a conclusão bem\-sucedida da operação, o instantâneo \`stable\` anterior
|
||||
é excluído, e o instantâneo \`pending\` é promovido para
|
||||
tomar o seu lugar como a nova referência estável.
|
||||
.PP
|
||||
Se um \`sync\` for interrompido, o instantâneo \`pending\` é preservado.
|
||||
Os comandos subsequentes \`scrub\`, \`check\` e \`fix\` utilizarão este
|
||||
instantâneo pendente, pois ele corresponde ao estado do sistema de arquivos registrado no
|
||||
arquivo .content, mesmo que a paridade esteja apenas parcialmente sincronizada.
|
||||
.PP
|
||||
No caso de uma interrupção do \`sync\`, os comandos \`check\` e \`fix\`
|
||||
também leem do instantâneo \`stable\` para recuperar blocos de dados
|
||||
de arquivos que foram atualizados ou excluídos durante o sync.
|
||||
Isso é possível porque o arquivo .content retém metadados para
|
||||
todos os arquivos modificados ou excluídos ao longo do processo de sync.
|
||||
Esta informação histórica só é limpa quando um sync termina
|
||||
com sucesso e a versão final do arquivo .content é salva.
|
||||
.PP
|
||||
Se um \`sync\` for reiniciado após uma interrupção, o instantâneo pending existente
|
||||
é excluído e um novo é criado para
|
||||
capturar o estado atual do sistema de arquivos ativo.
|
||||
No entanto, se um \`sync\` for interrompido, evite modificar, excluir,
|
||||
substituir ou mover arquivos até que um \`sync\` subsequente seja concluído
|
||||
com sucesso. A paridade ainda pode conter blocos calculados a partir do
|
||||
instantâneo usado pelo sync interrompido. Um sync posterior pode substituir
|
||||
esse instantâneo, tornando as versões intermediárias dos arquivos indisponíveis
|
||||
para recuperação.
|
||||
.SS Cópias de segurança externas com instantâneos do sistema de ficheiros (External backups with filesystem snapshots)
|
||||
Quando os instantâneos do sistema de ficheiros estão ativados, o SnapRAID
|
||||
acede ou cria instantâneos na raiz de cada subvolume, volume ou conjunto
|
||||
de dados (dataset).
|
||||
.PP
|
||||
Uma forma simples de evitar qualquer interferência com ferramentas externas
|
||||
é apontar a configuração \`data\` para um subdiretório normal dentro do
|
||||
subvolume ou volume (por exemplo, \`/mnt/subvol/data\` em vez de \`/mnt/subvol\`).
|
||||
O SnapRAID cria sempre o diretório de instantâneos na raiz do subvolume
|
||||
(por exemplo, \`/mnt/subvol/.snapraid/\`), deixando o subdiretório de dados
|
||||
limpo, de modo que os instantâneos permaneçam fora e invisíveis para as
|
||||
ferramentas de cópia de segurança que operam dentro dele.
|
||||
.PP
|
||||
Caso contrário, se o diretório \`data\` configurado for ele próprio a raiz
|
||||
do subvolume ou do volume, o SnapRAID cria um diretório \`.snapraid/\`
|
||||
diretamente dentro dele (em Btrfs, Bcachefs e NTFS). Embora o SnapRAID
|
||||
exclua automaticamente esse diretório das suas próprias verificações,
|
||||
ferramentas externas de cópia de segurança ou de sincronização irão
|
||||
encontrá\-lo. Se não for excluído, podem atravessar os instantâneos ou
|
||||
ligações de diretório e copiar toda a árvore de dados congelada, duplicando
|
||||
dados e esgotando o armazenamento de backup. Configure sempre as
|
||||
ferramentas de cópia de segurança externas para excluir o diretório
|
||||
\`.snapraid/\`.
|
||||
.PP
|
||||
No ZFS, os instantâneos são expostos através do diretório virtual padrão
|
||||
\`.zfs/snapshot/\` em vez de \`.snapraid/\`. Por predefinição (\`snapdir=hidden\`),
|
||||
o ZFS oculta esse diretório das listagens, de modo que ferramentas externas
|
||||
de cópia de segurança não o percorrem. Se tiver ativado \`snapdir=visible\`,
|
||||
certifique\-se de que as suas ferramentas de cópia de segurança excluem o
|
||||
diretório \`.zfs/\`.
|
||||
.SH PADRãO (PATTERN)
|
||||
Os padrões fornecem uma maneira flexível de filtrar arquivos para inclusão ou
|
||||
exclusão. Ao usar caracteres de globbing, você pode definir regras que
|
||||
|
|
@ -1810,18 +2040,19 @@ barra invertida, tornando\-o adequado para correspondência dentro de um único
|
|||
componente de caminho. Este é o comportamento padrão de curinga familiar do
|
||||
globbing de shell.
|
||||
.PP
|
||||
O asterisco duplo \`**\` é mais poderoso, ele corresponde a qualquer sequência de
|
||||
caracteres, incluindo separadores de diretórios. Isso permite que os padrões correspondam
|
||||
em vários níveis de diretório. Quando o \`**\` aparece incorporado diretamente em
|
||||
um padrão, ele pode corresponder a zero ou mais caracteres, incluindo barras entre
|
||||
o texto literal circundante.
|
||||
O curinga de asterisco duplo \`**\` corresponde através de separadores de
|
||||
diretório apenas quando for adjacente a um separador de diretório (precedido
|
||||
ou seguido por uma barra). Nessa forma, ele corresponde a zero ou mais
|
||||
caracteres através de níveis de diretório. Por exemplo, \`foo/**/bar\`
|
||||
corresponde a \`foo/bar\`, \`foo/a/bar\` e \`foo/a/b/bar\`; \`**/build\` corresponde a
|
||||
\`build\` e \`foo/bar/build\`; e \`src/**.js\` corresponde a \`src/main.js\` e
|
||||
\`src/ui/components/main.js\`.
|
||||
A forma avulsa \`/**/\` não é aceita como um padrão completo.
|
||||
.PP
|
||||
O uso mais importante do \`**\` é na forma especial \`/**/\`. Isso corresponde a
|
||||
zero ou mais níveis de diretório completos, tornando possível corresponder arquivos
|
||||
em qualquer profundidade em uma árvore de diretórios sem conhecer a estrutura exata do caminho.
|
||||
Por exemplo, o padrão \`src/**/main.js\` corresponde a \`src/main.js\` (pulando
|
||||
zero diretórios), \`src/ui/main.js\` (pulando um diretório) e
|
||||
\`src/ui/components/main.js\` (pulando dois diretórios).
|
||||
Quando \`**\` não for adjacente a uma barra, ele se comporta como \`*\` e não
|
||||
corresponde a separadores de diretório. Por exemplo, \`**.jpg\` corresponde a
|
||||
\`photo.jpg\` no diretório atual, mas não corresponde a \`dir/photo.jpg\`. Use
|
||||
\`**/*.jpg\` para essa finalidade.
|
||||
.PP
|
||||
Classes de caracteres usando colchetes \`[]\` correspondem a um único caractere de um
|
||||
conjunto ou intervalo especificado. Como os outros padrões de caractere único, elas
|
||||
|
|
@ -1830,8 +2061,8 @@ um ponto de exclamação.
|
|||
.PP
|
||||
A distinção fundamental a ser lembrada é que \`*\`, \`?\` e classes de caracteres
|
||||
respeitam os limites do diretório e correspondem apenas dentro de um único
|
||||
componente de caminho, enquanto \`**\` é o único padrão que pode corresponder através de
|
||||
separadores de diretório.
|
||||
componente de caminho, enquanto \`**\` só pode corresponder através de separadores
|
||||
de diretório quando for adjacente a uma barra.
|
||||
.PP
|
||||
Existem quatro tipos diferentes de padrões:
|
||||
.TP
|
||||
|
|
@ -1957,6 +2188,46 @@ include /pictures/
|
|||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Observe que a exclusão de um diretório (usando DIR/ ou /CAMINHO/DIR/)
|
||||
impede que o SnapRAID entre e examine esse diretório. Consequentemente,
|
||||
não é possível reincluir um arquivo ou subdiretório localizado dentro
|
||||
de um diretório pai excluído, porque o verificador nunca entra nele.
|
||||
.PP
|
||||
Por exemplo, a seguinte configuração NÃO incluirá \`file.dat\` porque
|
||||
\`/keep/\` é podado antes que \`file.dat\` possa ser examinado:
|
||||
.PP
|
||||
.RS 4
|
||||
# NÃO funciona: /keep/ é ignorado completamente
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Para excluir arquivos dentro de um diretório mantendo arquivos específicos,
|
||||
aplique o padrão aos arquivos dentro do diretório em vez de excluir o
|
||||
próprio diretório:
|
||||
.PP
|
||||
.RS 4
|
||||
# Funciona: /keep/ é percorrido, mas os outros arquivos nele são excluídos
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
include /keep/file.dat
|
||||
.PD 0
|
||||
.PP
|
||||
.PD
|
||||
exclude /keep/*
|
||||
.PD 0
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
Na linha de comando, usando a opção \-f, você pode usar apenas padrões \`include\`.
|
||||
Por exemplo:
|
||||
.PP
|
||||
|
|
@ -1975,7 +2246,7 @@ snapraid \-f \[dq]*.mp3\[dq] check
|
|||
.RE
|
||||
.PP
|
||||
No Unix, ao usar caracteres globbing na linha de comando, você deve
|
||||
citá\-los para evitar que o shell os expanda.
|
||||
colocá\-los entre aspas para evitar que o shell os expanda.
|
||||
.SH IGNORAR ARQUIVOS (IGNORE FILE)
|
||||
Além das regras globais no arquivo de configuração, você pode colocar
|
||||
arquivos \`.snapraidignore\` em qualquer diretório dentro do array para definir
|
||||
|
|
@ -2042,8 +2313,10 @@ SnapRAID armazena a lista e os checksums de seus arquivos no arquivo content.
|
|||
É um arquivo binário que lista todos os arquivos presentes em seu array
|
||||
de discos, juntamente com todos os checksums para verificar sua integridade.
|
||||
.PP
|
||||
Este arquivo é lido e escrito pelos comandos \`sync\` e \`scrub\` e
|
||||
lido pelos comandos \`fix\`, \`check\` e \`status\`.
|
||||
O arquivo content é lido e escrito pelos comandos \`sync\`, \`scrub\`,
|
||||
\`touch\` e \`rehash\`. É lido pelos comandos \`status\`, \`diff\`, \`check\`,
|
||||
\`fix\`, \`list\`, \`dup\`, \`locate\` e \`pool\`, e é completamente ignorado
|
||||
pelos comandos \`smart\`, \`probe\`, \`up\`, \`down\` e \`devices\`.
|
||||
.SH PARIDADE (PARITY)
|
||||
SnapRAID armazena as informações de paridade do seu array nos arquivos parity.
|
||||
.PP
|
||||
|
|
@ -2065,7 +2338,204 @@ e usar uma fonte TrueType como \`Lucida Console\` como fonte do console.
|
|||
Isso afeta apenas os nomes de arquivo impressos; se você
|
||||
redirecionar a saída do console para um arquivo, o arquivo resultante
|
||||
estará sempre no formato UTF\-8.
|
||||
.SH CóDIGO DE SAíDA (EXIT CODE)
|
||||
O SnapRAID termina com os seguintes códigos de erro:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I 0
|
||||
Tudo OK.
|
||||
.HP 4
|
||||
.I 1
|
||||
O comando encontrou alguns erros.
|
||||
.HP 4
|
||||
.I 2
|
||||
O comando \`diff\` determinou que tudo está OK, mas é necessário um \`sync\`.
|
||||
.HP 4
|
||||
.I 3
|
||||
Um comando de dispositivo de disco (\`probe\`, \`smart\`, \`devices\`, \`up\`,
|
||||
\`down\`) foi concluído, mas pelo menos um sistema de arquivos está operando
|
||||
em modo degradado com dispositivo(s) ausente(s).
|
||||
.PD
|
||||
.RE
|
||||
.SH PROBLEMAS CONHECIDOS (KNOWN ISSUES)
|
||||
.SS Limites do sistema de arquivos
|
||||
O SnapRAID não cruza limites de sistema de arquivos, pontos de montagem ou
|
||||
subvolumes ao verificar um disco de dados. Quando tal limite é detectado,
|
||||
o SnapRAID relata um AVISO e não verifica além dele.
|
||||
.PP
|
||||
Arquivos localizados além desses limites não são incluídos no disco de
|
||||
dados e devem ser configurados separadamente se precisarem ser protegidos.
|
||||
.SS Pontos de montagem com instantâneos do sistema de arquivos
|
||||
Quando os instantâneos do sistema de arquivos estão ativados, pontos de
|
||||
montagem aninhados e montagens bind dentro de um disco de dados não são
|
||||
suportados.
|
||||
.PP
|
||||
Os pontos de montagem fazem parte do namespace de montagem do sistema ativo
|
||||
e não são preservados em instantâneos do sistema de arquivos. Consequentemente,
|
||||
ao verificar um instantâneo, um diretório oculto por um ponto de montagem no
|
||||
sistema de arquivos ativo pode se tornar visível.
|
||||
.PP
|
||||
Não coloque pontos de montagem aninhados ou montagens bind dentro de discos
|
||||
de dados quando os instantâneos do sistema de arquivos estiverem ativados.
|
||||
.SS Múltiplas configurações com instantâneos do sistema de arquivos
|
||||
O suporte a instantâneos não pode ser compartilhado com segurança por
|
||||
múltiplas configurações independentes do SnapRAID que usem o mesmo
|
||||
namespace de instantâneos do sistema de arquivos.
|
||||
.PP
|
||||
No Btrfs e Bcachefs, apenas uma configuração do SnapRAID com suporte a
|
||||
instantâneos ativado pode usar diretórios de dados dentro do mesmo
|
||||
subvolume. No ZFS, a mesma restrição se aplica a um dataset, e no NTFS
|
||||
a um volume.
|
||||
.PP
|
||||
Múltiplas configurações que compartilham o mesmo namespace de instantâneos
|
||||
usam os mesmos instantâneos \`stable\`, \`pending\` e \`scan\`. A execução de uma
|
||||
configuração pode, portanto, substituir ou excluir instantâneos de
|
||||
recuperação necessários para outra.
|
||||
.SS Modificações de arquivo no local sem alteração de data/hora
|
||||
O SnapRAID detecta modificações em arquivos comparando tamanhos de arquivo e
|
||||
carimbos de data/hora de modificação (mtime).
|
||||
.PP
|
||||
Se um aplicativo modificar um arquivo no local sem alterar seu tamanho nem
|
||||
atualizar seu carimbo de data/hora de modificação, o \[dq]diff\[dq] e o \[dq]sync\[dq] não
|
||||
detectarão que o arquivo foi alterado e sua paridade não será atualizada.
|
||||
.PP
|
||||
Para garantir que o SnapRAID reconheça essas alterações, atualize o carimbo
|
||||
de data/hora de modificação do arquivo (por exemplo, com o utilitário \[dq]touch\[dq]).
|
||||
Caso contrário, a diferença só será detectada como uma incompatibilidade de
|
||||
hash durante um \[dq]scrub\[dq] ou \[dq]check\[dq] subsequente.
|
||||
.SS Correspondência de maiúsculas/minúsculas não\-ASCII no Windows
|
||||
O SnapRAID utiliza codificação UTF\-8 padrão e previsível em todas as plataformas,
|
||||
limitando a correspondência insensível a maiúsculas e minúsculas a caracteres
|
||||
ASCII.
|
||||
.PP
|
||||
Os sistemas de arquivos do Windows sofrem com o design legado de forçar a
|
||||
insensibilidade a maiúsculas e minúsculas em nomes de arquivo Unicode por meio
|
||||
de tabelas de conversão arbitrárias e dependentes do sistema. Consequentemente,
|
||||
o Windows oculta a realidade do sistema de arquivos ao tratar sequências de bytes
|
||||
Unicode completamente diferentes como se fossem o mesmo arquivo.
|
||||
.PP
|
||||
Por exemplo, \`À.txt\` e \`à.txt\` são nomes Unicode distintos, mas o Windows os
|
||||
trata ilogicamente como idênticos, enquanto o SnapRAID preserva sua verdadeira
|
||||
distinção.
|
||||
.PP
|
||||
Essa limitação é causada pelo tratamento inconsistente de nomes de arquivo
|
||||
Unicode pelo Windows e por sua insistência no uso de aliases sem diferenciação de
|
||||
maiúsculas/minúsculas. Para evitar discrepâncias decorrentes da conversão do
|
||||
Windows, sempre especifique a combinação exata de maiúsculas e minúsculas para
|
||||
caracteres não\-ASCII em caminhos de configuração e filtros.
|
||||
.SS Recuperação com fix parcial
|
||||
Quando o \`fix\` é restrito usando \`\-S, \-\-start\` ou \`\-B, \-\-count\`,
|
||||
o SnapRAID opera apenas nos blocos selecionados e não realiza a
|
||||
finalização em nível de arquivo nem a quarentena.
|
||||
.PP
|
||||
Se a recuperação produzir dados de melhor esforço (best\-effort) que não
|
||||
possam ser comprovados como representativos do conteúdo atual, esses
|
||||
blocos ainda poderão ser gravados com o nome de arquivo normal. A incerteza
|
||||
associada a esses blocos recuperados não persiste após o término do comando.
|
||||
.PP
|
||||
Como consequência, um \`fix\` posterior tratará esses blocos legíveis como
|
||||
dados de arquivo válidos e não tentará recuperá\-los novamente. Isso pode
|
||||
fazer com que uma recuperação posterior relate sucesso, deixando dados
|
||||
incompletos ou obsoletos no arquivo.
|
||||
.PP
|
||||
As opções \`\-S\` e \`\-B\` destinam\-se apenas à recuperação manual avançada,
|
||||
normalmente após a falha de um \`fix\` normal. Se um \`fix\` parcial relatar
|
||||
dados irrecuperáveis, remova ou renomeie os arquivos afetados antes de tentar
|
||||
outra recuperação, ou verifique manualmente seu conteúdo.
|
||||
.SS Links físicos no NTFS e caminhos excluídos
|
||||
No NTFS, as entradas de diretório armazenam em cache o tamanho do arquivo
|
||||
e os registros de data/hora de forma independente para cada link físico.
|
||||
Quando um arquivo é modificado por meio de um link, as entradas de diretório
|
||||
de outros links que apontam para o mesmo arquivo podem reter metadados
|
||||
obsoletos até que sejam acessadas.
|
||||
.PP
|
||||
O SnapRAID detecta e normaliza automaticamente essa condição sempre que
|
||||
pelo menos dois links físicos para o mesmo arquivo são encontrados durante
|
||||
uma verificação. No entanto, se apenas um link físico for verificado
|
||||
enquanto os outros forem excluídos por filtros ou residirem fora do caminho
|
||||
do disco de dados, o SnapRAID não conseguirá detectar a colisão de inodes e
|
||||
dependerá dos metadados em cache do único link visível.
|
||||
.PP
|
||||
Consequentemente, modificações feitas por meio de um link físico excluído
|
||||
ou externo podem passar despercebidas pelo SnapRAID até que os metadados do
|
||||
link incluído sejam atualizados pelo sistema operacional (como quando o
|
||||
arquivo é acessado ou aberto por meio desse caminho).
|
||||
.PP
|
||||
Para evitar essa limitação, evite modificar arquivos protegidos por meio
|
||||
de links físicos excluídos do SnapRAID, ou certifique\-se de que todos os
|
||||
links físicos de um arquivo sejam incluídos na verificação para que o
|
||||
SnapRAID possa normalizá\-los.
|
||||
.SS Recuperação após uma sincronização de multiparidade interrompida
|
||||
Em uma matriz com múltiplos discos de paridade, um \`sync\` interrompido
|
||||
pode deixar os níveis de paridade temporariamente fora de sincronia entre
|
||||
si. Por exemplo, a paridade 1 já pode conter dados recém\-atualizados,
|
||||
enquanto a paridade 2 ainda contém os dados antigos.
|
||||
.PP
|
||||
Durante \`check\` ou \`fix\`, o SnapRAID testa diferentes combinações de
|
||||
paridade e valida os dados reconstruídos em relação aos hashes de bloco
|
||||
conhecidos (cobrindo o bloco completo, normalmente 256 KiB).
|
||||
.PP
|
||||
Se o SnapRAID tentar uma reconstrução usando uma combinação inconsistente
|
||||
de paridade antiga e nova, as equações lineares de RAID produzirão dados
|
||||
incorretos. Para que essa combinação inválida seja aceita por engano,
|
||||
as equações teriam que reconstruir acidentalmente pelo menos um bloco
|
||||
completo de 256 KiB de maneira tão perfeita que seu hash corresponda,
|
||||
enquanto outros blocos não sincronizados na mesma faixa são reconstruídos
|
||||
com dados incorretos.
|
||||
.PP
|
||||
Esse cenário não depende de uma colisão de hash; em vez disso, as próprias
|
||||
equações de paridade mista teriam que gerar coincidentemente o conteúdo
|
||||
exato do bloco de 256 KiB original. Embora seja matematicamente concebível
|
||||
com dados especialmente preparados ou altamente repetitivos, é
|
||||
praticamente impossível com dados reais.
|
||||
.PP
|
||||
Se todos os discos estiverem íntegros, concluir o \`sync\` interrompido
|
||||
antes de fazer novas alterações remove essa ambiguidade. Se um disco tiver
|
||||
falhado e a recuperação for necessária, evite modificar os discos de dados
|
||||
antes de executar \`check\` ou \`fix\`.
|
||||
.SS Nomes reservados de arquivos e diretórios
|
||||
O SnapRAID reserva alguns nomes de arquivos, diretórios e snapshots para
|
||||
suas operações internas. Não use esses nomes para dados do usuário:
|
||||
.RS 0
|
||||
.PD 0
|
||||
.HP 4
|
||||
.I .snapraidignore
|
||||
Arquivo local de regras de exclusão.
|
||||
.HP 4
|
||||
.I .snapraid
|
||||
Diretório contêiner de snapshots.
|
||||
.HP 4
|
||||
.I snapraid\-*
|
||||
Nomes de snapshots ZFS gerenciados pelo SnapRAID.
|
||||
.HP 4
|
||||
.I *.unrecoverable
|
||||
Arquivos danificados colocados em quarentena durante
|
||||
a recuperação.
|
||||
.HP 4
|
||||
.I CONTENT.tmp
|
||||
Arquivo temporário para atualizações do content.
|
||||
.HP 4
|
||||
.I CONTENT.lock
|
||||
Arquivo de bloqueio do content.
|
||||
.HP 4
|
||||
.I PARITY.spaceholder
|
||||
Arquivo temporário de reserva de espaço durante a
|
||||
alocação de paridade no Windows.
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
O uso desses nomes para dados não relacionados pode fazer com que arquivos ou
|
||||
snapshots sejam ignorados, interpretados incorretamente como metadados,
|
||||
sobrescritos, renomeados ou excluídos.
|
||||
.PP
|
||||
No Windows, todas as variações de maiúsculas e minúsculas também são reservadas,
|
||||
mesmo em diretórios NTFS configurados para diferenciar maiúsculas de minúsculas
|
||||
(por exemplo, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP e CONTENT.Lock).
|
||||
.SH TRADUçãO (TRANSLATION)
|
||||
Este documento é uma tradução automática do manual em inglês.
|
||||
Consulte o manual em inglês para a versão oficial.
|
||||
.SH DIREITOS AUTORAIS (COPYRIGHT)
|
||||
Este arquivo é Copyright (C) 2025 Andrea Mazzoleni
|
||||
Este arquivo é Copyright (C) 2026 Andrea Mazzoleni
|
||||
.SH VEJA TAMBéM (SEE ALSO)
|
||||
snapraid_log(1), snapraidd(1)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Name{number}
|
||||
snapraid - SnapRAID Backup para Arrays de Disco
|
||||
|
||||
Sinopse
|
||||
Sinopse (Synopsis)
|
||||
:snapraid [-c, --conf CONFIG]
|
||||
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
|
||||
: [-m, --filter-missing] [-e, --filter-error]
|
||||
|
|
@ -23,7 +23,7 @@ Sinopse
|
|||
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Descrição
|
||||
Descrição (Description)
|
||||
SnapRAID é um programa de backup projetado para arrays de disco,
|
||||
armazenando informações de paridade para recuperação de dados no
|
||||
caso de até seis falhas de disco.
|
||||
|
|
@ -51,22 +51,31 @@ Descrição
|
|||
|
||||
:https://www.snapraid.it/
|
||||
|
||||
Limitações
|
||||
SnapRAID é um híbrido entre um programa RAID e um programa de backup,
|
||||
visando combinar os melhores benefícios de ambos. No entanto, ele tem
|
||||
algumas limitações que você deve considerar antes de usá-lo.
|
||||
Limitações (Limitations)
|
||||
O SnapRAID é um híbrido entre um RAID e um programa de backup, com o objetivo de combinar
|
||||
os melhores benefícios de ambos. No entanto, possui algumas limitações que deve
|
||||
considerar antes de o utilizar.
|
||||
|
||||
A principal limitação é que, se um disco falhar e você não tiver
|
||||
sincronizado recentemente, talvez não consiga recuperar totalmente.
|
||||
Mais especificamente, você pode não conseguir recuperar até o tamanho dos
|
||||
arquivos alterados ou excluídos desde a última operação de sincronização.
|
||||
Isso ocorre mesmo que os arquivos alterados ou excluídos não estejam no
|
||||
disco com falha. É por isso que o SnapRAID é mais adequado para
|
||||
dados que raramente mudam.
|
||||
A principal limitação é que, se um disco falhar, apenas poderá recuperar dados até ao
|
||||
estado da última operação de sincronização (`sync`). Quaisquer dados adicionados ou modificações feitas
|
||||
desde a última sincronização que estejam localizados no disco com falha serão perdidos.
|
||||
|
||||
Por outro lado, arquivos recém-adicionados não impedem a recuperação de
|
||||
arquivos já existentes. Você perderá apenas os arquivos adicionados
|
||||
recentemente se estiverem no disco com falha.
|
||||
Consequentemente, o SnapRAID é adequado principalmente para dados que raramente mudam.
|
||||
|
||||
Para dados que já existiam na última sincronização, a fiabilidade da recuperação depende
|
||||
de a opção `snapshot` ser ou não utilizada:
|
||||
|
||||
* Com suporte a instantâneos (disponível em Btrfs, ZFS, Bcachefs e NTFS),
|
||||
o SnapRAID pode manter automaticamente uma referência congelada
|
||||
independente de cada sistema de arquivos de dados suportado.
|
||||
Isso garante que, mesmo que modifique ou exclua arquivos no seu sistema de arquivos ativo
|
||||
durante ou após uma sincronização, o processo de recuperação permanece consistente e confiável.
|
||||
|
||||
* Sem suporte a instantâneos, excluir ou alterar arquivos após um `sync`
|
||||
pode impedir a recuperação total de outros discos com falha. Isso ocorre
|
||||
porque a paridade já não corresponde aos arquivos modificados, mesmo que
|
||||
esses arquivos não estejam no disco com falha. Por outro lado, arquivos adicionados recentemente
|
||||
não impedem a recuperação de arquivos já existentes.
|
||||
|
||||
Outras limitações do SnapRAID são:
|
||||
|
||||
|
|
@ -82,7 +91,7 @@ Limitações
|
|||
* Apenas nomes de arquivos, carimbos de data/hora, symlinks e hardlinks
|
||||
são salvos. Permissões, propriedade e atributos estendidos não são salvos.
|
||||
|
||||
Primeiros Passos
|
||||
Primeiros Passos (Getting Started)
|
||||
Para usar o SnapRAID, você precisa primeiro selecionar um disco em seu array
|
||||
de discos para dedicar às informações de `parity` (paridade). Com um
|
||||
disco para paridade, você poderá recuperar de uma única falha de disco,
|
||||
|
|
@ -165,7 +174,7 @@ Primeiros Passos
|
|||
Agora você pode começar a usar seu array como quiser e periodicamente
|
||||
atualizar as informações de paridade executando o comando `sync`.
|
||||
|
||||
Scrubbing
|
||||
Scrubbing (Scrubbing)
|
||||
Para verificar periodicamente os dados e a paridade em busca de erros,
|
||||
você pode executar o comando `scrub`.
|
||||
|
||||
|
|
@ -204,10 +213,10 @@ Primeiros Passos
|
|||
arquivos removidos ou modificados. Esses erros são relatados na saída de `scrub`,
|
||||
mas os blocos relacionados não são marcados como ruins.
|
||||
|
||||
Pooling
|
||||
Pooling (Pooling)
|
||||
Nota: O recurso de pooling descrito abaixo foi substituído pela ferramenta
|
||||
mergerfs, que agora é a opção recomendada para usuários Linux na comunidade
|
||||
SnapRAID. Mergefs oferece uma maneira mais flexível e eficiente de agrupar
|
||||
SnapRAID. Mergerfs oferece uma maneira mais flexível e eficiente de agrupar
|
||||
várias unidades em um único ponto de montagem unificado, permitindo acesso
|
||||
perfeito a arquivos em todo o seu array sem depender de links simbólicos.
|
||||
Ele se integra bem ao SnapRAID para proteção de paridade e é comumente usado
|
||||
|
|
@ -300,13 +309,15 @@ Primeiros Passos
|
|||
|
||||
:snapraid fix -m
|
||||
|
||||
Recuperando
|
||||
Recuperação (Recovering)
|
||||
O pior aconteceu e você perdeu um ou mais discos!
|
||||
|
||||
NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los!
|
||||
|
||||
A primeira coisa que você deve fazer é evitar mais alterações em seu array
|
||||
de discos. Desabilite quaisquer conexões remotas a ele e quaisquer
|
||||
Antes de fazer qualquer outra coisa, evite fazer qualquer alteração em seu
|
||||
array de discos, pois modificar ou excluir dados nos discos restantes pode
|
||||
tornar a recuperação impossível.
|
||||
Desabilite quaisquer conexões remotas a ele e quaisquer
|
||||
processos agendados, incluindo qualquer sincronização noturna ou scrub
|
||||
agendado do SnapRAID.
|
||||
|
||||
|
|
@ -359,7 +370,7 @@ Primeiros Passos
|
|||
Se você não estiver satisfeito com a recuperação, pode tentar novamente
|
||||
quantas vezes quiser.
|
||||
|
||||
Por exemplo, se você removeu arquivos do array após a última
|
||||
Por exemplo, se você removeu arquivos do array após o último
|
||||
`sync`, isso pode resultar em alguns arquivos não sendo recuperados.
|
||||
Neste caso, você pode tentar novamente o `fix` usando a opção -i, --import,
|
||||
especificando onde esses arquivos estão agora para incluí-los novamente
|
||||
|
|
@ -390,14 +401,14 @@ Primeiros Passos
|
|||
|
||||
Se tudo for recuperado, este comando é imediato.
|
||||
|
||||
Comandos
|
||||
SnapRAID fornece alguns comandos simples que permitem a você:
|
||||
Comandos (Commands)
|
||||
O SnapRAID fornece alguns comandos simples que lhe permitem:
|
||||
|
||||
* Imprimir o status do array -> `status`
|
||||
* Imprimir o estado do array -> `status`
|
||||
* Controlar os discos -> `smart`, `probe`, `up`, `down`
|
||||
* Fazer um backup/snapshot -> `sync`
|
||||
* Criar um ponto de backup/recuperação -> `sync`
|
||||
* Verificar periodicamente os dados -> `scrub`
|
||||
* Restaurar o último backup/snapshot -> `fix`.
|
||||
* Restaurar o último ponto de backup/recuperação -> `fix`.
|
||||
|
||||
Os comandos devem ser escritos em letras minúsculas.
|
||||
|
||||
|
|
@ -509,9 +520,10 @@ Comandos
|
|||
removed - Arquivos removidos.
|
||||
updated - Arquivos com tamanho ou carimbo de data/hora diferente,
|
||||
o que significa que foram modificados.
|
||||
moved - Arquivos movidos para um diretório diferente no mesmo disco.
|
||||
Eles são identificados por terem o mesmo nome, tamanho,
|
||||
carimbo de data/hora e inode, mas um diretório diferente.
|
||||
moved - Arquivos movidos ou renomeados no mesmo disco, mantendo
|
||||
o mesmo inode. Eles são identificados por terem o mesmo inode,
|
||||
tamanho e carimbo de data/hora, mas um caminho diferente. O nome
|
||||
do arquivo também pode ser diferente.
|
||||
copied - Arquivos copiados no mesmo disco ou em um disco
|
||||
diferente onde o arquivo original ainda existe.
|
||||
Eles são identificados por terem o mesmo nome, tamanho e
|
||||
|
|
@ -519,19 +531,18 @@ Comandos
|
|||
Se o carimbo de data/hora de subsegundos for zero, o caminho
|
||||
completo deve corresponder para ser identificado, não apenas
|
||||
o nome.
|
||||
relocated - Arquivos movidos no mesmo disco ou em um disco
|
||||
diferente onde o original desapareceu.
|
||||
Eles são identificados por terem o mesmo nome, tamanho e
|
||||
carimbo de data/hora.
|
||||
Se o carimbo de data/hora de subsegundos for zero, o caminho
|
||||
completo deve corresponder para ser identificado.
|
||||
Ao contrário dos arquivos 'moved' no mesmo disco, os arquivos
|
||||
realocados têm um inode diferente.
|
||||
relocated - Arquivos movidos para um diretório ou disco diferente onde
|
||||
o arquivo original desapareceu e o inode não é mantido.
|
||||
Eles são identificados por terem o mesmo nome, tamanho e carimbo
|
||||
de data/hora. Se o carimbo de data/hora de subsegundos for zero, o
|
||||
caminho completo deve corresponder para ser identificado. Ao
|
||||
contrário dos arquivos 'moved', os arquivos relocados exigem que
|
||||
o nome do arquivo permaneça o mesmo.
|
||||
restored - Arquivos com um inode diferente, mas com diretório,
|
||||
nome, tamanho e carimbo de data/hora correspondentes.
|
||||
Geralmente são arquivos restaurados após serem excluídos.
|
||||
|
||||
Se uma `sync` for necessária, o código de retorno do processo é 2,
|
||||
Se um `sync` for necessário, o código de retorno do processo é 2,
|
||||
em vez do padrão 0. O código de retorno 1 é usado para uma condição
|
||||
de erro genérica.
|
||||
|
||||
|
|
@ -610,13 +621,12 @@ Comandos
|
|||
fix
|
||||
Corrige todos os arquivos e os dados de paridade.
|
||||
|
||||
Todos os arquivos e dados de paridade são comparados com o estado de
|
||||
snapshot salvo na última `sync`.
|
||||
Se uma diferença for encontrada, ela é revertida para o snapshot armazenado.
|
||||
Todos os arquivos e dados de paridade são comparados com o estado salvo no
|
||||
último `sync`. Se for encontrada uma diferença, esta é revertida para o estado armazenado.
|
||||
|
||||
ATENÇÃO! O comando `fix` não diferencia entre erros e modificações
|
||||
intencionais. Ele reverte incondicionalmente o estado do arquivo
|
||||
para a última `sync`.
|
||||
AVISO!
|
||||
O comando `fix` não diferencia erros de modificações intencionais.
|
||||
Reverte incondicionalmente o estado do arquivo para o do último `sync`.
|
||||
|
||||
Se nenhuma outra opção for especificada, todo o array é processado.
|
||||
Use as opções de filtro para selecionar um subconjunto de arquivos ou
|
||||
|
|
@ -625,13 +635,13 @@ Comandos
|
|||
Para corrigir apenas os blocos marcados como ruins durante `sync` e `scrub`,
|
||||
use a opção -e, --filter-error.
|
||||
Ao contrário de outras opções de filtro, esta aplica correções apenas a
|
||||
arquivos que não foram alterados desde a última `sync`.
|
||||
arquivos que não foram alterados desde o último `sync`.
|
||||
|
||||
O SnapRAID renomeia todos os arquivos que não podem ser corrigidos adicionando
|
||||
a extensão `.unrecoverable`.
|
||||
|
||||
Antes de corrigir, todo o array é escaneado para encontrar quaisquer
|
||||
arquivos movidos desde a última operação `sync`.
|
||||
arquivos movidos desde a última operação de `sync`.
|
||||
Esses arquivos são identificados por seu carimbo de data/hora, ignorando
|
||||
seu nome e diretório, e são usados no processo de recuperação, se
|
||||
necessário.
|
||||
|
|
@ -756,7 +766,7 @@ Comandos
|
|||
Esteja ciente de que tais arquivos não estarão protegidos pela paridade durante
|
||||
o processo de realocação.
|
||||
|
||||
Opções
|
||||
Opções (Options)
|
||||
SnapRAID fornece as seguintes opções:
|
||||
|
||||
-c, --conf CONFIG
|
||||
|
|
@ -831,9 +841,9 @@ Opções
|
|||
Esta opção pode ser usada apenas com `check`.
|
||||
|
||||
-h, --pre-hash
|
||||
Em `sync`, executa uma fase de hash preliminar de todos os novos dados
|
||||
Em `sync`, executa uma fase de hash prexcluir de todos os novos dados
|
||||
para verificação adicional antes do cálculo da paridade.
|
||||
Normalmente, em `sync`, nenhum hash preliminar é feito, e os novos
|
||||
Normalmente, em `sync`, nenhum hash prexcluir é feito, e os novos
|
||||
dados são hashados logo antes do cálculo da paridade, quando são lidos
|
||||
pela primeira vez.
|
||||
Este processo ocorre quando o sistema está sob
|
||||
|
|
@ -870,7 +880,7 @@ Opções
|
|||
RATE é o número de bytes por segundo. Você pode especificar um
|
||||
multiplicador como K, M ou G (por exemplo, --bw-limit 1G).
|
||||
|
||||
-t, --tail TAMANHO
|
||||
-t, --tail SIZE
|
||||
Limita a listagem de arquivos àqueles que não usam mais do que o
|
||||
tamanho final especificado dos discos de paridade.
|
||||
Você pode usar multiplicadores como K, M, G ou T (ex: --tail 1G).
|
||||
|
|
@ -976,9 +986,9 @@ Opções
|
|||
recomendado não usá-la.
|
||||
Você NÃO tem proteção de dados durante a operação `sync`.
|
||||
|
||||
-W, --force-realloc-tail TAMANHO
|
||||
-W, --force-realloc-tail SIZE
|
||||
Funciona como -R, --force-realloc, mas limitado à parte final
|
||||
especificada (últimos TAMANHO bytes) de cada arquivo de paridade.
|
||||
especificada (últimos SIZE bytes) de cada arquivo de paridade.
|
||||
Força a realocação (movimentação) de quaisquer fragmentos/blocos de arquivos
|
||||
atualmente armazenados nessa seção final, permitindo que sejam colocados
|
||||
em qualquer lugar no(s) arquivo(s) de paridade onde houver espaço livre
|
||||
|
|
@ -992,10 +1002,9 @@ Opções
|
|||
--force-realloc-tail 1G).
|
||||
Você pode usar locate -t, --tail para saber antecipadamente os
|
||||
arquivos afetados.
|
||||
AVISO!
|
||||
Esta opção é apenas para especialistas e é altamente recomendado
|
||||
não utilizá-la.
|
||||
Você NÃO terá proteção de datos durante a operação `sync` para os
|
||||
ATENÇÃO! Esta opção é apenas para especialistas e é altamente
|
||||
recomendado não usá-la.
|
||||
Você NÃO tem proteção de dados durante a operação `sync` para os
|
||||
arquivos afetados.
|
||||
|
||||
-l, --log FILE
|
||||
|
|
@ -1030,11 +1039,13 @@ Opções
|
|||
Começa o processamento a partir do número de bloco
|
||||
especificado. Isso pode ser útil para tentar verificar
|
||||
ou corrigir blocos específicos em caso de um disco danificado.
|
||||
Esta opção é principalmente para recuperação manual avançada.
|
||||
Esta opção é principalmente para recuperação manual avançada
|
||||
e é suportada apenas por `check` e `fix`.
|
||||
|
||||
-B, --count BLKCOUNT
|
||||
Processa apenas o número especificado de blocos.
|
||||
Esta opção é principalmente para recuperação manual avançada.
|
||||
Esta opção é principalmente para recuperação manual avançada
|
||||
e é suportada apenas por `check` e `fix`.
|
||||
|
||||
-C, --gen-conf CONTENT
|
||||
Gera um arquivo de configuração dummy a partir de um arquivo
|
||||
|
|
@ -1065,7 +1076,7 @@ Opções
|
|||
-V, --version
|
||||
Imprime a versão do programa.
|
||||
|
||||
Configuração
|
||||
Configuração (Configuration)
|
||||
SnapRAID requer um arquivo de configuração para saber onde seu array
|
||||
de discos está localizado e onde armazenar as informações de paridade.
|
||||
|
||||
|
|
@ -1158,6 +1169,11 @@ Configuração
|
|||
Você pode alterar o ponto de montagem conforme necessário, desde que
|
||||
mantenha o NAME fixo.
|
||||
|
||||
No entanto, o caminho configurado deve apontar consistentemente para os
|
||||
mesmos dados subjacentes. Se o caminho contiver links simbólicos,
|
||||
seus destinos devem permanecer estáveis. A alteração desses links simbólicos
|
||||
para alternar o diretório de dados em tempo real não é suportada.
|
||||
|
||||
Você deve usar uma opção para cada disco de dados no array.
|
||||
|
||||
Você pode renomear um disco mais tarde alterando o NAME diretamente
|
||||
|
|
@ -1169,13 +1185,39 @@ Configuração
|
|||
Define o nome e o ponto de montagem de discos adicionais para
|
||||
monitorar com os comandos `smart` e `probe`.
|
||||
|
||||
Isso é útil para monitorar discos que não fazem parte da matriz,
|
||||
Isso é útil para monitorar discos que não fazem parte do array,
|
||||
mas que são necessários para o funcionamento do sistema, como o
|
||||
disco de inicialização.
|
||||
|
||||
Observe que tais discos não são afetados pelos comandos `up` e `down`
|
||||
porque se espera que estejam sempre girando.
|
||||
|
||||
snapshot
|
||||
Ativa o uso de instantâneos (snapshots) do sistema de arquivos para os comandos `sync`, `scrub`,
|
||||
`check` e `fix`.
|
||||
|
||||
Quando ativado, o SnapRAID cria um instantâneo de somente leitura de cada
|
||||
sistema de arquivos de dados suportado no início de um 'sync'. Isso fornece uma visão
|
||||
estável de cada sistema de arquivos, evitando que modificações posteriores alterem os
|
||||
dados utilizados para o cálculo da paridade.
|
||||
|
||||
Isso melhora significativamente a recuperação: se um arquivo for excluído do sistema de arquivos ativo,
|
||||
ele permanece preservado no instantâneo. Isso evita que a paridade fique "corrompida"
|
||||
para esse bloco, garantindo que ainda pode recuperar os dados com sucesso
|
||||
se outro disco falhar.
|
||||
|
||||
Esta opção aplica-se exclusivamente a discos de dados formatados com os sistemas de
|
||||
arquivos Btrfs, Bcachefs ou ZFS em Linux e NTFS em Windows.
|
||||
Discos de paridade, ou discos de dados que utilizem outros sistemas de arquivos, usarão sempre
|
||||
a versão ativa do sistema de arquivos.
|
||||
|
||||
A criação e exclusão de instantâneos requerem privilégios administrativos.
|
||||
Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo) quando
|
||||
esta opção estiver ativada.
|
||||
|
||||
Consulte a seção SNAPSHOTS para uma explicação detalhada do ciclo de vida
|
||||
dos instantâneos.
|
||||
|
||||
nohidden
|
||||
Exclui todos os arquivos e diretórios ocultos.
|
||||
No Unix, arquivos ocultos são aqueles que começam com `.`.
|
||||
|
|
@ -1192,6 +1234,11 @@ Configuração
|
|||
especificado for um `include`, ou incluído se o último padrão
|
||||
especificado for um `exclude`.
|
||||
|
||||
Observe que a filtragem ocorre hierarquicamente durante o percurso
|
||||
dos diretórios. Se um diretório corresponder a uma regra `exclude`,
|
||||
todo o diretório será ignorado (podado) e nenhuma regra `include` para
|
||||
arquivos ou subdiretórios dentro dele será avaliada.
|
||||
|
||||
Consulte a seção PATTERN para obter mais detalhes sobre
|
||||
especificações de padrão.
|
||||
|
||||
|
|
@ -1300,7 +1347,7 @@ Configuração
|
|||
Durante a operação, o SnapRAID também analisa a curva de aquecimento de
|
||||
cada disco e estima a temperatura estável de longo prazo que eles
|
||||
devem atingir se a atividade continuar. A estimativa é realizada apenas
|
||||
depois que a temperatura do disco aumentou quatro vezes, garantindo
|
||||
depois que a temperatura do disco tiver subido quatro vezes, garantindo
|
||||
que pontos de dados suficientes estejam disponíveis para estabelecer uma
|
||||
tendência confiável.
|
||||
Esta temperatura estável prevista é mostrada entre parênteses ao lado
|
||||
|
|
@ -1358,6 +1405,9 @@ Configuração
|
|||
nome do dispositivo. Para controladores RAID, o dispositivo é
|
||||
provavelmente fixo, e você pode não precisar usar `%s`.
|
||||
|
||||
Você também pode especificar uma string personalizada de opções de informação
|
||||
usando a tag `[info: ...]` para substituir a opção padrão `-a`.
|
||||
|
||||
Consulte a documentação do smartmontools para possíveis opções:
|
||||
|
||||
:https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
|
|
@ -1365,6 +1415,7 @@ Configuração
|
|||
|
||||
Por exemplo:
|
||||
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl parity -d sat %s
|
||||
|
||||
smartignore DISK/PARITY ATTR [ATTR...]
|
||||
|
|
@ -1377,14 +1428,19 @@ Configuração
|
|||
`4-parity`, `5-parity`, `6-parity` ou `z-parity`.
|
||||
O valor especial * pode ser usado para ignorar o atributo em todos os discos.
|
||||
|
||||
Por exemplo, para ignorar o atributo `Current Pending Sector Count` em
|
||||
todos os discos:
|
||||
Múltiplos atributos podem ser especificados separados por espaços.
|
||||
Cada atributo pode ser especificado como um número de 1 a 255, ou como um
|
||||
nome insensível a maiúsculas/minúsculas (por exemplo, `Current_Pending_Sector`).
|
||||
|
||||
:smartignore * 197
|
||||
Por exemplo, para ignorar os atributos `Current Pending Sector Count` e
|
||||
`Reallocated Sectors Count` em todos os discos pelo seu número ou nome:
|
||||
|
||||
Para ignorá-lo apenas no primeiro disco de paridade:
|
||||
:smartignore * 197 5
|
||||
:smartignore * Current_Pending_Sector Reallocated_Sector_Ct
|
||||
|
||||
:smartignore parity 197
|
||||
Para ignorá-los apenas no primeiro disco de paridade:
|
||||
|
||||
:smartignore parity 197 5
|
||||
|
||||
Exemplos
|
||||
Um exemplo de uma configuração típica para Unix é:
|
||||
|
|
@ -1397,7 +1453,7 @@ Configuração
|
|||
:data d3 /mnt/disk3/
|
||||
:exclude /lost+found/
|
||||
:exclude /tmp/
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/sg0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
|
@ -1413,11 +1469,167 @@ Configuração
|
|||
:exclude Thumbs.db
|
||||
:exclude \$RECYCLE.BIN
|
||||
:exclude \System Volume Information
|
||||
:smartctl d1 -d sat %s
|
||||
:smartctl d1 [info: -H -i -c -A] -d sat %s
|
||||
:smartctl d2 -d usbjmicron %s
|
||||
:smartctl parity -d areca,1/1 /dev/arcmsr0
|
||||
:smartctl 2-parity -d areca,2/1 /dev/arcmsr0
|
||||
|
||||
Instantâneos (Snapshots)
|
||||
Se a opção de instantâneo estiver ativada na configuração, o SnapRAID
|
||||
utiliza instantâneos do sistema de arquivos para manter estáveis os dados lidos
|
||||
durante uma operação, mesmo quando arquivos nos sistemas de arquivos ativos
|
||||
são posteriormente modificados ou excluídos.
|
||||
|
||||
A gestão de instantâneos é completamente automática e transparente.
|
||||
Pode continuar a utilizar o SnapRAID exatamente como antes, com a
|
||||
proteção adicional fornecida por instantâneos geridos inteiramente em
|
||||
segundo plano.
|
||||
|
||||
Isso proporciona dois benefícios principais:
|
||||
|
||||
Consistência - Arquivos modificados no sistema de arquivos ativo durante um sync ou scrub de
|
||||
longa duração não causarão divergências de paridade ou operações abortadas,
|
||||
porque cada sistema de arquivos com instantâneo permanece inalterado durante
|
||||
toda a operação.
|
||||
Recuperação - Se um arquivo for atualizado ou excluído do sistema de arquivos ativo,
|
||||
ele permanece preservado no instantâneo. Se ocorrer uma falha de disco
|
||||
antes de o próximo sync ser executado, o SnapRAID utiliza os dados preservados
|
||||
no instantâneo para reconstruir o disco com falha.
|
||||
|
||||
Em caso de falha de um disco durante um processo de sync ativo,
|
||||
o SnapRAID também é capaz de ler automaticamente tanto do instantâneo
|
||||
da computação de paridade anterior quanto da atual.
|
||||
Isso maximiza a probabilidade de uma recuperação completa ao
|
||||
fornecer acesso aos blocos de dados exatos necessários para resolver
|
||||
as equações de paridade, mesmo que esses blocos tenham sido modificados
|
||||
ou excluídos entre os syncs.
|
||||
|
||||
Sem instantâneos, um arquivo atualizado ou excluído num disco saudável
|
||||
resulta na falta de blocos de dados que podem ser necessários para
|
||||
reparar outros discos com falha.
|
||||
|
||||
Os instantâneos são criados apenas para discos de dados e apenas se o sistema de arquivos
|
||||
subjacente suportar esta funcionalidade. Os discos de paridade usam sempre
|
||||
o sistema de arquivos ativo.
|
||||
|
||||
Atualmente, isso é suportado em Btrfs, Bcachefs e ZFS em Linux
|
||||
e em NTFS em Windows.
|
||||
|
||||
Pode misturar discos de dados com sistemas de arquivos diferentes. Apenas aqueles que
|
||||
suportam instantâneos os utilizarão, enquanto os outros discos continuarão
|
||||
a operar diretamente no sistema de arquivos ativo.
|
||||
|
||||
A criação e exclusão de instantâneos requerem privilégios administrativos.
|
||||
Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo)
|
||||
quando os instantâneos estão ativados.
|
||||
|
||||
Comportamento dos Comandos com Instantâneos
|
||||
Os comandos `sync` e `scrub` utilizam instantâneos para discos de dados cujos
|
||||
sistemas de arquivos os suportam. Num disco com instantâneo, o comando vê
|
||||
uma imagem estável do sistema de arquivos não afetada por alterações simultâneas no
|
||||
sistema de arquivos ativo.
|
||||
Durante um `sync`, um novo instantâneo é criado independentemente para cada
|
||||
sistema de arquivos de dados suportado. Esses instantâneos fornecem coletivamente os
|
||||
dados utilizados para o cálculo da paridade.
|
||||
Em contraste, o comando `scrub` utiliza o último instantâneo, aquele
|
||||
criado durante o sync mais recente, para manter um ponto de referência confiável
|
||||
que corresponda à paridade existente.
|
||||
|
||||
Para os comandos `check` e `fix`, o uso do último instantâneo
|
||||
depende de discos específicos serem ou não alvo da operação utilizando a opção
|
||||
-d, --filter-disk.
|
||||
|
||||
Um disco explicitamente selecionado via -d (o "alvo" da operação)
|
||||
usa sempre o sistema de arquivos ativo. Para `fix`, isso permite restaurar
|
||||
dados para a substituição do disco ativo. Para `check`, permite simular
|
||||
a operação `fix` sob as mesmas condições.
|
||||
|
||||
Todos os outros discos de dados (os discos de "referência") serão acessados através dos
|
||||
seus instantâneos. Isso garante que, mesmo que esteja modificando arquivos
|
||||
nos seus discos saudáveis enquanto uma recuperação está em curso, o SnapRAID
|
||||
tem uma referência estável e congelada para resolver as equações de paridade.
|
||||
|
||||
Se nenhuma opção -d for fornecida, o SnapRAID assume que a operação se aplica
|
||||
a todo o array, neste caso, `check` e `fix` usarão os sistemas
|
||||
de arquivos ativos exclusivamente.
|
||||
|
||||
Todos os outros comandos operam exclusivamente no sistema de arquivos ativo.
|
||||
|
||||
Ciclo de Vida dos Instantâneos (Snapshots Lifecycle)
|
||||
O SnapRAID gerencia três instantâneos específicos, `stable` (estável), `pending` (pendente) e `scan` (verificação),
|
||||
dentro de um diretório oculto na raiz de cada subvolume de dados.
|
||||
Em Btrfs, Bcachefs e NTFS é utilizado o diretório `.snapraid/`,
|
||||
em ZFS o padrão `.zfs/snapshot/`.
|
||||
|
||||
O instantâneo `stable` representa o estado do último
|
||||
`sync` concluído com sucesso, contendo os dados exatos utilizados para
|
||||
computar a paridade atual. Serve como a principal fonte de dados
|
||||
para os comandos `scrub`, `check` e `fix`.
|
||||
|
||||
O instantâneo `scan` é uma imagem temporária criada ao início
|
||||
de um `sync` para fornecer um estado congelado para a verificação e a computação da paridade.
|
||||
Após a verificação e salvamento do novo estado de conteúdo, ele substitui o instantâneo
|
||||
`pending` anterior.
|
||||
|
||||
O instantâneo `pending` é a imagem usada por um `sync` interrompido.
|
||||
Após a conclusão bem-sucedida da operação, o instantâneo `stable` anterior
|
||||
é excluído, e o instantâneo `pending` é promovido para
|
||||
tomar o seu lugar como a nova referência estável.
|
||||
|
||||
Se um `sync` for interrompido, o instantâneo `pending` é preservado.
|
||||
Os comandos subsequentes `scrub`, `check` e `fix` utilizarão este
|
||||
instantâneo pendente, pois ele corresponde ao estado do sistema de arquivos registrado no
|
||||
arquivo .content, mesmo que a paridade esteja apenas parcialmente sincronizada.
|
||||
|
||||
No caso de uma interrupção do `sync`, os comandos `check` e `fix`
|
||||
também leem do instantâneo `stable` para recuperar blocos de dados
|
||||
de arquivos que foram atualizados ou excluídos durante o sync.
|
||||
Isso é possível porque o arquivo .content retém metadados para
|
||||
todos os arquivos modificados ou excluídos ao longo do processo de sync.
|
||||
Esta informação histórica só é limpa quando um sync termina
|
||||
com sucesso e a versão final do arquivo .content é salva.
|
||||
|
||||
Se um `sync` for reiniciado após uma interrupção, o instantâneo pending existente
|
||||
é excluído e um novo é criado para
|
||||
capturar o estado atual do sistema de arquivos ativo.
|
||||
No entanto, se um `sync` for interrompido, evite modificar, excluir,
|
||||
substituir ou mover arquivos até que um `sync` subsequente seja concluído
|
||||
com sucesso. A paridade ainda pode conter blocos calculados a partir do
|
||||
instantâneo usado pelo sync interrompido. Um sync posterior pode substituir
|
||||
esse instantâneo, tornando as versões intermediárias dos arquivos indisponíveis
|
||||
para recuperação.
|
||||
|
||||
Cópias de segurança externas com instantâneos do sistema de ficheiros (External backups with filesystem snapshots)
|
||||
Quando os instantâneos do sistema de ficheiros estão ativados, o SnapRAID
|
||||
acede ou cria instantâneos na raiz de cada subvolume, volume ou conjunto
|
||||
de dados (dataset).
|
||||
|
||||
Uma forma simples de evitar qualquer interferência com ferramentas externas
|
||||
é apontar a configuração `data` para um subdiretório normal dentro do
|
||||
subvolume ou volume (por exemplo, `/mnt/subvol/data` em vez de `/mnt/subvol`).
|
||||
O SnapRAID cria sempre o diretório de instantâneos na raiz do subvolume
|
||||
(por exemplo, `/mnt/subvol/.snapraid/`), deixando o subdiretório de dados
|
||||
limpo, de modo que os instantâneos permaneçam fora e invisíveis para as
|
||||
ferramentas de cópia de segurança que operam dentro dele.
|
||||
|
||||
Caso contrário, se o diretório `data` configurado for ele próprio a raiz
|
||||
do subvolume ou do volume, o SnapRAID cria um diretório `.snapraid/`
|
||||
diretamente dentro dele (em Btrfs, Bcachefs e NTFS). Embora o SnapRAID
|
||||
exclua automaticamente esse diretório das suas próprias verificações,
|
||||
ferramentas externas de cópia de segurança ou de sincronização irão
|
||||
encontrá-lo. Se não for excluído, podem atravessar os instantâneos ou
|
||||
ligações de diretório e copiar toda a árvore de dados congelada, duplicando
|
||||
dados e esgotando o armazenamento de backup. Configure sempre as
|
||||
ferramentas de cópia de segurança externas para excluir o diretório
|
||||
`.snapraid/`.
|
||||
|
||||
No ZFS, os instantâneos são expostos através do diretório virtual padrão
|
||||
`.zfs/snapshot/` em vez de `.snapraid/`. Por predefinição (`snapdir=hidden`),
|
||||
o ZFS oculta esse diretório das listagens, de modo que ferramentas externas
|
||||
de cópia de segurança não o percorrem. Se tiver ativado `snapdir=visible`,
|
||||
certifique-se de que as suas ferramentas de cópia de segurança excluem o
|
||||
diretório `.zfs/`.
|
||||
|
||||
Padrão (Pattern)
|
||||
Os padrões fornecem uma maneira flexível de filtrar arquivos para inclusão ou
|
||||
exclusão. Ao usar caracteres de globbing, você pode definir regras que
|
||||
|
|
@ -1434,18 +1646,19 @@ Padrão (Pattern)
|
|||
componente de caminho. Este é o comportamento padrão de curinga familiar do
|
||||
globbing de shell.
|
||||
|
||||
O asterisco duplo `**` é mais poderoso, ele corresponde a qualquer sequência de
|
||||
caracteres, incluindo separadores de diretórios. Isso permite que os padrões correspondam
|
||||
em vários níveis de diretório. Quando o `**` aparece incorporado diretamente em
|
||||
um padrão, ele pode corresponder a zero ou mais caracteres, incluindo barras entre
|
||||
o texto literal circundante.
|
||||
O curinga de asterisco duplo `**` corresponde através de separadores de
|
||||
diretório apenas quando for adjacente a um separador de diretório (precedido
|
||||
ou seguido por uma barra). Nessa forma, ele corresponde a zero ou mais
|
||||
caracteres através de níveis de diretório. Por exemplo, `foo/**/bar`
|
||||
corresponde a `foo/bar`, `foo/a/bar` e `foo/a/b/bar`; `**/build` corresponde a
|
||||
`build` e `foo/bar/build`; e `src/**.js` corresponde a `src/main.js` e
|
||||
`src/ui/components/main.js`.
|
||||
A forma avulsa `/**/` não é aceita como um padrão completo.
|
||||
|
||||
O uso mais importante do `**` é na forma especial `/**/`. Isso corresponde a
|
||||
zero ou mais níveis de diretório completos, tornando possível corresponder arquivos
|
||||
em qualquer profundidade em uma árvore de diretórios sem conhecer a estrutura exata do caminho.
|
||||
Por exemplo, o padrão `src/**/main.js` corresponde a `src/main.js` (pulando
|
||||
zero diretórios), `src/ui/main.js` (pulando um diretório) e
|
||||
`src/ui/components/main.js` (pulando dois diretórios).
|
||||
Quando `**` não for adjacente a uma barra, ele se comporta como `*` e não
|
||||
corresponde a separadores de diretório. Por exemplo, `**.jpg` corresponde a
|
||||
`photo.jpg` no diretório atual, mas não corresponde a `dir/photo.jpg`. Use
|
||||
`**/*.jpg` para essa finalidade.
|
||||
|
||||
Classes de caracteres usando colchetes `[]` correspondem a um único caractere de um
|
||||
conjunto ou intervalo especificado. Como os outros padrões de caractere único, elas
|
||||
|
|
@ -1454,8 +1667,8 @@ Padrão (Pattern)
|
|||
|
||||
A distinção fundamental a ser lembrada é que `*`, `?` e classes de caracteres
|
||||
respeitam os limites do diretório e correspondem apenas dentro de um único
|
||||
componente de caminho, enquanto `**` é o único padrão que pode corresponder através de
|
||||
separadores de diretório.
|
||||
componente de caminho, enquanto `**` só pode corresponder através de separadores
|
||||
de diretório quando for adjacente a uma barra.
|
||||
|
||||
Existem quatro tipos diferentes de padrões:
|
||||
|
||||
|
|
@ -1524,6 +1737,26 @@ Padrão (Pattern)
|
|||
:include /musics/
|
||||
:include /pictures/
|
||||
|
||||
Observe que a exclusão de um diretório (usando DIR/ ou /CAMINHO/DIR/)
|
||||
impede que o SnapRAID entre e examine esse diretório. Consequentemente,
|
||||
não é possível reincluir um arquivo ou subdiretório localizado dentro
|
||||
de um diretório pai excluído, porque o verificador nunca entra nele.
|
||||
|
||||
Por exemplo, a seguinte configuração NÃO incluirá `file.dat` porque
|
||||
`/keep/` é podado antes que `file.dat` possa ser examinado:
|
||||
|
||||
:# NÃO funciona: /keep/ é ignorado completamente
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/
|
||||
|
||||
Para excluir arquivos dentro de um diretório mantendo arquivos específicos,
|
||||
aplique o padrão aos arquivos dentro do diretório em vez de excluir o
|
||||
próprio diretório:
|
||||
|
||||
:# Funciona: /keep/ é percorrido, mas os outros arquivos nele são excluídos
|
||||
:include /keep/file.dat
|
||||
:exclude /keep/*
|
||||
|
||||
Na linha de comando, usando a opção -f, você pode usar apenas padrões `include`.
|
||||
Por exemplo:
|
||||
|
||||
|
|
@ -1532,7 +1765,7 @@ Padrão (Pattern)
|
|||
:snapraid -f "*.mp3" check
|
||||
|
||||
No Unix, ao usar caracteres globbing na linha de comando, você deve
|
||||
citá-los para evitar que o shell os expanda.
|
||||
colocá-los entre aspas para evitar que o shell os expanda.
|
||||
|
||||
Ignorar Arquivos (Ignore File)
|
||||
Além das regras globais no arquivo de configuração, você pode colocar
|
||||
|
|
@ -1582,8 +1815,10 @@ Conteúdo (Content)
|
|||
É um arquivo binário que lista todos os arquivos presentes em seu array
|
||||
de discos, juntamente com todos os checksums para verificar sua integridade.
|
||||
|
||||
Este arquivo é lido e escrito pelos comandos `sync` e `scrub` e
|
||||
lido pelos comandos `fix`, `check` e `status`.
|
||||
O arquivo content é lido e escrito pelos comandos `sync`, `scrub`,
|
||||
`touch` e `rehash`. É lido pelos comandos `status`, `diff`, `check`,
|
||||
`fix`, `list`, `dup`, `locate` e `pool`, e é completamente ignorado
|
||||
pelos comandos `smart`, `probe`, `up`, `down` e `devices`.
|
||||
|
||||
Paridade (Parity)
|
||||
SnapRAID armazena as informações de paridade do seu array nos arquivos parity.
|
||||
|
|
@ -1608,8 +1843,188 @@ Codificação (Encoding)
|
|||
redirecionar a saída do console para um arquivo, o arquivo resultante
|
||||
estará sempre no formato UTF-8.
|
||||
|
||||
Código de Saída (Exit Code)
|
||||
O SnapRAID termina com os seguintes códigos de erro:
|
||||
|
||||
0 - Tudo OK.
|
||||
1 - O comando encontrou alguns erros.
|
||||
2 - O comando `diff` determinou que tudo está OK, mas é necessário um `sync`.
|
||||
3 - Um comando de dispositivo de disco (`probe`, `smart`, `devices`, `up`,
|
||||
`down`) foi concluído, mas pelo menos um sistema de arquivos está operando
|
||||
em modo degradado com dispositivo(s) ausente(s).
|
||||
|
||||
Problemas Conhecidos (Known Issues)
|
||||
Limites do sistema de arquivos
|
||||
O SnapRAID não cruza limites de sistema de arquivos, pontos de montagem ou
|
||||
subvolumes ao verificar um disco de dados. Quando tal limite é detectado,
|
||||
o SnapRAID relata um AVISO e não verifica além dele.
|
||||
|
||||
Arquivos localizados além desses limites não são incluídos no disco de
|
||||
dados e devem ser configurados separadamente se precisarem ser protegidos.
|
||||
|
||||
Pontos de montagem com instantâneos do sistema de arquivos
|
||||
Quando os instantâneos do sistema de arquivos estão ativados, pontos de
|
||||
montagem aninhados e montagens bind dentro de um disco de dados não são
|
||||
suportados.
|
||||
|
||||
Os pontos de montagem fazem parte do namespace de montagem do sistema ativo
|
||||
e não são preservados em instantâneos do sistema de arquivos. Consequentemente,
|
||||
ao verificar um instantâneo, um diretório oculto por um ponto de montagem no
|
||||
sistema de arquivos ativo pode se tornar visível.
|
||||
|
||||
Não coloque pontos de montagem aninhados ou montagens bind dentro de discos
|
||||
de dados quando os instantâneos do sistema de arquivos estiverem ativados.
|
||||
|
||||
Múltiplas configurações com instantâneos do sistema de arquivos
|
||||
O suporte a instantâneos não pode ser compartilhado com segurança por
|
||||
múltiplas configurações independentes do SnapRAID que usem o mesmo
|
||||
namespace de instantâneos do sistema de arquivos.
|
||||
|
||||
No Btrfs e Bcachefs, apenas uma configuração do SnapRAID com suporte a
|
||||
instantâneos ativado pode usar diretórios de dados dentro do mesmo
|
||||
subvolume. No ZFS, a mesma restrição se aplica a um dataset, e no NTFS
|
||||
a um volume.
|
||||
|
||||
Múltiplas configurações que compartilham o mesmo namespace de instantâneos
|
||||
usam os mesmos instantâneos `stable`, `pending` e `scan`. A execução de uma
|
||||
configuração pode, portanto, substituir ou excluir instantâneos de
|
||||
recuperação necessários para outra.
|
||||
|
||||
Modificações de arquivo no local sem alteração de data/hora
|
||||
O SnapRAID detecta modificações em arquivos comparando tamanhos de arquivo e
|
||||
carimbos de data/hora de modificação (mtime).
|
||||
|
||||
Se um aplicativo modificar um arquivo no local sem alterar seu tamanho nem
|
||||
atualizar seu carimbo de data/hora de modificação, o "diff" e o "sync" não
|
||||
detectarão que o arquivo foi alterado e sua paridade não será atualizada.
|
||||
|
||||
Para garantir que o SnapRAID reconheça essas alterações, atualize o carimbo
|
||||
de data/hora de modificação do arquivo (por exemplo, com o utilitário "touch").
|
||||
Caso contrário, a diferença só será detectada como uma incompatibilidade de
|
||||
hash durante um "scrub" ou "check" subsequente.
|
||||
|
||||
Correspondência de maiúsculas/minúsculas não-ASCII no Windows
|
||||
O SnapRAID utiliza codificação UTF-8 padrão e previsível em todas as plataformas,
|
||||
limitando a correspondência insensível a maiúsculas e minúsculas a caracteres
|
||||
ASCII.
|
||||
|
||||
Os sistemas de arquivos do Windows sofrem com o design legado de forçar a
|
||||
insensibilidade a maiúsculas e minúsculas em nomes de arquivo Unicode por meio
|
||||
de tabelas de conversão arbitrárias e dependentes do sistema. Consequentemente,
|
||||
o Windows oculta a realidade do sistema de arquivos ao tratar sequências de bytes
|
||||
Unicode completamente diferentes como se fossem o mesmo arquivo.
|
||||
|
||||
Por exemplo, `À.txt` e `à.txt` são nomes Unicode distintos, mas o Windows os
|
||||
trata ilogicamente como idênticos, enquanto o SnapRAID preserva sua verdadeira
|
||||
distinção.
|
||||
|
||||
Essa limitação é causada pelo tratamento inconsistente de nomes de arquivo
|
||||
Unicode pelo Windows e por sua insistência no uso de aliases sem diferenciação de
|
||||
maiúsculas/minúsculas. Para evitar discrepâncias decorrentes da conversão do
|
||||
Windows, sempre especifique a combinação exata de maiúsculas e minúsculas para
|
||||
caracteres não-ASCII em caminhos de configuração e filtros.
|
||||
|
||||
Recuperação com fix parcial
|
||||
Quando o `fix` é restrito usando `-S, --start` ou `-B, --count`,
|
||||
o SnapRAID opera apenas nos blocos selecionados e não realiza a
|
||||
finalização em nível de arquivo nem a quarentena.
|
||||
|
||||
Se a recuperação produzir dados de melhor esforço (best-effort) que não
|
||||
possam ser comprovados como representativos do conteúdo atual, esses
|
||||
blocos ainda poderão ser gravados com o nome de arquivo normal. A incerteza
|
||||
associada a esses blocos recuperados não persiste após o término do comando.
|
||||
|
||||
Como consequência, um `fix` posterior tratará esses blocos legíveis como
|
||||
dados de arquivo válidos e não tentará recuperá-los novamente. Isso pode
|
||||
fazer com que uma recuperação posterior relate sucesso, deixando dados
|
||||
incompletos ou obsoletos no arquivo.
|
||||
|
||||
As opções `-S` e `-B` destinam-se apenas à recuperação manual avançada,
|
||||
normalmente após a falha de um `fix` normal. Se um `fix` parcial relatar
|
||||
dados irrecuperáveis, remova ou renomeie os arquivos afetados antes de tentar
|
||||
outra recuperação, ou verifique manualmente seu conteúdo.
|
||||
|
||||
Links físicos no NTFS e caminhos excluídos
|
||||
No NTFS, as entradas de diretório armazenam em cache o tamanho do arquivo
|
||||
e os registros de data/hora de forma independente para cada link físico.
|
||||
Quando um arquivo é modificado por meio de um link, as entradas de diretório
|
||||
de outros links que apontam para o mesmo arquivo podem reter metadados
|
||||
obsoletos até que sejam acessadas.
|
||||
|
||||
O SnapRAID detecta e normaliza automaticamente essa condição sempre que
|
||||
pelo menos dois links físicos para o mesmo arquivo são encontrados durante
|
||||
uma verificação. No entanto, se apenas um link físico for verificado
|
||||
enquanto os outros forem excluídos por filtros ou residirem fora do caminho
|
||||
do disco de dados, o SnapRAID não conseguirá detectar a colisão de inodes e
|
||||
dependerá dos metadados em cache do único link visível.
|
||||
|
||||
Consequentemente, modificações feitas por meio de um link físico excluído
|
||||
ou externo podem passar despercebidas pelo SnapRAID até que os metadados do
|
||||
link incluído sejam atualizados pelo sistema operacional (como quando o
|
||||
arquivo é acessado ou aberto por meio desse caminho).
|
||||
|
||||
Para evitar essa limitação, evite modificar arquivos protegidos por meio
|
||||
de links físicos excluídos do SnapRAID, ou certifique-se de que todos os
|
||||
links físicos de um arquivo sejam incluídos na verificação para que o
|
||||
SnapRAID possa normalizá-los.
|
||||
|
||||
Recuperação após uma sincronização de multiparidade interrompida
|
||||
Em uma matriz com múltiplos discos de paridade, um `sync` interrompido
|
||||
pode deixar os níveis de paridade temporariamente fora de sincronia entre
|
||||
si. Por exemplo, a paridade 1 já pode conter dados recém-atualizados,
|
||||
enquanto a paridade 2 ainda contém os dados antigos.
|
||||
|
||||
Durante `check` ou `fix`, o SnapRAID testa diferentes combinações de
|
||||
paridade e valida os dados reconstruídos em relação aos hashes de bloco
|
||||
conhecidos (cobrindo o bloco completo, normalmente 256 KiB).
|
||||
|
||||
Se o SnapRAID tentar uma reconstrução usando uma combinação inconsistente
|
||||
de paridade antiga e nova, as equações lineares de RAID produzirão dados
|
||||
incorretos. Para que essa combinação inválida seja aceita por engano,
|
||||
as equações teriam que reconstruir acidentalmente pelo menos um bloco
|
||||
completo de 256 KiB de maneira tão perfeita que seu hash corresponda,
|
||||
enquanto outros blocos não sincronizados na mesma faixa são reconstruídos
|
||||
com dados incorretos.
|
||||
|
||||
Esse cenário não depende de uma colisão de hash; em vez disso, as próprias
|
||||
equações de paridade mista teriam que gerar coincidentemente o conteúdo
|
||||
exato do bloco de 256 KiB original. Embora seja matematicamente concebível
|
||||
com dados especialmente preparados ou altamente repetitivos, é
|
||||
praticamente impossível com dados reais.
|
||||
|
||||
Se todos os discos estiverem íntegros, concluir o `sync` interrompido
|
||||
antes de fazer novas alterações remove essa ambiguidade. Se um disco tiver
|
||||
falhado e a recuperação for necessária, evite modificar os discos de dados
|
||||
antes de executar `check` ou `fix`.
|
||||
|
||||
Nomes reservados de arquivos e diretórios
|
||||
O SnapRAID reserva alguns nomes de arquivos, diretórios e snapshots para
|
||||
suas operações internas. Não use esses nomes para dados do usuário:
|
||||
|
||||
.snapraidignore - Arquivo local de regras de exclusão.
|
||||
.snapraid - Diretório contêiner de snapshots.
|
||||
snapraid-* - Nomes de snapshots ZFS gerenciados pelo SnapRAID.
|
||||
*.unrecoverable - Arquivos danificados colocados em quarentena durante
|
||||
a recuperação.
|
||||
CONTENT.tmp - Arquivo temporário para atualizações do content.
|
||||
CONTENT.lock - Arquivo de bloqueio do content.
|
||||
PARITY.spaceholder - Arquivo temporário de reserva de espaço durante a
|
||||
alocação de paridade no Windows.
|
||||
|
||||
O uso desses nomes para dados não relacionados pode fazer com que arquivos ou
|
||||
snapshots sejam ignorados, interpretados incorretamente como metadados,
|
||||
sobrescritos, renomeados ou excluídos.
|
||||
|
||||
No Windows, todas as variações de maiúsculas e minúsculas também são reservadas,
|
||||
mesmo em diretórios NTFS configurados para diferenciar maiúsculas de minúsculas
|
||||
(por exemplo, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP e CONTENT.Lock).
|
||||
|
||||
Tradução (Translation)
|
||||
Este documento é uma tradução automática do manual em inglês.
|
||||
Consulte o manual em inglês para a versão oficial.
|
||||
|
||||
Direitos Autorais (Copyright)
|
||||
Este arquivo é Copyright (C) 2025 Andrea Mazzoleni
|
||||
Este arquivo é Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
Veja Também (See Also)
|
||||
snapraid_log(1), snapraidd(1)
|
||||
snapraid_log(1), snapraidd(1), rsync(1)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue