Creating Data Storage Areas on Segment Hosts

Creating Data Storage Areas on Segment Hosts

Data storage areas are required on the Greenplum Database segment hosts for primary segments. Separate storage areas are required for mirror segments.

To create the data directory locations on all segment hosts

  1. On the master host, log in as root:
    # su
  2. Create a file called hostfile_gpssh_segonly. This file should have only one machine configured host name for each segment host. For example, if you have three segment hosts:
    sdw1
    sdw2
    sdw3
  3. Using gpssh, create the primary and mirror data directory locations on all segment hosts at once using the hostfile_gpssh_segonly file you just created. For example:
    # source /usr/local/greenplum-db-4.3.x.x/greenplum_path.sh 
    # gpssh -f hostfile_gpssh_segonly -e 'mkdir /data/primary'
    # gpssh -f hostfile_gpssh_segonly -e 'mkdir /data/mirror'
    # gpssh -f hostfile_gpssh_segonly -e 'chown gpadmin /data/primary'
    # gpssh -f hostfile_gpssh_segonly -e 'chown gpadmin /data/mirror'