File: pmempool-transform.1

package info (click to toggle)
pmdk 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 31,076 kB
  • sloc: ansic: 144,239; sh: 29,351; cpp: 10,136; perl: 5,122; makefile: 3,531; pascal: 1,383; python: 677
file content (189 lines) | stat: -rw-r--r-- 5,970 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "PMEMPOOL-TRANSFORM" "1" "2018-07-18" "PMDK - pmem Tools version 1.4" "PMDK Programmer's Manual"
.hy
.\" Copyright 2014-2018, Intel Corporation
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\"     * Redistributions of source code must retain the above copyright
.\"       notice, this list of conditions and the following disclaimer.
.\"
.\"     * Redistributions in binary form must reproduce the above copyright
.\"       notice, this list of conditions and the following disclaimer in
.\"       the documentation and/or other materials provided with the
.\"       distribution.
.\"
.\"     * Neither the name of the copyright holder nor the names of its
.\"       contributors may be used to endorse or promote products derived
.\"       from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.SH NAME
.PP
\f[B]pmempool\-transform\f[] \- Modify internal structure of a pool set.
.SH SYNOPSIS
.IP
.nf
\f[C]
pmempool\ transform\ [options]\ <poolset_file_src>\ <poolset_file_dst>
\f[]
.fi
.SH DESCRIPTION
.PP
The \f[B]pmempool transform\f[] command modifies internal structure of a
pool set defined by the \f[C]poolset_file_src\f[] file, according to a
structure described in the \f[C]poolset_file_dst\f[] file.
.PP
The following operations are supported:
.IP \[bu] 2
adding replicas \- one or more new replicas can be added and
synchronized with other replicas in the pool set,
.IP \[bu] 2
removing replicas \- one or more replicas can be removed from the pool
set ,
.IP \[bu] 2
adding or removing pool set options.
.PP
Only one of the above operations can be performed at a time.
.PP
Currently adding and removing replicas are allowed only for
\f[B]pmemobj\f[] pools (see \f[B]libpmemobj\f[](7)).
.PP
The \f[I]poolset_file_src\f[] argument provides the source pool set to
be changed.
.PP
The \f[I]poolset_file_dst\f[] argument points to the target pool set.
.PP
When adding or deleting replicas, the two pool set files can differ only
in the definitions of replicas which are to be added or deleted.
When adding or removing pool set options (see \f[B]poolset\f[](5)), the
rest of both pool set files have to be of the same structure.
The operation of adding/removing a pool set option can be performed on a
pool set with local replicas only.
To add/remove a pool set option to/from a pool set with remote replicas,
one has to remove the remote replicas first, then add/remove the option,
and finally recreate the remote replicas having added/removed the pool
set option to/from the remote replicas' poolset files.
To add a replica it is necessary for its effective size to match or
exceed the pool size.
Otherwise the whole operation fails and no changes are applied.
If none of the poolset options is used, the effective size of a replica
is the sum of sizes of all its part files decreased by 4096 bytes per
each part file.
The 4096 bytes of each part file is utilized for storing internal
metadata of the pool part files.
If the option \f[I]SINGLEHDR\f[] is used, the effective size of a
replica is the sum of sizes of all its part files decreased once by 4096
bytes.
In this case only the first part contains internal metadata.
If the option \f[I]NOHDRS\f[] is used, the effective size of a replica
is the sum of sizes of all its part files.
In this case none of the parts contains internal metadata.
.SS Available options:
.TP
.B \f[C]\-d,\ \-\-dry\-run\f[]
Enable dry run mode.
In this mode no changes are applied, only check for viability of the
operation is performed.
.RS
.RE
.TP
.B \f[C]\-v,\ \-\-verbose\f[]
Increase verbosity level.
.RS
.RE
.TP
.B \f[C]\-h,\ \-\-help\f[]
Display help message and exit.
.RS
.RE
.SH EXAMPLES
.SS Example 1.
.PP
Let files \f[C]/path/poolset_file_src\f[] and
\f[C]/path/poolset_file_dst\f[] have the following contents:
.IP
.nf
\f[C]
PMEMPOOLSET
20M\ /0/partfile1
20M\ /0/partfile2
25M\ /0/partfile3
REPLICA
40M\ /1/partfile1
20M\ /1/partfile2
\f[]
.fi
.IP
.nf
\f[C]
PMEMPOOLSET
20M\ /0/partfile1
20M\ /0/partfile2
25M\ /0/partfile3
REPLICA
40M\ /1/partfile1
20M\ /1/partfile2
REPLICA
50M\ /2/partfile1
20M\ /2/partfile2
\f[]
.fi
.PP
Then, the command
.PP
\f[C]pmempool\ transform\ /path/poolset_file_src\ /path/poolset_file_dst\f[]
.PP
adds a replica to the pool set.
All other replicas remain unchanged and the size of the pool remains
60M.
.SS Example 2.
.PP
Let files \f[C]/path/poolset_file_src\f[] and
\f[C]/path/poolset_file_dst\f[] have the following contents:
.IP
.nf
\f[C]
PMEMPOOLSET
20M\ /0/partfile1
20M\ /0/partfile2
25M\ /0/partfile3
REPLICA
40M\ /1/partfile1
20M\ /1/partfile2
\f[]
.fi
.IP
.nf
\f[C]
PMEMPOOLSET
20M\ /0/partfile1
20M\ /0/partfile2
25M\ /0/partfile3
\f[]
.fi
.PP
Then
.PP
\f[C]pmempool_transform\ /path/poolset_file_src\ /path/poolset_file_dst\f[]
.PP
deletes the second replica from the pool set.
The first replica remains unchanged and the size of the pool is still
60M.
.SH SEE ALSO
.PP
\f[B]pmempool(1)\f[], \f[B]libpmemblk(7)\f[], \f[B]libpmemlog(7)\f[],
\f[B]libpmempool(7)\f[] and \f[B]<http://pmem.io>\f[]