23

I am facing a problem about "no space left on device" as shown in the Figure below.

enter image description here

I am relatively a newbie and don't know much about linux. I am using Ubuntu 18.04. Checking out various blogs about my problem such as this one (which suggests that I should increase my drive size) and this one (which is quite similar to my problem) also highlights the same problem but does not specify any solution.

Can you please help any solution? Thank you so much for your attention.

PS: I have also taken screen shot of df -h as shown below enter image description here

1
  • 2
    I'm having a similar problem from qpdfview, which uses inotify to watch the current file. Mint 19 apparently sets the default to 8192, whereas Mint 18 used 524288. Easy to fix from the answer (thank you), but why would one appliczation watching one file consume 8192 watches anyway? Is there a way to check what else is using inotify for this? Dec 31, 2018 at 23:33

4 Answers 4

32

The error message doesn't actually refer to the amount of storage space, but to the amount of inotify watches that are available for a given file system (see also here: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers).

The quick solution (taken from the above website) would be to run

echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Regards, Florian

1
  • Thank you so much Florian Echtler. I figured it out. The problem is in my /home directory which has been consumed 73% and Linux starts issuing error or warning if the available space is less than 28%. I deleted some files in my /home directory and now it is OK. Once again, I appreciate your efforts in clearing out. Thank you so much. Oct 29, 2018 at 13:38
2

Increasing the inotify watch limits can be necessary for applications that monitor a large number of files or directories. While adjusting these limits is generally safe, it's important to do so cautiously to avoid potential issues. Here's a step-by-step guide to safely increase the inotify watch limits:

Check Current Limit

To check the current inotify watch limit on your system, use the following command:

cat /proc/sys/fs/inotify/max_user_watches

Temporary Increase

You can temporarily increase the limit for the current session by running these commands in your terminal:

sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p

Replace 524288 with the desired number of watches you need.

Permanent Increase (for future sessions)

To make this change permanent:

  1. Edit /etc/sysctl.conf (or create a new file in /etc/sysctl.d/ if it doesn't exist) using a text editor:

    sudo nano /etc/sysctl.conf
    
  2. Add or edit the following line:

    fs.inotify.max_user_watches=65536
    

    Replace 65536 with your desired value (524288).

  3. Save and exit the text editor.

  4. Apply the changes:

    sudo sysctl -p
    

Safety Considerations

  • Increasing the limit shouldn't inherently harm your system.
  • Be mindful of memory usage as each watch consumes a small amount of kernel memory.
  • Setting excessively high values might impact performance, so avoid extreme increases.
1
0

Watch Limits are like rules that control how many folders and files you can monitor for changes using the inotify feature on a Linux system.

Example: Imagine you have a security camera system that watches your house. It uses inotify to notify you of any movement. But there's a rule that says you can only watch a maximum of 50 rooms (folders). This rule (the watch limit) stops one person from trying to watch 1,000 rooms, which would be a waste of computer resources.

So, watch limits keep things efficient and prevent anyone from using too much computer power to watch things with inotify.

We can check:

cat /proc/sys/fs/inotify/max_user_watches

To increase the watch limits, we need to edit configuration file /etc/sysctl.conf. Add this line at the end of the file:

fs.inotify.max_user_watches=65536 

Apply changes by running

sudo sysctl -p
-1

This is not a problem with disc storage space. I was getting this error message while running a python script, when I had ~100 GB disc space left. There are few solutions suggested by previous users. For me, just restarting the system stopped showing this error message.

Thanks J

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .