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