0

We have small gpdb cluster. When i am trying to create New user based Filespace. that is Calling gpfilespace utility

$gpfilespace -o gpfilespace_config

Getting following error at prompt:At the time of creation of filespace .

[gpadmin@mdw dfs]$ gpfilespace -o gpfilespace_config
20160615:15:17:07:027941 gpfilespace:mdw:gpadmin-[INFO]:-
A tablespace requires a file system location to store its database
files. A filespace is a collection of file system locations for all components
in a Greenplum system (primary segment, mirror segment and master instances).
Once a filespace is created, it can be used by one or more tablespaces.

20160615:15:17:07:027941 gpfilespace:mdw:gpadmin-[INFO]:-getting config
Enter a name for this filespace
> dfs_system

Checking your configuration:
Your system has 2 hosts with 1 primary and 1 mirror segments per host.
Your system has 2 hosts with 0 primary and 0 mirror segments per host.

Configuring hosts: [datanode1, datanode2]

Please specify 1 locations for the primary segments, one per line:
primary location 1> /data/primary/dfs/gpseg1
[Error]datanode2: /data/primary/dfs/gpseg1 : No such file or directory

I have tried different ways but user file space is not creating.

Any help on it would be much appreciated ?

4

1 に答える 1

1

この例は、私がずっと前に単一ノード VM を使用している顧客に送ったものです。

gpadmin$ mkdir /user
gpadmin$ cd data
gpadmin$ gpfilespace -o .
[INFO]:-
A tablespace requires a file system location to store its database
files. A filespace is a collection of file system locations for all components
in a Greenplum system (primary segment, mirror segment and master instances).
Once a filespace is created, it can be used by one or more tablespaces.

[INFO]:-getting config
Enter a name for this filespace
> userspace

Checking your configuration:
Your system has 1 hosts with 2 primary and 0 mirror segments per host.

Configuring hosts: [jonnymac]

Please specify 2 locations for the primary segments, one per line:
primary location 1> /user
primary location 2> /user

Enter a file system location for the master
master location> /user
gpfilespace:jonnymac:gpadmin-[INFO]:-Creating configuration file...
gpfilespace:jonnymac:gpadmin-[INFO]:-[created]
gpfilespace:jonnymac:gpadmin-[INFO]:-

gpadmin$ gpfilespace --config ./gpfilespace_config_xxxxxxxx_xxxxxx
[INFO]:-
A tablespace requires a file system location to store its database files. A 
filespace is a collection of file system locations for all components
in a Greenplum system (primary segment, mirror segment and master instances).
Once a filespace is created, it can be used by one or more tablespaces.

[INFO]:-getting config
[INFO]:-Connecting to database
[INFO]:-Filespace "userspace" successfully created

この単一ノードの例では、マスターとセグメントは /user にあります。gpseg-1 はマスターで、gpseg[0-1] はセグメントです。ここでそれを見ることができます:

gpadmin$ cd /user
gpadmin$ ls -la
total 0
drwxr-xr-x   5 gpadmin  admin   170 Oct 11 10:29 .
drwxrwxr-t  33 root     admin  1190 Oct 11 10:20 ..
drwx------   2 gpadmin  admin    68 Oct 11 10:29 gpseg-1
drwx------   2 gpadmin  admin    68 Oct 11 10:29 gpseg0
drwx------   2 gpadmin  admin    68 Oct 11 10:29 gpseg1
gpadmin$ psql
psql (8.2.15)
Type "help" for help.

これで、このファイルスペースを使用するテーブルスペースを作成できます。

gpdb=# create tablespace usertablespace filespace userspace;
CREATE TABLESPACE
gpdb=# select * from pg_tablespace;
spcname     | spcowner | spclocation | spcacl | spcprilocations | spcmirlocations | spcfsoid
----------------+----------+-------------+--------+-----------------+-----------------+----------
pg_default     |       10 |             |        |                 |                 |     3052
pg_global      |       10 |             |        |                 |                 |     3052
usertablespace |       10 |             |        |                 |                 |   271611
(3 rows)

gpdb=# \q
于 2016-06-15T21:15:57.733 に答える