1PMEMPOOL-SYNC(1) PMDK Programmer's Manual PMEMPOOL-SYNC(1)
2
3
4
6 pmempool-sync - Synchronize replicas or their parts within a pool set.
7
9 pmempool sync [options] <poolset_file>
10
11 NOTE: Only the pool set file used to create the pool should be used for
12 syncing the pool.
13
15 The pmempool sync command synchronizes data between replicas within a
16 pool set. It checks if metadata of all replicas in a pool set are con‐
17 sistent, i.e. all parts are healthy, and if any of them is not, the
18 corrupted or missing parts are recreated and filled with data from one
19 of the healthy replicas. Currently synchronizing data is allowed only
20 for pmemobj pools (see libpmemobj(7)).
21
22 If a pool set has the option SINGLEHDR or NOHDRS (see poolset(5)),
23 pmempool sync command has limited capability of checking its metadata.
24 This is due to limited or no, respectively, internal metadata at the
25 beginning of pool set parts in every replica when either of the options
26 is used. In that cases, only missing parts or the ones which cannot be
27 opened are recreated.
28
29 Available options:
30 -b, --bad-blocks
31 Fix bad blocks - it causes creating or reading special recovery
32 files. When bad blocks are detected, special recovery files
33 have to be created in order to fix them safely. A separate re‐
34 covery file is created for each part of the pool. The recovery
35 files are created in the same directory where the poolset file
36 is located using the following name pattern: <poolset-file-name>
37 _r <replica-number> _p <part-number> _badblocks.txt These recov‐
38 ery files are automatically removed if the sync operation fin‐
39 ishes successfully.
40
41 If the last sync operation was interrupted and not finished cor‐
42 rectly (eg. the application crashed) and the bad blocks fixing
43 procedure was in progress, the bad block recovery files may be
44 left over. In such case bad blocks might have been cleared and
45 zeroed, but the correct data from these blocks was not recovered
46 (not copied from a healthy replica), so the recovery files MUST
47 NOT be deleted manually, because it would cause a data loss.
48 Pmempool-sync should be run again with the `-b' option set. It
49 will finish the previously interrupted sync operation and copy
50 correct data to zeroed bad blocks using the left-over bad block
51 recovery files (the bad blocks will be read from the saved re‐
52 covery files). Pmempool will delete the recovery files automat‐
53 ically at the end of the sync operation.
54
55 Using this option may have limitations depending on the operat‐
56 ing system. For details see description of the CHECK_BAD_BLOCKS
57 feature in pmempool-feature(1).
58
59 -d, --dry-run
60 Enable dry run mode. In this mode no changes are applied, only
61 check for viability of synchronization.
62
63 -v, --verbose
64 Increase verbosity level.
65
66 -h, --help
67 Display help message and exit.
68
70 pmempool(1), libpmemblk(7), libpmemlog(7), libpmempool(7) and
71 <https://pmem.io>
72
73
74
75PMDK - pmem Tools version 1.4 2021-09-24 PMEMPOOL-SYNC(1)