25 Blobfuse2 Installation
Sourav Gupta редактировал(а) эту страницу 2024-03-29 16:45:15 +05:30

Install from Apt/Yum Package Repositories

blobfuse2 is currently available in the Microsoft product repositories for Ubuntu, Debian, CentOS, RedHat, SUSE and Mariner distros. Packages are only available for x86 platforms.

1. Configure the apt/yum repository for Microsoft products:

Follow this guideline.

2. Install blobfuse2

Ubuntu 18.04 / Debian 9 / Debian 10

sudo apt-get install fuse blobfuse2

Ubuntu 20.04 / Ubuntu 22.04 / Debian 11

sudo apt-get install fuse3 blobfuse2

CentOS / RedHat

sudo yum install fuse3 fuse3-libs blobfuse2

SUSE

sudo zypper install fuse3 blobfuse2

Mariner

sudo tdnf install fuse fuse3 blobfuse2

Now you're all set to go!

Install from Source

1. Install GoLang 1.20.X following this guideline

2. Clone the GitHub repository

git clone https://github.com/Azure/azure-storage-fuse/
cd azure-storage-fuse
git checkout -b main origin/main

If you do not have git, install git via sudo apt-get install git

3. Install Dependencies

Ubuntu 18.04 / Debian 9 / Debian 10

sudo apt-get install fuse libfuse-dev

Ubuntu 20.04 / Ubuntu 22.04 / Debian 11

sudo apt-get install fuse3 libfuse3-dev 

CentOS / RedHat

sudo yum install fuse3 fuse3-devel

SUSE

sudo zypper install fuse3 libfuse3-dev 

Mariner

sudo tdnf install fuse libfuse-dev fuse3 libfuse3-dev 

4. Build

Run the build script located in the root folder of the repository.

If you would also like to build the health monitor binary, run the following command

./build.sh health

Ubuntu 18.04 / Debian 9 / Debian 10

./build.sh fuse2

Ubuntu 20.04 / Ubuntu 22.04 / Debian 11 / CentOS / RedHat / SUSE / Mariner

./build.sh

Persisting mount

  1. Make sure the fuse package is installed (e.g., yum install fuse3 / apt-get install fuse3)
  2. Update config.yaml file with your preferred configuration.
  3. Edit /etc/fstab with the blobfuse script.

Add the following line to use mount.sh:

/<path_to_blobfuse2_mount.sh_file>/mount.sh   </path/to/desired/mountpoint>     fuse3    defaults,_netdev 0 0

OR

Add the following line to run without mount.sh

blobfuse2 /home/azureuser/mntblobfuse fuse3 defaults,_netdev,--config-file=/home/azureuser/config.yaml,allow_other 0 0
If you are using fuse2 compliant system then use 'fuse' as file-system type in above /etc/fstab commandlet.

Common issues

  1. If you have added allow_other in above command, ensure allow_other setting is enabled at libfuse level. This configuration is set in /etc/fuse.conf file.
  2. Mount using /etc/fstab works with root privileges by-default, if you wish to use mount point through another user, allow_other is a must have config.
  3. Ensure mount path and temp-cache path have full access to other users as well.
  4. When you are on a fuse3 compliant system, fs-type mentioned in /etc/fstab shall be "fuse3". If "fuse" is used and libfuse is not installed it will throw error in understanding the file-system type.
  5. If you wish to use "mount all" create a script file that executes the mount all command and mention the script file in /etc/fstab. Ensure the script file runs "blobfuse2 mount all" command with "sudo" access otherwise mount all will fail when it's executed from /etc/fstab.
  6. If you get this error while building from source,
    lf.initFuse undefined (type *Libfuse has no field or method initFuse)
    lf.destroyFuse undefined (type *Libfuse has no field or method destroyFuse)
    
    Then install these dependencies,
    sudo apt-get install make cmake gcc g++ parallel
    
  7. While building from code in AML workspace, if you get the below error, then run the build command with sudo .
    fatal error: fuse3/fuse.h: No such file or directory
    #include <fuse3/fuse.h>