-
Notifications
You must be signed in to change notification settings - Fork 239
Mount Blobfuse
BlobFuse can be installed from Microsoft repository for Linux by using simple command to install the BlobFuse package. In addition, there is an option to build the binary from the source code. Instructions for installation - here
Visit this page to see list of supported Linux distros.
There are two methods available for mounting:
- Command-line interface (CLI)
- Configuration file (config file)
You must also decide if you want to mount BlobFuse in Caching mode (File Cache) or Streaming mode (Block cache) before mounting. For guidance, please refer this guide.
This is the simplest way to mount by specifying Caching (File cache) mode or Streaming (Block cache) mode in the mount command. The parameters like memory, disk limits, and parallelism are automatically decided based on system configuration.
Note
Azure storage configurations like account name, container name, auth type and authentication details should be provided via. Environment Variables as shown below:
AZURE_STORAGE_AUTH_TYPE="msi"
AZURE_STORAGE_ACCOUNT="mystorageaccount"
AZURE_STORAGE_IDENTITY_OBJECT_ID="myobjectid"
AZURE_STORAGE_ACCOUNT_CONTAINER="mycontainer"
Then, BlobFuse can be mounted in Caching (file cache) mode using the command:
# blobfuse2 mount <mount path> --tmp-path=<local_cache_path>
Or Streaming (block cache) mode using following command:
# blobfuse2 mount <mount path> --streaming
For more precise control over mount settings, you may specify them through individual command-line interface (CLI) parameters. Please refer the complete list of cli parameters.
The following is an example command for mounting with Caching (File cache) mode:
# blobfuse2 mount <mount path> --tmp-path=<local cache path> --attr-cache-timeout=120 --file-cache-timeout=120
The following is an example command for mounting with Streaming (Block cache) mode:
# blobfuse2 mount <mount path> --streaming --attr-cache-timeout=120
You should specify the necessary BlobFuse configuration and Azure storage credentials in a configuration file in YAML format, which BlobFuse can then use to mount with the following command:
# blobfuse2 mount <mount path> –-config-file=<config file>
Guidance for creating a configuration file can be found here.
Note
Config file can be automatically generated with partially pre-filled settings using the command gen-config. Refer the page for details.
When a container is mounted with the default options, all files get 770 permissions and are accessible only by the user who does the mounting. To allow any user to access the BlobFuse2 mount, mount BlobFuse2 by using the --allow-other option. You also can configure this option in the YAML config file.
As stated earlier, chown operations are not supported for either block blob storage (FNS) or Data Lake Storage (HNS). FNS storage accounts do not support chmod operations, HNS storage accounts do support chmod operations but only on child objects inside of the mount directory, not on the root mount directory. chmod may appear to succeed on mounted FNS containers or the HNS root mount directory, but the operation doesn't actually succeed.