1PMEMPOOL-TRANSFORM(1) PMDK Programmer's Manual PMEMPOOL-TRANSFORM(1)
2
3
4
6 pmempool-transform - Modify internal structure of a pool set.
7
9 pmempool transform [options] <poolset_file_src> <poolset_file_dst>
10
12 The pmempool transform command modifies internal structure of a pool
13 set defined by the poolset_file_src file, according to a structure de‐
14 scribed in the poolset_file_dst file.
15
16 The following operations are supported:
17
18 • adding replicas - one or more new replicas can be added and synchro‐
19 nized with other replicas in the pool set,
20
21 • removing replicas - one or more replicas can be removed from the pool
22 set ,
23
24 • adding or removing pool set options.
25
26 Only one of the above operations can be performed at a time.
27
28 Currently adding and removing replicas are allowed only for pmemobj
29 pools (see libpmemobj(7)).
30
31 The poolset_file_src argument provides the source pool set to be
32 changed.
33
34 The poolset_file_dst argument points to the target pool set.
35
36 When adding or deleting replicas, the two pool set files can differ on‐
37 ly in the definitions of replicas which are to be added or deleted.
38 When adding or removing pool set options (see poolset(5)), the rest of
39 both pool set files have to be of the same structure. The operation of
40 adding/removing a pool set option can be performed on a pool set with
41 local replicas only. To add/remove a pool set option to/from a pool
42 set with remote replicas, one has to remove the remote replicas first,
43 then add/remove the option, and finally recreate the remote replicas
44 having added/removed the pool set option to/from the remote replicas'
45 poolset files. To add a replica it is necessary for its effective size
46 to match or exceed the pool size. Otherwise the whole operation fails
47 and no changes are applied. If none of the poolset options is used,
48 the effective size of a replica is the sum of sizes of all its part
49 files decreased by 4096 bytes per each part file. The 4096 bytes of
50 each part file is utilized for storing internal metadata of the pool
51 part files. If the option SINGLEHDR is used, the effective size of a
52 replica is the sum of sizes of all its part files decreased once by
53 4096 bytes. In this case only the first part contains internal metada‐
54 ta. If the option NOHDRS is used, the effective size of a replica is
55 the sum of sizes of all its part files. In this case none of the parts
56 contains internal metadata.
57
58 Available options:
59 -d, --dry-run
60 Enable dry run mode. In this mode no changes are applied, only
61 check for viability of the operation is performed.
62
63 -v, --verbose
64 Increase verbosity level.
65
66 -h, --help
67 Display help message and exit.
68
70 Example 1.
71 Let files /path/poolset_file_src and /path/poolset_file_dst have the
72 following contents:
73
74 PMEMPOOLSET
75 20M /0/partfile1
76 20M /0/partfile2
77 25M /0/partfile3
78 REPLICA
79 40M /1/partfile1
80 20M /1/partfile2
81
82 PMEMPOOLSET
83 20M /0/partfile1
84 20M /0/partfile2
85 25M /0/partfile3
86 REPLICA
87 40M /1/partfile1
88 20M /1/partfile2
89 REPLICA
90 50M /2/partfile1
91 20M /2/partfile2
92
93 Then, the command
94
95 pmempool transform /path/poolset_file_src /path/poolset_file_dst
96
97 adds a replica to the pool set. All other replicas remain unchanged
98 and the size of the pool remains 60M.
99
100 Example 2.
101 Let files /path/poolset_file_src and /path/poolset_file_dst have the
102 following contents:
103
104 PMEMPOOLSET
105 20M /0/partfile1
106 20M /0/partfile2
107 25M /0/partfile3
108 REPLICA
109 40M /1/partfile1
110 20M /1/partfile2
111
112 PMEMPOOLSET
113 20M /0/partfile1
114 20M /0/partfile2
115 25M /0/partfile3
116
117 Then
118
119 pmempool_transform /path/poolset_file_src /path/poolset_file_dst
120
121 deletes the second replica from the pool set. The first replica re‐
122 mains unchanged and the size of the pool is still 60M.
123
125 pmempool(1), libpmemblk(7), libpmemlog(7), libpmempool(7) and
126 <https://pmem.io>
127
128
129
130PMDK - pmem Tools version 1.4 2021-09-24 PMEMPOOL-TRANSFORM(1)