{"id":37,"date":"2017-11-07T13:31:11","date_gmt":"2017-11-07T13:31:11","guid":{"rendered":"https:\/\/nillsf.wordpress.com\/?p=37"},"modified":"2017-11-07T13:31:11","modified_gmt":"2017-11-07T13:31:11","slug":"fuse-adapter-for-blob-storage","status":"publish","type":"post","link":"https:\/\/blog.nillsf.com\/index.php\/2017\/11\/07\/fuse-adapter-for-blob-storage\/","title":{"rendered":"FUSE adapter for blob storage"},"content":{"rendered":"<p>Earlier this week, <a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/linux-fuse-adapter-for-blob-storage\/\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft launched a new Linux driver into public preview<\/a>: 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.<br \/>\nWhat 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&#8217;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.<br \/>\nOne 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 <a href=\"https:\/\/blogs.msdn.microsoft.com\/cindygross\/2015\/02\/04\/understanding-wasb-and-hadoop-storage-in-azure\/\" target=\"_blank\" rel=\"noopener noreferrer\">WASB<\/a>.\u00a0With the FUSE driver, you can get data into your storage account, so Hdinsight can start number crunching on your data.<br \/>\nLet&#8217;s dive into the FUSE driver and how you get it up and running:<\/p>\n<h2>Setting it up<\/h2>\n<p>To do this small demo, I created a small new Ubuntu VM.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-45\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_29_24-demo-dashboard-microsoft-azure.png\" alt=\"2017-11-07 13_29_24-Demo Dashboard - Microsoft Azure\" width=\"1136\" height=\"417\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_29_24-demo-dashboard-microsoft-azure.png 1136w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_29_24-demo-dashboard-microsoft-azure-300x110.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_29_24-demo-dashboard-microsoft-azure-768x282.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_29_24-demo-dashboard-microsoft-azure-1024x376.png 1024w\" sizes=\"auto, (max-width: 1136px) 100vw, 1136px\" \/><br \/>\nAfter logging in (SSH), we need to update apt-get and install the FUSE dependencies:<\/p>\n<blockquote><p>sudo apt-get update &amp;&amp; sudo apt-get install pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev git -y<\/p><\/blockquote>\n<p>Next step is to clone the source code from github and build the driver.<\/p>\n<blockquote><p>git clone <a href=\"https:\/\/github.com\/Azure\/azure-storage-fuse\/\">https:\/\/github.com\/Azure\/azure-storage-fuse\/<\/a><br \/>\ncd azure-storage-fuse<br \/>\n.\/build.sh<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-63\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_35_25-nilfranadminfusetest_-_azure-storage-fuse.png\" alt=\"2017-11-07 13_35_25-nilfranadmin@Fusetest_ ~_azure-storage-fuse\" width=\"825\" height=\"1402\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_35_25-nilfranadminfusetest_-_azure-storage-fuse.png 825w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_35_25-nilfranadminfusetest_-_azure-storage-fuse-177x300.png 177w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_35_25-nilfranadminfusetest_-_azure-storage-fuse-768x1305.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_35_25-nilfranadminfusetest_-_azure-storage-fuse-603x1024.png 603w\" sizes=\"auto, (max-width: 825px) 100vw, 825px\" \/><br \/>\nI used the default diagnostics storage account (lazy me) for my demo here and created a specific container for this demo.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-67\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_38_40-blob-service-microsoft-azure.png\" alt=\"2017-11-07 13_38_40-Blob service - Microsoft Azure\" width=\"619\" height=\"431\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_38_40-blob-service-microsoft-azure.png 619w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_38_40-blob-service-microsoft-azure-300x209.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><br \/>\nEnter in the right credentials info the connection.cfg file, so FUSE can access your storage account.<\/p>\n<blockquote><p>accountName fusetestdiag453<br \/>\naccountKey &lt;account key goes here&gt;<br \/>\ncontainerName fusecontainer<\/p><\/blockquote>\n<p>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.<\/p>\n<blockquote><p>Sudo mkdir -p ~\/blob<br \/>\nmkdir -p \/mnt\/blobfusetmp<br \/>\nsudo chown nilfranadmin \/mnt\/blobfusetmp\/<\/p><\/blockquote>\n<p>It should run now, but it didn&#8217;t for me&#8230;\u00a0This 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.<\/p>\n<blockquote><p>Cd \/mnt\/blobfusetmp<br \/>\nSudo chown nilfranadmin blob\/<br \/>\ncd ~\/azure-storage-fuse<br \/>\n.\/mount.sh ~\/blob<\/p><\/blockquote>\n<p>And here we are: blob is mounted into your VM!<\/p>\n<h2>Testing it out<\/h2>\n<p>Let&#8217;s now test this out, by e.g. downloading an Ubuntu ISO (simple WGET). What do we see? Well:<\/p>\n<ol type=\"1\">\n<li value=\"1\">Download speed varies between 10MB\/s and 60MB\/s, as expected with a file download.<\/li>\n<li>After the download, it took about a minute and a half for the WGET &#8216;task&#8217; to fully complete, and for the ISO to show up in my blob storage account.<\/li>\n<\/ol>\n<p>Below, you can see some screenshots of the download process itself, with the blob view from the azure portal next to it.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-72\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_55_05-nilfranadminfusetest_-_blob_test.png\" alt=\"2017-11-07 13_55_05-nilfranadmin@Fusetest_ ~_blob_test\" width=\"825\" height=\"721\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_05-nilfranadminfusetest_-_blob_test.png 825w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_05-nilfranadminfusetest_-_blob_test-300x262.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_05-nilfranadminfusetest_-_blob_test-768x671.png 768w\" sizes=\"auto, (max-width: 825px) 100vw, 825px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-75\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test.png\" alt=\"2017-11-07 13_55_32-nilfranadmin@Fusetest_ ~_blob_test\" width=\"1611\" height=\"675\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test.png 1611w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test-300x126.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test-768x322.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test-1024x429.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_55_32-nilfranadminfusetest_-_blob_test-1568x657.png 1568w\" sizes=\"auto, (max-width: 1611px) 100vw, 1611px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-76\" src=\"\/wp-content\/uploads\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test.png\" alt=\"2017-11-07 13_56_43-nilfranadmin@Fusetest_ ~_blob_test\" width=\"1611\" height=\"675\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test.png 1611w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test-300x126.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test-768x322.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test-1024x429.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_56_43-nilfranadminfusetest_-_blob_test-1568x657.png 1568w\" sizes=\"auto, (max-width: 1611px) 100vw, 1611px\" \/><\/p>\n<h2>Summary<\/h2>\n<p>The FUSE adapter for blob storage is a cool nifty driver that allows you to mount blob storage into your Linux file system. It\u2019s 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":67,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_featured_media_url":"https:\/\/nillsfblog.blob.core.windows.net\/media\/2017\/11\/2017-11-07-13_38_40-blob-service-microsoft-azure.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":0,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/media\/67"}],"wp:attachment":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}