diff --git "a/content/zh/post/zhangcuiping/\345\256\211\350\243\205\346\225\260\346\215\256\345\272\223\346\227\266\346\217\220\347\244\272\346\227\240\346\225\210\347\233\256\345\275\225\346\200\216\344\271\210\345\212\236.md" "b/content/zh/post/zhangcuiping/\345\256\211\350\243\205\346\225\260\346\215\256\345\272\223\346\227\266\346\217\220\347\244\272\346\227\240\346\225\210\347\233\256\345\275\225\346\200\216\344\271\210\345\212\236.md" new file mode 100644 index 0000000000000000000000000000000000000000..6d5f4e6204f666430e0705e9e646fa5f5501d27e --- /dev/null +++ "b/content/zh/post/zhangcuiping/\345\256\211\350\243\205\346\225\260\346\215\256\345\272\223\346\227\266\346\217\220\347\244\272\346\227\240\346\225\210\347\233\256\345\275\225\346\200\216\344\271\210\345\212\236.md" @@ -0,0 +1,75 @@ ++++ + +title = "安装数据库时提示无效目录怎么办" + +date = "2023-04-30" + +tags = ["openGauss安装"] + +archives = "2023-04" + +author = "张翠娉" + +summary = "安装数据库时提示无效目录怎么办" + +img = "/zh/post/zhangcuiping/title/img.png" + +times = "14:20" + ++++ + +# 安装数据库时提示无效目录怎么办? + +**背景介绍**: + +使用PTK安装MogDB数据库时,提示The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:|/usr/lib/s。 + +**报错内容及原因**: + +因为目录的权限问题,有些目录不支持数据库安装就会报无效目录。 + +**说明**:数据库目录设置为/dev、/tmp、/run等,都会提示无效目录。 + +```bash +[root@kylinos mogdb500]# more ptk-install-172.23.2.23.err.log +[exited status: 1] Command: "bash -c \". ~/.ptk_mogdb_env && /run/mogdb500/app/bin/gs_initdb --nodename dn_6001_6002 --no-locale --encoding=UTF-8 -D / +run/mogdb500/data --pwpasswd *** ": The files belonging to this database system will be owned by user "omm5". +This user must also own the server process. + +The database cluster will be initialized with locale "C". +The default text search configuration will be set to "english". + +fixing permissions on existing directory /run/mogdb500/data ... ok +creating subdirectories ... in ordinary occasionok +creating configuration files ... ok +selecting default max_connections ... 100 +selecting default shared_buffers ... 1024MB +Begin init undo subsystem meta. +[INIT UNDO] Init undo subsystem meta successfully. +creating template1 database in /run/mogdb500/data/base/1 ... The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:|/usr/lib/s +ystemd/ +2023-07-17 15:31:18.254 [unknown] [unknown] localhost 22695720371200 0[0:0#0] [BACKEND] WARNING: macAddr is 21076/10164381, sysidentifier is 1381236 +891/412969417, randomNum is 2272029129 +2023-07-17 15:31:18.265 [unknown] [unknown] localhost 22695720371200 0[0:0#0] [DBL_WRT] PANIC: Could not create file "global/pg_dw_meta": Invalid ar +gument +2023-07-17 15:31:18.265 [unknown] [unknown] localhost 22695720371200 0[0:0#0] [DBL_WRT] BACKTRACELOG: tid[425110]'s backtrace: + /run/mogdb500/app/bin/mogdb(+0xe39396) [0x55e554410396] + /run/mogdb500/app/bin/mogdb(_Z9errfinishiz+0x441) [0x55e554408ab1] + /run/mogdb500/app/bin/mogdb(_Z14dw_create_filePKc+0xf6) [0x55e554e1afe6] + /run/mogdb500/app/bin/mogdb(_Z21dw_generate_meta_fileP21st_dw_batch_meta_file+0x5e) [0x55e554e1b05e] + /run/mogdb500/app/bin/mogdb(_Z12dw_bootstrapv+0x85) [0x55e554e1b4d5] + /run/mogdb500/app/bin/mogdb(_Z13BootStrapXLOGv+0xb68) [0x55e554e4a2a8] + /run/mogdb500/app/bin/mogdb(_Z20BootStrapProcessMainiPPc+0x60f) [0x55e5544fde5f] + /run/mogdb500/app/bin/mogdb(main+0x7c2) [0x55e553ebc752] + /lib64/libc.so.6(__libc_start_main+0xe7) [0x14a4425e9b27] + /run/mogdb500/app/bin/mogdb(_start+0x2a) [0x55e553f2d61a] + Use addr2line to get pretty function name and line + +could not write to child process: Broken pipe +gs_initdb: removing contents of data directory "/run/mogdb500/data" +``` + +**解决办法**: + +将配置文件的base_dir设置为/opt即可成功安装。 +