We have a Linux CentOS server. Our 1 partition "/dev/md3" is 100% used. That's why Mongo DB is not being connected. Can someone let me know how to solve this issue. I think mounting the partition is the solution? But I also have to make sure that Data should not be destroyed.

The space details are the following. "/dev/md3" is the full and "/dev/md4" has 900 GB Free. We need to increase the space in "/dev/md3". So our all services & Mongo DB should start working again.

Filesystem     1K-blocks     Used Available Use% Mounted on
devtmpfs        65844948        0  65844948   0% /dev
tmpfs           65888636        0  65888636   0% /dev/shm
tmpfs           65888636    10760  65877876   1% /run
tmpfs           65888636        0  65888636   0% /sys/fs/cgroup
/dev/md3        20026172 19997792         0 100% /
/dev/md2          498468    88837    379375  19% /boot
/dev/nvme0n1p1    522228     2660    519568   1% /boot/efi
/dev/md4       901136592   258420 855080032   1% /home
/dev/loop0        763700     1200    722872   1% /tmp
tmpfs           13177728        0  13177728   0% /run/user/0
Or is there any way to move Mongo DB to another partition with more space?
  • Can you add more details about those RAID devices? mdadm -D /dev/md3 for example. Do you use LVM? lvscan – Piotr P. Karwasz Jan 1 at 19:26

A simple workaround without changing file systems structure would be to move some directories in a subtree of /home (e.g. /home/shared ) and then create a symlink to the original path. For example, assuming your database data is in /var/dbdir, you could move it this way:

$ sudo mkdir /home/share
$ sudo chmod 755 /home/share
$ sudo mv /var/dbdir /home/share
$ sudo ln -s /home/share/dbdir /var/dbdir

The correct answer is to expand the partition, but, as a short term solution you could try to free up some space by emptying large files.

To do this, use the true command redirection.

: > very_large_file.txt

Or, you can cat in /dev/null

cat /dev/null > very_large_file.txt

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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