Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql Postgres配置指向centos上的加密文件系统_Postgresql - Fatal编程技术网

Postgresql Postgres配置指向centos上的加密文件系统

Postgresql Postgres配置指向centos上的加密文件系统,postgresql,Postgresql,我正在开发centos 6.2版本。我想用加密文件系统配置postgres。 我已经使用LUKS在centos上创建了一个加密分区。现在我想用这个挂载的分区初始化db集群。但是我得到了下面的错误 bash-4.1$ initdb -D /mnt/cryptofs/data/ could not change directory to "/root/dimple/encryption" The files belonging to this database system will be owne

我正在开发centos 6.2版本。我想用加密文件系统配置postgres。 我已经使用LUKS在centos上创建了一个加密分区。现在我想用这个挂载的分区初始化db集群。但是我得到了下面的错误

bash-4.1$ initdb -D /mnt/cryptofs/data/
could not change directory to "/root/dimple/encryption"
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

initdb: directory "/mnt/cryptofs/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/mnt/cryptofs/data" or run initdb
with an argument other than "/mnt/cryptofs/data".

您将
PGDATA
指定为
/mnt/cryptofs/data/
,而
initdb
抱怨
/root/dimple/encryption
,这让我觉得:

  • /mnt/cryptofs/data/
    实际上是一个符号链接
  • 您没有对
    /root/dimple/encryption
    目录的适当权限
  • /mnt/cryptofs/data/
    中有一些文件。确保它是完全空的,没有隐藏的文件,也没有
    丢失+找到的
    目录
最好看看什么是
/mnt/cryptofs/data/
,权限是什么