server icon indicating copy to clipboard operation
server copied to clipboard

Add "no free space checking" in external storages configuration

Open Hexasoft opened this issue 5 years ago • 10 comments

Is your feature request related to a problem? Please describe.

When creating an external storage that points to an area with no free space, users get the "Your storage is full , files can not be updated or synced anymore !" message. The problem is that this message makes no sense when the target area is read-only (user can't add/modify files, even with free space). The same problem applies when "read-only" is selected in external storage configuration.

Describe the solution you'd like

  • nextcloud should not generate the "full" message for directories that are not writable, but a more adapted message (being not writable is more important than being full)
  • nextcloud should not generate the "full" message for storages configured with "read-only" checked (it should not check free space at all, btw)
  • maybe external storage configuration should include a "do not check for free space", because in some cases storage can be "strange" and not reliable for metadata such as free space (i.e. some FUSE mountpoints)

Describe alternatives you've considered

At this time I patched lib/private/Files/Storage/Local.php so that free_space() returns not empty for not writable path, in order to prevent disturbing messages to users.

Additional context

The problem arise with a backup external storage: an incremental backup system is used on files, and it allows to navigate back in time via a FUSE mountpoint. This mountpoint is readonly, with 0 free space. The external storage is configured with "read-only" checked and "allow sharing" unchecked. Each time a user go inside this storage ("/…/backups/$user" → "Backup") the "full" message appears. Note: target directory is automounted.

Regards.

PS: my initial post on help.nextcloud.com → https://help.nextcloud.com/t/prevent-storage-full-on-external-storage/66578 (and suggestion to open an issue here)

Hexasoft avatar Dec 23 '19 12:12 Hexasoft