# SMB external storage shows no files

**URL:** <https://help.nextcloud.com/t/smb-external-storage-shows-no-files/44756>\
**Category:** ℹ️ Support\
**Created:** [January 9, 2019, 11:30am UTC](https://help.nextcloud.com/t/smb-external-storage-shows-no-files/44756 "2019-01-09T11:30:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/emi/32/4339_2.png) [@Emi](https://help.nextcloud.com/u/Emi)\
**Post date:** [January 9, 2019, 11:30am UTC](https://help.nextcloud.com/t/smb-external-storage-shows-no-files/44756/1 "2019-01-09T11:30:11Z")

</div>

I’ve tried to add a SMB share to a nextcloud instance with the external storage app, but when I enter the folder on Nextcloud it either keeps loading forever or tells me there are no files. I’ve tried running

> occ files:scan user

But it throws an error about a locked file

> Exception during scan: “files/d8473000a2bdbccb8xxxxxxxxxxxxxx” is locked  
> #0 /var/www/nextcloud/lib/private/Files/Storage/Common.php(713): OC\Lock\DBLockingProvider-\>acquireLock(‘files/d8473000a…’, 2)  
> #1 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Common-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
> #2 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Wrapper\Wrapper-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
> #3 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Wrapper\Wrapper-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
> #4 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper-\>acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))  
> #5 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner-\>scan(‘’, true, 3)  
> #6 /var/www/nextcloud/apps/files/lib/Command/Scan.php(172): OC\Files\Utils\Scanner-\>scan(‘/emilian.mitoca…’, true, NULL)  
> #7 /var/www/nextcloud/apps/files/lib/Command/Scan.php(249): OCA\Files\Command\Scan-\>scanFiles(‘emilian.mitocar…’, ‘/emilian.mitoca…’, false, Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)  
> #8 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(251): OCA\Files\Command\Scan-\>execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #9 /var/www/nextcloud/core/Command/Base.php(162): Symfony\Component\Console\Command\Command-\>run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base-\>run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application-\>doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #12 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application-\>doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #13 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application-\>run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #14 /var/www/nextcloud/console.php(96): OC\Console\Application-\>run()  
> #15 /var/www/nextcloud/occ(11): require\_once(‘/var/www/nextcl…’)  
> #16 {main}

I’ve tried to manually remove the lock as described [here](https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883) but this doesn’t fix it and the lock just gets recreated. I’ve also tried to add the SMB share on another Nextcloud instance as a test and it works without a problem. Both servers are configured the same, so I wonder what happened on the first server and how can I fix it?

Note: both servers have redis caching for locks enabled

Nextcloud version: 14.0.4  
Operating system and version: Ubuntu 16.04  
Apache or nginx version: Apache 2.4.18  
PHP version: 7.0

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 9:01am UTC](https://help.nextcloud.com/t/smb-external-storage-shows-no-files/44756/2 "2024-12-04T09:01:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 4:43pm UTC](https://help.nextcloud.com/t/smb-external-storage-shows-no-files/44756/3 "2024-12-09T16:43:48Z")

</div>


