0

python 3.7 / Ubuntu 18.10

Getting this error setting up a watch using pyinotify. It happens for any directory I've tried.

This started after I installed pcloud but pcloud is not touching this directory.

 pyinotify ERROR] add_watch: cannot watch 
/home/stephen/<watchtarget> WD=-1, Errno=No space left on 
device (ENOSPC)

df -h shows no mounts are close to full.

 Filesystem      Size  Used Avail Use% Mounted on
 udev            7.8G     0  7.8G   0% /dev
 tmpfs           1.6G  1.6M  1.6G   1% /run
 /dev/sda2       219G  113G   95G  55% /
 tmpfs           7.8G   40M  7.8G   1% /dev/shm
 tmpfs           5.0M  4.0K  5.0M   1% /run/lock
 tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
 /dev/sda1       511M  7.3M  504M   2% /boot/efi
 /dev/sdd1       458G   87G  348G  20% /mnt/usb500
 /dev/sdb1       1.8T  144G  1.6T   9% /mnt/usb2T
 /dev/sdc1       293G  132G  147G  48% /mnt/usb250
 tmpfs           1.6G   52K  1.6G   1% /run/user/1000
 pCloud.fs       2.0T  106G  1.9T   6% /home/stephen/pCloudDrive

output of df -i as requested in comments:

Filesystem        Inodes  IUsed     IFree IUse% Mounted on
udev             2029639    583   2029056    1% /dev
tmpfs            2037540    965   2036575    1% /run
/dev/sda2       14622720 537713  14085007    4% /
tmpfs            2037540    211   2037329    1% /dev/shm
tmpfs            2037540      5   2037535    1% /run/lock
tmpfs            2037540     18   2037522    1% /sys/fs/cgroup
/dev/sda1              0      0         0     - /boot/efi
/dev/sdd1       30531584  84224  30447360    1% /mnt/usb500
/dev/sdb1      122101760 205683 121896077    1% /mnt/usb2T
/dev/sdc1       19537920    547  19537373    1% /mnt/usb250
tmpfs            2037540     35   2037505    1% /run/user/1000
pCloud.fs              0      0         0     - /home/stephen/pCloudDrive

Maximum watches allowed:

sysctl -n fs.inotify.max_user_watches
8192

pgrep -f notify shows only one watch.

9
  • What does df -f and findmnt show? Commented Apr 25, 2019 at 14:38
  • 1
    @ctrl-alt-delor I believe you mean df -i Commented Apr 25, 2019 at 14:39
  • 2
    Also, check this pynotify FAQ github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions Commented Apr 25, 2019 at 14:41
  • @ctrl-alt-delor added to question Commented Apr 25, 2019 at 14:57
  • 1
    Create an answer with this info and mark as choosed, so others can benefit from it! Commented Apr 25, 2019 at 19:12

1 Answer 1

0

Two points in this issue based purely on experimentation and observation. This is not based on familiarity with pCloud code or on extensive exploration of pCloud documentation, however it appears that:

  1. pCloud does not support inotify (pyinotify is a wrapper for the linux inotify application) and in this case, the target directory for the notify process had once been placed into the pCloudDrive.

  2. Behavior suggests that pCloud holds a reference to files once included in its drive and that to free these files it is necessary to kill all pCloud processes. A reboot does not work because pCloud persists its references through a system reset.

It is necessary to kill all pCloud processes, and for me a complete cleanup required intervention from the root account. Note that pCloud processes run as pcloud and pCloud(different case)

So use:

pgrep -fi pcloud | xargs kill 

Once the pCloud processes have been cleared you can start your watch. You can then restart pCloud and it will not restore its references.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.