Scroll to navigation

GFPREP(1) Gfarm GFPREP(1)

NAME

gfprep - replicate Gfarm files in parallel

SYNOPSIS

gfprep [-nqvdpPU] [-mx] [-X regexp] [-S  source-domainname] [-h source-hostfile] [-D  destination-domainname] [-H destination-hostfile] [-j  num-of-processes] [-J  num-of-processes] [-M total-byte] [-z minimum-byte] [-Z maximum-byte] [-w way-of-scheduling] [-W  kilobytes-for-threshold] [-s  KB/s-to-simulate] [-F  num-for-readahead] [-N num-of-replicas] path

DESCRIPTION

gfprep creates replicas of Gfarm files in parallel.
If the path parameter is a directory, files under the directory will be replicated recursively.
path is a Gfarm URL or a path on a mountpoint of gfarm2fs.
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 replicated.
Idler filesystem nodes will be selected for source or destination. The maximum number of parallel to send or receive per host is the number of CPUs. Please see the manual page of gfhost for information about the number of CPUs.
gfprep can also read the directory and get information of the entries in parallel.

GFPREP OPTIONS

These are the options only for gfprep.
-N num-of-replicas
Specifies the required number of file replicas. If there are a sufficient number of replicas in the destination hosts, neither any copying nor any removal will be done.
If this option is not specified, -N 1 is assumed.
-x
Removes extra file replicas when a set of destination nodes has more file replicas than specified by -N option.
-m
Migrates file replicas within a set of source nodes to destination nodes.
This option requires -S or -h or -D or -H options.
This option and -N option are mutually exclusive.

COMMON OPTIONS

gfprep has the same options with gfpcopy.
-X regexp
Skips source-files matched by pattern of regexp. If multiple patterns are specified, multiple -X options can be specified.
-S source-domainname
Specifies a domain name to select files. Only files which have the real file on the domain will be sent.
-h source-hostfile
Specifies a file of which describes hostnames of file system nodes to replicate or copy files. Only files which have the real file on the host names will be selected. The source-hostfile consists of a filesystem node name on each line.
If ``-'' is specified, standard input is used to read the host list.
-L
Filesystem nodes selected by -S or -h are only used to send for the source.
-D destination-domainname
Specifies the domain name for destination.
If neither this nor the -H option is specified, replicas may be copied to any available host.
-H destination-hostfile
Specifies a file which describes hostnames for destination. The destination-hostfile consists of a filesystem node name on each line.
If ``-'' is specified, standard input is used to read the host list.
-j num-of-processes
Specifies the maximum number of processes to create file replicas (or copy files) simultaneously.
The default value is the parameter of client_parallel_copy in gfarm2.conf. (see man gfarm2.conf)
The maximum number of process per filesystem node for source or destination is the number of CPUs (see man gfhost).
-J num-of-processes
Specifies the number of processes to read directories in parallel.
The default value is 8.
-M total-byte
Specifies the bytes to limit total copied size.
The default value is unlimited.
-z minimum-byte
Specifies the bytes to limit minimum size of a file.
The default value is unlimited.
-Z maximum-byte
Specifies the bytes to limit maximum size of a file.
The default value is unlimited.
-w way-of-scheduling
Specifies the name of scheduling way. ``noplan'' replicates/copies while files are found. ``greedy'' schedules greedily the order of replication/copy beforehand.
The default behavior is ``noplan''.
``greedy'' scheduling cannot use the -N option or -m option.
-W kibibytes
Specifies a threshold size/cost(KiB) to flat costs of Connections. A Connection means a scheduling information (assgined files) per a child-process.
This option is effective with -w greedy.
The default value is 50*1024 KiB (50MiB).
-U
Disables checking the available disk space of the selected node every time.
-F num-of-dirents
Specifies the number of entries to perform the directory readahead.
The default value is 10000.
-s kilobytes-per-sec.
Specifies a throughput(KB/s) to simulate the replication/copy, and does nothing (gets file information only).
-n
Does nothing.
-p
Reports the total performance and various results.
-P
Reports the each and total performance and various results.
-q
Suppresses non-error messages.
-v
Displays verbose output.
-d
Displays debug output.
-?
Displays a list of command options.

EXAMPLES

To replicate files under the directory recursively.
$ gfprep -N 3 gfarm:///dir
$ cd /mnt/gfarm2fs
$ gfprep -N 3 dir
To replicate a file or reduce surplus replicas of the file.
$ gfprep -N 3 -x gfarm:///dir/file
To migrate replicas from gfsd1.example.com to other nodes.
$ gfprep -m -S gfsd1.example.com gfarm:///

NOTES

When the -L or -m option is not specified, a source node is not always selected within a set of specified source filesystem nodes.
gfprep command should be executed at the same host of gfmd. If the gfmd and gfprep are far apart, the gfprep operation is slow. Specifying a large value by -j or -J options may be effective in such a case.

SEE ALSO

gfrep(1), gfpcopy(1), gfhost(1), gfarm2.conf(5)
27 Aug 2015 Gfarm