Lazy initialize external storages

Backport of 075e8d8e8658913e1c5b8869f3e457fa6db2d847 from master