Open petruchito opened 4 months ago
occ files:scan-app-data
after deleting empty directories:
+---------+--------+--------------+
| Folders | Files | Elapsed time |
+---------+--------+--------------+
| 368149 | 151478 | 02:13:46 |
+---------+--------+--------------+
Hi, which nc version?
Hi, which nc version?
Nextcloud AIO v9.1.0 (NEXTCLOUD_VERSION | 29.0.3)
Snapshots were ~400Gb each, 24 hourly, 7 daily, 4 weekly and 12 monthly, so every hour the server was introduced with 400Gb of data and 400Gb disappeared. IO utilization issues persisted after I unmounted the history
.
And this might also relate to the problem - I have 'filesystem_check_changes' => 1
in the config.php
.
I don't quite understand your bug report and you seem to have entirely bypassed our reporting template.
I understand your suggestion about the background job, but what was the originally problem that arose?
There are (or were) some bugs like #45654. Is this merely that?
what was the originally problem that arose?
Constant disk utilization by nextcloud's postgres led me to finding 5M folders in the preview folder. The cleanup job seems not to remove all empty folders and they were building up there.
(#45654 does not seem to relate.)
I suppose this deletes preview/b/5/7/7/2/e/7/39548/
but leaves preview/b/5/7/7/2/e/7/
orphaned even if it's an empty directory.
Thus you theoretically can end up with 7^16=3,32×10^13 empty directories.
I plead for 16⁷ directories 2.7E08 and yes, the empty ones should be deleted.
NC29.0.4: if have 1300 empty preview dirs in 3 months.
https://github.com/nextcloud/server/blob/1164c762eb2c120ca0d2d8da83dfe9f925ed652f/lib/private/Preview/BackgroundCleanupJob.php#L36
This should delete empty preview directories as well. After running a few weeks with automatic ZFS snapshots folder attached as a history (It was a bad idea), I've got a monstrous directory structure and the cron scan constantly utilized my disk for several days(
SELECT
-UPDATE
on theoc_filecache
table).files:cleanup
didn't do anything, 0 orphaned files.files:scan-app-data
took almost 6 hours to complete:So I'm now deleting empty folders manually with
find . -type d -empty -delete
in thepreview
directory.