GP创建文件系统 以及表空间

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

gpfilespace


每台节点创建文件目录 主实例 镜像实例都需要创建目录
例如 两个主 两个镜像
mkdir -p /data/utlcdr/seg1/pg_pri_cdr
mkdir -p /data/utlcdr/seg2/pg_pri_cdr

mkdir -p /data/utlcdr/seg1/pg_mir_cdr
mkdir -p /data/utlcdr/seg2/pg_mir_cdr
以上内容每台节点都需要执行

mkdir -p /data/utlcdr/master/pg_master_cdr 主实例


Create a filespace configuration file. You will be prompted to enter a name for the filespace, a master file system location, the primary segment file system locations, and the mirror segment file system locations. For example, if your configuration has 2 primary and 2 mirror segments per host, you will be prompted for a total of 5 locations (including the master). The file system locations must exist on all hosts in your system prior to running the gpfilespace utility:


$ gpfilespace -o .
Enter a name for this filespace
> fastdisk
Checking your configuration:
Your system has 2 hosts with 2 primary and 2 mirror segments per host.
Configuring hosts: [sdw1, sdw2]
Please specify 2 locations for the primary segments, one per line:
primary location 1> /gp_pri_filespc
primary location 2> /gp_pri_filespc
Please specify 2 locations for the mirror segments, one per line:
mirror location 1> /gp_mir_filespc
mirror location 2> /gp_mir_filespc
Enter a file system location for the master:
master location> /gp_master_filespc
Example filespace configuration file:
filespace:fastdisk
mdw:1:/gp_master_filespc/gp-1
sdw1:2:/gp_pri_filespc/gp0
sdw1:3:/gp_mir_filespc/gp1
sdw2:4:/gp_mir_filespc/gp0
sdw2:5:/gp_pri_filespc/gp1
Execute the configuration file to create the filespace in Greenplum Database:
$ gpfilespace -c gpfilespace_config_1

执行如下命令 创建表空间
CREATE TABLESPACE utlcdr OWNER gpadmin
FILESPACE utlcdr

相关文档
最新文档