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.

{
    auto settings = current_settings.get();
    return std::make_shared<S3PathKeeper>(settings->objects_chunk_size_to_delete);
}
void DiskS3::removeFromRemoteFS(RemoteFSPathKeeperPtr fs_paths_keeper)
{
    auto settings = current_settings.get();
    auto * s3_paths_keeper = dynamic_cast<S3PathKeeper *>(fs_paths_keeper.get());
    if (s3_paths_keeper)
        s3_paths_keeper->removePaths([&](S3PathKeeper::Chunk && chunk)
        {
            String keys = S3PathKeeper::getChunkKeys(chunk);
            LOG_TRACE(log, "Remove AWS keys {}", keys);
            Aws::S3::Model::Delete delkeys;
            delkeys.SetObjects(chunk);
            Aws::S3::Model::DeleteObjectsRequest request;
            request.SetBucket(bucket);
            request.SetDelete(delkeys);
            auto outcome = settings->client->DeleteObjects(request);
            
            logIfError(outcome, [&](){return "Can't remove AWS keys: " + keys;});
        });
}
void DiskS3::moveFile(const String & from_path, const String & to_path)