A newer version of this documentation is available. Use the version menu above to view the most up-to-date release of the Greenplum 6.x documentation.
Moves mirror segment instances to new locations.
gpmovemirrors -i move_config_file [-d master_data_directory] [-l logfile_directory] [-B parallel_processes] [-v] gpmovemirrors -? gpmovemirrors --version
The gpmovemirrors utility moves mirror segment instances to new locations. You may want to move mirrors to new locations to optimize distribution or data storage.
Before moving segments, the utility verifies that they are mirrors, and that their corresponding primary segments are up and are in synchronizing or resynchronizing mode.
By default, the utility will prompt you for the file system location(s) where it will move the mirror segment data directories.
You must make sure that the user who runs gpmovemirrors (the gpadmin user) has permissions to write to the data directory locations specified. You may want to create these directories on the segment hosts and chown them to the appropriate user before running gpmovemirrors.
- -B parallel_processes
- The number of mirror segments to move in parallel. If not specified, the utility will start up to 4 parallel processes depending on how many mirror segment instances it needs to move.
- -d master_data_directory
- The master data directory. If not specified, the value set for $MASTER_DATA_DIRECTORY will be used.
- -i move_config_file
- A configuration file containing information about which mirror segments to move, and where to move them.
- You must have one mirror segment listed for each primary segment in the system. Each line inside the configuration file has the following format (as per attributes in the gp_segment_configuration catalog table):
- Where contentID is the segment instance content ID, address is the host name or IP address of the segment host, port is the communication port, and data_dir is the segment instance data directory.
- -l logfile_directory
- The directory to write the log file. Defaults to ~/gpAdminLogs.
- -v (verbose)
- Sets logging output to verbose.
- --version (show utility version)
- Displays the version of this utility.
- -? (help)
- Displays the online help.
Moves mirrors from an existing Greenplum Database system to a different set of hosts:
$ gpmovemirrors -i move_config_file
Where the move_config_file looks something like this:
1|sdw2|50001|/data2/mirror/gpseg1 sdw3|50001|/data/mirror/gpseg1 2|sdw2|50001|/data2/mirror/gpseg2 sdw4|50001|/data/mirror/gpseg2 3|sdw3|50001|/data2/mirror/gpseg3 sdw1|50001|/data/mirror/gpseg3