TMAegis
Plus de règles pour tdsql

TMA-TDSQL-1.1

Ensure the TDSQL Database Is Placed on a Non-System Partition

MoyenneNiveau 1Automatiséetdsql

Description

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.

Méthode de vérification

Méthode d'audit: Commande 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
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
tdsqlstorage
Référence
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.1 Ensure the TDSQL Database Is Placed on a Non-System Partition

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target tdsql