【Docker】报错Data page checksums are disabled.
报错
Data page checksums are disabled.initdb: error: directory "/var/lib/postgresql/data/pgdata" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data/pgdata" or run initdb with an argument other than "/var/lib/postgresql/data/pgdata".
mkdir: can't create directory '/var/lib/postgresql/data/pgdata': Operation not permitted
mkdir: can't create directory '/var/lib/postgresql/data/pgdata': Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
思路
提升这个路径是有数据 /var/lib/postgresql/data/pgdata 才导致了失败,那么查看这个路径,提升没有此路径,猜测是docker容器绑定的路径,在Bind mounts里即可找到对应的真实路径,
找了半天在这里
解决
删掉真实路径下的内容即可