SMB - Lots of missing files

Version: 25.0.0 RC5

I have used SMB via External Storage for well over a year without issue. I recently did a lot of sorting and so moved things around and deleted the share and remounted via External Storage tab.

The share is visible, and certain folders are there, but some show as empty, there are lots and lots of missing files, maybe 40GB worth.

I’ve see occ files:scan and various options for files_external: such as notify, but it seems whatever I try nextcloud refuses to pick up on these files.

This is getting pretty urgent as I use this daily and currently don’t have access to any of my files, any ideas on what to try?

Copy paste this into your post and please fill it out.

Support intro

Nextcloud version (eg, 20.0.5): 25 RC5
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.25
PHP version (eg, 7.4): 8.1

The issue you are facing: above

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it: above

Hi @shaung,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to better help you! Thanks.

Can you not roll back to a backup? Restore your Nextcloud on a stable build you used before upgrading.

Why are you upgrading to an experimental rc on a production server (more of a rhetorical question, because that is never a good idea fwiw).

Try to scan a dedicated path and increase the verbosity of the scan by e.g. adding “-vvv”. Sometimes a path is not correctly scanned because of wrong access rights or specific characters in file names etc.

@j-ed Yea I was trying that flag but where the hell is the SMB path? I have no idea where OC mounts this.

Please fill out the support form linked above.

Nothing in the template apart from OS is relevant to this issue. I will fill it out but want it to be known that you’re posts are just cluttering the thread and anyone who may reply like @j-ed didn’t need that info.

@j-ed Seems like --path flag doesn’t actually get taken correctly?

user@nextcloud:/mnt/nextcloud$ sudo -u www-data php /var/www/occ files:scan --path=/SMB/ -vvv

Unknown user 1 SMB

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+

Please use “occ files:scan --help” to display all available command line options. You have to provide a user id or prefix the path with the user name.

@j-ed Thanks.

For a folder with files (showing in nextcloud UI), the below command results in files being scanned.

For this folder and many others showing 0kB in nextcloud UI, the result is below, it’s not seeing any files.

Before even posting here I have checked that permissions are exactly the same across all files and folders under this share, so I have no idea what’s happening here…

user@nextcloud:/mnt/nextcloud$ sudo -u www-data php /var/www/occ files:scan --path=/user/files/SMB/Documents/Photos -vvv
Starting scan for user 1 out of 1 (user)
	Folder	/user/files/SMB/Documents/Photos

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 1       | 0     | 00:00:00     |
+---------+-------+--------------+
user@nextcloud:/mnt/nextcloud$