nerdexam
CompTIA

XK0-005 · Question #47

Which of the following is the BEST reason for not storing database files in the /var directory?

The correct answer is D. If log files fill up /var, it might corrupt the database. Storing database files in the /var directory is problematic because the /var partition typically houses dynamic data like logs, which, if they grow large and fill the partition, could directly compromise the functionality and integrity of the database.

System Management

Question

Which of the following is the BEST reason for not storing database files in the /var directory?

Options

  • AThe /var filesystem is not fast enough for database files.
  • BThe number of files in /var is limited by the available inodes.
  • CFiles in /var do not have strict file permissions.
  • DIf log files fill up /var, it might corrupt the database.

How the community answered

(52 responses)
  • A
    13% (7)
  • B
    4% (2)
  • C
    6% (3)
  • D
    77% (40)

Why each option

Storing database files in the `/var` directory is problematic because the `/var` partition typically houses dynamic data like logs, which, if they grow large and fill the partition, could directly compromise the functionality and integrity of the database.

AThe /var filesystem is not fast enough for database files.

The speed of a filesystem is determined by the underlying storage hardware (e.g., SSD vs. HDD) and configuration, not inherently by the `/var` directory's logical purpose; database performance is a separate concern from partition purpose.

BThe number of files in /var is limited by the available inodes.

While any filesystem can run out of inodes, this is a general filesystem limitation and not a specific characteristic or the primary reason why `/var` is unsuitable for databases compared to the risk of space exhaustion from other variable data.

CFiles in /var do not have strict file permissions.

File permissions are configurable and can be set strictly on files and directories within `/var` just like any other part of the filesystem; lack of strict permissions is a configuration issue, not an inherent property of `/var`.

DIf log files fill up /var, it might corrupt the database.Correct

The `/var` directory is intended for variable data such as log files, mail queues, and spools. If a database is stored in `/var`, an uncontrolled growth of log files or other variable data could fill up the partition, causing the database to run out of space for transactions or new data, potentially leading to corruption or unavailability.

Concept tested: Linux filesystem hierarchy standard - /var

Source: https://www.pathname.com/fhs/pub/fhs-2.3.html#VAR

Topics

#Linux FHS#Disk Management#Database Administration#System Best Practices

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice