From 34e4f79557603abcbd2b8d33414a63a8736f2c58 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Sat, 23 Jul 2022 19:57:10 +0800 Subject: [PATCH] os: multi-level storage mount error --- source/common/src/tglobal.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index a73808f2ed..36900e3dfa 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -213,10 +213,6 @@ static int32_t taosSetTfsCfg(SConfig *pCfg) { memcpy(&tsDiskCfg[index], pCfg, sizeof(SDiskCfg)); if (pCfg->level == 0 && pCfg->primary == 1) { tstrncpy(tsDataDir, pCfg->dir, PATH_MAX); - if (taosMulMkDir(tsDataDir) != 0) { - uError("failed to create dataDir:%s since %s", tsDataDir, terrstr()); - return -1; - } } if (taosMulMkDir(pCfg->dir) != 0) { uError("failed to create tfsDir:%s since %s", tsDataDir, terrstr()); @@ -227,12 +223,13 @@ static int32_t taosSetTfsCfg(SConfig *pCfg) { if (tsDataDir[0] == 0) { if (pItem->str != NULL) { - taosAddDataDir(0, pItem->str, 0, 1); + taosAddDataDir(tsDiskCfgNum, pItem->str, 0, 1); tstrncpy(tsDataDir, pItem->str, PATH_MAX); if (taosMulMkDir(tsDataDir) != 0) { - uError("failed to create dataDir:%s since %s", tsDataDir, terrstr()); + uError("failed to create tfsDir:%s since %s", tsDataDir, terrstr()); return -1; } + tsDiskCfgNum++; } else { uError("datadir not set"); return -1; -- GitLab