diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 260f9218a88..26e5a4172f7 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -66,9 +66,12 @@ class Local extends \OC\Files\Storage\Common {
 		$this->unlinkOnTruncate = $this->config->getSystemValueBool('localstorage.unlink_on_truncate', false);
 
 		if (isset($parameters['isExternal']) && $parameters['isExternal'] && !$this->stat('')) {
-			// data dir not accessible or available, can happen when using an external storage of type Local
-			// on an unmounted system mount point
-			throw new StorageNotAvailableException('Local storage path does not exist "' . $this->getSourcePath('') . '"');
+            if (!$this->mkdir('')) {
+                // data dir not accessible or available, can happen when using an external storage of type Local
+                // on an unmounted system mount point
+                throw new StorageNotAvailableException('Local storage path does not exist and could not create it "' . $this->getSourcePath('') . '"');
+            }
+            Server::get(LoggerInterface::class)->warning('created local storage path ' . $this->getSourcePath(''), ['app' => 'core']);
 		}
 	}
 
-- 
2.50.1

