TDSQL
TMA-TDSQL-1.1
Ensure the TDSQL Database Is Placed on a Non-System Partition
中级别 1自动化tdsql
说明
TDSQL database instance data (including MySQL data files, binary logs, and transaction logs) should be stored on a dedicated, non-system partition. In TDSQL, the data directory and log directory paths can be configured per host via the ZooKeeper set_hostdir node. Uses TDSQL_DATA (default /data/tdsql/data) for the instance data directory; passes when it is not on the /, /var or /usr filesystem.
检查方式
审计方法: Shell 命令
shell
d=${TDSQL_DATA:-/data/tdsql/data}; [ -d "$d" ] || exit 1; m=$(findmnt -n -o TARGET -T "$d" 2>/dev/null) || exit 1; case "$m" in /|/var|/usr) echo "on $m";; *) echo compliant;; esac- 预期输出
compliant
修复方式
修复方法: 操作指南或基础设施补丁
Create a dedicated partition/volume for TDSQL data (e.g. mounted at /data/tdsql with nodev), migrate the data directory to it during a maintenance window and add it to /etc/fstab.
属性
- 操作系统
- 任意
- 标签
- tdsqlstorage
- 参考
- CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.1 Ensure the TDSQL Database Is Placed on a Non-System Partition
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target tdsql