In class IDiskRemote, all metadata file system operations use os file system api directly.
There is little extendiability if we want store the metadata of HDFS or S3 into distributed file system.
So I suggest change this way by using DiskPtr and will propose a pull request.

In addition, metadata of HDFS or S3 only store local FS which is not sharable.

UInt64 getAvailableSpace() const override { return std::numeric_limits<UInt64>::max(); }
    UInt64 getUnreservedSpace() const override { return std::numeric_limits<UInt64>::max(); }
    UInt64 getKeepingFreeSpace() const override { return 0; }
    bool exists(const String & path) const override;
    bool isFile(const String & path) const override;
    void createFile(const String & path) override;
    size_t getFileSize(const String & path) const override;
    void moveFile(const String & from_path, const String & to_path) override;
    void replaceFile(const String & from_path, const String & to_path) override;
    void removeFile(const String & path) override { removeSharedFile(path, false); }
    void removeFileIfExists(const String & path) override { removeSharedFileIfExists(path, false); }
    void removeRecursive(const String & path) override { removeSharedRecursive(path, false); }
    void removeSharedFile(const String & path, bool keep_in_remote_fs) override;
    void removeSharedFileIfExists(const String & path, bool keep_in_remote_fs) override;
    void removeSharedRecursive(const String & path, bool keep_in_remote_fs) override;
    void listFiles(const String & path, std::vector<String> & file_names) override;
    void setReadOnly(const String & path) override;
    bool isDirectory(const String & path) const override;
    void createDirectory(const String & path) override;
    void createDirectories(const String & path) override;
    void clearDirectory(const String & path) override;
    void moveDirectory(const String & from_path, const String & to_path) override { moveFile(from_path, to_path); }
    void removeDirectory(const String & path) override;
    DiskDirectoryIteratorPtr iterateDirectory(const String & path) override;
    void setLastModified(const String & path, const Poco::Timestamp & timestamp) override;
    Poco::Timestamp getLastModified(const String & path) override;
    void createHardLink(const String & src_path, const String & dst_path) override;