Ran into an issue with the scan: The scan took forever, so I rebooted after it wasn’t showing any progress after 12 hours. Now it seems to have locked the files in some weird way. Rebooting does not unlock it. Not all files got scanned, and the scan cannot be run again.
How can this issue be solved?
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
Starting scan for user 1 out of 1 (myuser)
Exception during scan: “files/67da545166427ea4e928a9f7f375abb2”(“home::myuser::scanner::”) is locked
#0 /var/www/nextcloud/lib/private/Files/Storage/Common.php(762): OC\Lock\DBLockingProvider->acquireLock()
#1 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(610): OC\Files\Storage\Common->acquireLock()
#2 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(610): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#3 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(335): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#4 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan()
#5 /var/www/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan()
#6 /var/www/nextcloud/apps/files/lib/Command/Scan.php(217): OCA\Files\Command\Scan->scanFiles()
#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#8 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#12 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#13 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#14 /var/www/nextcloud/occ(11): require_once(‘…’)
#15 {main}