From 95d2525fe680629ab133ca2963f61eb905b1a2be Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 1 Jul 2024 15:09:34 +0800 Subject: [PATCH 1/3] docs: tfs support disable_create_new_file --- docs/en/21-tdinternal/01-arch.md | 16 ++++++++-------- docs/zh/21-tdinternal/01-arch.md | 17 +++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/en/21-tdinternal/01-arch.md b/docs/en/21-tdinternal/01-arch.md index c2ef0a1900..a3feb5beba 100644 --- a/docs/en/21-tdinternal/01-arch.md +++ b/docs/en/21-tdinternal/01-arch.md @@ -197,20 +197,20 @@ By default, TDengine saves all data in /var/lib/taos directory, and the data fil dataDir format is as follows: ``` -dataDir data_path [tier_level] +dataDir data_path [tier_level] [primary] [disable_create_new_file] ``` -Where data_path is the folder path of mount point and tier_level is the media storage-tier. The higher the media storage-tier, means the older the data file. Multiple hard disks can be mounted at the same storage-tier, and data files on the same storage-tier are distributed on all hard disks within the tier. TDengine supports up to 3 tiers of storage, so tier_level values are 0, 1, and 2. When configuring dataDir, there must be only one mount path without specifying tier_level, which is called special mount disk (path). The mount path defaults to level 0 storage media and contains special file links, which cannot be removed, otherwise it will have a devastating impact on the written data. +Where `data_path` is the folder path of mount point, and `tier_level` is the media storage-tier. The higher the media storage-tier, means the older the data file. Multiple hard disks can be mounted at the same storage-tier, and data files on the same storage-tier are distributed on all hard disks within the tier. TDengine supports up to 3 tiers of storage, so tier_level values are 0, 1, and 2. When configuring dataDir, there must be only one mount path without specifying tier_level, which is called special mount disk (path). The mount path defaults to level 0 storage media and contains special file links, which cannot be removed, otherwise it will have a devastating impact on the written data. And `primary` means whether the mount point is the primary disk. Enter 0 for false or 1 for true. The default value is 1. A TDengine cluster can have only one `primary` mount point, which must be on tier 0. And `disable_create_new_file` means whether to prohibit the creation of new file sets on the specified mount point. Enter 0 for false and 1 for true. The default value is 0. Tier 0 storage must have at least one mount point with disable_create_new_file set to 0. Tier 1 and tier 2 storage do not have this restriction. Suppose there is a physical node with six mountable hard disks/mnt/disk1,/mnt/disk2, ..., /mnt/disk6, where disk1 and disk2 need to be designated as level 0 storage media, disk3 and disk4 are level 1 storage media, and disk5 and disk6 are level 2 storage media. Disk1 is a special mount disk, you can configure it in/etc/taos/taos.cfg as follows: ``` -dataDir /mnt/disk1/taos -dataDir /mnt/disk2/taos 0 -dataDir /mnt/disk3/taos 1 -dataDir /mnt/disk4/taos 1 -dataDir /mnt/disk5/taos 2 -dataDir /mnt/disk6/taos 2 +dataDir /mnt/disk1/taos 0 1 0 +dataDir /mnt/disk2/taos 0 0 0 +dataDir /mnt/disk3/taos 1 0 0 +dataDir /mnt/disk4/taos 1 0 1 +dataDir /mnt/disk5/taos 2 0 0 +dataDir /mnt/disk6/taos 2 0 0 ``` Mounted disks can also be a non-local network disk, as long as the system can access it. diff --git a/docs/zh/21-tdinternal/01-arch.md b/docs/zh/21-tdinternal/01-arch.md index 52212bc714..ceadb71f5c 100644 --- a/docs/zh/21-tdinternal/01-arch.md +++ b/docs/zh/21-tdinternal/01-arch.md @@ -206,7 +206,7 @@ TDengine 采用数据驱动的方式让缓存中的数据写入硬盘进行持 TDengine 多级存储配置方式如下(在配置文件/etc/taos/taos.cfg 中): ``` -dataDir [path] +dataDir [path] ``` - path: 挂载点的文件夹路径 @@ -216,16 +216,17 @@ dataDir [path] 同一存储等级可挂载多个硬盘,同一存储等级上的数据文件分布在该存储等级的所有硬盘上。 需要说明的是,数据在不同级别的存储介质上的移动,是由系统自动完成的,用户无需干预。 - primary: 是否为主挂载点,0(否)或 1(是),省略默认为 1。 +- disable_create_new_file: 是否禁止创建新文件组,0(否)或 1(是),省略默认为 0。 在配置中,只允许一个主挂载点的存在(level=0,primary=1),例如采用如下的配置方式: ``` -dataDir /mnt/data1 0 1 -dataDir /mnt/data2 0 0 -dataDir /mnt/data3 1 0 -dataDir /mnt/data4 1 0 -dataDir /mnt/data5 2 0 -dataDir /mnt/data6 2 0 +dataDir /mnt/data1 0 1 0 +dataDir /mnt/data2 0 0 0 +dataDir /mnt/data3 1 0 0 +dataDir /mnt/data4 1 0 1 +dataDir /mnt/data5 2 0 0 +dataDir /mnt/data6 2 0 0 ``` :::note @@ -233,7 +234,7 @@ dataDir /mnt/data6 2 0 1. 多级存储不允许跨级配置,合法的配置方案有:仅 0 级,仅 0 级+ 1 级,以及 0 级+ 1 级+ 2 级。而不允许只配置 level=0 和 level=2,而不配置 level=1。 2. 禁止手动移除使用中的挂载盘,挂载盘目前不支持非本地的网络盘。 3. 多级存储目前不支持删除已经挂载的硬盘的功能。 - +4. 0 级存储至少存在一个 disable_create_new_file 为 0 的挂载点,1 级 和 2 级存储没有该限制。 ::: ## 数据查询 From 6885583dff40825297ccf8a2d7921cd504c21f73 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 1 Jul 2024 15:17:27 +0800 Subject: [PATCH 2/3] docs: tfs supports disable_create_new_file --- docs/zh/21-tdinternal/01-arch.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/21-tdinternal/01-arch.md b/docs/zh/21-tdinternal/01-arch.md index ceadb71f5c..8e1d203b22 100644 --- a/docs/zh/21-tdinternal/01-arch.md +++ b/docs/zh/21-tdinternal/01-arch.md @@ -235,6 +235,7 @@ dataDir /mnt/data6 2 0 0 2. 禁止手动移除使用中的挂载盘,挂载盘目前不支持非本地的网络盘。 3. 多级存储目前不支持删除已经挂载的硬盘的功能。 4. 0 级存储至少存在一个 disable_create_new_file 为 0 的挂载点,1 级 和 2 级存储没有该限制。 + ::: ## 数据查询 From 9a95b51ee0c5c31c14bd30025cbdd934016ab74d Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 1 Jul 2024 15:42:52 +0800 Subject: [PATCH 3/3] docs: tfs supports disable_create_new_file --- docs/en/21-tdinternal/01-arch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/21-tdinternal/01-arch.md b/docs/en/21-tdinternal/01-arch.md index a3feb5beba..5cf9b90d0a 100644 --- a/docs/en/21-tdinternal/01-arch.md +++ b/docs/en/21-tdinternal/01-arch.md @@ -200,7 +200,7 @@ dataDir format is as follows: dataDir data_path [tier_level] [primary] [disable_create_new_file] ``` -Where `data_path` is the folder path of mount point, and `tier_level` is the media storage-tier. The higher the media storage-tier, means the older the data file. Multiple hard disks can be mounted at the same storage-tier, and data files on the same storage-tier are distributed on all hard disks within the tier. TDengine supports up to 3 tiers of storage, so tier_level values are 0, 1, and 2. When configuring dataDir, there must be only one mount path without specifying tier_level, which is called special mount disk (path). The mount path defaults to level 0 storage media and contains special file links, which cannot be removed, otherwise it will have a devastating impact on the written data. And `primary` means whether the mount point is the primary disk. Enter 0 for false or 1 for true. The default value is 1. A TDengine cluster can have only one `primary` mount point, which must be on tier 0. And `disable_create_new_file` means whether to prohibit the creation of new file sets on the specified mount point. Enter 0 for false and 1 for true. The default value is 0. Tier 0 storage must have at least one mount point with disable_create_new_file set to 0. Tier 1 and tier 2 storage do not have this restriction. +Where `data_path` is the folder path of mount point, and `tier_level` is the media storage-tier. The higher the media storage-tier, means the older the data file. Multiple hard disks can be mounted at the same storage-tier, and data files on the same storage-tier are distributed on all hard disks within the tier. TDengine supports up to 3 tiers of storage, so tier_level values are 0, 1, and 2. When configuring dataDir, there must be only one mount path without specifying tier_level, which is called special mount disk (path). The mount path defaults to level 0 storage media and contains special file links, which cannot be removed, otherwise it will have a devastating impact on the written data. And `primary` means whether the data dir is the primary mount point. Enter 0 for false or 1 for true. The default value is 1. A TDengine cluster can have only one `primary` mount point, which must be on tier 0. And `disable_create_new_file` means whether to prohibit the creation of new file sets on the specified mount point. Enter 0 for false and 1 for true. The default value is 0. Tier 0 storage must have at least one mount point with disable_create_new_file set to 0. Tier 1 and tier 2 storage do not have this restriction. Suppose there is a physical node with six mountable hard disks/mnt/disk1,/mnt/disk2, ..., /mnt/disk6, where disk1 and disk2 need to be designated as level 0 storage media, disk3 and disk4 are level 1 storage media, and disk5 and disk6 are level 2 storage media. Disk1 is a special mount disk, you can configure it in/etc/taos/taos.cfg as follows: