You'll always find me placing files in standard directories or as close to them as possible.
The reason for this is so that future admins can find them later -- because very often that future admin is me!
Consider logs, for instance, since that's what you have brought up. I would create a subdirectory in /var/log
to store these, such as /var/log/kafka
. The directory /var/log
is where most admins will go first to look for logs for any package. Apache's default of /tmp/kafka-logs
is pretty senseless, as you've already discovered. Cloudera's default log directory /var/log/kafka
makes much more sense.
If it turns out that you need to mount a disk partition to store logs, you don't have to change the log directory; instead, you can mount the new disk space directly at /var/log/kafka
.
And /opt
is intended for large third party packages; it's not where I expect to find most things. There are few standards or conventions for anything in this directory, so things could end up difficult to find.