Jump to content

adding an azure file share


Recommended Posts

Hi, 

 

First some quick background so you understand what I want to accomplish and why.

 

I don't have any backup for my important things on Unraid.

I do have $150 monthly credits on Azure, so backup for free 😃

 

I do know that rclone exists as a docker, but rclone only supports Azure Blob and not Azure File Share, with Blob storage I don't get backup and snapshots as I get with Azure File Shares. If I use Blob storage and something happens on my unraid (files are corrupted or deleted), the next rclone sync will corrupt or delete the files on Blob Storage.

So if I create a File Share I can mount that share in a Linux machine, I have already tested this on a VM.

So what I want to do is to mount my Azure File Share in Unraid and then use rsync to mirror some folders to Azure.

 

This is what I did on my test VM (generalized strings in the example).

 

sudo mkdir /mnt/test
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/mystorageaccount.cred" ]; then
    sudo bash -c 'echo "username=mystorageaccount." >> /etc/smbcredentials/mystorageaccount..cred'
    sudo bash -c 'echo "password=supergreatpassword" >> /etc/smbcredentials/mystorageaccount..cred'
fi
sudo chmod 600 /etc/smbcredentials/mystorageaccount..cred

sudo bash -c 'echo "//mystorageaccount.file.core.windows.net/test /mnt/test cifs nofail,vers=3.0,credentials=/etc/smbcredentials/mystorageaccount..cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab'
sudo mount -t cifs //mystorageaccount..file.core.windows.net/test /mnt/test -o vers=3.0,credentials=/etc/smbcredentials/mystorageaccount..cred,dir_mode=0777,file_mode=0777,serverino



I´m quite new to Linux so my main questions is, how to I translate this to be working on unraid?
Where shall I put my .cred file so it persists after reboot?
Where shall I put the mount string so it persists after reboot and auto mount?

 

Is there anything else I shall think about or do you have any concerns regarding this setup?

Edited by lusitopp
Link to comment
15 minutes ago, itimpi said:

I think this would all be handled for you if you use the Unassigned Device plugin to mount the azure share.    It would handle both saving credentials and mounting the share on reboot.   Should be easy enough to try it.

 

That was the first thing I tried, didn't get it to work..
it only says smb is offline and the mount button is greyed out.
 

Link to comment
47 minutes ago, lusitopp said:

it only says smb is offline and the mount button is greyed out.

It might be worth asking in the UD plugin support thread?

Can you ‘ping’ that address from the Unraid server?   As far as I know that is how UD determines if the server is online.

Link to comment
On 4/8/2022 at 3:30 PM, itimpi said:

It might be worth asking in the UD plugin support thread?

Can you ‘ping’ that address from the Unraid server?   As far as I know that is how UD determines if the server is online.

 

confirmed that it need to respond to ping, and it doesn't do that. so this can't be solved with UD. Need to solve it somehow else.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...