【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】
【附件:截图/日志/监控】
我的服务器挂载了NAS,可以直接把KiTv的data指向NAS目录吗?
部署过程没有问题,启动的时候,TiKv的服务启动不起来。到KiTv端口停住了,提示超市。
1、NAS盘读写性能较差,不建议tikv部署在NAS盘
2、TiKV起不来排查一下日志里面是否有异常信息
NAS一般用来做tidb br备份的目的地,存放数据建议用本地磁盘。
tikv报错,建议看tiv日志呀!
:::111 :::* \nLISTEN 0 128 :::4369 :::* \nLISTEN 0 128 :::22 :::* \nLISTEN 0 128 ::1:631 :::* \nLISTEN 0 64 :::44255 :::* \nLISTEN 0 128 :::50563 :::* \n", "stderr": "", "__hash__": "4c2debca67421ec7b87f91c02032b8fbffa5c9e5", "__func__": "github.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Execute", "hit": false}
2023-02-13T00:32:57.723+0800 DEBUG retry error {“error”: “operation timed out after 2m0s”}
2023-02-13T00:32:57.723+0800 DEBUG TaskFinish {“task”: “StartCluster”, “error”: “failed to start tikv: failed to start: 127.0.0.1 tikv-20161.service, please check the instance’s log(/home/zxsy/tidb-deploy/tikv-20161/log) for more detail.: timed out waiting for port 20161 to be started after 2m0s”, “errorVerbose”: “timed out waiting for port 20161 to be started after 2m0s\ngithub.com/pingcap/tiup/pkg/cluster/module.(*WaitFor).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/module/wait_for.go:91\ngithub.com/pingcap/tiup/pkg/cluster/spec.PortStarted\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:119\ngithub.com/pingcap/tiup/pkg/cluster/spec.(*BaseInstance).Ready\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:151\ngithub.com/pingcap/tiup/pkg/cluster/operation.startInstance\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:405\ngithub.com/pingcap/tiup/pkg/cluster/operation.StartComponent.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:534\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594\nfailed to start: 127.0.0.1 tikv-20161.service, please check the instance’s log(/home/zxsy/tidb-deploy/tikv-20161/log) for more detail.\nfailed to start tikv”}
2023-02-13T00:32:57.724+0800 INFO Execute command finished {“code”: 1, “error”: “failed to start tikv: failed to start: 127.0.0.1 tikv-20161.service, please check the instance’s log(/home/zxsy/tidb-deploy/tikv-20161/log) for more detail.: timed out waiting for port 20161 to be started after 2m0s”, “errorVerbose”: “timed out waiting for port 20161 to be started after 2m0s\ngithub.com/pingcap/tiup/pkg/cluster/module.(*WaitFor).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/module/wait_for.go:91\ngithub.com/pingcap/tiup/pkg/cluster/spec.PortStarted\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:119\ngithub.com/pingcap/tiup/pkg/cluster/spec.(*BaseInstance).Ready\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:151\ngithub.com/pingcap/tiup/pkg/cluster/operation.startInstance\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:405\ngithub.com/pingcap/tiup/pkg/cluster/operation.StartComponent.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:534\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594\nfailed to start: 127.0.0.1 tikv-20161.service, please check the instance’s log(/home/zxsy/tidb-deploy/tikv-20161/log) for more detail.\nfailed to start tikv”}
这里需要说明一下,因为挂载的是nas nfs ,所以没有用到
5.编辑 /etc/fstab
文件,添加 nodelalloc
挂载参数。的要求。
看一下节点日志里有没有有效信息?
/home/zxsy/tidb-deploy/tikv-20161/log
tikv 好像不支持
数据库对磁盘读写要求很高啊,人家恨不得都用内存,ssd盘,你用NAS,能承载住业务吗?
应该是不支持。官方文档明确说最好使用ext4。我这也使用过,tikv就是启动不成功。
NAS应该是可以搭建,只是承载的业务量有限。
我和我们的运维的人确认了。我测试过。使用的是阿里云的nas存储,搭建tikv真的不成功。 后来我们使用了更贵的本地磁盘SSD磁盘。目前是xfs格式。支持。
阿里云的NAS我用过,使用的是高版本的,iops也做过压测,测试也不建议使用,正式使用tikv更不行,抛去读写性能外,网络是瓶颈,而且我同时挂载了100个客户端做过测试,50以上客户端性能对半消耗,基本上可以说行不通,NAS基于nfsv3协议挂载,测试中,发现对centos3.0几的内核版本挂载有BUG,会出现tcp丢失重传严重的现象。