Folders missing (Error: fread(): Read of 8192 bytes failed with errno=5 Input/output error)

After uploading several files, which was successfully completed, the next day I had this error:
“Error: fread(): Read of 8192 bytes failed with errno=5 Input/output error at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55”

Several folders had then gone missing

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): Raspbian
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.54
PHP version (eg, 7.4): 8.0.1

The issue you are facing:

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

Steps to replicate it:

  1. Log in to NC
  2. Navigate to Folders
  3. Missing Folders

The output of your Nextcloud log in Admin > Logging:

Error	PHP	Error: fread(): Read of 8192 bytes failed with errno=5 Input/output error at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55
<<closure>>

OC\Log\ErrorHandler::onError()
/var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php - line 55:

fread()
/var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php - line 96:
Icewind\Streams\Wrapper->stream_read()
<<closure>>
Icewind\Streams\CallbackWrapper->stream_read()
/var/www/nextcloud/lib/private/Preview/MarkDown.php - line 46:
stream_get_contents()
/var/www/nextcloud/lib/private/Preview/GeneratorHelper.php - line 65:
OC\Preview\MarkDown->getThumbnail()
/var/www/nextcloud/lib/private/Preview/Generator.php - line 343:
OC\Preview\GeneratorHelper->getThumbnail()
/var/www/nextcloud/lib/private/Preview/Generator.php - line 162:
OC\Preview\Generator->getMaxPreview()
/var/www/nextcloud/lib/private/Preview/Generator.php - line 114:
OC\Preview\Generator->generatePreviews()
/var/www/nextcloud/lib/private/PreviewManager.php - line 185:
OC\Preview\Generator->getPreview()
/var/www/nextcloud/apps/files/lib/Controller/ApiController.php - line 130:
OC\PreviewManager->getPreview()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:
OCA\Files\Controller\ApiController->getThumbnail()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 298:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1047:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()