FUSE adapter for blob storage

Earlier this week, Microsoft launched a new Linux driver into public preview: the FUSE adapter for blob storage. Obviously this is an open source driver (hosted on github). The driver allows you to mount blob storage into your VMs and read/write from blob directly.
What does this mean? It is a very easy way to interact with blob storage. The downside of blob storage is that is an object storage platform, which doesn’t work like your regular file system or network drive. With the FUSE driver, you can use your Linux command line to interact with the blob storage platform.
One use case this can unlock, is an easy way to load your data into a storage account to use with a HDinsight cluster. HDinsight can natively interact with blob already via another open source driver called WASB. With the FUSE driver, you can get data into your storage account, so Hdinsight can start number crunching on your data.
Let’s dive into the FUSE driver and how you get it up and running:

Setting it up

To do this small demo, I created a small new Ubuntu VM.
2017-11-07 13_29_24-Demo Dashboard - Microsoft Azure
After logging in (SSH), we need to update apt-get and install the FUSE dependencies:

sudo apt-get update && sudo apt-get install pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev git -y

Next step is to clone the source code from github and build the driver.

git clone https://github.com/Azure/azure-storage-fuse/
cd azure-storage-fuse

2017-11-07 13_35_25-nilfranadmin@Fusetest_ ~_azure-storage-fuse
I used the default diagnostics storage account (lazy me) for my demo here and created a specific container for this demo.
2017-11-07 13_38_40-Blob service - Microsoft Azure
Enter in the right credentials info the connection.cfg file, so FUSE can access your storage account.

accountName fusetestdiag453
accountKey <account key goes here>
containerName fusecontainer

Create the mount point, create and give the user access to the temp directory (I had issues with this up front) and mount the blob container.

Sudo mkdir -p ~/blob
mkdir -p /mnt/blobfusetmp
sudo chown nilfranadmin /mnt/blobfusetmp/

It should run now, but it didn’t for me… This was linked to access rights on the blobfusetmp directory, where I needed to give my user ownership rights on the root directory in the blobfusetmp directory. And following that, I was able to start the mount.

Cd /mnt/blobfusetmp
Sudo chown nilfranadmin blob/
cd ~/azure-storage-fuse
./mount.sh ~/blob

And here we are: blob is mounted into your VM!

Testing it out

Let’s now test this out, by e.g. downloading an Ubuntu ISO (simple WGET). What do we see? Well:

  1. Download speed varies between 10MB/s and 60MB/s, as expected with a file download.
  2. After the download, it took about a minute and a half for the WGET ‘task’ to fully complete, and for the ISO to show up in my blob storage account.

Below, you can see some screenshots of the download process itself, with the blob view from the azure portal next to it.
2017-11-07 13_55_05-nilfranadmin@Fusetest_ ~_blob_test
2017-11-07 13_55_32-nilfranadmin@Fusetest_ ~_blob_test2017-11-07 13_56_43-nilfranadmin@Fusetest_ ~_blob_test


The FUSE adapter for blob storage is a cool nifty driver that allows you to mount blob storage into your Linux file system. It’s easy to install (only took me 30 minutes to try it out). The driver itself is quiet performant on my first look, so I recommend you to try it out. Just be careful: it is still in preview and still has its limitations.

Leave a Reply