Description
Context:
We are using Azure Batch with Azure Linux images to mount Azure Blob Storage using BlobFuse2, following the official guidance.
In Azure Batch, the only way to configure BlobFuse2 is through the AzureBlobFileSystemConfiguration.blobfuseOptions field, which passes CLI parameters directly to the BlobFuse2 mount command.
Problem:
When our Azure Batch VMs are rebooted (due to OS upgrades or manual operations), BlobFuse2 does not shut down gracefully. Upon restart, it fails with the following error:
[config error in block_cache "[temp directory not empty]"]
This happens because the block cache directory is not empty, and BlobFuse2 currently performs a strict check on this.
Investigation:
The block_cache component has a cleanup-on-start config option in the
However, this option is not exposed via CLI flags and cannot be passed through blobfuseOptions in Azure Batch.
The file_cache component supports the --empty-dir-check CLI flag:
It also supports the cleanup-on-start config option:
The mount.go logic also references the cleanup-on-start config option for file_cache mode
azure-storage-fuse/cmd/mount.go
Line 129 in 4ddfcd4
Request:
Please add support for either:
- --cleanup-on-start
- --empty-dir-check
as BlobFuse2 CLI parameters for the block_cache component, so that users relying on CLI-only configuration (e.g., in Azure Batch) can ensure a clean startup after reboots.
This would enable more robust and fault-tolerant behavior in environments where BlobFuse2 is managed non-interactively.
Thank you!