I've seen the strange behavior of my server and first of all I looked at log file /var/log/mongodb/mongodb.log
. There I saw the next lines:
Wed Jan 7 16:33:31 [FileAllocator] allocating new datafile /var/lib/mongodb/salesg_call_log.1, filling with zeroes...
Wed Jan 7 16:33:31 [FileAllocator] FileAllocator: posix_fallocate failed: errno:28 No space left on device falling back
Wed Jan 7 16:33:31 [FileAllocator] error failed to allocate new file: /var/lib/mongodb/salesg_call_log.1 size: 33554432 errno:28 No space left on device
Wed Jan 7 16:33:31 [FileAllocator] will try again in 10 seconds
I guess that it means that there is no free disk space on my server.
Then I typed command df -h
:
Filesystem Size Used Avail Use% Mounted on
rootfs 9.3G 2.5G 6.5G 28% /
udev 10M 0 10M 0% /dev
tmpfs 55M 92K 55M 1% /run
/dev/mapper/jatare--web--front_system-root 9.3G 2.5G 6.5G 28% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 109M 0 109M 0% /run/shm
/dev/xvda1 134M 18M 109M 15% /boot
My MongoDB-files store at /var/lib/mongodb/
, and there are a lot of enough space to store data.
Then I've just restarted mongodb service and apache2 service and now everything works well. But i am afraid of getting the same situation in near future.
So my question is what is the problem and how to solve it?
For @NickW:
root@jatare-web-front:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 593408 46255 547153 8% /
udev 57496 273 57223 1% /dev
tmpfs 69353 189 69164 1% /run
/dev/mapper/jatare--web--front_system-root 593408 46255 547153 8% /
tmpfs 69353 3 69350 1% /run/lock
tmpfs 69353 2 69351 1% /run/shm
/dev/xvda1 72720 27 72693 1% /boot