systemctl restart someservice returns “Error: No space left on device”
If you have sufficient disk space and you are running Code42/Crashplan pro and you get “Error: No space left on device” when you use systemctl, this may be the fix
Linux performs real-time file watching using the inotify API. Inotify imposes a limit on the number of “watches” that can be in use on a system at any given time. If the Code42 app exceeds inotify’s max watch limit, real-time file watching fails to work properly, and some or all file changes are not detected until the Code42 app’s file verification scan runs.
Step 1: Find the current watch limit
Find the current inotify watch limit by examining the proc file system. In Terminal, run the following:
cat /proc/sys/fs/inotify/max_user_watches
Step 2: Change the watch limit
To change the watch limit value, edit the sysctl.conf file.
In this example, 1048576 is being set as the new value. Adjust this number as appropriate for your system.
- Edit /etc/sysctl.conf as root:
sudo nano /etc/sysctl.conf
- Set (or add if it’s not present) the
fs.inotify.max_user_watches
parameter. Set this to the desired number of watches:fs.inotify.max_user_watches=1048576
- Save sysctl.conf and exit.
If you’re using nano, press Control+X, followed by Y, then Enter to save the file. - Either reboot the system or execute the following command:
sudo sysctl -p /etc/sysctl.conf
Tested on Centos 7
See: https://support.code42.com/CrashPlan/6/Troubleshooting/Linux_real-time_file_watching_errors