CompTIA Linux+ Exam XK0-004: Storing Database Files in /var Directory

Why Avoid Storing Database Files in the /var Directory

Question

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

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

The BEST reason for not storing database files in the /var directory is option D - If log files fill up /var, it might corrupt the database.

The /var directory is a directory in the Linux filesystem hierarchy that contains variable data files that are expected to grow over time. It includes files such as log files, spool files, and cache files, among others. While it is a common practice to store database files in the /var directory, it is not recommended because of the following reasons:

If log files fill up /var, it might corrupt the database: The /var directory is often used for storing log files, and if these log files consume all available space, it can cause problems for other files in the directory, including database files. When log files fill up the /var directory, it can cause disk space issues, which can lead to file corruption and data loss.

Therefore, storing database files in the /var directory is not a good idea because it can lead to problems with the integrity and availability of the database files.

Option A - The /var filesystem is not fast enough for database files is not a valid reason because the performance of the /var directory depends on the underlying storage subsystem, and it is possible to configure a fast storage subsystem for /var.

Option B - The number of files in /var is limited by the available inodes is not a valid reason because the number of inodes can be increased, and there are many other directories in the Linux filesystem hierarchy that have inode limitations.

Option C - Files in /var do not have strict file permissions is also not a valid reason because files in the /var directory can have strict file permissions, just like any other directory in the filesystem hierarchy.