Note that the tee -a
portion of the command-line above is short for tee --append
, so every time it’s issued it adds another line of "fs.inotify.max_user_watches=204800” to /etc/sysctl.conf
.
From a purely Linux point of view, if the sequence of commands is this…
echo “fs.inotify.max_user_watches=204800” | sudo tee -a /etc/sysctl.conf
cat /proc/sys/fs/inotify/max_user_watches
… because /etc/sysctl.conf
is only loaded at boot time, command #2 above can only return the value 1000000
if /etc/sysctl.conf
(or a /etc/sysctl.d/
directory) already contains the line “fs.inotify.max_user_watches=1000000” (if there’s more than one declaration, the last one found takes precedence).
I recommend forgetting about using command #1 because it’s obviously causing confusion. Reboot your QNAP, then without issuing any other commands, only issue command #2 to verify what inotify’s max user watches is immediately after booting. Then if the result isn’t 1000000
, the next step will be clear(er).
Wouldn’t surprise me if it does because it’s not unusual for devices sold as appliances to have some kind of protection to reduce the chances of customer inadvertently bricking their devices.