When I first installed MongoDB 2.2.3 with apt-get, following the instructions from 10gen installation guide, it auto starts when the server starts.
However, after following the instructions in /var/log/mongodb/mongodb.log:
Tue Apr 30 11:35:28.643 [initandlisten] ** WARNING: You are running on a NUMA machine.
Tue Apr 30 11:35:28.643 [initandlisten] ** We suggest launching mongod like this to avoid performance problems:
Tue Apr 30 11:35:28.643 [initandlisten] ** numactl --interleave=all mongod [other options]
Tue Apr 30 11:35:28.643 [initandlisten]
Tue Apr 30 11:35:28.643 [initandlisten] ** WARNING: /proc/sys/vm/zone_reclaim_mode is 1
Tue Apr 30 11:35:28.643 [initandlisten] ** We suggest setting it to 0
Tue Apr 30 11:35:28.643 [initandlisten] ** http://www.kernel.org/doc/Documentation/sysctl/vm.txt
Tue Apr 30 11:35:28.643 [initandlisten]
it doesn't auto start any more.
So now I have to enter:
echo 0 > /proc/sys/vm/zone_reclaim_mode && numactl --interleave=all /usr/bin/mongod --config /etc/mongodb.conf &
manually every time in a terminal to start it.
However, I suspect starting it this way also causes service mongodb stop/restart
to fail. It will throw a stop: Unknown instance:
error.
Is there a proper way to resolve this?