Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

(I'm not too familiar with admin stuff.)

My server has two disks/partitions, one mounted on /, the other much bigger one mounted on /home.

My MongoDB data file was at /var/lib/mongodb by default (I'm on a Debian).

I'm assuming I can just move data files around and set the conf in mongodb.conf.

Is having my data files on /home considered a good practice on "traditional" Linux file organizations?

If not, should I make a new partition of my large disk, and where should I mount it in that case?

Thanks

share|improve this question

1 Answer 1

up vote 4 down vote accepted

If this is a personal development database then it seems /home/<user>/var/lib/ would be one of the more unixish places to put it (but then the whole thing should be build with /home/<user> as root, i.e the conf would be in /home/<user>/etc/. If you are building from source /usr/local or /opt/ might be more appropriate. Many people mimic the filesystem hiearchy in their home directories.

If this is a server, than generally the default (a.k.a expected) place to put it makes sense. That way as time progresses and new people use the server things are where they expect them to be.

Ideally partitions should be sized to fit what is going on them, not the other way around.

See the FHS (Filesystem Hierarchy Standard) for where things go in Unix and why.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.