0

I need to install a mongodb instance with a lot of data storage. We have a Lustre FS with hundreds of terabytes, but when monogdb start show me this error:

Mon Jul 15 12:06:50.898 [initandlisten] exception in initAndListen: 10310 Unable to lock file: /var/lib/mongodb/mongod.lock. Is a mongod instance already running?, terminating
Mon Jul 15 12:06:50.898 dbexit: 

But the permissions should be fine:

# ls -lart /project/mongodb/
total 8
drwxr-xr-x 19 root   root   4096 Jul 15 11:12 ..
-rwxr-xr-x  1 mongod mongod    0 Jul 15 11:54 mongod.lock
drwxr-xr-x  2 mongod mongod 4096 Jul 15 12:10 .

And no other running process:

# ps -fu mongod
UID        PID  PPID  C STIME TTY          TIME CMD
# 

Has anyone done this (Lustre+mongodb)?

# rm mongod.lock
rm: remove regular empty file `mongod.lock'? y
# ls -lrt
total 0
# ls -lart
total 8
drwxr-xr-x 19 root   root   4096 Jul 15 11:12 ..
drwxr-xr-x  2 mongod mongod 4096 Jul 15 12:10 .
# ps aux | grep mongod
root     25865  0.0  0.0 103296   884 pts/15   S+   13:04   0:00 grep mongod
# service mongod start
Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: 25935
all output going to: /var/log/mongo/mongod.log
ERROR: child process failed, exited with error number 100
                                                           [FAILED]
LustreOne
  • 339
  • 2
  • 9
Anibal
  • 1
  • 1

1 Answers1

1

I realize that this is an old question, but I feel I should set the record straight.

MongoDB, or any DB or any application can run against a lustre file system without issues. However, by default, lustre clients do not explicitly set user_xattr or flock (enable).

Having set -o flock or even -o localflock while mounting the file system would have resolved the issue.