Fixing “Can’t add an inotify watch of /etc/config/rsync_schedule.conf error!: No Space left on device” on QNAP-419P

Standard

So, this issue seems to come back on my QNAP when using rsync for backup. It seems to be a bug that returns but the main issue is that the system doesn’t allow enough inotify watches resulting in this error.

Best would be a good fix to avoid needing so much, but since we also want to get stuff done we are cheating our way out, by increasing the maximum.

First check the value on your current box, login as admin with ssh

# cat /proc/sys/fs/inotify/max_user_watches
65536

Nice, but a bit low, you can quickly raise it by updating the file

# echo "655360" > /proc/sys/fs/inotify/max_user_watches
# cat /proc/sys/fs/inotify/max_user_watches
655360

So that’s great, but on reboot it will reset. To make it permanent we will add it to the autorun.sh in the config partition. This example is for the P419+ but you might want to check the wiki about other versions.

http://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup

# mkdir /tmp/config
# mount -t ext2 /dev/mtdblock5 /tmp/config
# vim /tmp/config/autorun.sh
## This is where you add the above line in a small shellscript
# chmod 755 /tmp/config/autorun.sh
# umount /tmp/config

Now reboot and check if the value remains but repeating the first step.

 

Leave a Reply

Your email address will not be published. Required fields are marked *