Does TiKV not support deployment on ZFS systems?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiKV不支持ZFS系统部署?

| username: dba-kit

When attempting to deploy TiDB on a single machine system, I found that when the data directory of TiKV is set to ZFS, TiKV fails to start and reports an error. However, with the same configuration file, it works fine on ext4 or xfs. The error message for ZFS is as follows:

failed to open raft engine: Other("[components/raft_log_engine/src/engine.rs:464]: IO Error: fallocate")] [backtrace=   0: tikv_util::set_panic_hook::{{closure}}
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/tikv_util/src/lib.rs:490:18
   1: std::panicking::rust_panic_with_hook
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:588:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:143:14
   6: core::result::unwrap_failed
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1749:5
   7: core::result::Result<T,E>::expect
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1022:23
      <raft_log_engine::engine::RaftLogEngine as server::server::ConfiguredRaftEngine>::build
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:1434:13
      server::server::TiKvServer<CER>::init_raw_engines
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:1468:27
   8: server::server::run_impl
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:129:35
      server::server::run_tikv
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:163:5
   9: tikv_server::main
             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/cmd/tikv-server/src/main.rs:189:5
  10: core::ops::function::FnOnce::call_once
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
      std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:122:18
  11: main
  12: __libc_start_main
  13: <unknown>
| username: 啦啦啦啦啦 | Original post link

For production environments, it is recommended to use ext4, as its reliability, security, and stability have been proven in numerous online scenarios.

| username: dba-kit | Original post link

This is a test environment. Initially, we planned to use ZFS’s snapshot & rollback for the test environment rollback solution.

| username: 啦啦啦啦啦 | Original post link

So far, I haven’t seen any cases using the ZFS file system. The experts on TUG have discussed this issue.
https://asktug.com/t/topic/153608

| username: dba-kit | Original post link

It’s not a ZFS compatibility issue. The same Ubuntu version, the same ZFS version, the same TiDB configuration, and the same TiDB version can be set up normally on Alibaba Cloud, but the above error occurs when setting up on Tencent Cloud. I guess Tencent Cloud’s kernel has been modified.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.