Persistent unRAID access from Linux


Recommended Posts

Greetings,

 

unRAID newbie here.

 

Is there a preferred method for persistent unRAID access from a Linux host?

 

I can use the Linux GUI (using CentOS 6.5) and connect to the unRAID server shares, but I'm assuming if I always want the share to be available I should mount it automatically on boot.  I assume I should also have some mechanism to deal with reconnecting in case of failures, or reboots or other reasons for disconnections.

 

I've looked at using autofs with SMB or NFS, but I'm not having success. 

 

I tried following section 4 of the guide here on SMB access.  http://wiki.centos.org/TipsAndTricks/WindowsShares

 

I'm guessing it is a configuration issue.  Before I dig deeper, I'd like to make sure I'm getting set up for the most reliable, best performing connection.

 

 

 

Thanks for any guidance!

 

John

Link to comment

Yes, yes there is!

 

The most popular method is using the /etc/fstab.

 

https://help.ubuntu.com/community/Fstab

 

Don't worry if you are not using Ubuntu, fstabs are all the same. I have my unRAID server exporting nfs.

 

Here are two examples mounting unRAID shares from my fstab:

 

10.0.1.10:/mnt/disk4/okasten /home/bkasten/Downloads nfs defaults,nolock,nfsvers=3 0 0

10.0.1.10:/mnt/user/TV /media/TV nfs defaults,nolock,nfsvers=3 0 0

 

The first line mounts a folder directly on one of my volumes (/mnt/disk4) and the second is mounting a multidisk share (/mnt/user/TV)

 

The basic syntax is:

 

NetworkNameorIP:/path/to/share    /where/to/mount    MountType  parameters  0  0

 

The link is a bit wordy, it is can help understand all the options.

 

Hope this helps.

 

bkasten

Link to comment

Yes, yes there is!

 

The most popular method is using the /etc/fstab.

 

Thanks for the info. 

 

It looks like your example does not show a particular User set up on the unRAID server.  I think part of my confusion is that most examples that I see in the Linux documentation show a user and a password.  I haven't added any users to my unRAID server, nor have I added a password to the root account, so your example should be helpful.

 

It's been years since I dabbled with Unix mounts and NFS.  I seem to recall that if you don't use auto mount, you can get into situations where your system will hang for a minute waiting for timeouts if you loose connectivity between the host and the mounted storage.  Is that still an issue if you use the straight fstab method?  That's why I was starting down the auto mount way. 

 

Perhaps I should at least get the simple config working first.

 

Thanks again.  I probably won't get a chance to try this until tonight.

 

John

 

Link to comment

Yes, yes there is!

 

The most popular method is using the /etc/fstab.

 

Thanks for the info. 

 

It looks like your example does not show a particular User set up on the unRAID server.  I think part of my confusion is that most examples that I see in the Linux documentation show a user and a password.  I haven't added any users to my unRAID server, nor have I added a password to the root account, so your example should be helpful.

 

It's been years since I dabbled with Unix mounts and NFS.  I seem to recall that if you don't use auto mount, you can get into situations where your system will hang for a minute waiting for timeouts if you loose connectivity between the host and the mounted storage.  Is that still an issue if you use the straight fstab method?  That's why I was starting down the auto mount way. 

 

Perhaps I should at least get the simple config working first.

 

Thanks again.  I probably won't get a chance to try this until tonight.

 

John

 

Don't worry about passwds, don't worry about users. Just edit your fstab, and the volumes will mount on boot. Once you have the edit(s) made, you can type:

 

sudo mount -a

 

and see if it is working.

 

The only thing I can recall about hanging mounts is if you mount them "hard", as apposed to "soft". In theory, hard mounts can hang the system if the volumes are not available, but I have never experienced that. If you have an issue, you can always add "soft" as an option to your fstab.

 

I use this all the time, and most of my home units are Linux of some sort. Hardly and issue for mounting.

 

Link to comment

sudo mount -a

 

and see if it is working.

 

I got it to work using fstab!  Thanks for you help.  Of course I spent the last 30 minutes fighting to get the correct fstab entry...

 

# my NAS connection

#

unraid:/mnt/user/Media  /home/osh/Media nfs defaults,nolock  0  0

 

 

I didn't have 'user' in there, since I hadn't created any users...  It didn't work, and it wasn't clear why.  Reading through some other support forum notes, I see other examples with user, and remembered you had shown that as well.

 

Thanks!

 

John

 

Link to comment

I had to add "nfsvers=3" because unRAID currently is running the Vers. 3 of NFS.

 

I was getting some weird behavior without that setting. I still get weird behavior, not seeing the size right, having to disconnect the mounts to get it all working correctly. It is better (for me anyway) with the nfsvers=3 setting.

 

The good news is that LimeTech is going to upgrade to NFS 4, and that will take away many of my issues.

 

A command you may need to know in the future:

 

sudo umount /where/the/mount/is

sudo mount -a

 

bkasten

 

Link to comment

I had to add "nfsvers=3" because unRAID currently is running the Vers. 3 of NFS.

 

I was getting some weird behavior without that setting. I still get weird behavior, not seeing the size right, having to disconnect the mounts to get it all working correctly. It is better (for me anyway) with the nfsvers=3 setting.

 

Yes, I started with the nfsvers=3 entry and received an error message.  I haven't used the NFS mount much yet, but I was able to copy a couple of 1 GB files without problem.

 

I've also not gotten the auto mount stuff to work too.  My main issue, it turns out, was not having the correct syntax for the shared drives on unRAID!

 

I do look forward to moving to v6 as soon as its considered stable. 

 

Thanks again,

 

John

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.