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 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gfpcopy</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="gfpcopy.1"></a><div class="titlepage"></div>
<div class="refnamediv">
<a name="name"></a><h2>Name</h2>
<p>gfpcopy — copy Gfarm files in parallel</p>
</div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">gfpcopy</code> [-nqvdpPU] [-X <em class="replaceable"><code>regexp</code></em>] [-S <em class="replaceable"><code>source-domainname</code></em>] [-h <em class="replaceable"><code>source-hostfile</code></em>] [-D <em class="replaceable"><code>destination-domainname</code></em>] [-H <em class="replaceable"><code>destination-hostfile</code></em>] [-j <em class="replaceable"><code>num-of-processes</code></em>] [-J <em class="replaceable"><code>num-of-processes</code></em>] [-M <em class="replaceable"><code>limit-byte</code></em>] [-z <em class="replaceable"><code>minimum-byte</code></em>] [-Z <em class="replaceable"><code>maximum-byte</code></em>] [-w <em class="replaceable"><code>way-of-scheduling</code></em>] [-W <em class="replaceable"><code>kilobytes-for-threshold</code></em>] [-s <em class="replaceable"><code>KB/s-to-simulate</code></em>] [-F <em class="replaceable"><code>num-for-readahead</code></em>] [-b <em class="replaceable"><code>bufsize</code></em>] [-f] [-e] [-k] <em class="replaceable"><code>source-path</code></em> <em class="replaceable"><code>destination-path</code></em> </p></div>
</div>
<div class="refsect1">
<a name="description"></a><h2>DESCRIPTION</h2>
<p>
<span class="command"><strong>gfpcopy</strong></span> copies files in parallel.
</p>
<p>
When the <em class="parameter"><code>source-path</code></em> is
a directory, files under the directory will be copied recursively.
</p>
<p>
When the <em class="parameter"><code>destination-path</code></em> does
not exist, the directory is created.
When the <em class="parameter"><code>destination-path</code></em>
exists, a directory of the same name as
the <em class="parameter"><code>source-path</code></em> is created
under the <em class="parameter"><code>destination-path</code></em>.
</p>
<p>
A set of source/destination hosts can be specified by a domain name
and/or a hostlist file. When both a domain name and a hostlist file
are specified, a set of hosts is determined by both conditions. When a
set of source hosts is specified, only files stored on the source
hosts are copied.
</p>
<p>
<span class="command"><strong>gfpcopy</strong></span> also retrieves the directory
entries in parallel.
</p>
</div>
<div class="refsect1">
<a name="source-path"></a><h2>SOURCE PATH</h2>
<p>
<em class="parameter"><code>source-path</code></em> must be one of the following formats.
Files on HPSS cannot be copied.
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><em class="parameter"><code>path-name</code></em></span></dt>
<dd><p>
is a relative path or an absolute path of a local file system. When the path
is a mount point on gfarm2fs, files are copied without passing through
the gfarm2fs.
</p></dd>
<dt><span class="term"><em class="parameter"><code>gfarm:...</code></em></span></dt>
<dd><p>
is a Gfarm URL.
</p></dd>
<dt><span class="term"><em class="parameter"><code>file:...</code></em></span></dt>
<dd><p>
is an URL of a local file system.
</p></dd>
</dl></div>
</div>
<div class="refsect1">
<a name="source-path"></a><h2>DESTINATION PATH</h2>
<p>
<em class="parameter"><code>destination-path</code></em>
must be one of the following formats.
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><em class="parameter"><code>path-name</code></em></span></dt>
<dd><p>
is a relative path or an absolute path of a local file system. When the path
is a mount point on gfarm2fs, files are copied without passing through
the gfarm2fs.
</p></dd>
<dt><span class="term"><em class="parameter"><code>gfarm:...</code></em></span></dt>
<dd><p>
is a Gfarm URL of a directory.
</p></dd>
<dt><span class="term"><em class="parameter"><code>file:...</code></em></span></dt>
<dd><p>
is an URL of a directory on a local file system.
</p></dd>
<dt><span class="term"><em class="parameter"><code>hpss:...</code></em></span></dt>
<dd><p>
is an URL of a directory on HPSS.
If the same directory as
the <em class="parameter"><code>source-path</code></em> exists under
this directory, the <em class="parameter"><code>source-path</code></em>
cannot be copied.
The differential copy is not supported for HPSS.
Relative path such as "hpss:". and "hpss:dir" can be specified.
</p></dd>
</dl></div>
</div>
<div class="refsect1">
<a name="options"></a><h2>GFPCOPY OPTIONS</h2>
<p>
These are options only for <span class="command"><strong>gfpcopy</strong></span>.
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="option">-b</code> <em class="parameter"><code>bufsize</code></em></span></dt>
<dd>
<p>
Specifies the buffer size in bytes to copy.
</p>
<p>
The default value is 64 KiB (64 * 1024).
</p>
</dd>
<dt><span class="term"><code class="option">-f</code></span></dt>
<dd>
<p>
With the -f option, existing files will be overwritten when
the size is different or the modification time (mtime) is different from the
source file.
</p>
<p>
Without the -f option, existing files will be overwritten when
they are older than the corresponding source files in the
modification time.
</p>
</dd>
<dt><span class="term"><code class="option">-e</code></span></dt>
<dd><p>
Skips existing files in order to execute gfpcopy
simultaneously.
</p></dd>
<dt><span class="term"><code class="option">-k</code></span></dt>
<dd><p>
Does not copy symbolic links.
</p></dd>
</dl></div>
</div>
<div class="refsect1">
<a name="common-options"></a><h2>COMMON OPTIONS</h2>
<p>
The following options are common options
for <span class="command"><strong>gfprep</strong></span>
and <span class="command"><strong>gfpcopy</strong></span>.
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="option">-X</code> <em class="parameter"><code>regexp</code></em></span></dt>
<dd><p>
Skips files matched by the pattern
of <em class="parameter"><code>regexp</code></em>. When multiple
patterns need to be specified, specify -X options multiple times.
</p></dd>
<dt><span class="term"><code class="option">-S</code> <em class="parameter"><code>source-domainname</code></em></span></dt>
<dd><p>
Creates file replicas or copies files only stored on the hosts in the
specified domain name.
</p></dd>
<dt><span class="term"><code class="option">-h</code> <em class="parameter"><code>source-hostfile</code></em></span></dt>
<dd>
<p>
Creates file replicas or copies files only stored on the hosts listed
in the specified hostfile.
The <em class="parameter"><code>source-hostfile</code></em> consists of
a file system node name on each line.
</p>
<p>
If ``-'' is specified, standard input is used to read the host list.</p>
</dd>
<dt><span class="term"><code class="option">-L</code></span></dt>
<dd><p>
Creates file replicas or copies files from the hosts specified by the
-S or -h option.
</p></dd>
<dt><span class="term"><code class="option">-D</code> <em class="parameter"><code>destination-domainname</code></em></span></dt>
<dd>
<p>
Specifies the domain name for destination.
</p>
<p>
If neither this nor the <code class="option">-H</code> option is specified,
replicas may be copied to any available host.
</p>
</dd>
<dt><span class="term"><code class="option">-H</code> <em class="parameter"><code>destination-hostfile</code></em></span></dt>
<dd>
<p>
Specifies a file which describes hostnames for destination.
The <em class="parameter"><code>destination-hostfile</code></em>
consists of a file system node name on each line.
</p>
<p>
If ``-'' is specified, standard input is used to read the host list.
</p>
</dd>
<dt><span class="term"><code class="option">-j</code> <em class="parameter"><code>num-of-processes</code></em></span></dt>
<dd>
<p>
Specifies the maximum number of processes to create file replicas (or
copy files) simultaneously.
</p>
<p>
The default value is the parameter of client_parallel_copy in gfarm2.conf.
(see man gfarm2.conf)
</p>
<p>
The maximum number of process per file system node for source or destination
is the number of CPUs (see man <span class="command"><strong>gfhost</strong></span>).
</p>
</dd>
<dt><span class="term"><code class="option">-J</code> <em class="parameter"><code>num-of-processes</code></em></span></dt>
<dd>
<p>
Specifies the number of processes to retrieve directory entries in parallel.
</p>
<p>
The default value is 8.
</p>
</dd>
<dt><span class="term"><code class="option">-M</code> <em class="parameter"><code>total-byte</code></em></span></dt>
<dd>
<p>
Specifies the total file size in bytes to replicate or copy. This
option is useful to increase the available capacity by moving the
specified bytes of files.
</p>
<p>
The default value is unlimited.
</p>
</dd>
<dt><span class="term"><code class="option">-z</code> <em class="parameter"><code>minimum-byte</code></em></span></dt>
<dd>
<p>
Specifies the minimum file size in bytes to replicate or copy. This
option is useful not to replicate or copy small files.
</p>
<p>
The default value is unlimited.
</p>
</dd>
<dt><span class="term"><code class="option">-Z</code> <em class="parameter"><code>maximum-byte</code></em></span></dt>
<dd>
<p>
Specifies the maximum file size in bytes to replicate or copy. This
option is useful not to replicate or copy large files.
</p>
<p>
The default value is unlimited.
</p>
</dd>
<dt><span class="term"><code class="option">-w</code> <em class="parameter"><code>way-of-scheduling</code></em></span></dt>
<dd>
<p>
Specifies a scheduling method.
``noplan'' replicates/copies while finding files.
``greedy'' schedules greedily the order of replication/copy beforehand.
</p>
<p>
The default behavior is ``noplan''.
</p>
<p>
``greedy'' scheduling cannot use with the -N option and -m option.
</p>
</dd>
<dt><span class="term"><code class="option">-W</code> <em class="parameter"><code>kibibytes</code></em></span></dt>
<dd>
<p>
Specifies a threshold size/cost(KiB) to flat costs of Connections.
A Connection means a scheduling information to assign files per a
child-process
</p>
<p>
This option is effective with -w greedy.
</p>
<p>
The default value is 50*1024 KiB (50 MiB).
</p>
</dd>
<dt><span class="term"><code class="option">-I</code> <em class="parameter"><code>sec-to-update</code></em></span></dt>
<dd>
<p>
Specifies the interval in seconds to collect load average and
available capacity.
</p>
<p>
Default is 300 seconds.
</p>
</dd>
<dt><span class="term"><code class="option">-B</code></span></dt>
<dd>
<p>
Gfarm 2.6.16 or later does not select high loaded file system nodes.
This option disables this feature.
</p>
<p>
High loaded node is defined by having more CPU load than schedule_busy_load_thresh * number of CPUs. For details of schedule_busy_load_thresh, refer to a manual page of gfarm2.conf.
</p>
</dd>
<dt><span class="term"><code class="option">-U</code></span></dt>
<dd><p>
Disables checking the available disk space of the selected node every
time.
</p></dd>
<dt><span class="term"><code class="option">-F</code> <em class="parameter"><code>num-of-dirents</code></em></span></dt>
<dd>
<p>
Specifies the number of readahead entries to retrieve the directory
entries.
</p>
<p>
The default value is 10000.
</p>
</dd>
<dt><span class="term"><code class="option">-s</code> <em class="parameter"><code>kilobytes-per-second</code></em></span></dt>
<dd><p>
Specifies a throughput(KB/s) to simulate the replication/copy, and
does nothing (gets file information only).
</p></dd>
<dt><span class="term"><code class="option">-n</code></span></dt>
<dd><p>
Does nothing.
</p></dd>
<dt><span class="term"><code class="option">-p</code></span></dt>
<dd><p>
Reports the total performance information.
</p></dd>
<dt><span class="term"><code class="option">-P</code></span></dt>
<dd><p>
Reports the performance information for each file and all files.
</p></dd>
<dt><span class="term"><code class="option">-q</code></span></dt>
<dd><p>
Suppresses non-error messages.
</p></dd>
<dt><span class="term"><code class="option">-v</code></span></dt>
<dd><p>Displays verbose output.
</p></dd>
<dt><span class="term"><code class="option">-d</code></span></dt>
<dd><p>Displays debug output.
</p></dd>
<dt><span class="term"><code class="option">-?</code></span></dt>
<dd><p>Displays a list of command options.</p></dd>
</dl></div>
</div>
<div class="refsect1">
<a name="examples"></a><h2>EXAMPLES</h2>
<p>
To copy files under the directory recursively.
</p>
<div class="literallayout"><p><br>
$ gfpcopy gfarm:///dir file:///tmp/dir<br>
</p></div>
<div class="literallayout"><p><br>
$ gfpcopy file:///tmp/dir gfarm:///dir<br>
</p></div>
<div class="literallayout"><p><br>
$ gfpcopy gfarm:///dir1 gfarm:///dir2<br>
</p></div>
<div class="literallayout"><p><br>
$ gfpcopy gfarm:///dir hpss:///tmp/dir<br>
</p></div>
<div class="literallayout"><p><br>
$ cd /mnt/gfarm2fs<br>
$ gfpcopy dir /tmp/dir<br>
</p></div>
<p>
To copy a file.
</p>
<div class="literallayout"><p><br>
$ gfpcopy gfarm:///dir/file file:///dir<br>
</p></div>
<div class="literallayout"><p><br>
$ cd /mnt/gfarm2fs<br>
$ gfpcopy file /tmp/dir<br>
</p></div>
</div>
<div class="refsect1">
<a name="notes"></a><h2>NOTES</h2>
<p>
To retrieve the directory entries efficiently, it is better to execute
<span class="command"><strong>gfpcopy</strong></span> command near the metadata
server. When you need to
execute <span class="command"><strong>gfpcopy</strong></span> command far from
the metadata server, increase the parallelism by the -j and -J
options.
</p>
</div>
<div class="refsect1">
<a name="see-also"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">gfprep</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">gfreg</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">gfexport</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">gfarm2.conf</span>(5)</span>
</p>
</div>
</div></body>
</html>
|